From 77cee11910a5bef35c8a643a5056cc4e2e083c6f Mon Sep 17 00:00:00 2001 From: Philip James Date: Tue, 22 Apr 2025 21:31:00 +0300 Subject: [PATCH 01/18] upgrade metadata --- metadata/macro/Cargo.toml | 12 + metadata/macro/src/lib.rs | 510 ++++++++++++++++++ metadata/program/Cargo.toml | 9 +- metadata/program/src/entrypoint.rs | 19 +- metadata/program/src/error.rs | 47 +- metadata/program/src/instruction.rs | 15 - metadata/program/src/instruction/metadata.rs | 41 ++ metadata/program/src/instruction/mod.rs | 49 ++ metadata/program/src/processor.rs | 171 ------ .../metadata/create_medatata_accounts.rs | 26 + .../program/src/processor/metadata/mod.rs | 5 + .../metadata/update_metadata_accounts.rs | 15 + metadata/program/src/processor/mod.rs | 65 +++ metadata/program/src/state.rs | 11 - metadata/program/src/state/collection.rs | 22 + metadata/program/src/state/creator.rs | 16 + metadata/program/src/state/data.rs | 27 + metadata/program/src/state/mod.rs | 23 + metadata/program/src/state/uses.rs | 20 + metadata/program/src/utils.rs | 7 - metadata/program/src/utils/mod.rs | 3 + metadata/program/src/utils/pda.rs | 1 + 22 files changed, 882 insertions(+), 232 deletions(-) create mode 100644 metadata/macro/Cargo.toml create mode 100644 metadata/macro/src/lib.rs delete mode 100644 metadata/program/src/instruction.rs create mode 100644 metadata/program/src/instruction/metadata.rs create mode 100644 metadata/program/src/instruction/mod.rs delete mode 100644 metadata/program/src/processor.rs create mode 100644 metadata/program/src/processor/metadata/create_medatata_accounts.rs create mode 100644 metadata/program/src/processor/metadata/mod.rs create mode 100644 metadata/program/src/processor/metadata/update_metadata_accounts.rs create mode 100644 metadata/program/src/processor/mod.rs delete mode 100644 metadata/program/src/state.rs create mode 100644 metadata/program/src/state/collection.rs create mode 100644 metadata/program/src/state/creator.rs create mode 100644 metadata/program/src/state/data.rs create mode 100644 metadata/program/src/state/mod.rs create mode 100644 metadata/program/src/state/uses.rs delete mode 100644 metadata/program/src/utils.rs create mode 100644 metadata/program/src/utils/mod.rs create mode 100644 metadata/program/src/utils/pda.rs diff --git a/metadata/macro/Cargo.toml b/metadata/macro/Cargo.toml new file mode 100644 index 00000000..d1cfdc01 --- /dev/null +++ b/metadata/macro/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "spl-token-metadata-context-derive" +version = "0.1.0" +edition = "2021" +license = "MIT" + +[lib] +proc-macro = true + +[dependencies] +quote = "1.0.21" +syn = { version = "1.0.103", features = ["extra-traits", "full"] } diff --git a/metadata/macro/src/lib.rs b/metadata/macro/src/lib.rs new file mode 100644 index 00000000..35e950a7 --- /dev/null +++ b/metadata/macro/src/lib.rs @@ -0,0 +1,510 @@ +use proc_macro::TokenStream; +use quote::quote; +use std::collections::HashMap; +use syn::{ + self, parse_macro_input, DeriveInput, Expr, ExprPath, GenericArgument, Lit, Meta, MetaList, + MetaNameValue, NestedMeta, Path, PathArguments, Type, TypePath, +}; + +#[derive(Default)] +struct Variant { + pub name: String, + pub tuple: Option, + pub accounts: Vec, + // (name, type, generic type) + pub args: Vec<(String, String, Option)>, +} + +#[derive(Debug)] +struct Account { + pub name: String, + pub optional: bool, +} + +// Helper account attribute (reusing from shank annotation). +const ACCOUNT_ATTRIBUTE: &str = "account"; +// Helper args attribute. +const ARGS_ATTRIBUTE: &str = "args"; +// Name property in the account attribute. +const NAME_PROPERTY: &str = "name"; +// Optional property in the account attribute. +const OPTIONAL_PROPERTY: &str = "optional"; + +#[proc_macro_derive(AccountContext, attributes(account, args))] +pub fn account_context_derive(input: TokenStream) -> TokenStream { + let ast = parse_macro_input!(input as DeriveInput); + + // identifies the accounts associated with each enum variant + + let variants = if let syn::Data::Enum(syn::DataEnum { ref variants, .. }) = ast.data { + let mut enum_variants = Vec::new(); + + for v in variants { + // extract the enum data (if there is one present) + let mut variant = Variant { + tuple: if let syn::Fields::Unnamed(syn::FieldsUnnamed { unnamed, .. }) = &v.fields { + match unnamed.first() { + Some(syn::Field { + ty: + Type::Path(TypePath { + path: Path { segments, .. }, + .. + }), + .. + }) => Some(segments.first().unwrap().ident.to_string()), + _ => None, + } + } else { + None + }, + name: v.ident.to_string(), + ..Default::default() + }; + + // parse the attribute of the variant + for a in &v.attrs { + let syn::Attribute { + path: syn::Path { segments, .. }, + .. + } = &a; + let mut skip = true; + let mut attribute = String::new(); + + for path in segments { + let ident = path.ident.to_string(); + // we are only interested in #[account] and #[args] attributes + if ident == ACCOUNT_ATTRIBUTE || ident == ARGS_ATTRIBUTE { + attribute = ident; + skip = false; + } + } + + if !skip { + if attribute == ACCOUNT_ATTRIBUTE { + let meta_tokens = a.parse_meta().unwrap(); + let nested_meta = if let Meta::List(MetaList { nested, .. }) = &meta_tokens + { + nested + } else { + panic!("#[account] requires attributes account name"); + }; + + // (name, optional) + let mut property: (Option, Option) = (None, None); + + for element in nested_meta { + match element { + // name = value (ignores any other attribute) + NestedMeta::Meta(Meta::NameValue(MetaNameValue { + path, + lit, + .. + })) => { + let ident = path.get_ident(); + if let Some(ident) = ident { + if *ident == NAME_PROPERTY { + let token = match lit { + // removes the surrounding "'s from string values" + Lit::Str(lit) => { + lit.token().to_string().replace('\"', "") + } + _ => panic!("Invalid value for property {ident}"), + }; + property.0 = Some(token); + } + } + } + // optional + NestedMeta::Meta(Meta::Path(path)) => { + let name = path.get_ident().map(|x| x.to_string()); + if let Some(name) = name { + if name == OPTIONAL_PROPERTY { + property.1 = Some(name); + } + } + } + _ => {} + } + } + variant.accounts.push(Account { + name: property.0.unwrap(), + optional: property.1.is_some(), + }); + } else if attribute == ARGS_ATTRIBUTE { + let args_tokens: syn::ExprType = a.parse_args().unwrap(); + // name + let name = match *args_tokens.expr { + Expr::Path(ExprPath { + path: Path { segments, .. }, + .. + }) => segments.first().unwrap().ident.to_string(), + _ => panic!("#[args] requires an expression 'name: type'"), + }; + // type + match *args_tokens.ty { + Type::Path(TypePath { + path: Path { segments, .. }, + .. + }) => { + let segment = segments.first().unwrap(); + + // check whether we are dealing with a generic type + let generic_ty = match &segment.arguments { + PathArguments::AngleBracketed(arguments) => { + if let Some(GenericArgument::Type(Type::Path(ty))) = + arguments.args.first() + { + Some( + ty.path.segments.first().unwrap().ident.to_string(), + ) + } else { + None + } + } + _ => None, + }; + + let ty = segment.ident.to_string(); + variant.args.push((name, ty, generic_ty)); + } + _ => panic!("#[args] requires an expression 'name: type'"), + } + } + } + } + + enum_variants.push(variant); + } + + enum_variants + } else { + panic!("No enum variants found"); + }; + + let mut account_structs = generate_accounts(&variants); + account_structs.extend(generate_builders(&variants)); + + account_structs +} + +/// Generates a struct for each enum variant. +/// +/// The struct will contain all shank annotated accounts and the impl block +/// will initialize them using the accounts iterators. It support the use of +/// optional accounts, which would generate an account field with an +/// `Option>` type. +/// +/// ```ignore +/// pub struct MyAccount<'a> { +/// my_first_account: solana_program::account_info::AccountInfo<'a>, +/// my_second_optional_account: Option>, +/// .. +/// } +/// impl<'a> MyAccount<'a> { +/// pub fn to_context( +/// accounts: &'a [solana_program::account_info::AccountInfo<'a>] +/// ) -> Result, solana_program::sysvar::slot_history::ProgramError> { +/// let account_info_iter = &mut accounts.iter(); +/// +/// let my_first_account = solana_program::account_info::next_account_info(account_info_iter)?; +/// +/// .. +/// +/// } +/// } +/// ``` +fn generate_accounts(variants: &[Variant]) -> TokenStream { + // build the trait implementation + let variant_structs = variants.iter().map(|variant| { + let name = syn::parse_str::(&variant.name).unwrap(); + // struct fields + let struct_fields = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(format!("{}_info", &account.name).as_str()).unwrap(); + if account.optional { + quote! { + pub #account_name: Option<&'a solana_program::account_info::AccountInfo<'a>> + } + } else { + quote! { + pub #account_name:&'a solana_program::account_info::AccountInfo<'a> + } + } + }); + // accounts initialization + let account_fields = variant.accounts.iter().enumerate().map(|(index, account)| { + let account_name = syn::parse_str::(format!("{}_info", &account.name).as_str()).unwrap(); + + if account.optional { + quote! { + #account_name: if accounts[#index].key == &crate::ID { None } else { Some(&accounts[#index]) } + } + } else { + quote! { + #account_name: &accounts[#index] + } + } + }); + // number of expected accounts + let expected = variant.accounts.len(); + + quote! { + pub struct #name<'a> { + #(#struct_fields,)* + } + impl<'a> #name<'a> { + pub fn to_context(accounts: &'a [solana_program::account_info::AccountInfo<'a>]) -> Result, solana_program::sysvar::slot_history::ProgramError> { + if accounts.len() < #expected { + return Err(solana_program::sysvar::slot_history::ProgramError::NotEnoughAccountKeys); + } + Ok(Context { + accounts: Self { + #(#account_fields,)* + }, + // not currently in use + //remaining_accounts: accounts[#expected..].to_vec(), + }) + } + } + } + }); + + TokenStream::from(quote! { + #(#variant_structs)* + }) +} + +fn generate_builders(variants: &[Variant]) -> TokenStream { + let mut default_pubkeys = HashMap::new(); + default_pubkeys.insert( + "system_program".to_string(), + syn::parse_str::("solana_program::system_program::ID").unwrap(), + ); + default_pubkeys.insert( + "spl_token_program".to_string(), + syn::parse_str::("crate::utils::SPL_TOKEN_ID").unwrap(), + ); + default_pubkeys.insert( + "spl_ata_program".to_string(), + syn::parse_str::("spl_associated_token_account::ID").unwrap(), + ); + default_pubkeys.insert( + "sysvar_instructions".to_string(), + syn::parse_str::("solana_program::sysvar::instructions::ID").unwrap(), + ); + default_pubkeys.insert( + "authorization_rules_program".to_string(), + syn::parse_str::("mpl_token_auth_rules::ID").unwrap(), + ); + + // build the trait implementation + let variant_structs = variants.iter().map(|variant| { + let name = syn::parse_str::(&variant.name).unwrap(); + + // struct block for the builder: this will contain both accounts and + // args for the builder + + // accounts + let struct_accounts = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(&account.name).unwrap(); + if account.optional { + quote! { + pub #account_name: Option + } + } else { + quote! { + pub #account_name: solana_program::pubkey::Pubkey + } + } + }); + + // args + let struct_args = variant.args.iter().map(|(name, ty, generic_ty)| { + let ident_ty = syn::parse_str::(ty).unwrap(); + let arg_ty = if let Some(genetic_ty) = generic_ty { + let arg_generic_ty = syn::parse_str::(genetic_ty).unwrap(); + quote! { #ident_ty<#arg_generic_ty> } + } else { + quote! { #ident_ty } + }; + let arg_name = syn::parse_str::(name).unwrap(); + + quote! { + pub #arg_name: #arg_ty + } + }); + + // builder block: this will have all accounts and args as optional fields + // that need to be set before the build method is called + + // accounts + let builder_accounts = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(&account.name).unwrap(); + quote! { + pub #account_name: Option + } + }); + + // accounts initialization + let builder_initialize_accounts = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(&account.name).unwrap(); + quote! { + #account_name: None + } + }); + + // args + let builder_args = variant.args.iter().map(|(name, ty, generic_ty)| { + let ident_ty = syn::parse_str::(ty).unwrap(); + let arg_ty = if let Some(genetic_ty) = generic_ty { + let arg_generic_ty = syn::parse_str::(genetic_ty).unwrap(); + quote! { #ident_ty<#arg_generic_ty> } + } else { + quote! { #ident_ty } + }; + let arg_name = syn::parse_str::(name).unwrap(); + + quote! { + pub #arg_name: Option<#arg_ty> + } + }); + + // args initialization + let builder_initialize_args = variant.args.iter().map(|(name, _ty, _generi_ty)| { + let arg_name = syn::parse_str::(name).unwrap(); + quote! { + #arg_name: None + } + }); + + // account setter methods + let builder_accounts_methods = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(&account.name).unwrap(); + quote! { + pub fn #account_name(&mut self, #account_name: solana_program::pubkey::Pubkey) -> &mut Self { + self.#account_name = Some(#account_name); + self + } + } + }); + + // args setter methods + let builder_args_methods = variant.args.iter().map(|(name, ty, generic_ty)| { + let ident_ty = syn::parse_str::(ty).unwrap(); + let arg_ty = if let Some(genetic_ty) = generic_ty { + let arg_generic_ty = syn::parse_str::(genetic_ty).unwrap(); + quote! { #ident_ty<#arg_generic_ty> } + } else { + quote! { #ident_ty } + }; + let arg_name = syn::parse_str::(name).unwrap(); + + quote! { + pub fn #arg_name(&mut self, #arg_name: #arg_ty) -> &mut Self { + self.#arg_name = Some(#arg_name); + self + } + } + }); + + // required accounts + let required_accounts = variant.accounts.iter().map(|account| { + let account_name = syn::parse_str::(&account.name).unwrap(); + + if account.optional { + quote! { + #account_name: self.#account_name + } + } else { + // are we dealing with a default pubkey? + if default_pubkeys.contains_key(&account.name) { + let pubkey = default_pubkeys.get(&account.name).unwrap(); + // we add the default key as the fallback value + quote! { + #account_name: self.#account_name.unwrap_or(#pubkey) + } + } + else { + // if not a default pubkey, we will need to have it set + quote! { + #account_name: self.#account_name.ok_or(concat!(stringify!(#account_name), " is not set"))? + } + } + } + }); + + // required args + let required_args = variant.args.iter().map(|(name, _ty, _generic_ty)| { + let arg_name = syn::parse_str::(name).unwrap(); + quote! { + #arg_name: self.#arg_name.clone().ok_or(concat!(stringify!(#arg_name), " is not set"))? + } + }); + + // args parameter list + let args = if let Some(args) = &variant.tuple { + let arg_ty = syn::parse_str::(args).unwrap(); + quote! { &mut self, args: #arg_ty } + } else { + quote! { &mut self } + }; + + // instruction args + let instruction_args = if let Some(args) = &variant.tuple { + let arg_ty = syn::parse_str::(args).unwrap(); + quote! { pub args: #arg_ty, } + } else { + quote! { } + }; + + // required instruction args + let required_instruction_args = if variant.tuple.is_some() { + quote! { args, } + } else { + quote! { } + }; + + // builder name + let builder_name = syn::parse_str::(&format!("{}Builder", name)).unwrap(); + + quote! { + pub struct #name { + #(#struct_accounts,)* + #(#struct_args,)* + #instruction_args + } + + pub struct #builder_name { + #(#builder_accounts,)* + #(#builder_args,)* + } + + impl #builder_name { + pub fn new() -> Box<#builder_name> { + Box::new(#builder_name { + #(#builder_initialize_accounts,)* + #(#builder_initialize_args,)* + }) + } + + #(#builder_accounts_methods)* + #(#builder_args_methods)* + + pub fn build(#args) -> Result, Box> { + Ok(Box::new(#name { + #(#required_accounts,)* + #(#required_args,)* + #required_instruction_args + })) + } + } + } + }); + + TokenStream::from(quote! { + pub mod builders { + use super::*; + + #(#variant_structs)* + } + }) +} diff --git a/metadata/program/Cargo.toml b/metadata/program/Cargo.toml index e18115fb..08e6732c 100644 --- a/metadata/program/Cargo.toml +++ b/metadata/program/Cargo.toml @@ -9,10 +9,17 @@ crate-type = ["cdylib", "lib"] [features] no-entrypoint = [] +serde-feature = ["serde", "serde_with"] test-bpf = [] [dependencies] borsh = "0.9" borsh-derive = "0.9" -thiserror = "1.0" +num-derive = "0.3" +num-traits = "0.2" +serde = { version = "1.0.149", optional = true } +serde_with = { version = "1.14.0", optional = true } +shank = { version = "0.3.0" } solana-program = {version = "0.1.4", path = "../../../bbachain/sdk/program"} +spl-token-metadata-context-derive = { version = "0.1.0", path = "../macro" } +thiserror = "1.0" diff --git a/metadata/program/src/entrypoint.rs b/metadata/program/src/entrypoint.rs index 1454d88d..a52d6258 100644 --- a/metadata/program/src/entrypoint.rs +++ b/metadata/program/src/entrypoint.rs @@ -1,15 +1,20 @@ use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, + program_error::PrintProgramError, pubkey::Pubkey, }; -use crate::processor::Processor; +use crate::{error::MetadataError, processor}; entrypoint!(process_instruction); - -fn process_instruction( - program_id: &Pubkey, - accounts: &[AccountInfo], +fn process_instruction<'a>( + program_id: &'a Pubkey, + accounts: &'a [AccountInfo<'a>], instruction_data: &[u8], ) -> ProgramResult { - Processor::process(program_id, accounts, instruction_data) + if let Err(error) = processor::process_instruction(program_id, accounts, instruction_data) { + // catch the error so we can print it + error.print::(); + return Err(error); + } + Ok(()) } diff --git a/metadata/program/src/error.rs b/metadata/program/src/error.rs index 891fe6a3..5ff5ea0b 100644 --- a/metadata/program/src/error.rs +++ b/metadata/program/src/error.rs @@ -1,26 +1,27 @@ -use solana_program::program_error::ProgramError; +use num_derive::FromPrimitive; +use solana_program::{ + decode_error::DecodeError, + msg, + program_error::{PrintProgramError, ProgramError}, +}; use thiserror::Error; -#[derive(Error, Debug, Copy, Clone)] +/// Errors that may be returned by the Metadata program. +#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)] pub enum MetadataError { - #[error("Name too long")] - NameTooLong, - #[error("Symbol too long")] - SymbolTooLong, - #[error("URI too long")] - UriTooLong, - #[error("Metadata account already initialized")] - AlreadyInitialized, - #[error("Metadata account not initialized")] - NotInitialized, - #[error("Invalid metadata authority")] - InvalidAuthority, - #[error("Invalid metadata PDA")] - InvalidPda, - #[error("Mint is not initialized")] - UninitializedMint, - #[error("Deserialization failed")] - DeserializationError, + /// 0 Failed to unpack instruction data + #[error("")] + InstructionUnpackError, + + /// 189 + #[error("Invalid or removed instruction")] + InvalidInstruction, +} + +impl PrintProgramError for MetadataError { + fn print(&self) { + msg!(&self.to_string()); + } } impl From for ProgramError { @@ -28,3 +29,9 @@ impl From for ProgramError { ProgramError::Custom(e as u32) } } + +impl DecodeError for MetadataError { + fn type_of() -> &'static str { + "Metadata Error" + } +} diff --git a/metadata/program/src/instruction.rs b/metadata/program/src/instruction.rs deleted file mode 100644 index 699d76e5..00000000 --- a/metadata/program/src/instruction.rs +++ /dev/null @@ -1,15 +0,0 @@ -use borsh::{BorshDeserialize, BorshSerialize}; - -#[derive(BorshDeserialize, BorshSerialize)] -pub enum TokenInstruction { - Initialize { - name: String, - symbol: String, - uri: String, - }, - Update { - name: String, - symbol: String, - uri: String, - }, -} diff --git a/metadata/program/src/instruction/metadata.rs b/metadata/program/src/instruction/metadata.rs new file mode 100644 index 00000000..c9e5f9a9 --- /dev/null +++ b/metadata/program/src/instruction/metadata.rs @@ -0,0 +1,41 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use solana_program::pubkey::Pubkey; +#[cfg(feature = "serde-feature")] +use { + serde::{Deserialize, Serialize}, + serde_with::{As, DisplayFromStr}, +}; + +use crate::state::{CollectionDetails, Data}; + +//----------------------+ +// Instruction args | +//----------------------+ + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +/// Args for create call +pub struct CreateMetadataAccountArgs { + /// Note that unique metadatas are disabled for now. + pub data: Data, + /// Whether you want your metadata to be updateable in the future. + pub is_mutable: bool, + /// If this is a collection parent NFT. + pub collection_details: Option, +} + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +/// Args for update call +pub struct UpdateMetadataAccountArgs { + pub data: Option, + #[cfg_attr( + feature = "serde-feature", + serde(with = "As::>") + )] + pub update_authority: Option, + pub primary_sale_happened: Option, + pub is_mutable: Option, +} diff --git a/metadata/program/src/instruction/mod.rs b/metadata/program/src/instruction/mod.rs new file mode 100644 index 00000000..bcebb963 --- /dev/null +++ b/metadata/program/src/instruction/mod.rs @@ -0,0 +1,49 @@ +mod metadata; + +use borsh::{BorshDeserialize, BorshSerialize}; +pub use metadata::*; +#[cfg(feature = "serde-feature")] +use serde::{Deserialize, Serialize}; +use shank::ShankInstruction; +use spl_token_metadata_context_derive::AccountContext; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +/// Instructions supported by the Metadata program. +#[derive(BorshSerialize, BorshDeserialize, Clone, ShankInstruction, AccountContext)] +// #[rustfmt::skip] +pub enum MetadataInstruction { + /// Create Metadata object. + #[account( + 0, + writable, + name = "metadata", + desc = "Metadata key (pda of ['metadata', program id, mint id])" + )] + #[account(1, name = "mint", desc = "Mint of token asset")] + #[account(2, signer, name = "mint_authority", desc = "Mint authority")] + #[account(3, signer, writable, name = "payer", desc = "payer")] + #[account( + 4, + optional_signer, + name = "update_authority", + desc = "update authority info" + )] + #[account(5, name = "system_program", desc = "System program")] + #[account(6, optional, name = "rent", desc = "Rent info")] + #[legacy_optional_accounts_strategy] + CreateMetadataAccount(CreateMetadataAccountArgs), + + /// Update a Metadata with is_mutable as a parameter + #[account(0, writable, name = "metadata", desc = "Metadata account")] + #[account(1, signer, name = "update_authority", desc = "Update authority key")] + UpdateMetadataAccount(UpdateMetadataAccountArgs), +} + +pub struct Context { + pub accounts: T, +} + +pub trait InstructionBuilder { + fn instruction(&self) -> solana_program::instruction::Instruction; +} diff --git a/metadata/program/src/processor.rs b/metadata/program/src/processor.rs deleted file mode 100644 index b872c987..00000000 --- a/metadata/program/src/processor.rs +++ /dev/null @@ -1,171 +0,0 @@ -use borsh::{BorshDeserialize, BorshSerialize}; -use solana_program::{ - account_info::{next_account_info, AccountInfo}, - entrypoint::ProgramResult, - msg, - program::invoke_signed, - program_error::ProgramError, - pubkey::Pubkey, - rent::Rent, - system_instruction, - sysvar::Sysvar, -}; - -use crate::{ - constants::{MAX_NAME_LEN, MAX_SYMBOL_LEN, MAX_URI_LEN, METADATA_SEED}, - error::MetadataError, - instruction::TokenInstruction, - state::TokenMetadata, - utils::derive_metadata_pda, -}; - -pub struct Processor; -impl Processor { - pub fn process( - program_id: &Pubkey, - accounts: &[AccountInfo], - instruction_data: &[u8], - ) -> ProgramResult { - let instruction = TokenInstruction::try_from_slice(instruction_data) - .map_err(|_| ProgramError::InvalidInstructionData)?; - match instruction { - TokenInstruction::Initialize { name, symbol, uri } => { - Self::process_initialize(program_id, accounts, name, symbol, uri) - } - TokenInstruction::Update { name, symbol, uri } => { - Self::process_update(program_id, accounts, name, symbol, uri) - } - } - } - - /** - * Validates the metadata fields for length. - * - * @param name: The name of the token. - * @param symbol: The symbol of the token. - * @param uri: The URI of the token. - * @return: ProgramResult indicating success or failure. - * - */ - fn validate_metadata_fields(name: &str, symbol: &str, uri: &str) -> ProgramResult { - if name.len() > MAX_NAME_LEN { - msg!("Error: name too long"); - return Err(MetadataError::NameTooLong.into()); - } - if symbol.len() > MAX_SYMBOL_LEN { - msg!("Error: symbol too long"); - return Err(MetadataError::SymbolTooLong.into()); - } - if uri.len() > MAX_URI_LEN { - msg!("Error: uri too long"); - return Err(MetadataError::UriTooLong.into()); - } - Ok(()) - } - - // Processing the Initialize instruction - fn process_initialize( - program_id: &Pubkey, - accounts: &[AccountInfo], - name: String, - symbol: String, - uri: String, - ) -> ProgramResult { - // Validate the metadata fields - Self::validate_metadata_fields(&name, &symbol, &uri)?; - - let account_info_iter = &mut accounts.iter(); - let metadata_account = next_account_info(account_info_iter)?; - let mint_account = next_account_info(account_info_iter)?; - let authority = next_account_info(account_info_iter)?; - let system_program = next_account_info(account_info_iter)?; - - // Check if the metadata account is already initialized - if !metadata_account.data_is_empty() { - return Err(MetadataError::AlreadyInitialized.into()); - } - - // Create PDA account - let (pda, bump_seed) = derive_metadata_pda(mint_account.key, program_id); - if pda != *metadata_account.key { - return Err(MetadataError::InvalidPda.into()); - } - - // Calculate the size of the metadata account - let data_size = 1 + 32 + 4 + name.len() + 4 + symbol.len() + 4 + uri.len() + 32; // bool + Pubkey + String (len + data) - let rent = Rent::get()?.minimum_balance(data_size); - - // Create the metadata account - invoke_signed( - &system_instruction::create_account( - authority.key, - metadata_account.key, - rent, - data_size as u64, - program_id, - ), - &[ - authority.clone(), - metadata_account.clone(), - system_program.clone(), - ], - &[&[METADATA_SEED, mint_account.key.as_ref(), &[bump_seed]]], - )?; - - // Write metadata to the account - let metadata = TokenMetadata { - mint: *mint_account.key, - name, - symbol, - uri, - authority: *authority.key, - }; - metadata.serialize(&mut &mut metadata_account.data.borrow_mut()[..])?; - - msg!("Metadata initialized for mint: {}", mint_account.key); - Ok(()) - } - - // Processing the Update instruction - fn process_update( - program_id: &Pubkey, - accounts: &[AccountInfo], - name: String, - symbol: String, - uri: String, - ) -> ProgramResult { - // Validate the metadata fields - Self::validate_metadata_fields(&name, &symbol, &uri)?; - - let account_info_iter = &mut accounts.iter(); - let metadata_account = next_account_info(account_info_iter)?; - let mint_account = next_account_info(account_info_iter)?; - let authority = next_account_info(account_info_iter)?; - - // Check mint account - let (pda, _bump_seed) = derive_metadata_pda(mint_account.key, program_id); - if pda != *metadata_account.key { - return Err(MetadataError::InvalidPda.into()); - } - - // Check if the metadata account is already initialized - let mut metadata = TokenMetadata::deserialize(&mut &metadata_account.data.borrow()[..])?; - if metadata.name.is_empty() || metadata.symbol.is_empty() || metadata.uri.is_empty() { - return Err(MetadataError::NotInitialized.into()); - } - - // Check if the authority is correct - if metadata.authority != *authority.key { - return Err(MetadataError::InvalidAuthority.into()); - } - - // Update metadata - metadata.name = name; - metadata.symbol = symbol; - metadata.uri = uri; - metadata.serialize(&mut &mut metadata_account.data.borrow_mut()[..])?; - - msg!("Metadata updated for mint: {}", mint_account.key); - Ok(()) - } -} diff --git a/metadata/program/src/processor/metadata/create_medatata_accounts.rs b/metadata/program/src/processor/metadata/create_medatata_accounts.rs new file mode 100644 index 00000000..261465ea --- /dev/null +++ b/metadata/program/src/processor/metadata/create_medatata_accounts.rs @@ -0,0 +1,26 @@ +use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; + +use crate::{ + processor::all_account_infos, + state::{CollectionDetails, Data}, +}; + +pub fn process_create_metadata_accounts<'a>( + program_id: &'a Pubkey, + accounts: &'a [AccountInfo<'a>], + data: Data, + is_mutable: bool, + collection_details: Option, +) -> ProgramResult { + all_account_infos!( + accounts, + metadata_account_info, + mint_info, + mint_authority_info, + payer_account_info, + update_authority_info, + system_account_info + ); + + todo!("process_create_metadata_accounts"); +} diff --git a/metadata/program/src/processor/metadata/mod.rs b/metadata/program/src/processor/metadata/mod.rs new file mode 100644 index 00000000..cdc99578 --- /dev/null +++ b/metadata/program/src/processor/metadata/mod.rs @@ -0,0 +1,5 @@ +mod create_medatata_accounts; +mod update_metadata_accounts; + +pub use create_medatata_accounts::*; +pub use update_metadata_accounts::*; diff --git a/metadata/program/src/processor/metadata/update_metadata_accounts.rs b/metadata/program/src/processor/metadata/update_metadata_accounts.rs new file mode 100644 index 00000000..58e95871 --- /dev/null +++ b/metadata/program/src/processor/metadata/update_metadata_accounts.rs @@ -0,0 +1,15 @@ +use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; + +use crate::{error::MetadataError, processor::all_account_infos, state::Data}; + +// Update existing account instruction +pub fn process_update_metadata_accounts( + program_id: &Pubkey, + accounts: &[AccountInfo], + optional_data: Option, + update_authority: Option, + primary_sale_happened: Option, + is_mutable: Option, +) -> ProgramResult { + todo!("process_update_metadata_accounts"); +} diff --git a/metadata/program/src/processor/mod.rs b/metadata/program/src/processor/mod.rs new file mode 100644 index 00000000..80afe401 --- /dev/null +++ b/metadata/program/src/processor/mod.rs @@ -0,0 +1,65 @@ +mod metadata; + +use borsh::BorshDeserialize; +pub use metadata::*; +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, msg, program_error::ProgramError, + pubkey::Pubkey, +}; + +use crate::{error::MetadataError, instruction::MetadataInstruction}; + +/// Process Token Metadata instructions. +/// +/// The processor is divided into two parts: +/// * It first tries to match the instruction into the new API; +/// * If it is not one of the new instructions, it checks that any metadata +/// account is not a pNFT before forwarding the transaction processing to +/// the "legacy" processor. +pub fn process_instruction<'a>( + program_id: &'a Pubkey, + accounts: &'a [AccountInfo<'a>], + input: &[u8], +) -> ProgramResult { + let (variant, _args) = input + .split_first() + .ok_or(MetadataError::InvalidInstruction)?; + + let instruction = MetadataInstruction::try_from_slice(input) + .map_err(|_| ProgramError::InvalidInstructionData)?; + + match instruction { + MetadataInstruction::CreateMetadataAccount(args) => { + msg!("IX: Create Metadata Accounts"); + process_create_metadata_accounts( + program_id, + accounts, + args.data, + args.is_mutable, + args.collection_details, + ) + } + MetadataInstruction::UpdateMetadataAccount(args) => { + msg!("IX: Update Metadata Accounts"); + process_update_metadata_accounts( + program_id, + accounts, + args.data, + args.update_authority, + args.primary_sale_happened, + args.is_mutable, + ) + } + } +} + +macro_rules! all_account_infos { + ($accounts:expr, $($account:ident),*) => { + let [$($account),*] = match $accounts { + [$($account),*, ..] => [$($account),*], + _ => return Err(solana_program::program_error::ProgramError::NotEnoughAccountKeys), + }; + }; +} + +pub(crate) use all_account_infos; diff --git a/metadata/program/src/state.rs b/metadata/program/src/state.rs deleted file mode 100644 index ffc70df5..00000000 --- a/metadata/program/src/state.rs +++ /dev/null @@ -1,11 +0,0 @@ -use borsh::{BorshDeserialize, BorshSerialize}; -use solana_program::pubkey::Pubkey; - -#[derive(BorshSerialize, BorshDeserialize, Debug)] -pub struct TokenMetadata { - pub mint: Pubkey, - pub name: String, - pub symbol: String, - pub uri: String, - pub authority: Pubkey, -} diff --git a/metadata/program/src/state/collection.rs b/metadata/program/src/state/collection.rs new file mode 100644 index 00000000..95fd58bb --- /dev/null +++ b/metadata/program/src/state/collection.rs @@ -0,0 +1,22 @@ +use super::*; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +pub struct Collection { + pub verified: bool, + #[cfg_attr(feature = "serde-feature", serde(with = "As::"))] + pub key: Pubkey, +} + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +pub enum CollectionDetails { + V1 { + size: u64, + }, + V2 { + padding: [u8; 8], + }, +} diff --git a/metadata/program/src/state/creator.rs b/metadata/program/src/state/creator.rs new file mode 100644 index 00000000..9779b208 --- /dev/null +++ b/metadata/program/src/state/creator.rs @@ -0,0 +1,16 @@ +use super::*; + +pub const MAX_CREATOR_LIMIT: usize = 5; + +pub const MAX_CREATOR_LEN: usize = 32 + 1 + 1; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Debug, Clone, Eq, Hash)] +pub struct Creator { + #[cfg_attr(feature = "serde-feature", serde(with = "As::"))] + pub address: Pubkey, + pub verified: bool, + // In percentages, NOT basis points ;) Watch out! + pub share: u8, +} diff --git a/metadata/program/src/state/data.rs b/metadata/program/src/state/data.rs new file mode 100644 index 00000000..4f23e016 --- /dev/null +++ b/metadata/program/src/state/data.rs @@ -0,0 +1,27 @@ +use super::*; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +pub struct Data { + /// The name of the asset + pub name: String, + + /// The symbol for the asset + pub symbol: String, + + /// URI pointing to JSON representing the asset + pub uri: String, + + /// Royalty basis points that goes to creators in secondary sales (0-10000) + pub seller_fee_basis_points: u16, + + /// Array of creators, optional + pub creators: Option>, + + /// Collection + pub collection: Option, + + /// Uses + pub uses: Option, +} diff --git a/metadata/program/src/state/mod.rs b/metadata/program/src/state/mod.rs new file mode 100644 index 00000000..36b5e2e6 --- /dev/null +++ b/metadata/program/src/state/mod.rs @@ -0,0 +1,23 @@ +pub(crate) mod collection; +pub(crate) mod creator; +pub(crate) mod data; +pub(crate) mod uses; + +pub use collection::*; +pub use creator::*; +pub use data::*; +pub use uses::*; + +use { + borsh::{BorshDeserialize, BorshSerialize}, + num_derive::FromPrimitive, + // num_traits::FromPrimitive, + solana_program::pubkey::Pubkey, +}; + +#[cfg(feature = "serde-feature")] +use { + serde::{Deserialize, Deserializer, Serialize}, + serde_with::{As, DisplayFromStr}, + std::str::FromStr, +}; diff --git a/metadata/program/src/state/uses.rs b/metadata/program/src/state/uses.rs new file mode 100644 index 00000000..646b408d --- /dev/null +++ b/metadata/program/src/state/uses.rs @@ -0,0 +1,20 @@ +use super::*; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone, FromPrimitive)] +pub enum UseMethod { + Burn, + Multiple, + Single, +} + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +pub struct Uses { + // 17 bytes + Option byte + pub use_method: UseMethod, //1 + pub remaining: u64, //8 + pub total: u64, //8 +} diff --git a/metadata/program/src/utils.rs b/metadata/program/src/utils.rs deleted file mode 100644 index df2c870f..00000000 --- a/metadata/program/src/utils.rs +++ /dev/null @@ -1,7 +0,0 @@ -use solana_program::pubkey::Pubkey; - -use crate::constants::METADATA_SEED; - -pub fn derive_metadata_pda(mint: &Pubkey, program_id: &Pubkey) -> (Pubkey, u8) { - Pubkey::find_program_address(&[METADATA_SEED, mint.as_ref()], program_id) -} diff --git a/metadata/program/src/utils/mod.rs b/metadata/program/src/utils/mod.rs new file mode 100644 index 00000000..40deb9be --- /dev/null +++ b/metadata/program/src/utils/mod.rs @@ -0,0 +1,3 @@ +pub(crate) mod pda; + +pub use pda::*; diff --git a/metadata/program/src/utils/pda.rs b/metadata/program/src/utils/pda.rs new file mode 100644 index 00000000..f8d978cd --- /dev/null +++ b/metadata/program/src/utils/pda.rs @@ -0,0 +1 @@ +pub const PREFIX: &str = "metadata"; From 983e65c7f58a77f9dfc050f49e58ce8b239ab1e3 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 18:03:27 +0300 Subject: [PATCH 02/18] updated --- Cargo.lock | 479 +++++++++++------- Cargo.toml | 1 + metadata/program/Cargo.toml | 1 + metadata/program/src/assertions/metadata.rs | 137 +++++ metadata/program/src/assertions/misc.rs | 40 ++ metadata/program/src/assertions/mod.rs | 4 + metadata/program/src/error.rs | 40 ++ metadata/program/src/lib.rs | 8 +- metadata/program/src/{utils => }/pda.rs | 0 .../metadata/create_medatata_accounts.rs | 30 ++ metadata/program/src/state/fee.rs | 17 + metadata/program/src/state/metadata.rs | 77 +++ metadata/program/src/state/mod.rs | 101 +++- metadata/program/src/utils/fee.rs | 55 ++ metadata/program/src/utils/metadata.rs | 112 ++++ metadata/program/src/utils/mod.rs | 5 +- metadata/utils/Cargo.toml | 21 + metadata/utils/src/account.rs | 56 ++ metadata/utils/src/assertions.rs | 18 + metadata/utils/src/lib.rs | 9 + metadata/utils/src/misc.rs | 26 + metadata/utils/src/token/assertions.rs | 9 + metadata/utils/src/token/mod.rs | 5 + metadata/utils/src/token/utils.rs | 23 + 24 files changed, 1067 insertions(+), 207 deletions(-) create mode 100644 metadata/program/src/assertions/metadata.rs create mode 100644 metadata/program/src/assertions/misc.rs create mode 100644 metadata/program/src/assertions/mod.rs rename metadata/program/src/{utils => }/pda.rs (100%) create mode 100644 metadata/program/src/state/fee.rs create mode 100644 metadata/program/src/state/metadata.rs create mode 100644 metadata/program/src/utils/fee.rs create mode 100644 metadata/program/src/utils/metadata.rs create mode 100644 metadata/utils/Cargo.toml create mode 100644 metadata/utils/src/account.rs create mode 100644 metadata/utils/src/assertions.rs create mode 100644 metadata/utils/src/lib.rs create mode 100644 metadata/utils/src/misc.rs create mode 100644 metadata/utils/src/token/assertions.rs create mode 100644 metadata/utils/src/token/mod.rs create mode 100644 metadata/utils/src/token/utils.rs diff --git a/Cargo.lock b/Cargo.lock index 988c1688..e8fdfa44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -165,9 +165,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "synstructure", ] @@ -177,9 +177,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -241,9 +241,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -252,9 +252,9 @@ version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -388,8 +388,8 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "regex", "rustc-hash", "shlex", @@ -504,8 +504,8 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.36", - "syn 1.0.91", + "proc-macro2 1.0.95", + "syn 1.0.109", ] [[package]] @@ -514,9 +514,9 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -525,9 +525,9 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -605,9 +605,9 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562e382481975bc61d11275ac5e62a19abd00b0547d99516a415336f183dcd0e" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -664,11 +664,11 @@ dependencies = [ "heck 0.3.3", "indexmap", "log", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "serde", "serde_json", - "syn 1.0.91", + "syn 1.0.109", "tempfile", "toml", ] @@ -1031,10 +1031,10 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "strsim 0.10.0", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -1044,8 +1044,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.14", - "syn 1.0.91", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1100,9 +1100,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1111,9 +1111,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b24629208e87a2d8b396ff43b15c4afb0a69cea3fbbaa9ed9b92b7c02f0aed73" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1123,10 +1123,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -1217,9 +1217,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1293,9 +1293,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f86b50932a01e7ec5c06160492ab660fb19b6bb2a7878030dd6cd68d21df9d4d" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1334,9 +1334,9 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1347,9 +1347,9 @@ checksum = "0b166c9e378360dd5a6666a9604bb4f54ae0cac39023ffbac425e917a2a04fef" dependencies = [ "num-bigint 0.4.3", "num-traits", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1359,9 +1359,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" dependencies = [ "once_cell", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -1586,9 +1586,9 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -2106,9 +2106,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "unindent", ] @@ -2234,9 +2234,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -2623,9 +2623,9 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -2639,7 +2639,7 @@ dependencies = [ "mpl-token-vault", "num-derive", "num-traits", - "shank", + "shank 0.0.3", "solana-program 1.10.33", "spl-associated-token-account 1.0.5", "spl-token 3.3.0", @@ -2779,9 +2779,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -2853,9 +2853,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5249369707a1e07b39f78d98c8f34e00aca7dcb053812fdbb5ad7be82c1bba38" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -2979,9 +2979,9 @@ checksum = "ed9a247206016d424fe8497bc611e510887af5c261fbbf977877c4bb55ca4d82" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3132,9 +3132,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3173,9 +3173,9 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b95af56fee93df76d721d356ac1ca41fccf168bc448eb14049234df764ba3e76" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3264,8 +3264,8 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b83ec2d0af5c5c556257ff52c9f98934e243b9fd39604bfb2a9b75ec2e97f18" dependencies = [ - "proc-macro2 1.0.36", - "syn 1.0.91", + "proc-macro2 1.0.95", + "syn 1.0.109", ] [[package]] @@ -3294,9 +3294,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "version_check", ] @@ -3306,8 +3306,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "version_check", ] @@ -3328,11 +3328,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -3425,9 +3425,9 @@ checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3438,9 +3438,9 @@ checksum = "df35198f0777b75e9ff669737c6da5136b59dba33cf5a010a6d1cc4d56defc6f" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3495,8 +3495,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67701eb32b1f9a9722b4bc54b548ff9d7ebfded011c12daece7b9063be1fd755" dependencies = [ "pyo3-macros-backend", - "quote 1.0.14", - "syn 1.0.91", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3505,10 +3505,10 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f44f09e825ee49a105f2c7b23ebee50886a9aee0746f4dd5a704138a64b0218a" dependencies = [ - "proc-macro2 1.0.36", + "proc-macro2 1.0.95", "pyo3-build-config", - "quote 1.0.14", - "syn 1.0.91", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -3597,11 +3597,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.14" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ - "proc-macro2 1.0.36", + "proc-macro2 1.0.95", ] [[package]] @@ -4054,9 +4054,9 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -4125,9 +4125,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -4143,13 +4143,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 2.0.56", ] [[package]] @@ -4192,9 +4192,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -4239,9 +4239,9 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -4251,10 +4251,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1b95bb2f4f624565e8fe8140c789af7e2082c0e0561b5a82a1b678baa9703dc" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustversion", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -4360,7 +4360,16 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c7f8aac4c67081e718ff2a7754a6264774a0eaa6ed64a6e94b1ec1c17af200" dependencies = [ - "shank_macro", + "shank_macro 0.0.3", +] + +[[package]] +name = "shank" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c9395612d493b69a522725eef78a095f199d43eeb847f4a4b77ec0cacab535" +dependencies = [ + "shank_macro 0.3.0", ] [[package]] @@ -4369,10 +4378,23 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9a7538be7f2a6530a37d4e03de34569a1f27a2287b3efe06732d7e5648a9105" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "shank_macro_impl", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "shank_macro_impl 0.0.3", + "syn 1.0.109", +] + +[[package]] +name = "shank_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8abef069c02e15f62233679b1e71f3152fac10f90b3ff89ebbad6a25b7497754" +dependencies = [ + "proc-macro2 1.0.95", + "quote 1.0.40", + "shank_macro_impl 0.3.0", + "shank_render", + "syn 1.0.109", ] [[package]] @@ -4382,10 +4404,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4679c7294e45b98031bade3d50f5b01a562962176d76058af69e21e195919190" dependencies = [ "anyhow", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "serde", - "syn 1.0.91", + "syn 1.0.109", +] + +[[package]] +name = "shank_macro_impl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d3d92bfcc6e08f882f2264d774d1a2f46dc36122adc1b76416ba6405a29a9c" +dependencies = [ + "anyhow", + "proc-macro2 1.0.95", + "quote 1.0.40", + "serde", + "syn 1.0.109", +] + +[[package]] +name = "shank_render" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a2ea9c6dd95ea311b3b81e63cf4e9c808ed04b098819e6d2c4b1a467d587203" +dependencies = [ + "proc-macro2 1.0.95", + "quote 1.0.40", + "shank_macro_impl 0.3.0", ] [[package]] @@ -4931,10 +4977,10 @@ dependencies = [ name = "solana-frozen-abi-macro" version = "0.1.4" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -4943,10 +4989,10 @@ version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "635c60ac96b1347af272c625465068b908aff919d19f29b5795a44310310494d" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustc_version 0.4.0", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -5540,10 +5586,10 @@ name = "solana-sdk-macro" version = "0.1.4" dependencies = [ "bs58", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustversion", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -5553,10 +5599,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b8bcac4394644f21dc013e932a7df9f536fcecef3e5df43fe362b4ec532ce30" dependencies = [ "bs58", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustversion", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -6442,10 +6488,25 @@ version = "0.1.0" dependencies = [ "borsh", "borsh-derive", + "num-derive", + "num-traits", + "serde", + "serde_with", + "shank 0.3.0", "solana-program 0.1.4", + "spl-token-metadata-context-derive", + "spl-utils", "thiserror", ] +[[package]] +name = "spl-token-metadata-context-derive" +version = "0.1.0" +dependencies = [ + "quote 1.0.40", + "syn 1.0.109", +] + [[package]] name = "spl-token-swap" version = "3.0.0" @@ -6477,6 +6538,15 @@ dependencies = [ "spl-token-swap", ] +[[package]] +name = "spl-utils" +version = "0.1.0" +dependencies = [ + "arrayref", + "solana-program 0.1.4", + "spl-token-2022 0.4.2", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -6532,11 +6602,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "serde", "serde_derive", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -6546,13 +6616,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -6600,10 +6670,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "rustversion", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -6631,13 +6701,24 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.91" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "unicode-xid 0.2.2", + "proc-macro2 1.0.95", + "quote 1.0.40", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2415488199887523e74fd9a5f7be804dfd42d868ae0eca382e3917094d210e" +dependencies = [ + "proc-macro2 1.0.95", + "quote 1.0.40", + "unicode-ident", ] [[package]] @@ -6652,9 +6733,9 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "unicode-xid 0.2.2", ] @@ -6722,9 +6803,9 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -6800,9 +6881,9 @@ version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -6875,10 +6956,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.36", - "quote 1.0.14", + "proc-macro2 1.0.95", + "quote 1.0.40", "standback", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -6951,9 +7032,9 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -7142,10 +7223,10 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" dependencies = [ - "proc-macro2 1.0.36", + "proc-macro2 1.0.95", "prost-build 0.9.0", - "quote 1.0.14", - "syn 1.0.91", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -7155,10 +7236,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d17087af5c80e5d5fc8ba9878e60258065a0a757e35efe7a05b7904bece1943" dependencies = [ "prettyplease", - "proc-macro2 1.0.36", + "proc-macro2 1.0.95", "prost-build 0.10.0", - "quote 1.0.14", - "syn 1.0.91", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -7231,9 +7312,9 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", ] [[package]] @@ -7351,6 +7432,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -7558,9 +7645,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -7582,7 +7669,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ - "quote 1.0.14", + "quote 1.0.40", "wasm-bindgen-macro-support", ] @@ -7592,9 +7679,9 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7810,9 +7897,9 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ - "proc-macro2 1.0.36", - "quote 1.0.14", - "syn 1.0.91", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 1.0.109", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 545d97a6..7fb36b09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ members = [ "libraries/math", "memo/program", "metadata/program", + "metadata/utils", "name-service/program", "record/program", "shared-memory/program", diff --git a/metadata/program/Cargo.toml b/metadata/program/Cargo.toml index 08e6732c..4060b5cf 100644 --- a/metadata/program/Cargo.toml +++ b/metadata/program/Cargo.toml @@ -22,4 +22,5 @@ serde_with = { version = "1.14.0", optional = true } shank = { version = "0.3.0" } solana-program = {version = "0.1.4", path = "../../../bbachain/sdk/program"} spl-token-metadata-context-derive = { version = "0.1.0", path = "../macro" } +spl-utils = { version = "0.1.0", path = "../utils" } thiserror = "1.0" diff --git a/metadata/program/src/assertions/metadata.rs b/metadata/program/src/assertions/metadata.rs new file mode 100644 index 00000000..6d534199 --- /dev/null +++ b/metadata/program/src/assertions/metadata.rs @@ -0,0 +1,137 @@ +// use solana_program::pubkey::Pubkey; + +// use crate::state::{Data, Metadata}; + +// pub fn assert_data_valid( +// data: &Data, +// update_authority: &Pubkey, +// existing_metadata: &Metadata, +// allow_direct_creator_writes: bool, +// update_authority_is_signer: bool, +// ) -> ProgramResult { +// if data.name.len() > MAX_NAME_LENGTH { +// return Err(MetadataError::NameTooLong.into()); +// } + +// if data.symbol.len() > MAX_SYMBOL_LENGTH { +// return Err(MetadataError::SymbolTooLong.into()); +// } + +// if data.uri.len() > MAX_URI_LENGTH { +// return Err(MetadataError::UriTooLong.into()); +// } + +// if data.seller_fee_basis_points > 10000 { +// return Err(MetadataError::InvalidBasisPoints.into()); +// } + +// // If the user passes in creators we get a reference to it, otherwise if the user passes in +// // None we make sure no current creators are verified before returning and allowing them to set +// // creators field to None. +// let creators = match data.creators { +// Some(ref creators) => creators, +// None => { +// if let Some(ref existing_creators) = existing_metadata.data.creators { +// if existing_creators.iter().any(|c| c.verified) { +// return Err(MetadataError::CannotRemoveVerifiedCreator.into()); +// } +// } +// return Ok(()); +// } +// }; + +// if creators.len() > MAX_CREATOR_LIMIT { +// return Err(MetadataError::CreatorsTooLong.into()); +// } + +// if creators.is_empty() { +// return Err(MetadataError::CreatorsMustBeAtleastOne.into()); +// } + +// // Store caller-supplied creator's array into a hashmap for direct lookup. +// let new_creators_map: HashMap<&Pubkey, &Creator> = +// creators.iter().map(|c| (&c.address, c)).collect(); + +// // Do not allow duplicate entries in the creator's array. +// if new_creators_map.len() != creators.len() { +// return Err(MetadataError::DuplicateCreatorAddress.into()); +// } + +// // If there is an existing creator's array, store this in a hashmap as well. +// let existing_creators_map: Option> = existing_metadata +// .data +// .creators +// .as_ref() +// .map(|existing_creators| existing_creators.iter().map(|c| (&c.address, c)).collect()); + +// // Loop over new creator's map. +// let mut share_total: u8 = 0; +// for (address, creator) in &new_creators_map { +// // Add up creator shares. After looping through all creators, will +// // verify it adds up to 100%. +// share_total = share_total +// .checked_add(creator.share) +// .ok_or(MetadataError::NumericalOverflowError)?; + +// // If this flag is set we are allowing any and all creators to be marked as verified +// // without further checking. This can only be done in special circumstances when the +// // metadata is fully trusted such as when minting a limited edition. Note we are still +// // checking that creator share adds up to 100%. +// if allow_direct_creator_writes { +// continue; +// } + +// // If this specific creator (of this loop iteration) is a signer and an update +// // authority, then we are fine with this creator either setting or clearing its +// // own `creator.verified` flag. +// if update_authority_is_signer && **address == *update_authority { +// continue; +// } + +// // If the previous two conditions are not true then we check the state in the existing +// // metadata creators array (if it exists) before allowing `creator.verified` to be set. +// if let Some(existing_creators_map) = &existing_creators_map { +// if existing_creators_map.contains_key(address) { +// // If this specific creator (of this loop iteration) is in the existing +// // creator's array, then it's `creator.verified` flag must match the existing +// // state. +// if creator.verified && !existing_creators_map[address].verified { +// return Err(MetadataError::CannotVerifyAnotherCreator.into()); +// } else if !creator.verified && existing_creators_map[address].verified { +// return Err(MetadataError::CannotUnverifyAnotherCreator.into()); +// } +// } else if creator.verified { +// // If this specific creator is not in the existing creator's array, then we +// // cannot set `creator.verified`. +// return Err(MetadataError::CannotVerifyAnotherCreator.into()); +// } +// } else if creator.verified { +// // If there is no existing creators array, we cannot set `creator.verified`. +// return Err(MetadataError::CannotVerifyAnotherCreator.into()); +// } +// } + +// // Ensure share total is 100%. +// if share_total != 100 { +// return Err(MetadataError::ShareTotalMustBe100.into()); +// } + +// // Next make sure there were not any existing creators that were already verified but not +// // listed in the new creator's array. +// if allow_direct_creator_writes { +// return Ok(()); +// } else if let Some(existing_creators_map) = &existing_creators_map { +// for (address, existing_creator) in existing_creators_map { +// // If this specific existing creator (of this loop iteration is a signer and an +// // update authority, then we are fine with this creator clearing its own +// // `creator.verified` flag. +// if update_authority_is_signer && **address == *update_authority { +// continue; +// } else if !new_creators_map.contains_key(address) && existing_creator.verified { +// return Err(MetadataError::CannotUnverifyAnotherCreator.into()); +// } +// } +// } + +// Ok(()) +// } diff --git a/metadata/program/src/assertions/misc.rs b/metadata/program/src/assertions/misc.rs new file mode 100644 index 00000000..2e8ebde6 --- /dev/null +++ b/metadata/program/src/assertions/misc.rs @@ -0,0 +1,40 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, program_option::COption, pubkey::Pubkey, +}; +use spl_utils::cmp_pubkeys; + +use crate::error::MetadataError; + +pub fn assert_mint_authority_matches_mint( + mint_authority: &COption, + mint_authority_info: &AccountInfo, +) -> ProgramResult { + match mint_authority { + COption::None => { + return Err(MetadataError::InvalidMintAuthority.into()); + } + COption::Some(key) => { + if mint_authority_info.key != key { + return Err(MetadataError::InvalidMintAuthority.into()); + } + } + } + + if !mint_authority_info.is_signer { + return Err(MetadataError::NotMintAuthority.into()); + } + + Ok(()) +} + +pub fn assert_owner_in(account: &AccountInfo, owners: &[Pubkey]) -> ProgramResult { + if owners.iter().any(|owner| cmp_pubkeys(owner, account.owner)) { + Ok(()) + } else { + Err(MetadataError::IncorrectOwner.into()) + } +} + +pub fn assert_owned_by(account: &AccountInfo, owner: &Pubkey) -> ProgramResult { + spl_utils::assert_owned_by(account, owner, MetadataError::IncorrectOwner) +} diff --git a/metadata/program/src/assertions/mod.rs b/metadata/program/src/assertions/mod.rs new file mode 100644 index 00000000..e39b5a89 --- /dev/null +++ b/metadata/program/src/assertions/mod.rs @@ -0,0 +1,4 @@ +pub mod metadata; +mod misc; + +pub use misc::*; diff --git a/metadata/program/src/error.rs b/metadata/program/src/error.rs index 5ff5ea0b..50b4c45c 100644 --- a/metadata/program/src/error.rs +++ b/metadata/program/src/error.rs @@ -13,9 +13,49 @@ pub enum MetadataError { #[error("")] InstructionUnpackError, + /// Metadata's key must match seed of ['metadata', program id, mint] provided + #[error(" Metadata's key must match seed of ['metadata', program id, mint] provided")] + InvalidMetadataKey, + + /// NumericalOverflowError + #[error("NumericalOverflowError")] + NumericalOverflowError, + + /// Incorrect account owner + #[error("Incorrect account owner")] + IncorrectOwner, + + /// You must be the mint authority and signer on this transaction + #[error("You must be the mint authority and signer on this transaction")] + NotMintAuthority, + + /// Name too long + #[error("Name too long")] + NameTooLong, + + /// Symbol too long + #[error("Symbol too long")] + SymbolTooLong, + + /// URI too long + #[error("URI too long")] + UriTooLong, + + /// 10 - Mint authority provided does not match the authority on the mint + #[error("Mint authority provided does not match the authority on the mint")] + InvalidMintAuthority, + + /// Data type mismatch + #[error("Data type mismatch")] + DataTypeMismatch, + /// 189 #[error("Invalid or removed instruction")] InvalidInstruction, + + /// 199 + #[error("Expected account to be uninitialized")] + ExpectedUninitializedAccount, } impl PrintProgramError for MetadataError { diff --git a/metadata/program/src/lib.rs b/metadata/program/src/lib.rs index d85e0920..4ade945d 100644 --- a/metadata/program/src/lib.rs +++ b/metadata/program/src/lib.rs @@ -1,14 +1,18 @@ //! SPL Token Metadata +pub mod assertions; pub mod constants; +#[cfg(not(feature = "no-entrypoint"))] +pub mod entrypoint; pub mod error; pub mod instruction; +pub mod pda; pub mod processor; pub mod state; pub mod utils; -#[cfg(not(feature = "no-entrypoint"))] -pub mod entrypoint; +// Export current sdk types for downstream users building with a different sdk version +pub use solana_program; // SPL Token Metadata Program ID solana_program::declare_id!("metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F"); diff --git a/metadata/program/src/utils/pda.rs b/metadata/program/src/pda.rs similarity index 100% rename from metadata/program/src/utils/pda.rs rename to metadata/program/src/pda.rs diff --git a/metadata/program/src/processor/metadata/create_medatata_accounts.rs b/metadata/program/src/processor/metadata/create_medatata_accounts.rs index 261465ea..0337e275 100644 --- a/metadata/program/src/processor/metadata/create_medatata_accounts.rs +++ b/metadata/program/src/processor/metadata/create_medatata_accounts.rs @@ -3,6 +3,10 @@ use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubke use crate::{ processor::all_account_infos, state::{CollectionDetails, Data}, + utils::{ + fee::{levy, set_fee_flag, LevyArgs}, + process_create_metadata_accounts_logic, CreateMetadataAccountsLogicArgs, + }, }; pub fn process_create_metadata_accounts<'a>( @@ -22,5 +26,31 @@ pub fn process_create_metadata_accounts<'a>( system_account_info ); + // Levy fees first, to fund the metadata account with rent + fee amount. + levy(LevyArgs { + payer_account_info, + token_metadata_pda_info: metadata_account_info, + })?; + + process_create_metadata_accounts_logic( + program_id, + CreateMetadataAccountsLogicArgs { + metadata_account_info, + mint_info, + mint_authority_info, + payer_account_info, + update_authority_info, + system_account_info, + }, + data, + false, + is_mutable, + true, + collection_details, + None, + )?; + + // Set fee flag after metadata account is created. + set_fee_flag(metadata_account_info); todo!("process_create_metadata_accounts"); } diff --git a/metadata/program/src/state/fee.rs b/metadata/program/src/state/fee.rs new file mode 100644 index 00000000..f48e5b3a --- /dev/null +++ b/metadata/program/src/state/fee.rs @@ -0,0 +1,17 @@ +use solana_program::{program_error::ProgramError, rent::Rent, sysvar::Sysvar}; + +use crate::error::MetadataError; + +const CREATE_FEE_SCALAR: usize = 1308; +const CREATE_FEE_OFFSET: u64 = 5440; +// create_metadata_accounts, create, print edition commands +pub fn get_create_fee() -> Result { + let rent = Rent::get()?.minimum_balance(CREATE_FEE_SCALAR); + + Ok(rent + .checked_add(CREATE_FEE_OFFSET) + .ok_or(MetadataError::NumericalOverflowError)?) +} + +pub const FEE_FLAG_SET: u8 = 1; +pub const FEE_FLAG_CLEARED: u8 = 0; diff --git a/metadata/program/src/state/metadata.rs b/metadata/program/src/state/metadata.rs new file mode 100644 index 00000000..fcb058c0 --- /dev/null +++ b/metadata/program/src/state/metadata.rs @@ -0,0 +1,77 @@ +use super::*; + +pub const MAX_NAME_LENGTH: usize = 32; + +pub const MAX_SYMBOL_LENGTH: usize = 10; + +pub const MAX_URI_LENGTH: usize = 200; + +pub const MAX_METADATA_LEN: usize = 1 // key ++ 32 // update auth pubkey ++ 32 // mint pubkey ++ MAX_DATA_SIZE ++ 1 // primary sale ++ 1 // mutable ++ 9 // nonce (pretty sure this only needs to be 2) ++ 2 // token standard ++ 34 // collection ++ 10 // collection details ++ 18 // uses ++ 1; // Fee flag + +pub const MAX_DATA_SIZE: usize = 4 + + MAX_NAME_LENGTH + + 4 + + MAX_SYMBOL_LENGTH + + 4 + + MAX_URI_LENGTH + + 2 + + 1 + + 4 + + MAX_CREATOR_LIMIT * MAX_CREATOR_LEN; + +// The last byte of the account contains the fee flag, indicating +// if the account has fees available for retrieval. +pub const METADATA_FEE_FLAG_OFFSET: usize = 1; + +#[macro_export] +macro_rules! metadata_seeds { + ($mint:expr) => {{ + let path = vec!["metadata".as_bytes(), $crate::ID.as_ref(), $mint.as_ref()]; + let (_, bump) = Pubkey::find_program_address(&path, &$crate::ID); + &[ + "metadata".as_bytes(), + $crate::ID.as_ref(), + $mint.as_ref(), + &[bump], + ] + }}; +} + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(Clone, BorshSerialize, Debug, PartialEq, Eq, ShankAccount)] +pub struct Metadata { + /// Account discriminator. + pub key: Key, + /// Address of the update authority. + #[cfg_attr(feature = "serde-feature", serde(with = "As::"))] + pub update_authority: Pubkey, + /// Address of the mint. + #[cfg_attr(feature = "serde-feature", serde(with = "As::"))] + pub mint: Pubkey, + /// Asset data. + pub data: Data, + // Immutable, once flipped, all sales of this metadata are considered secondary. + pub primary_sale_happened: bool, + // Whether or not the data struct is mutable, default is not + pub is_mutable: bool, + /// Since we cannot easily change Metadata, we add the new DataV2 fields here at the end. + pub token_standard: Option, + /// Collection + pub collection: Option, + /// Collection Details + pub collection_details: Option, + /// Uses + pub uses: Option, +} diff --git a/metadata/program/src/state/mod.rs b/metadata/program/src/state/mod.rs index 36b5e2e6..61a189bc 100644 --- a/metadata/program/src/state/mod.rs +++ b/metadata/program/src/state/mod.rs @@ -1,23 +1,110 @@ pub(crate) mod collection; pub(crate) mod creator; pub(crate) mod data; +pub mod fee; +pub(crate) mod metadata; pub(crate) mod uses; +use std::io::ErrorKind; + +use borsh::{maybestd::io::Error as BorshError, BorshDeserialize, BorshSerialize}; pub use collection::*; pub use creator::*; pub use data::*; +pub use fee::*; +pub use metadata::*; +use num_derive::FromPrimitive; +use num_traits::FromPrimitive; +use shank::ShankAccount; +use solana_program::{account_info::AccountInfo, program_error::ProgramError, pubkey::Pubkey}; pub use uses::*; -use { - borsh::{BorshDeserialize, BorshSerialize}, - num_derive::FromPrimitive, - // num_traits::FromPrimitive, - solana_program::pubkey::Pubkey, -}; - #[cfg(feature = "serde-feature")] use { serde::{Deserialize, Deserializer, Serialize}, serde_with::{As, DisplayFromStr}, std::str::FromStr, }; + +// Re-export constants to maintain compatibility. +use crate::{assertions::assert_owned_by, error::MetadataError, ID}; +pub use crate::pda::PREFIX; + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone, Copy, FromPrimitive)] +pub enum TokenStandard { + Fungible, // A token with with metadata + NonFungible, // A non-fungible token with metadata +} + +impl From for TokenStandard { + fn from(value: u8) -> Self { + match value { + 0 => TokenStandard::Fungible, + 1 => TokenStandard::NonFungible, + _ => panic!("Invalid token standard"), + } + } +} + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone, Copy, FromPrimitive)] +pub enum Key { + Uninitialized, + Metadata, +} + +pub trait TokenMetadataAccount: BorshDeserialize { + fn key() -> Key; + + fn size() -> usize; + + fn is_correct_account_type(data: &[u8], data_type: Key, data_size: usize) -> bool { + if data.is_empty() { + return false; + } + + let key: Option = Key::from_u8(data[0]); + match key { + Some(key) => { + (key == data_type || key == Key::Uninitialized) + && (data.len() == data_size || data_size == 0) + } + None => false, + } + } + + fn pad_length(buf: &mut Vec) -> Result<(), MetadataError> { + if Self::size() != 0 { + let padding_length = Self::size() + .checked_sub(buf.len()) + .ok_or(MetadataError::NumericalOverflowError)?; + buf.extend(vec![0; padding_length]); + } + Ok(()) + } + + fn safe_deserialize(mut data: &[u8]) -> Result { + if !Self::is_correct_account_type(data, Self::key(), Self::size()) { + return Err(BorshError::new(ErrorKind::Other, "DataTypeMismatch")); + } + + let result = Self::deserialize(&mut data)?; + + Ok(result) + } + + fn from_account_info(a: &AccountInfo) -> Result +where { + let data = &a.data.borrow_mut(); + + let ua = Self::safe_deserialize(data).map_err(|_| MetadataError::DataTypeMismatch)?; + + // Check that this is a `token-metadata` owned account. + assert_owned_by(a, &ID)?; + + Ok(ua) + } +} diff --git a/metadata/program/src/utils/fee.rs b/metadata/program/src/utils/fee.rs new file mode 100644 index 00000000..9bc48479 --- /dev/null +++ b/metadata/program/src/utils/fee.rs @@ -0,0 +1,55 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, program::invoke, rent::Rent, + sysvar::Sysvar, +}; + +use crate::{ + error::MetadataError, + state::{get_create_fee, MAX_METADATA_LEN, METADATA_FEE_FLAG_OFFSET}, +}; + +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub(crate) struct LevyArgs<'a> { + pub payer_account_info: &'a AccountInfo<'a>, + pub token_metadata_pda_info: &'a AccountInfo<'a>, +} + +pub(crate) fn levy(args: LevyArgs) -> ProgramResult { + // Fund metadata account with rent + SPL Token Metadata fee. + let rent = Rent::get()?; + + // Normally we would use the account data length to calculate the rent, but + // but levy is always called before the account is created, so it will be + // zero at this point. But we double check anyway. + let account_data_len = args.token_metadata_pda_info.data_len(); + if account_data_len > 0 { + return Err(MetadataError::ExpectedUninitializedAccount.into()); + } + let fee = get_create_fee()? + rent.minimum_balance(MAX_METADATA_LEN); + + invoke( + &solana_program::system_instruction::transfer( + args.payer_account_info.key, + args.token_metadata_pda_info.key, + fee, + ), + &[ + args.payer_account_info.clone(), + args.token_metadata_pda_info.clone(), + ], + )?; + + Ok(()) +} + +pub(crate) fn set_fee_flag(pda_account_info: &AccountInfo) -> ProgramResult { + let last_byte = pda_account_info + .data_len() + .checked_sub(METADATA_FEE_FLAG_OFFSET) + .ok_or(MetadataError::NumericalOverflowError)?; + let mut data = pda_account_info.try_borrow_mut_data()?; + data[last_byte] = 1; + + Ok(()) +} diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs new file mode 100644 index 00000000..a1e4c420 --- /dev/null +++ b/metadata/program/src/utils/metadata.rs @@ -0,0 +1,112 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, program_option::COption, pubkey::Pubkey, +}; +use spl_utils::{ + create_or_allocate_account_raw, + token::{get_mint_authority, SPL_TOKEN_PROGRAM_IDS}, +}; + +use crate::{ + assertions::{assert_mint_authority_matches_mint, assert_owner_in}, + error::MetadataError, + state::{CollectionDetails, Data, Metadata, TokenStandard, MAX_METADATA_LEN, PREFIX}, +}; + +// This equals the program address of the metadata program: +// +// AqH29mZfQFgRpfwaPoTMWSKJ5kqauoc1FwVBRksZyQrt +// +// IMPORTANT NOTE +// This allows the upgrade authority of the Token Metadata program to create metadata for SPL tokens. +// This only allows the upgrade authority to do create general metadata for the SPL token, it does not +// allow the upgrade authority to add or change creators. +pub const SEED_AUTHORITY: Pubkey = Pubkey::new_from_array([ + 0x92, 0x17, 0x2c, 0xc4, 0x72, 0x5d, 0xc0, 0x41, 0xf9, 0xdd, 0x8c, 0x51, 0x52, 0x60, 0x04, 0x26, + 0x00, 0x93, 0xa3, 0x0b, 0x02, 0x73, 0xdc, 0xfa, 0x74, 0x92, 0x17, 0xfc, 0x94, 0xa2, 0x40, 0x49, +]); + +pub struct CreateMetadataAccountsLogicArgs<'a> { + pub metadata_account_info: &'a AccountInfo<'a>, + pub mint_info: &'a AccountInfo<'a>, + pub mint_authority_info: &'a AccountInfo<'a>, + pub payer_account_info: &'a AccountInfo<'a>, + pub update_authority_info: &'a AccountInfo<'a>, + pub system_account_info: &'a AccountInfo<'a>, +} + +#[allow(clippy::too_many_arguments)] +/// Create a new account instruction +#[allow(clippy::too_many_arguments)] +pub fn process_create_metadata_accounts_logic( + program_id: &Pubkey, + accounts: CreateMetadataAccountsLogicArgs, + data: Data, + allow_direct_creator_writes: bool, + mut is_mutable: bool, + add_token_standard: bool, + collection_details: Option, + token_standard_override: Option, +) -> ProgramResult { + let CreateMetadataAccountsLogicArgs { + metadata_account_info, + mint_info, + mint_authority_info, + payer_account_info, + update_authority_info, + system_account_info, + } = accounts; + + let mut update_authority_key = *update_authority_info.key; + let existing_mint_authority = get_mint_authority(mint_info)?; + + // IMPORTANT NOTE: + // This allows SPL Token Metadata to Create but not update metadata for SPL tokens that + // have not populated their metadata. + assert_mint_authority_matches_mint(&existing_mint_authority, mint_authority_info).or_else( + |e| { + // Allow seeding by the authority seed populator + if mint_authority_info.key == &SEED_AUTHORITY && mint_authority_info.is_signer { + // When metadata is seeded, the mint authority should be able to change it + if let COption::Some(auth) = existing_mint_authority { + update_authority_key = auth; + is_mutable = true; + } + Ok(()) + } else { + Err(e) + } + }, + )?; + assert_owner_in(mint_info, &SPL_TOKEN_PROGRAM_IDS)?; + + let metadata_seeds = &[ + PREFIX.as_bytes(), + program_id.as_ref(), + mint_info.key.as_ref(), + ]; + let (metadata_key, metadata_bump_seed) = + Pubkey::find_program_address(metadata_seeds, program_id); + let metadata_authority_signer_seeds = &[ + PREFIX.as_bytes(), + program_id.as_ref(), + mint_info.key.as_ref(), + &[metadata_bump_seed], + ]; + + if metadata_account_info.key != &metadata_key { + return Err(MetadataError::InvalidMetadataKey.into()); + } + + create_or_allocate_account_raw( + *program_id, + metadata_account_info, + system_account_info, + payer_account_info, + MAX_METADATA_LEN, + metadata_authority_signer_seeds, + )?; + + // TODO: + + Ok(()) +} diff --git a/metadata/program/src/utils/mod.rs b/metadata/program/src/utils/mod.rs index 40deb9be..8e456b2c 100644 --- a/metadata/program/src/utils/mod.rs +++ b/metadata/program/src/utils/mod.rs @@ -1,3 +1,4 @@ -pub(crate) mod pda; +pub(crate) mod fee; +pub(crate) mod metadata; -pub use pda::*; +pub use metadata::{process_create_metadata_accounts_logic, CreateMetadataAccountsLogicArgs}; diff --git a/metadata/utils/Cargo.toml b/metadata/utils/Cargo.toml new file mode 100644 index 00000000..70c3396d --- /dev/null +++ b/metadata/utils/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "spl-utils" +version = "0.1.0" +edition = "2021" +license = "MIT" + +[lib] +crate-type = ["cdylib", "lib"] +path = "src/lib.rs" + +[dependencies] +arrayref = "0.3.6" +solana-program = { version = "0.1.4", path = "../../../bbachain/sdk/program" } +spl-token-2022 = { version = "0.4.2", path = "../../token/program-2022", features = [ "no-entrypoint" ], optional = true } + +[features] +default = ["spl-token"] +spl-token = ["spl-token-2022"] + +[profile.release] +overflow-checks = true # Enable integer overflow checks. \ No newline at end of file diff --git a/metadata/utils/src/account.rs b/metadata/utils/src/account.rs new file mode 100644 index 00000000..4e85121b --- /dev/null +++ b/metadata/utils/src/account.rs @@ -0,0 +1,56 @@ +use solana_program::{ + account_info::AccountInfo, + entrypoint::ProgramResult, + msg, + program::{invoke, invoke_signed}, + pubkey::Pubkey, + rent::Rent, + system_instruction, sysvar::Sysvar, +}; + +/// Create account almost from scratch, lifted from +/// +pub fn create_or_allocate_account_raw<'a>( + program_id: Pubkey, + new_account_info: &AccountInfo<'a>, + system_program_info: &AccountInfo<'a>, + payer_info: &AccountInfo<'a>, + size: usize, + signer_seeds: &[&[u8]], +) -> ProgramResult { + let rent = &Rent::get()?; + let required_daltons = rent + .minimum_balance(size) + .max(1) + .saturating_sub(new_account_info.daltons()); + + if required_daltons > 0 { + msg!("Transfer {} daltons to the new account", required_daltons); + invoke( + &system_instruction::transfer(payer_info.key, new_account_info.key, required_daltons), + &[ + payer_info.clone(), + new_account_info.clone(), + system_program_info.clone(), + ], + )?; + } + + let accounts = &[new_account_info.clone(), system_program_info.clone()]; + + msg!("Allocate space for the account"); + invoke_signed( + &system_instruction::allocate(new_account_info.key, size.try_into().unwrap()), + accounts, + &[signer_seeds], + )?; + + msg!("Assign the account to the owning program"); + invoke_signed( + &system_instruction::assign(new_account_info.key, &program_id), + accounts, + &[signer_seeds], + )?; + + Ok(()) +} diff --git a/metadata/utils/src/assertions.rs b/metadata/utils/src/assertions.rs new file mode 100644 index 00000000..7ff5fbca --- /dev/null +++ b/metadata/utils/src/assertions.rs @@ -0,0 +1,18 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, program_error::ProgramError, + pubkey::Pubkey, +}; + +// use crate::cmp_pubkeys; + +pub fn assert_owned_by( + account: &AccountInfo, + owner: &Pubkey, + error: impl Into, +) -> ProgramResult { + if account.owner != owner { + Err(error.into()) + } else { + Ok(()) + } +} diff --git a/metadata/utils/src/lib.rs b/metadata/utils/src/lib.rs new file mode 100644 index 00000000..0adb368f --- /dev/null +++ b/metadata/utils/src/lib.rs @@ -0,0 +1,9 @@ +mod account; +mod assertions; +mod misc; +#[cfg(feature = "spl-token")] +pub mod token; + +pub use account::*; +pub use assertions::*; +pub use misc::*; diff --git a/metadata/utils/src/misc.rs b/metadata/utils/src/misc.rs new file mode 100644 index 00000000..486eab3b --- /dev/null +++ b/metadata/utils/src/misc.rs @@ -0,0 +1,26 @@ +use solana_program::{ + program_memory::sol_memcmp, + pubkey::{Pubkey, PUBKEY_BYTES}, +}; + +pub fn cmp_pubkeys(a: &Pubkey, b: &Pubkey) -> bool { + sol_memcmp(a.as_ref(), b.as_ref(), PUBKEY_BYTES) == 0 +} + +#[cfg(test)] +pub mod tests { + use super::*; + + #[test] + fn check_keys_equal() { + let key1 = Pubkey::new_unique(); + assert!(cmp_pubkeys(&key1, &key1)); + } + + #[test] + fn check_keys_not_equal() { + let key1 = Pubkey::new_unique(); + let key2 = Pubkey::new_unique(); + assert!(!cmp_pubkeys(&key1, &key2)); + } +} diff --git a/metadata/utils/src/token/assertions.rs b/metadata/utils/src/token/assertions.rs new file mode 100644 index 00000000..76280407 --- /dev/null +++ b/metadata/utils/src/token/assertions.rs @@ -0,0 +1,9 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, program_error::ProgramError, pubkey, + pubkey::Pubkey, +}; + +pub static SPL_TOKEN_PROGRAM_IDS: [Pubkey; 2] = [ + pubkey!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), + pubkey!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"), +]; diff --git a/metadata/utils/src/token/mod.rs b/metadata/utils/src/token/mod.rs new file mode 100644 index 00000000..82a13056 --- /dev/null +++ b/metadata/utils/src/token/mod.rs @@ -0,0 +1,5 @@ +mod assertions; +mod utils; + +pub use assertions::*; +pub use utils::*; diff --git a/metadata/utils/src/token/utils.rs b/metadata/utils/src/token/utils.rs new file mode 100644 index 00000000..3e5d2ccd --- /dev/null +++ b/metadata/utils/src/token/utils.rs @@ -0,0 +1,23 @@ +use arrayref::{array_ref, array_refs}; +use solana_program::{ + account_info::AccountInfo, program_error::ProgramError, program_option::COption, pubkey::Pubkey, +}; + +pub fn get_mint_authority(account_info: &AccountInfo) -> Result, ProgramError> { + // In token program, 36, 8, 1, 1 is the layout, where the first 36 is mint_authority + // so we start at 0. + let data = account_info.try_borrow_data().unwrap(); + let authority_bytes = array_ref![data, 0, 36]; + + unpack_coption_key(authority_bytes) +} + +/// Unpacks COption from a slice, taken from token program +fn unpack_coption_key(src: &[u8; 36]) -> Result, ProgramError> { + let (tag, body) = array_refs![src, 4, 32]; + match *tag { + [0, 0, 0, 0] => Ok(COption::None), + [1, 0, 0, 0] => Ok(COption::Some(Pubkey::new_from_array(*body))), + _ => Err(ProgramError::InvalidAccountData), + } +} From 7d4db4bf319e30e1204dde667b1dfff329a394c8 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 19:22:00 +0300 Subject: [PATCH 03/18] updated --- metadata/program/src/state/data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/program/src/state/data.rs b/metadata/program/src/state/data.rs index 4f23e016..c6ae06d0 100644 --- a/metadata/program/src/state/data.rs +++ b/metadata/program/src/state/data.rs @@ -2,7 +2,7 @@ use super::*; #[repr(C)] #[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] -#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +#[derive(BorshSerialize, BorshDeserialize, Default, PartialEq, Eq, Debug, Clone)] pub struct Data { /// The name of the asset pub name: String, From 2f0f6082ec4b9c8354972f59f283affc6daa3222 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 19:22:17 +0300 Subject: [PATCH 04/18] updated --- metadata/program/src/state/metadata.rs | 48 ++++++++++++++++++++ metadata/program/src/state/mod.rs | 18 ++++---- metadata/program/src/utils/metadata.rs | 62 +++++++++++++++++++++++++- 3 files changed, 118 insertions(+), 10 deletions(-) diff --git a/metadata/program/src/state/metadata.rs b/metadata/program/src/state/metadata.rs index fcb058c0..086fef70 100644 --- a/metadata/program/src/state/metadata.rs +++ b/metadata/program/src/state/metadata.rs @@ -1,5 +1,7 @@ use super::*; +use crate::utils::metadata::meta_deser_unchecked; + pub const MAX_NAME_LENGTH: usize = 32; pub const MAX_SYMBOL_LENGTH: usize = 10; @@ -75,3 +77,49 @@ pub struct Metadata { /// Uses pub uses: Option, } + +impl Metadata { + pub fn save(&self, data: &mut [u8]) -> Result<(), BorshError> { + let mut bytes = Vec::with_capacity(MAX_METADATA_LEN); + borsh::to_writer(&mut bytes, self)?; + data[..bytes.len()].copy_from_slice(&bytes); + Ok(()) + } +} + +impl Default for Metadata { + fn default() -> Self { + Metadata { + key: Key::Metadata, + update_authority: Pubkey::default(), + mint: Pubkey::default(), + data: Data::default(), + primary_sale_happened: false, + is_mutable: false, + token_standard: None, + collection: None, + collection_details: None, + uses: None, + } + } +} + +impl TokenMetadataAccount for Metadata { + fn key() -> Key { + Key::Metadata + } + + fn size() -> usize { + 0 + } +} + +// We have a custom implementation of BorshDeserialize for Metadata because of corrupted metadata issues +// caused by resizing of the Creators array. We use a custom `meta_deser_unchecked` function +// that has fallback values for corrupted fields. +impl borsh::de::BorshDeserialize for Metadata { + fn deserialize(buf: &mut &[u8]) -> ::core::result::Result { + let md = meta_deser_unchecked(buf)?; + Ok(md) + } +} diff --git a/metadata/program/src/state/mod.rs b/metadata/program/src/state/mod.rs index 61a189bc..c32c790e 100644 --- a/metadata/program/src/state/mod.rs +++ b/metadata/program/src/state/mod.rs @@ -27,8 +27,8 @@ use { }; // Re-export constants to maintain compatibility. -use crate::{assertions::assert_owned_by, error::MetadataError, ID}; pub use crate::pda::PREFIX; +use crate::{assertions::assert_owned_by, error::MetadataError, ID}; #[repr(C)] #[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] @@ -48,14 +48,6 @@ impl From for TokenStandard { } } -#[repr(C)] -#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] -#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone, Copy, FromPrimitive)] -pub enum Key { - Uninitialized, - Metadata, -} - pub trait TokenMetadataAccount: BorshDeserialize { fn key() -> Key; @@ -108,3 +100,11 @@ where { Ok(ua) } } + +#[repr(C)] +#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone, Copy, FromPrimitive)] +pub enum Key { + Uninitialized, + Metadata, +} diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index a1e4c420..44fc7ed5 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -1,3 +1,4 @@ +use borsh::{maybestd::io::Error as BorshError, BorshDeserialize, BorshSerialize}; use solana_program::{ account_info::AccountInfo, entrypoint::ProgramResult, program_option::COption, pubkey::Pubkey, }; @@ -9,7 +10,7 @@ use spl_utils::{ use crate::{ assertions::{assert_mint_authority_matches_mint, assert_owner_in}, error::MetadataError, - state::{CollectionDetails, Data, Metadata, TokenStandard, MAX_METADATA_LEN, PREFIX}, + state::{Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, Uses, MAX_METADATA_LEN, PREFIX}, }; // This equals the program address of the metadata program: @@ -110,3 +111,62 @@ pub fn process_create_metadata_accounts_logic( Ok(()) } + +// Custom deserialization function to handle NFTs with corrupted data. +// This function is used in a custom deserialization implementation for the +// `Metadata` struct, so should never have `msg` macros used in it as it may be used client side +// either in tests or client code. +// +// It does not check `Key` type or account length and should only be used through the custom functions +// `from_account_info` and `deserialize` implemented on the Metadata struct. +pub fn meta_deser_unchecked(buf: &mut &[u8]) -> Result { + // Metadata corruption shouldn't appear until after edition_nonce. + let key: Key = BorshDeserialize::deserialize(buf)?; + let update_authority: Pubkey = BorshDeserialize::deserialize(buf)?; + let mint: Pubkey = BorshDeserialize::deserialize(buf)?; + let data: Data = BorshDeserialize::deserialize(buf)?; + let primary_sale_happened: bool = BorshDeserialize::deserialize(buf)?; + let is_mutable: bool = BorshDeserialize::deserialize(buf)?; + let edition_nonce: Option = BorshDeserialize::deserialize(buf)?; + + // V1.2 + let token_standard_res: Result, BorshError> = + BorshDeserialize::deserialize(buf); + let collection_res: Result, BorshError> = BorshDeserialize::deserialize(buf); + let uses_res: Result, BorshError> = BorshDeserialize::deserialize(buf); + + // V1.3 + let collection_details_res: Result, BorshError> = + BorshDeserialize::deserialize(buf); + + // We can have accidentally valid, but corrupted data, particularly on the Collection struct, + // so to increase probability of catching errors. If any of these deserializations fail, set + // all values to None. + let (token_standard, collection, uses) = match (token_standard_res, collection_res, uses_res) { + (Ok(token_standard_res), Ok(collection_res), Ok(uses_res)) => { + (token_standard_res, collection_res, uses_res) + } + _ => (None, None, None), + }; + + // V1.3 + let collection_details = match collection_details_res { + Ok(details) => details, + Err(_) => None, + }; + + let metadata = Metadata { + key, + update_authority, + mint, + data, + primary_sale_happened, + is_mutable, + token_standard, + collection, + collection_details, + uses, + }; + + Ok(metadata) +} From 1c608a6cca0be241faff75c0d7e79186898f5012 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 19:48:33 +0300 Subject: [PATCH 05/18] updated #3 --- metadata/program/src/utils/metadata.rs | 9 +++++++-- metadata/program/src/utils/mod.rs | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index 44fc7ed5..1517ff00 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -7,10 +7,13 @@ use spl_utils::{ token::{get_mint_authority, SPL_TOKEN_PROGRAM_IDS}, }; +use super::*; use crate::{ assertions::{assert_mint_authority_matches_mint, assert_owner_in}, - error::MetadataError, - state::{Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, Uses, MAX_METADATA_LEN, PREFIX}, + state::{ + Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, + Uses, MAX_METADATA_LEN, PREFIX, + }, }; // This equals the program address of the metadata program: @@ -107,6 +110,8 @@ pub fn process_create_metadata_accounts_logic( metadata_authority_signer_seeds, )?; + let mut metadata = Metadata::from_account_info(metadata_account_info)?; + // TODO: Ok(()) diff --git a/metadata/program/src/utils/mod.rs b/metadata/program/src/utils/mod.rs index 8e456b2c..53e88c47 100644 --- a/metadata/program/src/utils/mod.rs +++ b/metadata/program/src/utils/mod.rs @@ -2,3 +2,11 @@ pub(crate) mod fee; pub(crate) mod metadata; pub use metadata::{process_create_metadata_accounts_logic, CreateMetadataAccountsLogicArgs}; + +use crate::{ + error::MetadataError, + state::{ + Key, Metadata, TokenMetadataAccount, TokenStandard, + MAX_NAME_LENGTH, MAX_SYMBOL_LENGTH, MAX_URI_LENGTH, + }, +}; From 038b479370505870d910c9c4a45ecec412ff2ec0 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 21:27:46 +0300 Subject: [PATCH 06/18] updated #4 --- metadata/program/src/assertions/metadata.rs | 282 ++++++++++---------- metadata/program/src/assertions/mod.rs | 1 + metadata/program/src/assertions/uses.rs | 32 +++ metadata/program/src/error.rs | 40 +++ metadata/program/src/utils/metadata.rs | 30 ++- 5 files changed, 243 insertions(+), 142 deletions(-) create mode 100644 metadata/program/src/assertions/uses.rs diff --git a/metadata/program/src/assertions/metadata.rs b/metadata/program/src/assertions/metadata.rs index 6d534199..82e7ad2b 100644 --- a/metadata/program/src/assertions/metadata.rs +++ b/metadata/program/src/assertions/metadata.rs @@ -1,137 +1,145 @@ -// use solana_program::pubkey::Pubkey; - -// use crate::state::{Data, Metadata}; - -// pub fn assert_data_valid( -// data: &Data, -// update_authority: &Pubkey, -// existing_metadata: &Metadata, -// allow_direct_creator_writes: bool, -// update_authority_is_signer: bool, -// ) -> ProgramResult { -// if data.name.len() > MAX_NAME_LENGTH { -// return Err(MetadataError::NameTooLong.into()); -// } - -// if data.symbol.len() > MAX_SYMBOL_LENGTH { -// return Err(MetadataError::SymbolTooLong.into()); -// } - -// if data.uri.len() > MAX_URI_LENGTH { -// return Err(MetadataError::UriTooLong.into()); -// } - -// if data.seller_fee_basis_points > 10000 { -// return Err(MetadataError::InvalidBasisPoints.into()); -// } - -// // If the user passes in creators we get a reference to it, otherwise if the user passes in -// // None we make sure no current creators are verified before returning and allowing them to set -// // creators field to None. -// let creators = match data.creators { -// Some(ref creators) => creators, -// None => { -// if let Some(ref existing_creators) = existing_metadata.data.creators { -// if existing_creators.iter().any(|c| c.verified) { -// return Err(MetadataError::CannotRemoveVerifiedCreator.into()); -// } -// } -// return Ok(()); -// } -// }; - -// if creators.len() > MAX_CREATOR_LIMIT { -// return Err(MetadataError::CreatorsTooLong.into()); -// } - -// if creators.is_empty() { -// return Err(MetadataError::CreatorsMustBeAtleastOne.into()); -// } - -// // Store caller-supplied creator's array into a hashmap for direct lookup. -// let new_creators_map: HashMap<&Pubkey, &Creator> = -// creators.iter().map(|c| (&c.address, c)).collect(); - -// // Do not allow duplicate entries in the creator's array. -// if new_creators_map.len() != creators.len() { -// return Err(MetadataError::DuplicateCreatorAddress.into()); -// } - -// // If there is an existing creator's array, store this in a hashmap as well. -// let existing_creators_map: Option> = existing_metadata -// .data -// .creators -// .as_ref() -// .map(|existing_creators| existing_creators.iter().map(|c| (&c.address, c)).collect()); - -// // Loop over new creator's map. -// let mut share_total: u8 = 0; -// for (address, creator) in &new_creators_map { -// // Add up creator shares. After looping through all creators, will -// // verify it adds up to 100%. -// share_total = share_total -// .checked_add(creator.share) -// .ok_or(MetadataError::NumericalOverflowError)?; - -// // If this flag is set we are allowing any and all creators to be marked as verified -// // without further checking. This can only be done in special circumstances when the -// // metadata is fully trusted such as when minting a limited edition. Note we are still -// // checking that creator share adds up to 100%. -// if allow_direct_creator_writes { -// continue; -// } - -// // If this specific creator (of this loop iteration) is a signer and an update -// // authority, then we are fine with this creator either setting or clearing its -// // own `creator.verified` flag. -// if update_authority_is_signer && **address == *update_authority { -// continue; -// } - -// // If the previous two conditions are not true then we check the state in the existing -// // metadata creators array (if it exists) before allowing `creator.verified` to be set. -// if let Some(existing_creators_map) = &existing_creators_map { -// if existing_creators_map.contains_key(address) { -// // If this specific creator (of this loop iteration) is in the existing -// // creator's array, then it's `creator.verified` flag must match the existing -// // state. -// if creator.verified && !existing_creators_map[address].verified { -// return Err(MetadataError::CannotVerifyAnotherCreator.into()); -// } else if !creator.verified && existing_creators_map[address].verified { -// return Err(MetadataError::CannotUnverifyAnotherCreator.into()); -// } -// } else if creator.verified { -// // If this specific creator is not in the existing creator's array, then we -// // cannot set `creator.verified`. -// return Err(MetadataError::CannotVerifyAnotherCreator.into()); -// } -// } else if creator.verified { -// // If there is no existing creators array, we cannot set `creator.verified`. -// return Err(MetadataError::CannotVerifyAnotherCreator.into()); -// } -// } - -// // Ensure share total is 100%. -// if share_total != 100 { -// return Err(MetadataError::ShareTotalMustBe100.into()); -// } - -// // Next make sure there were not any existing creators that were already verified but not -// // listed in the new creator's array. -// if allow_direct_creator_writes { -// return Ok(()); -// } else if let Some(existing_creators_map) = &existing_creators_map { -// for (address, existing_creator) in existing_creators_map { -// // If this specific existing creator (of this loop iteration is a signer and an -// // update authority, then we are fine with this creator clearing its own -// // `creator.verified` flag. -// if update_authority_is_signer && **address == *update_authority { -// continue; -// } else if !new_creators_map.contains_key(address) && existing_creator.verified { -// return Err(MetadataError::CannotUnverifyAnotherCreator.into()); -// } -// } -// } - -// Ok(()) -// } +use std::collections::HashMap; + +use solana_program::{entrypoint::ProgramResult, pubkey::Pubkey}; + +use crate::{ + error::MetadataError, + state::{ + Creator, Data, Metadata, MAX_CREATOR_LIMIT, MAX_NAME_LENGTH, MAX_SYMBOL_LENGTH, + MAX_URI_LENGTH, + }, +}; + +pub fn assert_data_valid( + data: &Data, + update_authority: &Pubkey, + existing_metadata: &Metadata, + allow_direct_creator_writes: bool, + update_authority_is_signer: bool, +) -> ProgramResult { + if data.name.len() > MAX_NAME_LENGTH { + return Err(MetadataError::NameTooLong.into()); + } + + if data.symbol.len() > MAX_SYMBOL_LENGTH { + return Err(MetadataError::SymbolTooLong.into()); + } + + if data.uri.len() > MAX_URI_LENGTH { + return Err(MetadataError::UriTooLong.into()); + } + + if data.seller_fee_basis_points > 10000 { + return Err(MetadataError::InvalidBasisPoints.into()); + } + + // If the user passes in creators we get a reference to it, otherwise if the user passes in + // None we make sure no current creators are verified before returning and allowing them to set + // creators field to None. + let creators = match data.creators { + Some(ref creators) => creators, + None => { + if let Some(ref existing_creators) = existing_metadata.data.creators { + if existing_creators.iter().any(|c| c.verified) { + return Err(MetadataError::CannotRemoveVerifiedCreator.into()); + } + } + return Ok(()); + } + }; + + if creators.len() > MAX_CREATOR_LIMIT { + return Err(MetadataError::CreatorsTooLong.into()); + } + + if creators.is_empty() { + return Err(MetadataError::CreatorsMustBeAtleastOne.into()); + } + + // Store caller-supplied creator's array into a hashmap for direct lookup. + let new_creators_map: HashMap<&Pubkey, &Creator> = + creators.iter().map(|c| (&c.address, c)).collect(); + + // Do not allow duplicate entries in the creator's array. + if new_creators_map.len() != creators.len() { + return Err(MetadataError::DuplicateCreatorAddress.into()); + } + + // If there is an existing creator's array, store this in a hashmap as well. + let existing_creators_map: Option> = existing_metadata + .data + .creators + .as_ref() + .map(|existing_creators| existing_creators.iter().map(|c| (&c.address, c)).collect()); + + // Loop over new creator's map. + let mut share_total: u8 = 0; + for (address, creator) in &new_creators_map { + // Add up creator shares. After looping through all creators, will + // verify it adds up to 100%. + share_total = share_total + .checked_add(creator.share) + .ok_or(MetadataError::NumericalOverflowError)?; + + // If this flag is set we are allowing any and all creators to be marked as verified + // without further checking. This can only be done in special circumstances when the + // metadata is fully trusted such as when minting a limited edition. Note we are still + // checking that creator share adds up to 100%. + if allow_direct_creator_writes { + continue; + } + + // If this specific creator (of this loop iteration) is a signer and an update + // authority, then we are fine with this creator either setting or clearing its + // own `creator.verified` flag. + if update_authority_is_signer && **address == *update_authority { + continue; + } + + // If the previous two conditions are not true then we check the state in the existing + // metadata creators array (if it exists) before allowing `creator.verified` to be set. + if let Some(existing_creators_map) = &existing_creators_map { + if existing_creators_map.contains_key(address) { + // If this specific creator (of this loop iteration) is in the existing + // creator's array, then it's `creator.verified` flag must match the existing + // state. + if creator.verified && !existing_creators_map[address].verified { + return Err(MetadataError::CannotVerifyAnotherCreator.into()); + } else if !creator.verified && existing_creators_map[address].verified { + return Err(MetadataError::CannotUnverifyAnotherCreator.into()); + } + } else if creator.verified { + // If this specific creator is not in the existing creator's array, then we + // cannot set `creator.verified`. + return Err(MetadataError::CannotVerifyAnotherCreator.into()); + } + } else if creator.verified { + // If there is no existing creators array, we cannot set `creator.verified`. + return Err(MetadataError::CannotVerifyAnotherCreator.into()); + } + } + + // Ensure share total is 100%. + if share_total != 100 { + return Err(MetadataError::ShareTotalMustBe100.into()); + } + + // Next make sure there were not any existing creators that were already verified but not + // listed in the new creator's array. + if allow_direct_creator_writes { + return Ok(()); + } else if let Some(existing_creators_map) = &existing_creators_map { + for (address, existing_creator) in existing_creators_map { + // If this specific existing creator (of this loop iteration is a signer and an + // update authority, then we are fine with this creator clearing its own + // `creator.verified` flag. + if update_authority_is_signer && **address == *update_authority { + continue; + } else if !new_creators_map.contains_key(address) && existing_creator.verified { + return Err(MetadataError::CannotUnverifyAnotherCreator.into()); + } + } + } + + Ok(()) +} diff --git a/metadata/program/src/assertions/mod.rs b/metadata/program/src/assertions/mod.rs index e39b5a89..79af7bd6 100644 --- a/metadata/program/src/assertions/mod.rs +++ b/metadata/program/src/assertions/mod.rs @@ -1,4 +1,5 @@ pub mod metadata; mod misc; +pub mod uses; pub use misc::*; diff --git a/metadata/program/src/assertions/uses.rs b/metadata/program/src/assertions/uses.rs new file mode 100644 index 00000000..bc9ccb69 --- /dev/null +++ b/metadata/program/src/assertions/uses.rs @@ -0,0 +1,32 @@ +use solana_program::program_error::ProgramError; + +use crate::{error::MetadataError, state::{UseMethod, Uses}}; + +pub fn assert_valid_use( + incoming_use: &Option, + current_use: &Option, +) -> Result<(), ProgramError> { + if let Some(i) = incoming_use { + if i.use_method == UseMethod::Single && (i.total != 1 || i.remaining != 1) { + return Err(MetadataError::InvalidUseMethod.into()); + } + if i.use_method == UseMethod::Multiple && (i.total < 2 || i.total < i.remaining) { + return Err(MetadataError::InvalidUseMethod.into()); + } + } + match (incoming_use, current_use) { + (Some(incoming), Some(current)) => { + if incoming.use_method != current.use_method && current.total != current.remaining { + return Err(MetadataError::CannotChangeUseMethodAfterFirstUse.into()); + } + if incoming.total != current.total && current.total != current.remaining { + return Err(MetadataError::CannotChangeUsesAfterFirstUse.into()); + } + if incoming.remaining != current.remaining && current.total != current.remaining { + return Err(MetadataError::CannotChangeUsesAfterFirstUse.into()); + } + Ok(()) + } + _ => Ok(()), + } +} diff --git a/metadata/program/src/error.rs b/metadata/program/src/error.rs index 50b4c45c..18bd0059 100644 --- a/metadata/program/src/error.rs +++ b/metadata/program/src/error.rs @@ -41,6 +41,18 @@ pub enum MetadataError { #[error("URI too long")] UriTooLong, + /// Basis points cannot be more than 10000 + #[error("Basis points cannot be more than 10000")] + InvalidBasisPoints, + + /// Creators list too long + #[error("Creators list too long")] + CreatorsTooLong, + + /// Creators must be at least one if set + #[error("Creators must be at least one if set")] + CreatorsMustBeAtleastOne, + /// 10 - Mint authority provided does not match the authority on the mint #[error("Mint authority provided does not match the authority on the mint")] InvalidMintAuthority, @@ -49,6 +61,34 @@ pub enum MetadataError { #[error("Data type mismatch")] DataTypeMismatch, + #[error("Verified creators cannot be removed.")] + CannotRemoveVerifiedCreator, + + /// You cannot unilaterally verify another creator, they must sign + #[error("You cannot unilaterally verify another creator, they must sign")] + CannotVerifyAnotherCreator, + + /// You cannot unilaterally unverify another creator + #[error("You cannot unilaterally unverify another creator")] + CannotUnverifyAnotherCreator, + + /// Share total must equal 100 for creator array + #[error("Share total must equal 100 for creator array")] + ShareTotalMustBe100, + + /// 60 - No duplicate creator addresses + #[error("No duplicate creator addresses")] + DuplicateCreatorAddress, + + #[error("This use method is invalid")] + InvalidUseMethod, + + #[error("Cannot Change Use Method after the first use")] + CannotChangeUseMethodAfterFirstUse, + + #[error("Cannot Change Remaining or Available uses after the first use")] + CannotChangeUsesAfterFirstUse, + /// 189 #[error("Invalid or removed instruction")] InvalidInstruction, diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index 1517ff00..34a0bc40 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -4,15 +4,18 @@ use solana_program::{ }; use spl_utils::{ create_or_allocate_account_raw, - token::{get_mint_authority, SPL_TOKEN_PROGRAM_IDS}, + token::{get_mint_authority, get_mint_decimals, SPL_TOKEN_PROGRAM_IDS}, }; use super::*; use crate::{ - assertions::{assert_mint_authority_matches_mint, assert_owner_in}, + assertions::{ + assert_mint_authority_matches_mint, assert_owner_in, metadata::assert_data_valid, + uses::assert_valid_use, + }, state::{ - Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, - Uses, MAX_METADATA_LEN, PREFIX, + Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, Uses, MAX_METADATA_LEN, + PREFIX, }, }; @@ -112,7 +115,24 @@ pub fn process_create_metadata_accounts_logic( let mut metadata = Metadata::from_account_info(metadata_account_info)?; - // TODO: + assert_data_valid( + &data, + &update_authority_key, + &metadata, + allow_direct_creator_writes, + update_authority_info.is_signer, + )?; + + let mint_decimals = get_mint_decimals(mint_info)?; + + metadata.mint = *mint_info.key; + metadata.key = Key::Metadata; + metadata.data = data.clone(); + metadata.is_mutable = is_mutable; + metadata.update_authority = update_authority_key; + + assert_valid_use(&data.uses, &None)?; + metadata.uses = data.uses; Ok(()) } From 65a3f33cb288d02008d098e10cc017b1e06d4413 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 21:28:04 +0300 Subject: [PATCH 07/18] updated #4 --- metadata/utils/src/token/utils.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/metadata/utils/src/token/utils.rs b/metadata/utils/src/token/utils.rs index 3e5d2ccd..cb940a98 100644 --- a/metadata/utils/src/token/utils.rs +++ b/metadata/utils/src/token/utils.rs @@ -21,3 +21,18 @@ fn unpack_coption_key(src: &[u8; 36]) -> Result, ProgramError> { _ => Err(ProgramError::InvalidAccountData), } } + +/// cheap method to just get supply off a mint without unpacking whole object +pub fn get_mint_decimals(account_info: &AccountInfo) -> Result { + // In token program, 36, 8, 1, 1, is the layout, where the first 1 is decimals u8. + // so we start at 36. + let data = account_info.try_borrow_data()?; + + // If we don't check this and an empty account is passed in, we get a panic when + // we try to index into the data. + if data.is_empty() { + return Err(ProgramError::InvalidAccountData); + } + + Ok(data[44]) +} From 2d451c3e8a0604e614b93ec01a2753fcde3f4f37 Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 22:01:32 +0300 Subject: [PATCH 08/18] update process_create_metadata_accounts --- metadata/program/src/assertions/collection.rs | 35 +++++++++++++++ metadata/program/src/assertions/mod.rs | 1 + metadata/program/src/error.rs | 6 +++ metadata/program/src/instruction/mod.rs | 4 ++ .../metadata/create_medatata_accounts.rs | 3 +- .../metadata/update_metadata_accounts.rs | 14 +++--- metadata/program/src/processor/mod.rs | 17 +++++-- metadata/program/src/utils/metadata.rs | 45 +++++++++++++++---- metadata/program/src/utils/mod.rs | 25 +++++++++-- metadata/utils/src/token/assertions.rs | 5 +-- 10 files changed, 126 insertions(+), 29 deletions(-) create mode 100644 metadata/program/src/assertions/collection.rs diff --git a/metadata/program/src/assertions/collection.rs b/metadata/program/src/assertions/collection.rs new file mode 100644 index 00000000..31ab55c6 --- /dev/null +++ b/metadata/program/src/assertions/collection.rs @@ -0,0 +1,35 @@ +use solana_program::program_error::ProgramError; + +use crate::{error::MetadataError, state::Collection}; + +/// Checks whether the collection update is allowed or not based on the `verified` status. +pub fn assert_collection_update_is_valid( + existing: &Option, + incoming: &Option, +) -> Result<(), ProgramError> { + let is_incoming_verified = if let Some(status) = incoming { + status.verified + } else { + false + }; + + let is_existing_verified = if let Some(status) = existing { + status.verified + } else { + false + }; + + let valid_update = if is_incoming_verified { + // verified: can only update if the details match + is_existing_verified && (existing.as_ref().unwrap().key == incoming.as_ref().unwrap().key) + } else { + // unverified: can only update if existing is unverified + !is_existing_verified + }; + + if !valid_update { + return Err(MetadataError::CollectionCannotBeVerifiedInThisInstruction.into()); + } + + Ok(()) +} diff --git a/metadata/program/src/assertions/mod.rs b/metadata/program/src/assertions/mod.rs index 79af7bd6..c11b9960 100644 --- a/metadata/program/src/assertions/mod.rs +++ b/metadata/program/src/assertions/mod.rs @@ -1,3 +1,4 @@ +pub mod collection; pub mod metadata; mod misc; pub mod uses; diff --git a/metadata/program/src/error.rs b/metadata/program/src/error.rs index 18bd0059..ee777c25 100644 --- a/metadata/program/src/error.rs +++ b/metadata/program/src/error.rs @@ -9,6 +9,9 @@ use thiserror::Error; /// Errors that may be returned by the Metadata program. #[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)] pub enum MetadataError { + #[error("This instruction was deprecated in a previous release and is now removed")] + Removed, //For the curious we cannot get rid of an instruction in the enum or move them or it will break our api, this is a friendly way to get rid of them + /// 0 Failed to unpack instruction data #[error("")] InstructionUnpackError, @@ -89,6 +92,9 @@ pub enum MetadataError { #[error("Cannot Change Remaining or Available uses after the first use")] CannotChangeUsesAfterFirstUse, + #[error("Collection cannot be verified in this instruction")] + CollectionCannotBeVerifiedInThisInstruction, + /// 189 #[error("Invalid or removed instruction")] InvalidInstruction, diff --git a/metadata/program/src/instruction/mod.rs b/metadata/program/src/instruction/mod.rs index bcebb963..35f02284 100644 --- a/metadata/program/src/instruction/mod.rs +++ b/metadata/program/src/instruction/mod.rs @@ -7,6 +7,10 @@ use serde::{Deserialize, Serialize}; use shank::ShankInstruction; use spl_token_metadata_context_derive::AccountContext; +// Deprecated Instructions +pub const CREATE_METADATA_ACCOUNT_V0: u8 = 0; +pub const UPDATE_METADATA_ACCOUNT_V0: u8 = 1; + #[repr(C)] #[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))] /// Instructions supported by the Metadata program. diff --git a/metadata/program/src/processor/metadata/create_medatata_accounts.rs b/metadata/program/src/processor/metadata/create_medatata_accounts.rs index 0337e275..904072fe 100644 --- a/metadata/program/src/processor/metadata/create_medatata_accounts.rs +++ b/metadata/program/src/processor/metadata/create_medatata_accounts.rs @@ -51,6 +51,5 @@ pub fn process_create_metadata_accounts<'a>( )?; // Set fee flag after metadata account is created. - set_fee_flag(metadata_account_info); - todo!("process_create_metadata_accounts"); + set_fee_flag(metadata_account_info) } diff --git a/metadata/program/src/processor/metadata/update_metadata_accounts.rs b/metadata/program/src/processor/metadata/update_metadata_accounts.rs index 58e95871..83f7c86d 100644 --- a/metadata/program/src/processor/metadata/update_metadata_accounts.rs +++ b/metadata/program/src/processor/metadata/update_metadata_accounts.rs @@ -1,15 +1,15 @@ use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; -use crate::{error::MetadataError, processor::all_account_infos, state::Data}; +use crate::state::Data; // Update existing account instruction pub fn process_update_metadata_accounts( - program_id: &Pubkey, - accounts: &[AccountInfo], - optional_data: Option, - update_authority: Option, - primary_sale_happened: Option, - is_mutable: Option, + _program_id: &Pubkey, + _accounts: &[AccountInfo], + _optional_data: Option, + _update_authority: Option, + _primary_sale_happened: Option, + _is_mutable: Option, ) -> ProgramResult { todo!("process_update_metadata_accounts"); } diff --git a/metadata/program/src/processor/mod.rs b/metadata/program/src/processor/mod.rs index 80afe401..25187d73 100644 --- a/metadata/program/src/processor/mod.rs +++ b/metadata/program/src/processor/mod.rs @@ -7,7 +7,10 @@ use solana_program::{ pubkey::Pubkey, }; -use crate::{error::MetadataError, instruction::MetadataInstruction}; +use crate::{ + error::MetadataError, + instruction::{MetadataInstruction, CREATE_METADATA_ACCOUNT_V0, UPDATE_METADATA_ACCOUNT_V0}, +}; /// Process Token Metadata instructions. /// @@ -25,8 +28,16 @@ pub fn process_instruction<'a>( .split_first() .ok_or(MetadataError::InvalidInstruction)?; - let instruction = MetadataInstruction::try_from_slice(input) - .map_err(|_| ProgramError::InvalidInstructionData)?; + let instruction = match MetadataInstruction::try_from_slice(input) { + Ok(instruction) => Ok(instruction), + // Check if the instruction is a deprecated instruction. + Err(_) => match *variant { + CREATE_METADATA_ACCOUNT_V0 | UPDATE_METADATA_ACCOUNT_V0 => { + Err(MetadataError::Removed.into()) + } + _ => Err(ProgramError::InvalidInstructionData), + }, + }?; match instruction { MetadataInstruction::CreateMetadataAccount(args) => { diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index 34a0bc40..b52cc00b 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -1,16 +1,17 @@ -use borsh::{maybestd::io::Error as BorshError, BorshDeserialize, BorshSerialize}; +use borsh::{maybestd::io::Error as BorshError, BorshDeserialize}; use solana_program::{ account_info::AccountInfo, entrypoint::ProgramResult, program_option::COption, pubkey::Pubkey, }; use spl_utils::{ create_or_allocate_account_raw, - token::{get_mint_authority, get_mint_decimals, SPL_TOKEN_PROGRAM_IDS}, + token::{get_mint_authority, SPL_TOKEN_PROGRAM_IDS}, }; use super::*; use crate::{ assertions::{ - assert_mint_authority_matches_mint, assert_owner_in, metadata::assert_data_valid, + assert_mint_authority_matches_mint, assert_owner_in, + collection::assert_collection_update_is_valid, metadata::assert_data_valid, uses::assert_valid_use, }, state::{ @@ -123,7 +124,8 @@ pub fn process_create_metadata_accounts_logic( update_authority_info.is_signer, )?; - let mint_decimals = get_mint_decimals(mint_info)?; + // DISABLED: This is a security risk. + // let mint_decimals = get_mint_decimals(mint_info)?; metadata.mint = *mint_info.key; metadata.key = Key::Metadata; @@ -134,6 +136,36 @@ pub fn process_create_metadata_accounts_logic( assert_valid_use(&data.uses, &None)?; metadata.uses = data.uses; + assert_collection_update_is_valid(&None, &data.collection)?; + metadata.collection = data.collection; + + // We want to create new collections with a size of zero but we use the + // collection details enum for forward compatibility. + if let Some(details) = collection_details { + match details { + #[allow(deprecated)] + CollectionDetails::V1 { size: _size } => { + metadata.collection_details = Some(CollectionDetails::V1 { size: 0 }); + } + CollectionDetails::V2 { padding: _ } => { + metadata.collection_details = Some(CollectionDetails::V2 { padding: [0; 8] }); + } + } + } else { + metadata.collection_details = None; + } + + metadata.token_standard = if add_token_standard { + token_standard_override.or(Some(TokenStandard::Fungible)) + } else { + None + }; + + puff_out_data_fields(&mut metadata); + + // saves the changes to the account data + metadata.save(&mut metadata_account_info.data.borrow_mut())?; + Ok(()) } @@ -145,22 +177,18 @@ pub fn process_create_metadata_accounts_logic( // It does not check `Key` type or account length and should only be used through the custom functions // `from_account_info` and `deserialize` implemented on the Metadata struct. pub fn meta_deser_unchecked(buf: &mut &[u8]) -> Result { - // Metadata corruption shouldn't appear until after edition_nonce. let key: Key = BorshDeserialize::deserialize(buf)?; let update_authority: Pubkey = BorshDeserialize::deserialize(buf)?; let mint: Pubkey = BorshDeserialize::deserialize(buf)?; let data: Data = BorshDeserialize::deserialize(buf)?; let primary_sale_happened: bool = BorshDeserialize::deserialize(buf)?; let is_mutable: bool = BorshDeserialize::deserialize(buf)?; - let edition_nonce: Option = BorshDeserialize::deserialize(buf)?; - // V1.2 let token_standard_res: Result, BorshError> = BorshDeserialize::deserialize(buf); let collection_res: Result, BorshError> = BorshDeserialize::deserialize(buf); let uses_res: Result, BorshError> = BorshDeserialize::deserialize(buf); - // V1.3 let collection_details_res: Result, BorshError> = BorshDeserialize::deserialize(buf); @@ -174,7 +202,6 @@ pub fn meta_deser_unchecked(buf: &mut &[u8]) -> Result { _ => (None, None, None), }; - // V1.3 let collection_details = match collection_details_res { Ok(details) => details, Err(_) => None, diff --git a/metadata/program/src/utils/mod.rs b/metadata/program/src/utils/mod.rs index 53e88c47..8371fbc3 100644 --- a/metadata/program/src/utils/mod.rs +++ b/metadata/program/src/utils/mod.rs @@ -5,8 +5,25 @@ pub use metadata::{process_create_metadata_accounts_logic, CreateMetadataAccount use crate::{ error::MetadataError, - state::{ - Key, Metadata, TokenMetadataAccount, TokenStandard, - MAX_NAME_LENGTH, MAX_SYMBOL_LENGTH, MAX_URI_LENGTH, - }, + state::{Metadata, TokenMetadataAccount, MAX_NAME_LENGTH, MAX_SYMBOL_LENGTH, MAX_URI_LENGTH}, }; + +/// Strings need to be appended with `\0`s in order to have a deterministic length. +/// This supports the `memcmp` filter on get program account calls. +/// NOTE: it is assumed that the metadata fields are never larger than the respective MAX_LENGTH +pub fn puff_out_data_fields(metadata: &mut Metadata) { + metadata.data.name = puffed_out_string(&metadata.data.name, MAX_NAME_LENGTH); + metadata.data.symbol = puffed_out_string(&metadata.data.symbol, MAX_SYMBOL_LENGTH); + metadata.data.uri = puffed_out_string(&metadata.data.uri, MAX_URI_LENGTH); +} + +/// Pads the string to the desired size with `0u8`s. +/// NOTE: it is assumed that the string's size is never larger than the given size. +pub fn puffed_out_string(s: &str, size: usize) -> String { + let mut array_of_zeroes = vec![]; + let puff_amount = size - s.len(); + while array_of_zeroes.len() < puff_amount { + array_of_zeroes.push(0u8); + } + s.to_owned() + std::str::from_utf8(&array_of_zeroes).unwrap() +} diff --git a/metadata/utils/src/token/assertions.rs b/metadata/utils/src/token/assertions.rs index 76280407..895476f2 100644 --- a/metadata/utils/src/token/assertions.rs +++ b/metadata/utils/src/token/assertions.rs @@ -1,7 +1,4 @@ -use solana_program::{ - account_info::AccountInfo, entrypoint::ProgramResult, program_error::ProgramError, pubkey, - pubkey::Pubkey, -}; +use solana_program::{pubkey, pubkey::Pubkey}; pub static SPL_TOKEN_PROGRAM_IDS: [Pubkey; 2] = [ pubkey!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), From 60a940de8a35df23bdbb653e19c3e2f8d522f30a Mon Sep 17 00:00:00 2001 From: Philip James Date: Thu, 24 Apr 2025 22:15:14 +0300 Subject: [PATCH 09/18] remove SEED_AUTHORITY role --- metadata/program/src/utils/metadata.rs | 38 +++----------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index b52cc00b..f17ad5bb 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -1,6 +1,6 @@ use borsh::{maybestd::io::Error as BorshError, BorshDeserialize}; use solana_program::{ - account_info::AccountInfo, entrypoint::ProgramResult, program_option::COption, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; use spl_utils::{ create_or_allocate_account_raw, @@ -20,19 +20,6 @@ use crate::{ }, }; -// This equals the program address of the metadata program: -// -// AqH29mZfQFgRpfwaPoTMWSKJ5kqauoc1FwVBRksZyQrt -// -// IMPORTANT NOTE -// This allows the upgrade authority of the Token Metadata program to create metadata for SPL tokens. -// This only allows the upgrade authority to do create general metadata for the SPL token, it does not -// allow the upgrade authority to add or change creators. -pub const SEED_AUTHORITY: Pubkey = Pubkey::new_from_array([ - 0x92, 0x17, 0x2c, 0xc4, 0x72, 0x5d, 0xc0, 0x41, 0xf9, 0xdd, 0x8c, 0x51, 0x52, 0x60, 0x04, 0x26, - 0x00, 0x93, 0xa3, 0x0b, 0x02, 0x73, 0xdc, 0xfa, 0x74, 0x92, 0x17, 0xfc, 0x94, 0xa2, 0x40, 0x49, -]); - pub struct CreateMetadataAccountsLogicArgs<'a> { pub metadata_account_info: &'a AccountInfo<'a>, pub mint_info: &'a AccountInfo<'a>, @@ -50,7 +37,7 @@ pub fn process_create_metadata_accounts_logic( accounts: CreateMetadataAccountsLogicArgs, data: Data, allow_direct_creator_writes: bool, - mut is_mutable: bool, + is_mutable: bool, add_token_standard: bool, collection_details: Option, token_standard_override: Option, @@ -64,27 +51,10 @@ pub fn process_create_metadata_accounts_logic( system_account_info, } = accounts; - let mut update_authority_key = *update_authority_info.key; + let update_authority_key = *update_authority_info.key; let existing_mint_authority = get_mint_authority(mint_info)?; - // IMPORTANT NOTE: - // This allows SPL Token Metadata to Create but not update metadata for SPL tokens that - // have not populated their metadata. - assert_mint_authority_matches_mint(&existing_mint_authority, mint_authority_info).or_else( - |e| { - // Allow seeding by the authority seed populator - if mint_authority_info.key == &SEED_AUTHORITY && mint_authority_info.is_signer { - // When metadata is seeded, the mint authority should be able to change it - if let COption::Some(auth) = existing_mint_authority { - update_authority_key = auth; - is_mutable = true; - } - Ok(()) - } else { - Err(e) - } - }, - )?; + assert_mint_authority_matches_mint(&existing_mint_authority, mint_authority_info)?; assert_owner_in(mint_info, &SPL_TOKEN_PROGRAM_IDS)?; let metadata_seeds = &[ From 237295eb50937ba44e1e5b8f32bdd697d3c28cd4 Mon Sep 17 00:00:00 2001 From: Philip James Date: Fri, 25 Apr 2025 09:57:57 +0300 Subject: [PATCH 10/18] remove edition_nonce in MAX_METADATA_LEN --- metadata/program/src/state/metadata.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata/program/src/state/metadata.rs b/metadata/program/src/state/metadata.rs index 086fef70..79161fe4 100644 --- a/metadata/program/src/state/metadata.rs +++ b/metadata/program/src/state/metadata.rs @@ -14,7 +14,6 @@ pub const MAX_METADATA_LEN: usize = 1 // key + MAX_DATA_SIZE + 1 // primary sale + 1 // mutable -+ 9 // nonce (pretty sure this only needs to be 2) + 2 // token standard + 34 // collection + 10 // collection details From c1b71d8c3e1e330f36d49c17b58baff7ea7005c3 Mon Sep 17 00:00:00 2001 From: Philip James Date: Fri, 25 Apr 2025 10:05:30 +0300 Subject: [PATCH 11/18] fix create_metadata_accounts file name --- ...reate_medatata_accounts.rs => create_metadata_accounts.rs} | 0 metadata/program/src/processor/metadata/mod.rs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename metadata/program/src/processor/metadata/{create_medatata_accounts.rs => create_metadata_accounts.rs} (100%) diff --git a/metadata/program/src/processor/metadata/create_medatata_accounts.rs b/metadata/program/src/processor/metadata/create_metadata_accounts.rs similarity index 100% rename from metadata/program/src/processor/metadata/create_medatata_accounts.rs rename to metadata/program/src/processor/metadata/create_metadata_accounts.rs diff --git a/metadata/program/src/processor/metadata/mod.rs b/metadata/program/src/processor/metadata/mod.rs index cdc99578..f1f3e377 100644 --- a/metadata/program/src/processor/metadata/mod.rs +++ b/metadata/program/src/processor/metadata/mod.rs @@ -1,5 +1,5 @@ -mod create_medatata_accounts; +mod create_metadata_accounts; mod update_metadata_accounts; -pub use create_medatata_accounts::*; +pub use create_metadata_accounts::*; pub use update_metadata_accounts::*; From 390691ea3d147f053a7796d6e0a87e3ed22fc5e6 Mon Sep 17 00:00:00 2001 From: Philip James Date: Sun, 27 Apr 2025 18:41:11 +0300 Subject: [PATCH 12/18] update js lib --- metadata/js/.editorconfig | 9 - metadata/js/.eslintignore | 5 +- metadata/js/.eslintrc.js | 16 + metadata/js/.eslintrc.json | 14 - metadata/js/.gitignore | 2 +- metadata/js/.mocharc.json | 5 - metadata/js/.nojekyll | 0 metadata/js/.prettierignore | 5 +- metadata/js/.prettierrc | 7 - metadata/js/.prettierrc.js | 1 + metadata/js/README.md | 111 - metadata/js/package.json | 98 +- metadata/js/src/accounts/Metadata.ts | 207 + metadata/js/src/accounts/index.ts | 1 + metadata/js/src/constants.ts | 18 - metadata/js/src/errors.ts | 4137 +++++++++++++++++ metadata/js/src/helpers.ts | 22 - metadata/js/src/helpers/index.ts | 1 + .../js/src/helpers/metadata-deserializer.ts | 103 + metadata/js/src/index.ts | 23 +- metadata/js/src/instructions.ts | 41 - .../src/instructions/CreateMetadataAccount.ts | 124 + metadata/js/src/instructions/index.ts | 1 + metadata/js/src/read.ts | 25 - metadata/js/src/schema.ts | 45 - metadata/js/src/types.ts | 37 - metadata/js/src/types/Collection.ts | 19 + metadata/js/src/types/CollectionDetails.ts | 42 + .../js/src/types/CreateMetadataAccountArgs.ts | 22 + metadata/js/src/types/Creator.ts | 21 + metadata/js/src/types/Data.ts | 30 + metadata/js/src/types/Key.ts | 14 + metadata/js/src/types/TokenStandard.ts | 17 + metadata/js/src/types/UseMethod.ts | 18 + metadata/js/src/types/Uses.ts | 20 + metadata/js/src/types/index.ts | 9 + metadata/js/test/common.ts | 11 - metadata/js/tsconfig.build.json | 15 + metadata/js/tsconfig.cjs.json | 10 - metadata/js/tsconfig.json | 30 +- metadata/js/typedoc.json | 21 + metadata/js/yarn.lock | 3232 +++++++------ 42 files changed, 6506 insertions(+), 2083 deletions(-) delete mode 100644 metadata/js/.editorconfig create mode 100644 metadata/js/.eslintrc.js delete mode 100644 metadata/js/.eslintrc.json delete mode 100644 metadata/js/.mocharc.json delete mode 100644 metadata/js/.nojekyll delete mode 100644 metadata/js/.prettierrc create mode 100644 metadata/js/.prettierrc.js delete mode 100644 metadata/js/README.md create mode 100644 metadata/js/src/accounts/Metadata.ts create mode 100644 metadata/js/src/accounts/index.ts delete mode 100644 metadata/js/src/constants.ts create mode 100644 metadata/js/src/errors.ts delete mode 100644 metadata/js/src/helpers.ts create mode 100644 metadata/js/src/helpers/index.ts create mode 100644 metadata/js/src/helpers/metadata-deserializer.ts delete mode 100644 metadata/js/src/instructions.ts create mode 100644 metadata/js/src/instructions/CreateMetadataAccount.ts create mode 100644 metadata/js/src/instructions/index.ts delete mode 100644 metadata/js/src/read.ts delete mode 100644 metadata/js/src/schema.ts delete mode 100644 metadata/js/src/types.ts create mode 100644 metadata/js/src/types/Collection.ts create mode 100644 metadata/js/src/types/CollectionDetails.ts create mode 100644 metadata/js/src/types/CreateMetadataAccountArgs.ts create mode 100644 metadata/js/src/types/Creator.ts create mode 100644 metadata/js/src/types/Data.ts create mode 100644 metadata/js/src/types/Key.ts create mode 100644 metadata/js/src/types/TokenStandard.ts create mode 100644 metadata/js/src/types/UseMethod.ts create mode 100644 metadata/js/src/types/Uses.ts create mode 100644 metadata/js/src/types/index.ts delete mode 100644 metadata/js/test/common.ts create mode 100644 metadata/js/tsconfig.build.json delete mode 100644 metadata/js/tsconfig.cjs.json create mode 100644 metadata/js/typedoc.json diff --git a/metadata/js/.editorconfig b/metadata/js/.editorconfig deleted file mode 100644 index 3e10c03d..00000000 --- a/metadata/js/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 4 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true \ No newline at end of file diff --git a/metadata/js/.eslintignore b/metadata/js/.eslintignore index b3c7b6f5..6edbcddb 100644 --- a/metadata/js/.eslintignore +++ b/metadata/js/.eslintignore @@ -1,4 +1,3 @@ node_modules - -docs -lib +dist/ +coverage/ diff --git a/metadata/js/.eslintrc.js b/metadata/js/.eslintrc.js new file mode 100644 index 00000000..9733c111 --- /dev/null +++ b/metadata/js/.eslintrc.js @@ -0,0 +1,16 @@ +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaFeatures: { + ecmaVersion: 2020, + sourceType: 'module', + }, + }, + extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'], + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/ban-types': ['error', { extendDefaults: true, types: { '{}': false } }], + '@typescript-eslint/ban-ts-comment': 'off', + }, +}; diff --git a/metadata/js/.eslintrc.json b/metadata/js/.eslintrc.json deleted file mode 100644 index 38eb3be9..00000000 --- a/metadata/js/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "node": true, - "es6": true - }, - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "prettier"], - "rules": { - "@typescript-eslint/ban-ts-comment": "off" - } -} diff --git a/metadata/js/.gitignore b/metadata/js/.gitignore index 7bc72baf..1a33f1f2 100644 --- a/metadata/js/.gitignore +++ b/metadata/js/.gitignore @@ -1,2 +1,2 @@ -lib +dist docs diff --git a/metadata/js/.mocharc.json b/metadata/js/.mocharc.json deleted file mode 100644 index 451c14c3..00000000 --- a/metadata/js/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extension": ["ts"], - "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"], - "timeout": 5000 -} diff --git a/metadata/js/.nojekyll b/metadata/js/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/metadata/js/.prettierignore b/metadata/js/.prettierignore index a81d45c2..de4d1f00 100644 --- a/metadata/js/.prettierignore +++ b/metadata/js/.prettierignore @@ -1,3 +1,2 @@ -docs -lib -test-ledger +dist +node_modules diff --git a/metadata/js/.prettierrc b/metadata/js/.prettierrc deleted file mode 100644 index b9ce4c19..00000000 --- a/metadata/js/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "printWidth": 120, - "trailingComma": "es5", - "tabWidth": 4, - "semi": true, - "singleQuote": true -} \ No newline at end of file diff --git a/metadata/js/.prettierrc.js b/metadata/js/.prettierrc.js new file mode 100644 index 00000000..c6ea425e --- /dev/null +++ b/metadata/js/.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('../../.prettierrc'); diff --git a/metadata/js/README.md b/metadata/js/README.md deleted file mode 100644 index 4994e9ba..00000000 --- a/metadata/js/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# @bbachain/spl-token-metadata - -BBAChain JavaScript SDK for interacting with a Token Metadata Program on BBAChain. - -This library supports: -- Initializing token metadata -- Updating token metadata -- Reading token metadata - -> Compatible with SPL Token standard and deployed custom program at: -> `metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F` - ---- - -## 📦 Installation - -```bash -npm install @bbachain/spl-token-metadata -``` ---- - -## 🚀 Usage - -### 🧱 Initialize metadata - -```ts -import { - initializeMetadata -} from "@bbachain/spl-token-metadata"; -import { - Connection, - Keypair, - PublicKey, - clusterApiUrl -} from "@bbachain/web3.js"; - -const connection = new Connection(clusterApiUrl("testnet")); -const payer = Keypair.generate(); // Or load from file -const mint = new PublicKey("YourMintAddressHere"); - -await initializeMetadata( - connection, - payer, - mint, - "My Token", - "MTK", - "https://example.com/metadata.json" -); -``` - ---- - -### ✏️ Update metadata - -```ts -import { updateMetadata } from "@bbachain/spl-token-metadata"; - -await updateMetadata( - connection, - payer, - mint, - "New Token Name", - "NTK", - "https://example.com/new-uri.json" -); -``` - ---- - -### 🔍 Read metadata - -```ts -import { readMetadata } from "@bbachain/spl-token-metadata"; - -const metadata = await readMetadata(connection, mint); -if (metadata) { - console.log("Name:", metadata.name); - console.log("Symbol:", metadata.symbol); - console.log("URI:", metadata.uri); -} -``` - ---- - -## 🔧 API Reference - -### `initializeMetadata(connection, payer, mint, name, symbol, uri)` - -Creates the metadata account for a token mint (PDA). Only runs once per mint. - -### `updateMetadata(connection, payer, mint, name, symbol, uri)` - -Updates existing metadata. Only the authority set during initialization can update. - -### `readMetadata(connection, mint): TokenMetadata | null` - -Fetches and deserializes the on-chain metadata. - ---- - -## 🧠 Notes - -- This library uses **Borsh** for serialization (compatible with the Rust program). -- Metadata is stored in a PDA derived from `[b"metadata", mint]`. -- Compatible with any BBAChain cluster, including mainnet, testnet and localnet. - ---- - -## 🪪 License - -MIT © BBAChain Contributors diff --git a/metadata/js/package.json b/metadata/js/package.json index 823733b7..9a6de289 100644 --- a/metadata/js/package.json +++ b/metadata/js/package.json @@ -4,73 +4,65 @@ "author": "BBAChain Labs ", "repository": "https://github.com/bbachain/program-executor", "license": "Apache-2.0", + "keywords": [ + "metadata", + "bbachain", + "blockchain" + ], "publishConfig": { "access": "public" }, "files": [ - "lib", - "src", - "LICENSE", - "README.md" + "dist/src" ], - "type": "module", - "sideEffects": false, - "main": "lib/cjs/index.js", - "module": "lib/esm/index.mjs", - "types": "lib/types/index.d.ts", - "exports": { - "require": "./lib/cjs/index.js", - "import": "./lib/esm/index.mjs", - "types": "./lib/types/index.d.ts" - }, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "clean": "shx rm -rf lib", - "build": "yarn clean && tsc -p tsconfig.json; tsc-esm -p tsconfig.json && tsc -p tsconfig.cjs.json", - "postbuild": "echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "deploy": "yarn docs && gh-pages --dist docs --dest metadata/js --dotfiles", - "test": "yarn test:unit && yarn test:e2e-built && yarn test:e2e-native && yarn test:e2e-2022", - "test:unit": "mocha test/unit", - "test:e2e-built": "start-server-and-test 'solana-test-validator --bpf-program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ../../target/deploy/spl_token.so --reset --quiet' http://localhost:8899/health 'mocha test/e2e'", - "test:e2e-native": "start-server-and-test 'solana-test-validator --reset --quiet' http://localhost:8899/health 'mocha test/e2e'", - "test:build-programs": "cargo build-bpf --manifest-path ../program/Cargo.toml && cargo build-bpf --manifest-path ../program-2022/Cargo.toml && cargo build-bpf --manifest-path ../../associated-token-account/program/Cargo.toml", - "docs": "shx rm -rf docs && NODE_OPTIONS=--max_old_space_size=4096 typedoc && shx cp .nojekyll docs/", - "fmt": "prettier --write '{*,**/*}.{js,ts,jsx,tsx,json}'", - "lint": "eslint --max-warnings 0 --ext .ts . && prettier --check '{*,**/*}.{js,ts,jsx,tsx,json}'", - "lint:fix": "eslint --fix --ext .ts . && yarn fmt", - "nuke": "shx rm -rf node_modules yarn.lock" + "check:publish-ready": "yarn build && yarn lint", + "preversion": "yarn check:publish-ready", + "postversion": "git add package.json && git commit -m \"chore: update $npm_package_name to v$npm_package_version\" && git tag $npm_package_name@$npm_package_version", + "prepublishOnly": "yarn check:publish-ready", + "postpublish": "git push origin && git push origin --tags", + "build:docs": "typedoc", + "build": "rimraf dist && tsc -p tsconfig.json", + "api:gen": "DEBUG='(solita|rustbin):(info|error)' solita", + "test": "cpr test/fixtures dist/test/fixtures -o && tape dist/test/*.js", + "lint": "eslint \"{src,test}/**/*.ts\" --format stylish", + "fix:lint": "yarn lint --fix", + "prettier": "prettier \"{src,test}/**/*.ts\" --check", + "fix:prettier": "prettier --write src/", + "fix": "yarn fix:lint && yarn fix:prettier" }, "dependencies": { + "@bbachain/beet": "^0.0.1", + "@bbachain/beet-bbachain": "^0.0.1", "@bbachain/buffer-layout": "^1.0.0", "@bbachain/buffer-layout-utils": "^1.0.0", "@bbachain/web3.js": "^1.0.3", + "@metaplex-foundation/cusper": "^0.0.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4", "rpc-websockets": "7.11.0" }, "devDependencies": { - "@bbachain/spl-memo": "^0.0.1", - "@types/bn.js": "^5.1.6", - "@types/chai-as-promised": "^7.1.4", - "@types/eslint": "^8.4.0", - "@types/eslint-plugin-prettier": "^3.1.0", - "@types/mocha": "^9.1.0", - "@types/node": "^16.11.21", - "@types/node-fetch": "^2.6.12", - "@types/prettier": "^2.4.3", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", - "chai": "^4.3.4", - "chai-as-promised": "^7.1.1", - "eslint": "^8.7.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^4.0.0", - "gh-pages": "^3.2.3", - "mocha": "^9.1.4", + "@msgpack/msgpack": "^2.8.0", + "@types/bn.js": "^5.1.1", + "@types/debug": "^4.1.7", + "@types/tape": "^4.13.2", + "@typescript-eslint/eslint-plugin": "^5.44.0", + "@typescript-eslint/parser": "^5.44.0", + "cpr": "^3.0.1", + "esbuild": "0.15.12", + "esbuild-runner": "^2.2.1", + "eslint": "^8.3.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", "prettier": "^2.5.1", - "shx": "^0.3.4", - "start-server-and-test": "^1.14.0", - "ts-node": "^10.4.0", - "tslib": "^2.3.1", - "typedoc": "^0.22.11", - "typescript": "^4.5.5", - "typescript-esm": "^2.0.0" + "rimraf": "^3.0.2", + "spok": "^1.4.3", + "supports-color": "^9.2.3", + "tape": "^5.5.3", + "typedoc": "^0.23.16", + "typescript": "^4.9.3" } } diff --git a/metadata/js/src/accounts/Metadata.ts b/metadata/js/src/accounts/Metadata.ts new file mode 100644 index 00000000..c7cfdf9e --- /dev/null +++ b/metadata/js/src/accounts/Metadata.ts @@ -0,0 +1,207 @@ +import * as beet from '@bbachain/beet'; +import * as beetBBA from '@bbachain/beet-bbachain'; +import * as web3 from '@bbachain/web3.js'; +import { + Collection, + collectionBeet, + CollectionDetails, + collectionDetailsBeet, + Data, + dataBeet, + Key, + keyBeet, + TokenStandard, + tokenStandardBeet, + Uses, + usesBeet, +} from '../types'; +import * as customSerializer from '../helpers/metadata-deserializer'; +import { PROGRAM_ADDRESS } from '..'; + +/** + * Arguments used to create {@link Metadata} + * @category Accounts + */ +export type MetadataArgs = { + key: Key; + updateAuthority: web3.PublicKey; + mint: web3.PublicKey; + data: Data; + primarySaleHappened: boolean; + isMutable: boolean; + tokenStandard: beet.COption; + collection: beet.COption; + collectionDetails: beet.COption; + uses: beet.COption; +}; +/** + * Holds the data for the {@link Metadata} Account and provides de/serialization + * functionality for that data + * + * @category Accounts + */ +export class Metadata implements MetadataArgs { + private constructor( + readonly key: Key, + readonly updateAuthority: web3.PublicKey, + readonly mint: web3.PublicKey, + readonly data: Data, + readonly primarySaleHappened: boolean, + readonly isMutable: boolean, + readonly tokenStandard: beet.COption, + readonly collection: beet.COption, + readonly collectionDetails: beet.COption, + readonly uses: beet.COption + ) {} + + /** + * Creates a {@link Metadata} instance from the provided args. + */ + static fromArgs(args: MetadataArgs) { + return new Metadata( + args.key, + args.updateAuthority, + args.mint, + args.data, + args.primarySaleHappened, + args.isMutable, + args.tokenStandard, + args.collection, + args.collectionDetails, + args.uses + ); + } + + /** + * Deserializes the {@link Metadata} from the data of the provided {@link web3.AccountInfo}. + * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. + */ + static fromAccountInfo(accountInfo: web3.AccountInfo, offset = 0): [Metadata, number] { + return Metadata.deserialize(accountInfo.data, offset); + } + + /** + * Retrieves the account info from the provided address and deserializes + * the {@link Metadata} from its data. + * + * @throws Error if no account info is found at the address or if deserialization fails + */ + static async fromAccountAddress( + connection: web3.Connection, + address: web3.PublicKey, + commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig + ): Promise { + const accountInfo = await connection.getAccountInfo(address, commitmentOrConfig); + if (accountInfo == null) { + throw new Error(`Unable to find Metadata account at ${address}`); + } + return Metadata.fromAccountInfo(accountInfo, 0)[0]; + } + + /** + * Provides a {@link web3.Connection.getProgramAccounts} config builder, + * to fetch accounts matching filters that can be specified via that builder. + * + * @param programId - the program that owns the accounts we are filtering + */ + static gpaBuilder(programId: web3.PublicKey = new web3.PublicKey(PROGRAM_ADDRESS)) { + return beetBBA.GpaBuilder.fromStruct(programId, metadataBeet); + } + + /** + * Deserializes the {@link Metadata} from the provided data Buffer. + * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. + */ + static deserialize(buf: Buffer, offset = 0): [Metadata, number] { + return resolvedDeserialize(buf, offset); + } + + /** + * Serializes the {@link Metadata} into a Buffer. + * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it. + */ + serialize(): [Buffer, number] { + return resolvedSerialize(this); + } + + /** + * Returns the byteSize of a {@link Buffer} holding the serialized data of + * {@link Metadata} for the provided args. + * + * @param args need to be provided since the byte size for this account + * depends on them + */ + static byteSize(args: MetadataArgs) { + const instance = Metadata.fromArgs(args); + return metadataBeet.toFixedFromValue(instance).byteSize; + } + + /** + * Fetches the minimum balance needed to exempt an account holding + * {@link Metadata} data from rent + * + * @param args need to be provided since the byte size for this account + * depends on them + * @param connection used to retrieve the rent exemption information + */ + static async getMinimumBalanceForRentExemption( + args: MetadataArgs, + connection: web3.Connection, + commitment?: web3.Commitment + ): Promise { + return connection.getMinimumBalanceForRentExemption(Metadata.byteSize(args), commitment); + } + + /** + * Returns a readable version of {@link Metadata} properties + * and can be used to convert to JSON and/or logging + */ + pretty() { + return { + key: 'Key.' + Key[this.key], + updateAuthority: this.updateAuthority.toBase58(), + mint: this.mint.toBase58(), + data: this.data, + primarySaleHappened: this.primarySaleHappened, + isMutable: this.isMutable, + tokenStandard: this.tokenStandard, + collection: this.collection, + collectionDetails: this.collectionDetails, + uses: this.uses, + }; + } +} + +/** + * @category Accounts + */ +export const metadataBeet = new beet.FixableBeetStruct( + [ + ['key', keyBeet], + ['updateAuthority', beetBBA.publicKey], + ['mint', beetBBA.publicKey], + ['data', dataBeet], + ['primarySaleHappened', beet.bool], + ['isMutable', beet.bool], + ['tokenStandard', beet.coption(tokenStandardBeet)], + ['collection', beet.coption(collectionBeet)], + ['collectionDetails', beet.coption(collectionDetailsBeet)], + ['uses', beet.coption(usesBeet)], + ], + Metadata.fromArgs, + 'Metadata' +); + +const serializer = customSerializer as unknown as { + serialize: typeof metadataBeet.serialize; + deserialize: typeof metadataBeet.deserialize; +}; + +const resolvedSerialize = + typeof serializer.serialize === 'function' + ? serializer.serialize.bind(serializer) + : metadataBeet.serialize.bind(metadataBeet); +const resolvedDeserialize = + typeof serializer.deserialize === 'function' + ? serializer.deserialize.bind(serializer) + : metadataBeet.deserialize.bind(metadataBeet); diff --git a/metadata/js/src/accounts/index.ts b/metadata/js/src/accounts/index.ts new file mode 100644 index 00000000..60949688 --- /dev/null +++ b/metadata/js/src/accounts/index.ts @@ -0,0 +1 @@ +export * from './Metadata'; diff --git a/metadata/js/src/constants.ts b/metadata/js/src/constants.ts deleted file mode 100644 index ffbfc0ff..00000000 --- a/metadata/js/src/constants.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PublicKey } from '@bbachain/web3.js'; - -/** Program ID (replace with your actual address if it changes). */ -export const PROGRAM_ID = new PublicKey('metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F'); - -export const PDA_SEED = 'metadata'; - -/** Maximum on‑chain string lengths (bytes, not UTF‑16 code units). */ -export const MAX_NAME_LEN = 32; -export const MAX_SYMBOL_LEN = 10; -export const MAX_URI_LEN = 200; - -/** - * The Rust program over‑allocates one byte when it creates the account - * (`processor.rs::data_size`), but never writes to it. - * We drop that trailing byte when decoding. - */ -export const TAIL_PADDING = 1; diff --git a/metadata/js/src/errors.ts b/metadata/js/src/errors.ts new file mode 100644 index 00000000..a2841190 --- /dev/null +++ b/metadata/js/src/errors.ts @@ -0,0 +1,4137 @@ +type ErrorWithCode = Error & { code: number }; +type MaybeErrorWithCode = ErrorWithCode | null | undefined; + +const createErrorFromCodeLookup: Map ErrorWithCode> = new Map(); +const createErrorFromNameLookup: Map ErrorWithCode> = new Map(); + +/** + * InstructionUnpackError: '' + * + * @category Errors + * @category generated + */ +export class InstructionUnpackErrorError extends Error { + readonly code: number = 0x0; + readonly name: string = 'InstructionUnpackError'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InstructionUnpackErrorError); + } + } +} + +createErrorFromCodeLookup.set(0x0, () => new InstructionUnpackErrorError()); +createErrorFromNameLookup.set('InstructionUnpackError', () => new InstructionUnpackErrorError()); + +/** + * InstructionPackError: '' + * + * @category Errors + * @category generated + */ +export class InstructionPackErrorError extends Error { + readonly code: number = 0x1; + readonly name: string = 'InstructionPackError'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InstructionPackErrorError); + } + } +} + +createErrorFromCodeLookup.set(0x1, () => new InstructionPackErrorError()); +createErrorFromNameLookup.set('InstructionPackError', () => new InstructionPackErrorError()); + +/** + * NotRentExempt: 'Lamport balance below rent-exempt threshold' + * + * @category Errors + * @category generated + */ +export class NotRentExemptError extends Error { + readonly code: number = 0x2; + readonly name: string = 'NotRentExempt'; + constructor() { + super('Lamport balance below rent-exempt threshold'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotRentExemptError); + } + } +} + +createErrorFromCodeLookup.set(0x2, () => new NotRentExemptError()); +createErrorFromNameLookup.set('NotRentExempt', () => new NotRentExemptError()); + +/** + * AlreadyInitialized: 'Already initialized' + * + * @category Errors + * @category generated + */ +export class AlreadyInitializedError extends Error { + readonly code: number = 0x3; + readonly name: string = 'AlreadyInitialized'; + constructor() { + super('Already initialized'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AlreadyInitializedError); + } + } +} + +createErrorFromCodeLookup.set(0x3, () => new AlreadyInitializedError()); +createErrorFromNameLookup.set('AlreadyInitialized', () => new AlreadyInitializedError()); + +/** + * Uninitialized: 'Uninitialized' + * + * @category Errors + * @category generated + */ +export class UninitializedError extends Error { + readonly code: number = 0x4; + readonly name: string = 'Uninitialized'; + constructor() { + super('Uninitialized'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UninitializedError); + } + } +} + +createErrorFromCodeLookup.set(0x4, () => new UninitializedError()); +createErrorFromNameLookup.set('Uninitialized', () => new UninitializedError()); + +/** + * InvalidMetadataKey: ' Metadata's key must match seed of ['metadata', program id, mint] provided' + * + * @category Errors + * @category generated + */ +export class InvalidMetadataKeyError extends Error { + readonly code: number = 0x5; + readonly name: string = 'InvalidMetadataKey'; + constructor() { + super(" Metadata's key must match seed of ['metadata', program id, mint] provided"); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMetadataKeyError); + } + } +} + +createErrorFromCodeLookup.set(0x5, () => new InvalidMetadataKeyError()); +createErrorFromNameLookup.set('InvalidMetadataKey', () => new InvalidMetadataKeyError()); + +/** + * InvalidEditionKey: 'Edition's key must match seed of ['metadata', program id, name, 'edition'] provided' + * + * @category Errors + * @category generated + */ +export class InvalidEditionKeyError extends Error { + readonly code: number = 0x6; + readonly name: string = 'InvalidEditionKey'; + constructor() { + super("Edition's key must match seed of ['metadata', program id, name, 'edition'] provided"); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidEditionKeyError); + } + } +} + +createErrorFromCodeLookup.set(0x6, () => new InvalidEditionKeyError()); +createErrorFromNameLookup.set('InvalidEditionKey', () => new InvalidEditionKeyError()); + +/** + * UpdateAuthorityIncorrect: 'Update Authority given does not match' + * + * @category Errors + * @category generated + */ +export class UpdateAuthorityIncorrectError extends Error { + readonly code: number = 0x7; + readonly name: string = 'UpdateAuthorityIncorrect'; + constructor() { + super('Update Authority given does not match'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UpdateAuthorityIncorrectError); + } + } +} + +createErrorFromCodeLookup.set(0x7, () => new UpdateAuthorityIncorrectError()); +createErrorFromNameLookup.set( + 'UpdateAuthorityIncorrect', + () => new UpdateAuthorityIncorrectError(), +); + +/** + * UpdateAuthorityIsNotSigner: 'Update Authority needs to be signer to update metadata' + * + * @category Errors + * @category generated + */ +export class UpdateAuthorityIsNotSignerError extends Error { + readonly code: number = 0x8; + readonly name: string = 'UpdateAuthorityIsNotSigner'; + constructor() { + super('Update Authority needs to be signer to update metadata'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UpdateAuthorityIsNotSignerError); + } + } +} + +createErrorFromCodeLookup.set(0x8, () => new UpdateAuthorityIsNotSignerError()); +createErrorFromNameLookup.set( + 'UpdateAuthorityIsNotSigner', + () => new UpdateAuthorityIsNotSignerError(), +); + +/** + * NotMintAuthority: 'You must be the mint authority and signer on this transaction' + * + * @category Errors + * @category generated + */ +export class NotMintAuthorityError extends Error { + readonly code: number = 0x9; + readonly name: string = 'NotMintAuthority'; + constructor() { + super('You must be the mint authority and signer on this transaction'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotMintAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0x9, () => new NotMintAuthorityError()); +createErrorFromNameLookup.set('NotMintAuthority', () => new NotMintAuthorityError()); + +/** + * InvalidMintAuthority: 'Mint authority provided does not match the authority on the mint' + * + * @category Errors + * @category generated + */ +export class InvalidMintAuthorityError extends Error { + readonly code: number = 0xa; + readonly name: string = 'InvalidMintAuthority'; + constructor() { + super('Mint authority provided does not match the authority on the mint'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMintAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0xa, () => new InvalidMintAuthorityError()); +createErrorFromNameLookup.set('InvalidMintAuthority', () => new InvalidMintAuthorityError()); + +/** + * NameTooLong: 'Name too long' + * + * @category Errors + * @category generated + */ +export class NameTooLongError extends Error { + readonly code: number = 0xb; + readonly name: string = 'NameTooLong'; + constructor() { + super('Name too long'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NameTooLongError); + } + } +} + +createErrorFromCodeLookup.set(0xb, () => new NameTooLongError()); +createErrorFromNameLookup.set('NameTooLong', () => new NameTooLongError()); + +/** + * SymbolTooLong: 'Symbol too long' + * + * @category Errors + * @category generated + */ +export class SymbolTooLongError extends Error { + readonly code: number = 0xc; + readonly name: string = 'SymbolTooLong'; + constructor() { + super('Symbol too long'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, SymbolTooLongError); + } + } +} + +createErrorFromCodeLookup.set(0xc, () => new SymbolTooLongError()); +createErrorFromNameLookup.set('SymbolTooLong', () => new SymbolTooLongError()); + +/** + * UriTooLong: 'URI too long' + * + * @category Errors + * @category generated + */ +export class UriTooLongError extends Error { + readonly code: number = 0xd; + readonly name: string = 'UriTooLong'; + constructor() { + super('URI too long'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UriTooLongError); + } + } +} + +createErrorFromCodeLookup.set(0xd, () => new UriTooLongError()); +createErrorFromNameLookup.set('UriTooLong', () => new UriTooLongError()); + +/** + * UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner: '' + * + * @category Errors + * @category generated + */ +export class UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError extends Error { + readonly code: number = 0xe; + readonly name: string = 'UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError); + } + } +} + +createErrorFromCodeLookup.set( + 0xe, + () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError(), +); +createErrorFromNameLookup.set( + 'UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner', + () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError(), +); + +/** + * MintMismatch: 'Mint given does not match mint on Metadata' + * + * @category Errors + * @category generated + */ +export class MintMismatchError extends Error { + readonly code: number = 0xf; + readonly name: string = 'MintMismatch'; + constructor() { + super('Mint given does not match mint on Metadata'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0xf, () => new MintMismatchError()); +createErrorFromNameLookup.set('MintMismatch', () => new MintMismatchError()); + +/** + * EditionsMustHaveExactlyOneToken: 'Editions must have exactly one token' + * + * @category Errors + * @category generated + */ +export class EditionsMustHaveExactlyOneTokenError extends Error { + readonly code: number = 0x10; + readonly name: string = 'EditionsMustHaveExactlyOneToken'; + constructor() { + super('Editions must have exactly one token'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EditionsMustHaveExactlyOneTokenError); + } + } +} + +createErrorFromCodeLookup.set(0x10, () => new EditionsMustHaveExactlyOneTokenError()); +createErrorFromNameLookup.set( + 'EditionsMustHaveExactlyOneToken', + () => new EditionsMustHaveExactlyOneTokenError(), +); + +/** + * MaxEditionsMintedAlready: '' + * + * @category Errors + * @category generated + */ +export class MaxEditionsMintedAlreadyError extends Error { + readonly code: number = 0x11; + readonly name: string = 'MaxEditionsMintedAlready'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MaxEditionsMintedAlreadyError); + } + } +} + +createErrorFromCodeLookup.set(0x11, () => new MaxEditionsMintedAlreadyError()); +createErrorFromNameLookup.set( + 'MaxEditionsMintedAlready', + () => new MaxEditionsMintedAlreadyError(), +); + +/** + * TokenMintToFailed: '' + * + * @category Errors + * @category generated + */ +export class TokenMintToFailedError extends Error { + readonly code: number = 0x12; + readonly name: string = 'TokenMintToFailed'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenMintToFailedError); + } + } +} + +createErrorFromCodeLookup.set(0x12, () => new TokenMintToFailedError()); +createErrorFromNameLookup.set('TokenMintToFailed', () => new TokenMintToFailedError()); + +/** + * MasterRecordMismatch: '' + * + * @category Errors + * @category generated + */ +export class MasterRecordMismatchError extends Error { + readonly code: number = 0x13; + readonly name: string = 'MasterRecordMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MasterRecordMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x13, () => new MasterRecordMismatchError()); +createErrorFromNameLookup.set('MasterRecordMismatch', () => new MasterRecordMismatchError()); + +/** + * DestinationMintMismatch: '' + * + * @category Errors + * @category generated + */ +export class DestinationMintMismatchError extends Error { + readonly code: number = 0x14; + readonly name: string = 'DestinationMintMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DestinationMintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x14, () => new DestinationMintMismatchError()); +createErrorFromNameLookup.set('DestinationMintMismatch', () => new DestinationMintMismatchError()); + +/** + * EditionAlreadyMinted: '' + * + * @category Errors + * @category generated + */ +export class EditionAlreadyMintedError extends Error { + readonly code: number = 0x15; + readonly name: string = 'EditionAlreadyMinted'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EditionAlreadyMintedError); + } + } +} + +createErrorFromCodeLookup.set(0x15, () => new EditionAlreadyMintedError()); +createErrorFromNameLookup.set('EditionAlreadyMinted', () => new EditionAlreadyMintedError()); + +/** + * PrintingMintDecimalsShouldBeZero: '' + * + * @category Errors + * @category generated + */ +export class PrintingMintDecimalsShouldBeZeroError extends Error { + readonly code: number = 0x16; + readonly name: string = 'PrintingMintDecimalsShouldBeZero'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintingMintDecimalsShouldBeZeroError); + } + } +} + +createErrorFromCodeLookup.set(0x16, () => new PrintingMintDecimalsShouldBeZeroError()); +createErrorFromNameLookup.set( + 'PrintingMintDecimalsShouldBeZero', + () => new PrintingMintDecimalsShouldBeZeroError(), +); + +/** + * OneTimePrintingAuthorizationMintDecimalsShouldBeZero: '' + * + * @category Errors + * @category generated + */ +export class OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError extends Error { + readonly code: number = 0x17; + readonly name: string = 'OneTimePrintingAuthorizationMintDecimalsShouldBeZero'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError); + } + } +} + +createErrorFromCodeLookup.set( + 0x17, + () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError(), +); +createErrorFromNameLookup.set( + 'OneTimePrintingAuthorizationMintDecimalsShouldBeZero', + () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError(), +); + +/** + * EditionMintDecimalsShouldBeZero: 'EditionMintDecimalsShouldBeZero' + * + * @category Errors + * @category generated + */ +export class EditionMintDecimalsShouldBeZeroError extends Error { + readonly code: number = 0x18; + readonly name: string = 'EditionMintDecimalsShouldBeZero'; + constructor() { + super('EditionMintDecimalsShouldBeZero'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EditionMintDecimalsShouldBeZeroError); + } + } +} + +createErrorFromCodeLookup.set(0x18, () => new EditionMintDecimalsShouldBeZeroError()); +createErrorFromNameLookup.set( + 'EditionMintDecimalsShouldBeZero', + () => new EditionMintDecimalsShouldBeZeroError(), +); + +/** + * TokenBurnFailed: '' + * + * @category Errors + * @category generated + */ +export class TokenBurnFailedError extends Error { + readonly code: number = 0x19; + readonly name: string = 'TokenBurnFailed'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenBurnFailedError); + } + } +} + +createErrorFromCodeLookup.set(0x19, () => new TokenBurnFailedError()); +createErrorFromNameLookup.set('TokenBurnFailed', () => new TokenBurnFailedError()); + +/** + * TokenAccountOneTimeAuthMintMismatch: '' + * + * @category Errors + * @category generated + */ +export class TokenAccountOneTimeAuthMintMismatchError extends Error { + readonly code: number = 0x1a; + readonly name: string = 'TokenAccountOneTimeAuthMintMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenAccountOneTimeAuthMintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x1a, () => new TokenAccountOneTimeAuthMintMismatchError()); +createErrorFromNameLookup.set( + 'TokenAccountOneTimeAuthMintMismatch', + () => new TokenAccountOneTimeAuthMintMismatchError(), +); + +/** + * DerivedKeyInvalid: 'Derived key invalid' + * + * @category Errors + * @category generated + */ +export class DerivedKeyInvalidError extends Error { + readonly code: number = 0x1b; + readonly name: string = 'DerivedKeyInvalid'; + constructor() { + super('Derived key invalid'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DerivedKeyInvalidError); + } + } +} + +createErrorFromCodeLookup.set(0x1b, () => new DerivedKeyInvalidError()); +createErrorFromNameLookup.set('DerivedKeyInvalid', () => new DerivedKeyInvalidError()); + +/** + * PrintingMintMismatch: 'The Printing mint does not match that on the master edition!' + * + * @category Errors + * @category generated + */ +export class PrintingMintMismatchError extends Error { + readonly code: number = 0x1c; + readonly name: string = 'PrintingMintMismatch'; + constructor() { + super('The Printing mint does not match that on the master edition!'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintingMintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x1c, () => new PrintingMintMismatchError()); +createErrorFromNameLookup.set('PrintingMintMismatch', () => new PrintingMintMismatchError()); + +/** + * OneTimePrintingAuthMintMismatch: 'The One Time Printing Auth mint does not match that on the master edition!' + * + * @category Errors + * @category generated + */ +export class OneTimePrintingAuthMintMismatchError extends Error { + readonly code: number = 0x1d; + readonly name: string = 'OneTimePrintingAuthMintMismatch'; + constructor() { + super('The One Time Printing Auth mint does not match that on the master edition!'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, OneTimePrintingAuthMintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x1d, () => new OneTimePrintingAuthMintMismatchError()); +createErrorFromNameLookup.set( + 'OneTimePrintingAuthMintMismatch', + () => new OneTimePrintingAuthMintMismatchError(), +); + +/** + * TokenAccountMintMismatch: 'The mint of the token account does not match the Printing mint!' + * + * @category Errors + * @category generated + */ +export class TokenAccountMintMismatchError extends Error { + readonly code: number = 0x1e; + readonly name: string = 'TokenAccountMintMismatch'; + constructor() { + super('The mint of the token account does not match the Printing mint!'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenAccountMintMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x1e, () => new TokenAccountMintMismatchError()); +createErrorFromNameLookup.set( + 'TokenAccountMintMismatch', + () => new TokenAccountMintMismatchError(), +); + +/** + * TokenAccountMintMismatchV2: 'The mint of the token account does not match the master metadata mint!' + * + * @category Errors + * @category generated + */ +export class TokenAccountMintMismatchV2Error extends Error { + readonly code: number = 0x1f; + readonly name: string = 'TokenAccountMintMismatchV2'; + constructor() { + super('The mint of the token account does not match the master metadata mint!'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenAccountMintMismatchV2Error); + } + } +} + +createErrorFromCodeLookup.set(0x1f, () => new TokenAccountMintMismatchV2Error()); +createErrorFromNameLookup.set( + 'TokenAccountMintMismatchV2', + () => new TokenAccountMintMismatchV2Error(), +); + +/** + * NotEnoughTokens: 'Not enough tokens to mint a limited edition' + * + * @category Errors + * @category generated + */ +export class NotEnoughTokensError extends Error { + readonly code: number = 0x20; + readonly name: string = 'NotEnoughTokens'; + constructor() { + super('Not enough tokens to mint a limited edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotEnoughTokensError); + } + } +} + +createErrorFromCodeLookup.set(0x20, () => new NotEnoughTokensError()); +createErrorFromNameLookup.set('NotEnoughTokens', () => new NotEnoughTokensError()); + +/** + * PrintingMintAuthorizationAccountMismatch: '' + * + * @category Errors + * @category generated + */ +export class PrintingMintAuthorizationAccountMismatchError extends Error { + readonly code: number = 0x21; + readonly name: string = 'PrintingMintAuthorizationAccountMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintingMintAuthorizationAccountMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x21, () => new PrintingMintAuthorizationAccountMismatchError()); +createErrorFromNameLookup.set( + 'PrintingMintAuthorizationAccountMismatch', + () => new PrintingMintAuthorizationAccountMismatchError(), +); + +/** + * AuthorizationTokenAccountOwnerMismatch: '' + * + * @category Errors + * @category generated + */ +export class AuthorizationTokenAccountOwnerMismatchError extends Error { + readonly code: number = 0x22; + readonly name: string = 'AuthorizationTokenAccountOwnerMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AuthorizationTokenAccountOwnerMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x22, () => new AuthorizationTokenAccountOwnerMismatchError()); +createErrorFromNameLookup.set( + 'AuthorizationTokenAccountOwnerMismatch', + () => new AuthorizationTokenAccountOwnerMismatchError(), +); + +/** + * Disabled: '' + * + * @category Errors + * @category generated + */ +export class DisabledError extends Error { + readonly code: number = 0x23; + readonly name: string = 'Disabled'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DisabledError); + } + } +} + +createErrorFromCodeLookup.set(0x23, () => new DisabledError()); +createErrorFromNameLookup.set('Disabled', () => new DisabledError()); + +/** + * CreatorsTooLong: 'Creators list too long' + * + * @category Errors + * @category generated + */ +export class CreatorsTooLongError extends Error { + readonly code: number = 0x24; + readonly name: string = 'CreatorsTooLong'; + constructor() { + super('Creators list too long'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CreatorsTooLongError); + } + } +} + +createErrorFromCodeLookup.set(0x24, () => new CreatorsTooLongError()); +createErrorFromNameLookup.set('CreatorsTooLong', () => new CreatorsTooLongError()); + +/** + * CreatorsMustBeAtleastOne: 'Creators must be at least one if set' + * + * @category Errors + * @category generated + */ +export class CreatorsMustBeAtleastOneError extends Error { + readonly code: number = 0x25; + readonly name: string = 'CreatorsMustBeAtleastOne'; + constructor() { + super('Creators must be at least one if set'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CreatorsMustBeAtleastOneError); + } + } +} + +createErrorFromCodeLookup.set(0x25, () => new CreatorsMustBeAtleastOneError()); +createErrorFromNameLookup.set( + 'CreatorsMustBeAtleastOne', + () => new CreatorsMustBeAtleastOneError(), +); + +/** + * MustBeOneOfCreators: '' + * + * @category Errors + * @category generated + */ +export class MustBeOneOfCreatorsError extends Error { + readonly code: number = 0x26; + readonly name: string = 'MustBeOneOfCreators'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MustBeOneOfCreatorsError); + } + } +} + +createErrorFromCodeLookup.set(0x26, () => new MustBeOneOfCreatorsError()); +createErrorFromNameLookup.set('MustBeOneOfCreators', () => new MustBeOneOfCreatorsError()); + +/** + * NoCreatorsPresentOnMetadata: 'This metadata does not have creators' + * + * @category Errors + * @category generated + */ +export class NoCreatorsPresentOnMetadataError extends Error { + readonly code: number = 0x27; + readonly name: string = 'NoCreatorsPresentOnMetadata'; + constructor() { + super('This metadata does not have creators'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NoCreatorsPresentOnMetadataError); + } + } +} + +createErrorFromCodeLookup.set(0x27, () => new NoCreatorsPresentOnMetadataError()); +createErrorFromNameLookup.set( + 'NoCreatorsPresentOnMetadata', + () => new NoCreatorsPresentOnMetadataError(), +); + +/** + * CreatorNotFound: 'This creator address was not found' + * + * @category Errors + * @category generated + */ +export class CreatorNotFoundError extends Error { + readonly code: number = 0x28; + readonly name: string = 'CreatorNotFound'; + constructor() { + super('This creator address was not found'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CreatorNotFoundError); + } + } +} + +createErrorFromCodeLookup.set(0x28, () => new CreatorNotFoundError()); +createErrorFromNameLookup.set('CreatorNotFound', () => new CreatorNotFoundError()); + +/** + * InvalidBasisPoints: 'Basis points cannot be more than 10000' + * + * @category Errors + * @category generated + */ +export class InvalidBasisPointsError extends Error { + readonly code: number = 0x29; + readonly name: string = 'InvalidBasisPoints'; + constructor() { + super('Basis points cannot be more than 10000'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidBasisPointsError); + } + } +} + +createErrorFromCodeLookup.set(0x29, () => new InvalidBasisPointsError()); +createErrorFromNameLookup.set('InvalidBasisPoints', () => new InvalidBasisPointsError()); + +/** + * PrimarySaleCanOnlyBeFlippedToTrue: 'Primary sale can only be flipped to true and is immutable' + * + * @category Errors + * @category generated + */ +export class PrimarySaleCanOnlyBeFlippedToTrueError extends Error { + readonly code: number = 0x2a; + readonly name: string = 'PrimarySaleCanOnlyBeFlippedToTrue'; + constructor() { + super('Primary sale can only be flipped to true and is immutable'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrimarySaleCanOnlyBeFlippedToTrueError); + } + } +} + +createErrorFromCodeLookup.set(0x2a, () => new PrimarySaleCanOnlyBeFlippedToTrueError()); +createErrorFromNameLookup.set( + 'PrimarySaleCanOnlyBeFlippedToTrue', + () => new PrimarySaleCanOnlyBeFlippedToTrueError(), +); + +/** + * OwnerMismatch: 'Owner does not match that on the account given' + * + * @category Errors + * @category generated + */ +export class OwnerMismatchError extends Error { + readonly code: number = 0x2b; + readonly name: string = 'OwnerMismatch'; + constructor() { + super('Owner does not match that on the account given'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, OwnerMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x2b, () => new OwnerMismatchError()); +createErrorFromNameLookup.set('OwnerMismatch', () => new OwnerMismatchError()); + +/** + * NoBalanceInAccountForAuthorization: 'This account has no tokens to be used for authorization' + * + * @category Errors + * @category generated + */ +export class NoBalanceInAccountForAuthorizationError extends Error { + readonly code: number = 0x2c; + readonly name: string = 'NoBalanceInAccountForAuthorization'; + constructor() { + super('This account has no tokens to be used for authorization'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NoBalanceInAccountForAuthorizationError); + } + } +} + +createErrorFromCodeLookup.set(0x2c, () => new NoBalanceInAccountForAuthorizationError()); +createErrorFromNameLookup.set( + 'NoBalanceInAccountForAuthorization', + () => new NoBalanceInAccountForAuthorizationError(), +); + +/** + * ShareTotalMustBe100: 'Share total must equal 100 for creator array' + * + * @category Errors + * @category generated + */ +export class ShareTotalMustBe100Error extends Error { + readonly code: number = 0x2d; + readonly name: string = 'ShareTotalMustBe100'; + constructor() { + super('Share total must equal 100 for creator array'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ShareTotalMustBe100Error); + } + } +} + +createErrorFromCodeLookup.set(0x2d, () => new ShareTotalMustBe100Error()); +createErrorFromNameLookup.set('ShareTotalMustBe100', () => new ShareTotalMustBe100Error()); + +/** + * ReservationExists: '' + * + * @category Errors + * @category generated + */ +export class ReservationExistsError extends Error { + readonly code: number = 0x2e; + readonly name: string = 'ReservationExists'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationExistsError); + } + } +} + +createErrorFromCodeLookup.set(0x2e, () => new ReservationExistsError()); +createErrorFromNameLookup.set('ReservationExists', () => new ReservationExistsError()); + +/** + * ReservationDoesNotExist: '' + * + * @category Errors + * @category generated + */ +export class ReservationDoesNotExistError extends Error { + readonly code: number = 0x2f; + readonly name: string = 'ReservationDoesNotExist'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationDoesNotExistError); + } + } +} + +createErrorFromCodeLookup.set(0x2f, () => new ReservationDoesNotExistError()); +createErrorFromNameLookup.set('ReservationDoesNotExist', () => new ReservationDoesNotExistError()); + +/** + * ReservationNotSet: '' + * + * @category Errors + * @category generated + */ +export class ReservationNotSetError extends Error { + readonly code: number = 0x30; + readonly name: string = 'ReservationNotSet'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationNotSetError); + } + } +} + +createErrorFromCodeLookup.set(0x30, () => new ReservationNotSetError()); +createErrorFromNameLookup.set('ReservationNotSet', () => new ReservationNotSetError()); + +/** + * ReservationAlreadyMade: '' + * + * @category Errors + * @category generated + */ +export class ReservationAlreadyMadeError extends Error { + readonly code: number = 0x31; + readonly name: string = 'ReservationAlreadyMade'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationAlreadyMadeError); + } + } +} + +createErrorFromCodeLookup.set(0x31, () => new ReservationAlreadyMadeError()); +createErrorFromNameLookup.set('ReservationAlreadyMade', () => new ReservationAlreadyMadeError()); + +/** + * BeyondMaxAddressSize: '' + * + * @category Errors + * @category generated + */ +export class BeyondMaxAddressSizeError extends Error { + readonly code: number = 0x32; + readonly name: string = 'BeyondMaxAddressSize'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, BeyondMaxAddressSizeError); + } + } +} + +createErrorFromCodeLookup.set(0x32, () => new BeyondMaxAddressSizeError()); +createErrorFromNameLookup.set('BeyondMaxAddressSize', () => new BeyondMaxAddressSizeError()); + +/** + * NumericalOverflowError: 'NumericalOverflowError' + * + * @category Errors + * @category generated + */ +export class NumericalOverflowErrorError extends Error { + readonly code: number = 0x33; + readonly name: string = 'NumericalOverflowError'; + constructor() { + super('NumericalOverflowError'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NumericalOverflowErrorError); + } + } +} + +createErrorFromCodeLookup.set(0x33, () => new NumericalOverflowErrorError()); +createErrorFromNameLookup.set('NumericalOverflowError', () => new NumericalOverflowErrorError()); + +/** + * ReservationBreachesMaximumSupply: '' + * + * @category Errors + * @category generated + */ +export class ReservationBreachesMaximumSupplyError extends Error { + readonly code: number = 0x34; + readonly name: string = 'ReservationBreachesMaximumSupply'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationBreachesMaximumSupplyError); + } + } +} + +createErrorFromCodeLookup.set(0x34, () => new ReservationBreachesMaximumSupplyError()); +createErrorFromNameLookup.set( + 'ReservationBreachesMaximumSupply', + () => new ReservationBreachesMaximumSupplyError(), +); + +/** + * AddressNotInReservation: '' + * + * @category Errors + * @category generated + */ +export class AddressNotInReservationError extends Error { + readonly code: number = 0x35; + readonly name: string = 'AddressNotInReservation'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AddressNotInReservationError); + } + } +} + +createErrorFromCodeLookup.set(0x35, () => new AddressNotInReservationError()); +createErrorFromNameLookup.set('AddressNotInReservation', () => new AddressNotInReservationError()); + +/** + * CannotVerifyAnotherCreator: 'You cannot unilaterally verify another creator, they must sign' + * + * @category Errors + * @category generated + */ +export class CannotVerifyAnotherCreatorError extends Error { + readonly code: number = 0x36; + readonly name: string = 'CannotVerifyAnotherCreator'; + constructor() { + super('You cannot unilaterally verify another creator, they must sign'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotVerifyAnotherCreatorError); + } + } +} + +createErrorFromCodeLookup.set(0x36, () => new CannotVerifyAnotherCreatorError()); +createErrorFromNameLookup.set( + 'CannotVerifyAnotherCreator', + () => new CannotVerifyAnotherCreatorError(), +); + +/** + * CannotUnverifyAnotherCreator: 'You cannot unilaterally unverify another creator' + * + * @category Errors + * @category generated + */ +export class CannotUnverifyAnotherCreatorError extends Error { + readonly code: number = 0x37; + readonly name: string = 'CannotUnverifyAnotherCreator'; + constructor() { + super('You cannot unilaterally unverify another creator'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotUnverifyAnotherCreatorError); + } + } +} + +createErrorFromCodeLookup.set(0x37, () => new CannotUnverifyAnotherCreatorError()); +createErrorFromNameLookup.set( + 'CannotUnverifyAnotherCreator', + () => new CannotUnverifyAnotherCreatorError(), +); + +/** + * SpotMismatch: '' + * + * @category Errors + * @category generated + */ +export class SpotMismatchError extends Error { + readonly code: number = 0x38; + readonly name: string = 'SpotMismatch'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, SpotMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x38, () => new SpotMismatchError()); +createErrorFromNameLookup.set('SpotMismatch', () => new SpotMismatchError()); + +/** + * IncorrectOwner: 'Incorrect account owner' + * + * @category Errors + * @category generated + */ +export class IncorrectOwnerError extends Error { + readonly code: number = 0x39; + readonly name: string = 'IncorrectOwner'; + constructor() { + super('Incorrect account owner'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, IncorrectOwnerError); + } + } +} + +createErrorFromCodeLookup.set(0x39, () => new IncorrectOwnerError()); +createErrorFromNameLookup.set('IncorrectOwner', () => new IncorrectOwnerError()); + +/** + * PrintingWouldBreachMaximumSupply: '' + * + * @category Errors + * @category generated + */ +export class PrintingWouldBreachMaximumSupplyError extends Error { + readonly code: number = 0x3a; + readonly name: string = 'PrintingWouldBreachMaximumSupply'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintingWouldBreachMaximumSupplyError); + } + } +} + +createErrorFromCodeLookup.set(0x3a, () => new PrintingWouldBreachMaximumSupplyError()); +createErrorFromNameLookup.set( + 'PrintingWouldBreachMaximumSupply', + () => new PrintingWouldBreachMaximumSupplyError(), +); + +/** + * DataIsImmutable: 'Data is immutable' + * + * @category Errors + * @category generated + */ +export class DataIsImmutableError extends Error { + readonly code: number = 0x3b; + readonly name: string = 'DataIsImmutable'; + constructor() { + super('Data is immutable'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DataIsImmutableError); + } + } +} + +createErrorFromCodeLookup.set(0x3b, () => new DataIsImmutableError()); +createErrorFromNameLookup.set('DataIsImmutable', () => new DataIsImmutableError()); + +/** + * DuplicateCreatorAddress: 'No duplicate creator addresses' + * + * @category Errors + * @category generated + */ +export class DuplicateCreatorAddressError extends Error { + readonly code: number = 0x3c; + readonly name: string = 'DuplicateCreatorAddress'; + constructor() { + super('No duplicate creator addresses'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DuplicateCreatorAddressError); + } + } +} + +createErrorFromCodeLookup.set(0x3c, () => new DuplicateCreatorAddressError()); +createErrorFromNameLookup.set('DuplicateCreatorAddress', () => new DuplicateCreatorAddressError()); + +/** + * ReservationSpotsRemainingShouldMatchTotalSpotsAtStart: '' + * + * @category Errors + * @category generated + */ +export class ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError extends Error { + readonly code: number = 0x3d; + readonly name: string = 'ReservationSpotsRemainingShouldMatchTotalSpotsAtStart'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError); + } + } +} + +createErrorFromCodeLookup.set( + 0x3d, + () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError(), +); +createErrorFromNameLookup.set( + 'ReservationSpotsRemainingShouldMatchTotalSpotsAtStart', + () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError(), +); + +/** + * InvalidTokenProgram: 'Invalid token program' + * + * @category Errors + * @category generated + */ +export class InvalidTokenProgramError extends Error { + readonly code: number = 0x3e; + readonly name: string = 'InvalidTokenProgram'; + constructor() { + super('Invalid token program'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidTokenProgramError); + } + } +} + +createErrorFromCodeLookup.set(0x3e, () => new InvalidTokenProgramError()); +createErrorFromNameLookup.set('InvalidTokenProgram', () => new InvalidTokenProgramError()); + +/** + * DataTypeMismatch: 'Data type mismatch' + * + * @category Errors + * @category generated + */ +export class DataTypeMismatchError extends Error { + readonly code: number = 0x3f; + readonly name: string = 'DataTypeMismatch'; + constructor() { + super('Data type mismatch'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DataTypeMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x3f, () => new DataTypeMismatchError()); +createErrorFromNameLookup.set('DataTypeMismatch', () => new DataTypeMismatchError()); + +/** + * BeyondAlottedAddressSize: '' + * + * @category Errors + * @category generated + */ +export class BeyondAlottedAddressSizeError extends Error { + readonly code: number = 0x40; + readonly name: string = 'BeyondAlottedAddressSize'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, BeyondAlottedAddressSizeError); + } + } +} + +createErrorFromCodeLookup.set(0x40, () => new BeyondAlottedAddressSizeError()); +createErrorFromNameLookup.set( + 'BeyondAlottedAddressSize', + () => new BeyondAlottedAddressSizeError(), +); + +/** + * ReservationNotComplete: '' + * + * @category Errors + * @category generated + */ +export class ReservationNotCompleteError extends Error { + readonly code: number = 0x41; + readonly name: string = 'ReservationNotComplete'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationNotCompleteError); + } + } +} + +createErrorFromCodeLookup.set(0x41, () => new ReservationNotCompleteError()); +createErrorFromNameLookup.set('ReservationNotComplete', () => new ReservationNotCompleteError()); + +/** + * TriedToReplaceAnExistingReservation: '' + * + * @category Errors + * @category generated + */ +export class TriedToReplaceAnExistingReservationError extends Error { + readonly code: number = 0x42; + readonly name: string = 'TriedToReplaceAnExistingReservation'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TriedToReplaceAnExistingReservationError); + } + } +} + +createErrorFromCodeLookup.set(0x42, () => new TriedToReplaceAnExistingReservationError()); +createErrorFromNameLookup.set( + 'TriedToReplaceAnExistingReservation', + () => new TriedToReplaceAnExistingReservationError(), +); + +/** + * InvalidOperation: 'Invalid operation' + * + * @category Errors + * @category generated + */ +export class InvalidOperationError extends Error { + readonly code: number = 0x43; + readonly name: string = 'InvalidOperation'; + constructor() { + super('Invalid operation'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidOperationError); + } + } +} + +createErrorFromCodeLookup.set(0x43, () => new InvalidOperationError()); +createErrorFromNameLookup.set('InvalidOperation', () => new InvalidOperationError()); + +/** + * InvalidOwner: 'Invalid Owner' + * + * @category Errors + * @category generated + */ +export class InvalidOwnerError extends Error { + readonly code: number = 0x44; + readonly name: string = 'InvalidOwner'; + constructor() { + super('Invalid Owner'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidOwnerError); + } + } +} + +createErrorFromCodeLookup.set(0x44, () => new InvalidOwnerError()); +createErrorFromNameLookup.set('InvalidOwner', () => new InvalidOwnerError()); + +/** + * PrintingMintSupplyMustBeZeroForConversion: 'Printing mint supply must be zero for conversion' + * + * @category Errors + * @category generated + */ +export class PrintingMintSupplyMustBeZeroForConversionError extends Error { + readonly code: number = 0x45; + readonly name: string = 'PrintingMintSupplyMustBeZeroForConversion'; + constructor() { + super('Printing mint supply must be zero for conversion'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintingMintSupplyMustBeZeroForConversionError); + } + } +} + +createErrorFromCodeLookup.set(0x45, () => new PrintingMintSupplyMustBeZeroForConversionError()); +createErrorFromNameLookup.set( + 'PrintingMintSupplyMustBeZeroForConversion', + () => new PrintingMintSupplyMustBeZeroForConversionError(), +); + +/** + * OneTimeAuthMintSupplyMustBeZeroForConversion: 'One Time Auth mint supply must be zero for conversion' + * + * @category Errors + * @category generated + */ +export class OneTimeAuthMintSupplyMustBeZeroForConversionError extends Error { + readonly code: number = 0x46; + readonly name: string = 'OneTimeAuthMintSupplyMustBeZeroForConversion'; + constructor() { + super('One Time Auth mint supply must be zero for conversion'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, OneTimeAuthMintSupplyMustBeZeroForConversionError); + } + } +} + +createErrorFromCodeLookup.set(0x46, () => new OneTimeAuthMintSupplyMustBeZeroForConversionError()); +createErrorFromNameLookup.set( + 'OneTimeAuthMintSupplyMustBeZeroForConversion', + () => new OneTimeAuthMintSupplyMustBeZeroForConversionError(), +); + +/** + * InvalidEditionIndex: 'You tried to insert one edition too many into an edition mark pda' + * + * @category Errors + * @category generated + */ +export class InvalidEditionIndexError extends Error { + readonly code: number = 0x47; + readonly name: string = 'InvalidEditionIndex'; + constructor() { + super('You tried to insert one edition too many into an edition mark pda'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidEditionIndexError); + } + } +} + +createErrorFromCodeLookup.set(0x47, () => new InvalidEditionIndexError()); +createErrorFromNameLookup.set('InvalidEditionIndex', () => new InvalidEditionIndexError()); + +/** + * ReservationArrayShouldBeSizeOne: '' + * + * @category Errors + * @category generated + */ +export class ReservationArrayShouldBeSizeOneError extends Error { + readonly code: number = 0x48; + readonly name: string = 'ReservationArrayShouldBeSizeOne'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationArrayShouldBeSizeOneError); + } + } +} + +createErrorFromCodeLookup.set(0x48, () => new ReservationArrayShouldBeSizeOneError()); +createErrorFromNameLookup.set( + 'ReservationArrayShouldBeSizeOne', + () => new ReservationArrayShouldBeSizeOneError(), +); + +/** + * IsMutableCanOnlyBeFlippedToFalse: 'Is Mutable can only be flipped to false' + * + * @category Errors + * @category generated + */ +export class IsMutableCanOnlyBeFlippedToFalseError extends Error { + readonly code: number = 0x49; + readonly name: string = 'IsMutableCanOnlyBeFlippedToFalse'; + constructor() { + super('Is Mutable can only be flipped to false'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, IsMutableCanOnlyBeFlippedToFalseError); + } + } +} + +createErrorFromCodeLookup.set(0x49, () => new IsMutableCanOnlyBeFlippedToFalseError()); +createErrorFromNameLookup.set( + 'IsMutableCanOnlyBeFlippedToFalse', + () => new IsMutableCanOnlyBeFlippedToFalseError(), +); + +/** + * CollectionCannotBeVerifiedInThisInstruction: 'Collection cannot be verified in this instruction' + * + * @category Errors + * @category generated + */ +export class CollectionCannotBeVerifiedInThisInstructionError extends Error { + readonly code: number = 0x4a; + readonly name: string = 'CollectionCannotBeVerifiedInThisInstruction'; + constructor() { + super('Collection cannot be verified in this instruction'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionCannotBeVerifiedInThisInstructionError); + } + } +} + +createErrorFromCodeLookup.set(0x4a, () => new CollectionCannotBeVerifiedInThisInstructionError()); +createErrorFromNameLookup.set( + 'CollectionCannotBeVerifiedInThisInstruction', + () => new CollectionCannotBeVerifiedInThisInstructionError(), +); + +/** + * Removed: 'This instruction was deprecated in a previous release and is now removed' + * + * @category Errors + * @category generated + */ +export class RemovedError extends Error { + readonly code: number = 0x4b; + readonly name: string = 'Removed'; + constructor() { + super('This instruction was deprecated in a previous release and is now removed'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, RemovedError); + } + } +} + +createErrorFromCodeLookup.set(0x4b, () => new RemovedError()); +createErrorFromNameLookup.set('Removed', () => new RemovedError()); + +/** + * MustBeBurned: '' + * + * @category Errors + * @category generated + */ +export class MustBeBurnedError extends Error { + readonly code: number = 0x4c; + readonly name: string = 'MustBeBurned'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MustBeBurnedError); + } + } +} + +createErrorFromCodeLookup.set(0x4c, () => new MustBeBurnedError()); +createErrorFromNameLookup.set('MustBeBurned', () => new MustBeBurnedError()); + +/** + * InvalidUseMethod: 'This use method is invalid' + * + * @category Errors + * @category generated + */ +export class InvalidUseMethodError extends Error { + readonly code: number = 0x4d; + readonly name: string = 'InvalidUseMethod'; + constructor() { + super('This use method is invalid'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidUseMethodError); + } + } +} + +createErrorFromCodeLookup.set(0x4d, () => new InvalidUseMethodError()); +createErrorFromNameLookup.set('InvalidUseMethod', () => new InvalidUseMethodError()); + +/** + * CannotChangeUseMethodAfterFirstUse: 'Cannot Change Use Method after the first use' + * + * @category Errors + * @category generated + */ +export class CannotChangeUseMethodAfterFirstUseError extends Error { + readonly code: number = 0x4e; + readonly name: string = 'CannotChangeUseMethodAfterFirstUse'; + constructor() { + super('Cannot Change Use Method after the first use'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotChangeUseMethodAfterFirstUseError); + } + } +} + +createErrorFromCodeLookup.set(0x4e, () => new CannotChangeUseMethodAfterFirstUseError()); +createErrorFromNameLookup.set( + 'CannotChangeUseMethodAfterFirstUse', + () => new CannotChangeUseMethodAfterFirstUseError(), +); + +/** + * CannotChangeUsesAfterFirstUse: 'Cannot Change Remaining or Available uses after the first use' + * + * @category Errors + * @category generated + */ +export class CannotChangeUsesAfterFirstUseError extends Error { + readonly code: number = 0x4f; + readonly name: string = 'CannotChangeUsesAfterFirstUse'; + constructor() { + super('Cannot Change Remaining or Available uses after the first use'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotChangeUsesAfterFirstUseError); + } + } +} + +createErrorFromCodeLookup.set(0x4f, () => new CannotChangeUsesAfterFirstUseError()); +createErrorFromNameLookup.set( + 'CannotChangeUsesAfterFirstUse', + () => new CannotChangeUsesAfterFirstUseError(), +); + +/** + * CollectionNotFound: 'Collection Not Found on Metadata' + * + * @category Errors + * @category generated + */ +export class CollectionNotFoundError extends Error { + readonly code: number = 0x50; + readonly name: string = 'CollectionNotFound'; + constructor() { + super('Collection Not Found on Metadata'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionNotFoundError); + } + } +} + +createErrorFromCodeLookup.set(0x50, () => new CollectionNotFoundError()); +createErrorFromNameLookup.set('CollectionNotFound', () => new CollectionNotFoundError()); + +/** + * InvalidCollectionUpdateAuthority: 'Collection Update Authority is invalid' + * + * @category Errors + * @category generated + */ +export class InvalidCollectionUpdateAuthorityError extends Error { + readonly code: number = 0x51; + readonly name: string = 'InvalidCollectionUpdateAuthority'; + constructor() { + super('Collection Update Authority is invalid'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidCollectionUpdateAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0x51, () => new InvalidCollectionUpdateAuthorityError()); +createErrorFromNameLookup.set( + 'InvalidCollectionUpdateAuthority', + () => new InvalidCollectionUpdateAuthorityError(), +); + +/** + * CollectionMustBeAUniqueMasterEdition: 'Collection Must Be a Unique Master Edition v2' + * + * @category Errors + * @category generated + */ +export class CollectionMustBeAUniqueMasterEditionError extends Error { + readonly code: number = 0x52; + readonly name: string = 'CollectionMustBeAUniqueMasterEdition'; + constructor() { + super('Collection Must Be a Unique Master Edition v2'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionMustBeAUniqueMasterEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x52, () => new CollectionMustBeAUniqueMasterEditionError()); +createErrorFromNameLookup.set( + 'CollectionMustBeAUniqueMasterEdition', + () => new CollectionMustBeAUniqueMasterEditionError(), +); + +/** + * UseAuthorityRecordAlreadyExists: 'The Use Authority Record Already Exists, to modify it Revoke, then Approve' + * + * @category Errors + * @category generated + */ +export class UseAuthorityRecordAlreadyExistsError extends Error { + readonly code: number = 0x53; + readonly name: string = 'UseAuthorityRecordAlreadyExists'; + constructor() { + super('The Use Authority Record Already Exists, to modify it Revoke, then Approve'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UseAuthorityRecordAlreadyExistsError); + } + } +} + +createErrorFromCodeLookup.set(0x53, () => new UseAuthorityRecordAlreadyExistsError()); +createErrorFromNameLookup.set( + 'UseAuthorityRecordAlreadyExists', + () => new UseAuthorityRecordAlreadyExistsError(), +); + +/** + * UseAuthorityRecordAlreadyRevoked: 'The Use Authority Record is empty or already revoked' + * + * @category Errors + * @category generated + */ +export class UseAuthorityRecordAlreadyRevokedError extends Error { + readonly code: number = 0x54; + readonly name: string = 'UseAuthorityRecordAlreadyRevoked'; + constructor() { + super('The Use Authority Record is empty or already revoked'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UseAuthorityRecordAlreadyRevokedError); + } + } +} + +createErrorFromCodeLookup.set(0x54, () => new UseAuthorityRecordAlreadyRevokedError()); +createErrorFromNameLookup.set( + 'UseAuthorityRecordAlreadyRevoked', + () => new UseAuthorityRecordAlreadyRevokedError(), +); + +/** + * Unusable: 'This token has no uses' + * + * @category Errors + * @category generated + */ +export class UnusableError extends Error { + readonly code: number = 0x55; + readonly name: string = 'Unusable'; + constructor() { + super('This token has no uses'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UnusableError); + } + } +} + +createErrorFromCodeLookup.set(0x55, () => new UnusableError()); +createErrorFromNameLookup.set('Unusable', () => new UnusableError()); + +/** + * NotEnoughUses: 'There are not enough Uses left on this token.' + * + * @category Errors + * @category generated + */ +export class NotEnoughUsesError extends Error { + readonly code: number = 0x56; + readonly name: string = 'NotEnoughUses'; + constructor() { + super('There are not enough Uses left on this token.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotEnoughUsesError); + } + } +} + +createErrorFromCodeLookup.set(0x56, () => new NotEnoughUsesError()); +createErrorFromNameLookup.set('NotEnoughUses', () => new NotEnoughUsesError()); + +/** + * CollectionAuthorityRecordAlreadyExists: 'This Collection Authority Record Already Exists.' + * + * @category Errors + * @category generated + */ +export class CollectionAuthorityRecordAlreadyExistsError extends Error { + readonly code: number = 0x57; + readonly name: string = 'CollectionAuthorityRecordAlreadyExists'; + constructor() { + super('This Collection Authority Record Already Exists.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionAuthorityRecordAlreadyExistsError); + } + } +} + +createErrorFromCodeLookup.set(0x57, () => new CollectionAuthorityRecordAlreadyExistsError()); +createErrorFromNameLookup.set( + 'CollectionAuthorityRecordAlreadyExists', + () => new CollectionAuthorityRecordAlreadyExistsError(), +); + +/** + * CollectionAuthorityDoesNotExist: 'This Collection Authority Record Does Not Exist.' + * + * @category Errors + * @category generated + */ +export class CollectionAuthorityDoesNotExistError extends Error { + readonly code: number = 0x58; + readonly name: string = 'CollectionAuthorityDoesNotExist'; + constructor() { + super('This Collection Authority Record Does Not Exist.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionAuthorityDoesNotExistError); + } + } +} + +createErrorFromCodeLookup.set(0x58, () => new CollectionAuthorityDoesNotExistError()); +createErrorFromNameLookup.set( + 'CollectionAuthorityDoesNotExist', + () => new CollectionAuthorityDoesNotExistError(), +); + +/** + * InvalidUseAuthorityRecord: 'This Use Authority Record is invalid.' + * + * @category Errors + * @category generated + */ +export class InvalidUseAuthorityRecordError extends Error { + readonly code: number = 0x59; + readonly name: string = 'InvalidUseAuthorityRecord'; + constructor() { + super('This Use Authority Record is invalid.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidUseAuthorityRecordError); + } + } +} + +createErrorFromCodeLookup.set(0x59, () => new InvalidUseAuthorityRecordError()); +createErrorFromNameLookup.set( + 'InvalidUseAuthorityRecord', + () => new InvalidUseAuthorityRecordError(), +); + +/** + * InvalidCollectionAuthorityRecord: '' + * + * @category Errors + * @category generated + */ +export class InvalidCollectionAuthorityRecordError extends Error { + readonly code: number = 0x5a; + readonly name: string = 'InvalidCollectionAuthorityRecord'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidCollectionAuthorityRecordError); + } + } +} + +createErrorFromCodeLookup.set(0x5a, () => new InvalidCollectionAuthorityRecordError()); +createErrorFromNameLookup.set( + 'InvalidCollectionAuthorityRecord', + () => new InvalidCollectionAuthorityRecordError(), +); + +/** + * InvalidFreezeAuthority: 'Metadata does not match the freeze authority on the mint' + * + * @category Errors + * @category generated + */ +export class InvalidFreezeAuthorityError extends Error { + readonly code: number = 0x5b; + readonly name: string = 'InvalidFreezeAuthority'; + constructor() { + super('Metadata does not match the freeze authority on the mint'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidFreezeAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0x5b, () => new InvalidFreezeAuthorityError()); +createErrorFromNameLookup.set('InvalidFreezeAuthority', () => new InvalidFreezeAuthorityError()); + +/** + * InvalidDelegate: 'All tokens in this account have not been delegated to this user.' + * + * @category Errors + * @category generated + */ +export class InvalidDelegateError extends Error { + readonly code: number = 0x5c; + readonly name: string = 'InvalidDelegate'; + constructor() { + super('All tokens in this account have not been delegated to this user.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidDelegateError); + } + } +} + +createErrorFromCodeLookup.set(0x5c, () => new InvalidDelegateError()); +createErrorFromNameLookup.set('InvalidDelegate', () => new InvalidDelegateError()); + +/** + * CannotAdjustVerifiedCreator: '' + * + * @category Errors + * @category generated + */ +export class CannotAdjustVerifiedCreatorError extends Error { + readonly code: number = 0x5d; + readonly name: string = 'CannotAdjustVerifiedCreator'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotAdjustVerifiedCreatorError); + } + } +} + +createErrorFromCodeLookup.set(0x5d, () => new CannotAdjustVerifiedCreatorError()); +createErrorFromNameLookup.set( + 'CannotAdjustVerifiedCreator', + () => new CannotAdjustVerifiedCreatorError(), +); + +/** + * CannotRemoveVerifiedCreator: 'Verified creators cannot be removed.' + * + * @category Errors + * @category generated + */ +export class CannotRemoveVerifiedCreatorError extends Error { + readonly code: number = 0x5e; + readonly name: string = 'CannotRemoveVerifiedCreator'; + constructor() { + super('Verified creators cannot be removed.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotRemoveVerifiedCreatorError); + } + } +} + +createErrorFromCodeLookup.set(0x5e, () => new CannotRemoveVerifiedCreatorError()); +createErrorFromNameLookup.set( + 'CannotRemoveVerifiedCreator', + () => new CannotRemoveVerifiedCreatorError(), +); + +/** + * CannotWipeVerifiedCreators: '' + * + * @category Errors + * @category generated + */ +export class CannotWipeVerifiedCreatorsError extends Error { + readonly code: number = 0x5f; + readonly name: string = 'CannotWipeVerifiedCreators'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotWipeVerifiedCreatorsError); + } + } +} + +createErrorFromCodeLookup.set(0x5f, () => new CannotWipeVerifiedCreatorsError()); +createErrorFromNameLookup.set( + 'CannotWipeVerifiedCreators', + () => new CannotWipeVerifiedCreatorsError(), +); + +/** + * NotAllowedToChangeSellerFeeBasisPoints: '' + * + * @category Errors + * @category generated + */ +export class NotAllowedToChangeSellerFeeBasisPointsError extends Error { + readonly code: number = 0x60; + readonly name: string = 'NotAllowedToChangeSellerFeeBasisPoints'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotAllowedToChangeSellerFeeBasisPointsError); + } + } +} + +createErrorFromCodeLookup.set(0x60, () => new NotAllowedToChangeSellerFeeBasisPointsError()); +createErrorFromNameLookup.set( + 'NotAllowedToChangeSellerFeeBasisPoints', + () => new NotAllowedToChangeSellerFeeBasisPointsError(), +); + +/** + * EditionOverrideCannotBeZero: 'Edition override cannot be zero' + * + * @category Errors + * @category generated + */ +export class EditionOverrideCannotBeZeroError extends Error { + readonly code: number = 0x61; + readonly name: string = 'EditionOverrideCannotBeZero'; + constructor() { + super('Edition override cannot be zero'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EditionOverrideCannotBeZeroError); + } + } +} + +createErrorFromCodeLookup.set(0x61, () => new EditionOverrideCannotBeZeroError()); +createErrorFromNameLookup.set( + 'EditionOverrideCannotBeZero', + () => new EditionOverrideCannotBeZeroError(), +); + +/** + * InvalidUser: 'Invalid User' + * + * @category Errors + * @category generated + */ +export class InvalidUserError extends Error { + readonly code: number = 0x62; + readonly name: string = 'InvalidUser'; + constructor() { + super('Invalid User'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidUserError); + } + } +} + +createErrorFromCodeLookup.set(0x62, () => new InvalidUserError()); +createErrorFromNameLookup.set('InvalidUser', () => new InvalidUserError()); + +/** + * RevokeCollectionAuthoritySignerIncorrect: 'Revoke Collection Authority signer is incorrect' + * + * @category Errors + * @category generated + */ +export class RevokeCollectionAuthoritySignerIncorrectError extends Error { + readonly code: number = 0x63; + readonly name: string = 'RevokeCollectionAuthoritySignerIncorrect'; + constructor() { + super('Revoke Collection Authority signer is incorrect'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, RevokeCollectionAuthoritySignerIncorrectError); + } + } +} + +createErrorFromCodeLookup.set(0x63, () => new RevokeCollectionAuthoritySignerIncorrectError()); +createErrorFromNameLookup.set( + 'RevokeCollectionAuthoritySignerIncorrect', + () => new RevokeCollectionAuthoritySignerIncorrectError(), +); + +/** + * TokenCloseFailed: '' + * + * @category Errors + * @category generated + */ +export class TokenCloseFailedError extends Error { + readonly code: number = 0x64; + readonly name: string = 'TokenCloseFailed'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TokenCloseFailedError); + } + } +} + +createErrorFromCodeLookup.set(0x64, () => new TokenCloseFailedError()); +createErrorFromNameLookup.set('TokenCloseFailed', () => new TokenCloseFailedError()); + +/** + * UnsizedCollection: 'Can't use this function on unsized collection' + * + * @category Errors + * @category generated + */ +export class UnsizedCollectionError extends Error { + readonly code: number = 0x65; + readonly name: string = 'UnsizedCollection'; + constructor() { + super("Can't use this function on unsized collection"); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UnsizedCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x65, () => new UnsizedCollectionError()); +createErrorFromNameLookup.set('UnsizedCollection', () => new UnsizedCollectionError()); + +/** + * SizedCollection: 'Can't use this function on a sized collection' + * + * @category Errors + * @category generated + */ +export class SizedCollectionError extends Error { + readonly code: number = 0x66; + readonly name: string = 'SizedCollection'; + constructor() { + super("Can't use this function on a sized collection"); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, SizedCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x66, () => new SizedCollectionError()); +createErrorFromNameLookup.set('SizedCollection', () => new SizedCollectionError()); + +/** + * MissingCollectionMetadata: 'Missing collection metadata account' + * + * @category Errors + * @category generated + */ +export class MissingCollectionMetadataError extends Error { + readonly code: number = 0x67; + readonly name: string = 'MissingCollectionMetadata'; + constructor() { + super('Missing collection metadata account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingCollectionMetadataError); + } + } +} + +createErrorFromCodeLookup.set(0x67, () => new MissingCollectionMetadataError()); +createErrorFromNameLookup.set( + 'MissingCollectionMetadata', + () => new MissingCollectionMetadataError(), +); + +/** + * NotAMemberOfCollection: 'This NFT is not a member of the specified collection.' + * + * @category Errors + * @category generated + */ +export class NotAMemberOfCollectionError extends Error { + readonly code: number = 0x68; + readonly name: string = 'NotAMemberOfCollection'; + constructor() { + super('This NFT is not a member of the specified collection.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotAMemberOfCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x68, () => new NotAMemberOfCollectionError()); +createErrorFromNameLookup.set('NotAMemberOfCollection', () => new NotAMemberOfCollectionError()); + +/** + * NotVerifiedMemberOfCollection: 'This NFT is not a verified member of the specified collection.' + * + * @category Errors + * @category generated + */ +export class NotVerifiedMemberOfCollectionError extends Error { + readonly code: number = 0x69; + readonly name: string = 'NotVerifiedMemberOfCollection'; + constructor() { + super('This NFT is not a verified member of the specified collection.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotVerifiedMemberOfCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x69, () => new NotVerifiedMemberOfCollectionError()); +createErrorFromNameLookup.set( + 'NotVerifiedMemberOfCollection', + () => new NotVerifiedMemberOfCollectionError(), +); + +/** + * NotACollectionParent: 'This NFT is not a collection parent NFT.' + * + * @category Errors + * @category generated + */ +export class NotACollectionParentError extends Error { + readonly code: number = 0x6a; + readonly name: string = 'NotACollectionParent'; + constructor() { + super('This NFT is not a collection parent NFT.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotACollectionParentError); + } + } +} + +createErrorFromCodeLookup.set(0x6a, () => new NotACollectionParentError()); +createErrorFromNameLookup.set('NotACollectionParent', () => new NotACollectionParentError()); + +/** + * CouldNotDetermineTokenStandard: 'Could not determine a TokenStandard type.' + * + * @category Errors + * @category generated + */ +export class CouldNotDetermineTokenStandardError extends Error { + readonly code: number = 0x6b; + readonly name: string = 'CouldNotDetermineTokenStandard'; + constructor() { + super('Could not determine a TokenStandard type.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CouldNotDetermineTokenStandardError); + } + } +} + +createErrorFromCodeLookup.set(0x6b, () => new CouldNotDetermineTokenStandardError()); +createErrorFromNameLookup.set( + 'CouldNotDetermineTokenStandard', + () => new CouldNotDetermineTokenStandardError(), +); + +/** + * MissingEditionAccount: 'This mint account has an edition but none was provided.' + * + * @category Errors + * @category generated + */ +export class MissingEditionAccountError extends Error { + readonly code: number = 0x6c; + readonly name: string = 'MissingEditionAccount'; + constructor() { + super('This mint account has an edition but none was provided.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingEditionAccountError); + } + } +} + +createErrorFromCodeLookup.set(0x6c, () => new MissingEditionAccountError()); +createErrorFromNameLookup.set('MissingEditionAccount', () => new MissingEditionAccountError()); + +/** + * NotAMasterEdition: 'This edition is not a Master Edition' + * + * @category Errors + * @category generated + */ +export class NotAMasterEditionError extends Error { + readonly code: number = 0x6d; + readonly name: string = 'NotAMasterEdition'; + constructor() { + super('This edition is not a Master Edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotAMasterEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x6d, () => new NotAMasterEditionError()); +createErrorFromNameLookup.set('NotAMasterEdition', () => new NotAMasterEditionError()); + +/** + * MasterEditionHasPrints: 'This Master Edition has existing prints' + * + * @category Errors + * @category generated + */ +export class MasterEditionHasPrintsError extends Error { + readonly code: number = 0x6e; + readonly name: string = 'MasterEditionHasPrints'; + constructor() { + super('This Master Edition has existing prints'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MasterEditionHasPrintsError); + } + } +} + +createErrorFromCodeLookup.set(0x6e, () => new MasterEditionHasPrintsError()); +createErrorFromNameLookup.set('MasterEditionHasPrints', () => new MasterEditionHasPrintsError()); + +/** + * BorshDeserializationError: '' + * + * @category Errors + * @category generated + */ +export class BorshDeserializationErrorError extends Error { + readonly code: number = 0x6f; + readonly name: string = 'BorshDeserializationError'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, BorshDeserializationErrorError); + } + } +} + +createErrorFromCodeLookup.set(0x6f, () => new BorshDeserializationErrorError()); +createErrorFromNameLookup.set( + 'BorshDeserializationError', + () => new BorshDeserializationErrorError(), +); + +/** + * CannotUpdateVerifiedCollection: 'Cannot update a verified collection in this command' + * + * @category Errors + * @category generated + */ +export class CannotUpdateVerifiedCollectionError extends Error { + readonly code: number = 0x70; + readonly name: string = 'CannotUpdateVerifiedCollection'; + constructor() { + super('Cannot update a verified collection in this command'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotUpdateVerifiedCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x70, () => new CannotUpdateVerifiedCollectionError()); +createErrorFromNameLookup.set( + 'CannotUpdateVerifiedCollection', + () => new CannotUpdateVerifiedCollectionError(), +); + +/** + * CollectionMasterEditionAccountInvalid: 'Edition account doesnt match collection ' + * + * @category Errors + * @category generated + */ +export class CollectionMasterEditionAccountInvalidError extends Error { + readonly code: number = 0x71; + readonly name: string = 'CollectionMasterEditionAccountInvalid'; + constructor() { + super('Edition account doesnt match collection '); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionMasterEditionAccountInvalidError); + } + } +} + +createErrorFromCodeLookup.set(0x71, () => new CollectionMasterEditionAccountInvalidError()); +createErrorFromNameLookup.set( + 'CollectionMasterEditionAccountInvalid', + () => new CollectionMasterEditionAccountInvalidError(), +); + +/** + * AlreadyVerified: 'Item is already verified.' + * + * @category Errors + * @category generated + */ +export class AlreadyVerifiedError extends Error { + readonly code: number = 0x72; + readonly name: string = 'AlreadyVerified'; + constructor() { + super('Item is already verified.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AlreadyVerifiedError); + } + } +} + +createErrorFromCodeLookup.set(0x72, () => new AlreadyVerifiedError()); +createErrorFromNameLookup.set('AlreadyVerified', () => new AlreadyVerifiedError()); + +/** + * AlreadyUnverified: '' + * + * @category Errors + * @category generated + */ +export class AlreadyUnverifiedError extends Error { + readonly code: number = 0x73; + readonly name: string = 'AlreadyUnverified'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AlreadyUnverifiedError); + } + } +} + +createErrorFromCodeLookup.set(0x73, () => new AlreadyUnverifiedError()); +createErrorFromNameLookup.set('AlreadyUnverified', () => new AlreadyUnverifiedError()); + +/** + * NotAPrintEdition: 'This edition is not a Print Edition' + * + * @category Errors + * @category generated + */ +export class NotAPrintEditionError extends Error { + readonly code: number = 0x74; + readonly name: string = 'NotAPrintEdition'; + constructor() { + super('This edition is not a Print Edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NotAPrintEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x74, () => new NotAPrintEditionError()); +createErrorFromNameLookup.set('NotAPrintEdition', () => new NotAPrintEditionError()); + +/** + * InvalidMasterEdition: 'Invalid Master Edition' + * + * @category Errors + * @category generated + */ +export class InvalidMasterEditionError extends Error { + readonly code: number = 0x75; + readonly name: string = 'InvalidMasterEdition'; + constructor() { + super('Invalid Master Edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMasterEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x75, () => new InvalidMasterEditionError()); +createErrorFromNameLookup.set('InvalidMasterEdition', () => new InvalidMasterEditionError()); + +/** + * InvalidPrintEdition: 'Invalid Print Edition' + * + * @category Errors + * @category generated + */ +export class InvalidPrintEditionError extends Error { + readonly code: number = 0x76; + readonly name: string = 'InvalidPrintEdition'; + constructor() { + super('Invalid Print Edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidPrintEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x76, () => new InvalidPrintEditionError()); +createErrorFromNameLookup.set('InvalidPrintEdition', () => new InvalidPrintEditionError()); + +/** + * InvalidEditionMarker: 'Invalid Edition Marker' + * + * @category Errors + * @category generated + */ +export class InvalidEditionMarkerError extends Error { + readonly code: number = 0x77; + readonly name: string = 'InvalidEditionMarker'; + constructor() { + super('Invalid Edition Marker'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidEditionMarkerError); + } + } +} + +createErrorFromCodeLookup.set(0x77, () => new InvalidEditionMarkerError()); +createErrorFromNameLookup.set('InvalidEditionMarker', () => new InvalidEditionMarkerError()); + +/** + * ReservationListDeprecated: 'Reservation List is Deprecated' + * + * @category Errors + * @category generated + */ +export class ReservationListDeprecatedError extends Error { + readonly code: number = 0x78; + readonly name: string = 'ReservationListDeprecated'; + constructor() { + super('Reservation List is Deprecated'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ReservationListDeprecatedError); + } + } +} + +createErrorFromCodeLookup.set(0x78, () => new ReservationListDeprecatedError()); +createErrorFromNameLookup.set( + 'ReservationListDeprecated', + () => new ReservationListDeprecatedError(), +); + +/** + * PrintEditionDoesNotMatchMasterEdition: 'Print Edition does not match Master Edition' + * + * @category Errors + * @category generated + */ +export class PrintEditionDoesNotMatchMasterEditionError extends Error { + readonly code: number = 0x79; + readonly name: string = 'PrintEditionDoesNotMatchMasterEdition'; + constructor() { + super('Print Edition does not match Master Edition'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrintEditionDoesNotMatchMasterEditionError); + } + } +} + +createErrorFromCodeLookup.set(0x79, () => new PrintEditionDoesNotMatchMasterEditionError()); +createErrorFromNameLookup.set( + 'PrintEditionDoesNotMatchMasterEdition', + () => new PrintEditionDoesNotMatchMasterEditionError(), +); + +/** + * EditionNumberGreaterThanMaxSupply: 'Edition Number greater than max supply' + * + * @category Errors + * @category generated + */ +export class EditionNumberGreaterThanMaxSupplyError extends Error { + readonly code: number = 0x7a; + readonly name: string = 'EditionNumberGreaterThanMaxSupply'; + constructor() { + super('Edition Number greater than max supply'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EditionNumberGreaterThanMaxSupplyError); + } + } +} + +createErrorFromCodeLookup.set(0x7a, () => new EditionNumberGreaterThanMaxSupplyError()); +createErrorFromNameLookup.set( + 'EditionNumberGreaterThanMaxSupply', + () => new EditionNumberGreaterThanMaxSupplyError(), +); + +/** + * MustUnverify: 'Must unverify before migrating collections.' + * + * @category Errors + * @category generated + */ +export class MustUnverifyError extends Error { + readonly code: number = 0x7b; + readonly name: string = 'MustUnverify'; + constructor() { + super('Must unverify before migrating collections.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MustUnverifyError); + } + } +} + +createErrorFromCodeLookup.set(0x7b, () => new MustUnverifyError()); +createErrorFromNameLookup.set('MustUnverify', () => new MustUnverifyError()); + +/** + * InvalidEscrowBumpSeed: 'Invalid Escrow Account Bump Seed' + * + * @category Errors + * @category generated + */ +export class InvalidEscrowBumpSeedError extends Error { + readonly code: number = 0x7c; + readonly name: string = 'InvalidEscrowBumpSeed'; + constructor() { + super('Invalid Escrow Account Bump Seed'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidEscrowBumpSeedError); + } + } +} + +createErrorFromCodeLookup.set(0x7c, () => new InvalidEscrowBumpSeedError()); +createErrorFromNameLookup.set('InvalidEscrowBumpSeed', () => new InvalidEscrowBumpSeedError()); + +/** + * MustBeEscrowAuthority: 'Must Escrow Authority' + * + * @category Errors + * @category generated + */ +export class MustBeEscrowAuthorityError extends Error { + readonly code: number = 0x7d; + readonly name: string = 'MustBeEscrowAuthority'; + constructor() { + super('Must Escrow Authority'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MustBeEscrowAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0x7d, () => new MustBeEscrowAuthorityError()); +createErrorFromNameLookup.set('MustBeEscrowAuthority', () => new MustBeEscrowAuthorityError()); + +/** + * InvalidSystemProgram: 'Invalid System Program' + * + * @category Errors + * @category generated + */ +export class InvalidSystemProgramError extends Error { + readonly code: number = 0x7e; + readonly name: string = 'InvalidSystemProgram'; + constructor() { + super('Invalid System Program'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidSystemProgramError); + } + } +} + +createErrorFromCodeLookup.set(0x7e, () => new InvalidSystemProgramError()); +createErrorFromNameLookup.set('InvalidSystemProgram', () => new InvalidSystemProgramError()); + +/** + * MustBeNonFungible: 'Must be a Non Fungible Token' + * + * @category Errors + * @category generated + */ +export class MustBeNonFungibleError extends Error { + readonly code: number = 0x7f; + readonly name: string = 'MustBeNonFungible'; + constructor() { + super('Must be a Non Fungible Token'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MustBeNonFungibleError); + } + } +} + +createErrorFromCodeLookup.set(0x7f, () => new MustBeNonFungibleError()); +createErrorFromNameLookup.set('MustBeNonFungible', () => new MustBeNonFungibleError()); + +/** + * InsufficientTokens: 'Insufficient tokens for transfer' + * + * @category Errors + * @category generated + */ +export class InsufficientTokensError extends Error { + readonly code: number = 0x80; + readonly name: string = 'InsufficientTokens'; + constructor() { + super('Insufficient tokens for transfer'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InsufficientTokensError); + } + } +} + +createErrorFromCodeLookup.set(0x80, () => new InsufficientTokensError()); +createErrorFromNameLookup.set('InsufficientTokens', () => new InsufficientTokensError()); + +/** + * BorshSerializationError: 'Borsh Serialization Error' + * + * @category Errors + * @category generated + */ +export class BorshSerializationErrorError extends Error { + readonly code: number = 0x81; + readonly name: string = 'BorshSerializationError'; + constructor() { + super('Borsh Serialization Error'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, BorshSerializationErrorError); + } + } +} + +createErrorFromCodeLookup.set(0x81, () => new BorshSerializationErrorError()); +createErrorFromNameLookup.set('BorshSerializationError', () => new BorshSerializationErrorError()); + +/** + * NoFreezeAuthoritySet: 'Cannot create NFT with no Freeze Authority.' + * + * @category Errors + * @category generated + */ +export class NoFreezeAuthoritySetError extends Error { + readonly code: number = 0x82; + readonly name: string = 'NoFreezeAuthoritySet'; + constructor() { + super('Cannot create NFT with no Freeze Authority.'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NoFreezeAuthoritySetError); + } + } +} + +createErrorFromCodeLookup.set(0x82, () => new NoFreezeAuthoritySetError()); +createErrorFromNameLookup.set('NoFreezeAuthoritySet', () => new NoFreezeAuthoritySetError()); + +/** + * InvalidCollectionSizeChange: 'Invalid collection size change' + * + * @category Errors + * @category generated + */ +export class InvalidCollectionSizeChangeError extends Error { + readonly code: number = 0x83; + readonly name: string = 'InvalidCollectionSizeChange'; + constructor() { + super('Invalid collection size change'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidCollectionSizeChangeError); + } + } +} + +createErrorFromCodeLookup.set(0x83, () => new InvalidCollectionSizeChangeError()); +createErrorFromNameLookup.set( + 'InvalidCollectionSizeChange', + () => new InvalidCollectionSizeChangeError(), +); + +/** + * InvalidBubblegumSigner: 'Invalid bubblegum signer' + * + * @category Errors + * @category generated + */ +export class InvalidBubblegumSignerError extends Error { + readonly code: number = 0x84; + readonly name: string = 'InvalidBubblegumSigner'; + constructor() { + super('Invalid bubblegum signer'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidBubblegumSignerError); + } + } +} + +createErrorFromCodeLookup.set(0x84, () => new InvalidBubblegumSignerError()); +createErrorFromNameLookup.set('InvalidBubblegumSigner', () => new InvalidBubblegumSignerError()); + +/** + * EscrowParentHasDelegate: 'Escrow parent cannot have a delegate' + * + * @category Errors + * @category generated + */ +export class EscrowParentHasDelegateError extends Error { + readonly code: number = 0x85; + readonly name: string = 'EscrowParentHasDelegate'; + constructor() { + super('Escrow parent cannot have a delegate'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, EscrowParentHasDelegateError); + } + } +} + +createErrorFromCodeLookup.set(0x85, () => new EscrowParentHasDelegateError()); +createErrorFromNameLookup.set('EscrowParentHasDelegate', () => new EscrowParentHasDelegateError()); + +/** + * MintIsNotSigner: 'Mint needs to be signer to initialize the account' + * + * @category Errors + * @category generated + */ +export class MintIsNotSignerError extends Error { + readonly code: number = 0x86; + readonly name: string = 'MintIsNotSigner'; + constructor() { + super('Mint needs to be signer to initialize the account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MintIsNotSignerError); + } + } +} + +createErrorFromCodeLookup.set(0x86, () => new MintIsNotSignerError()); +createErrorFromNameLookup.set('MintIsNotSigner', () => new MintIsNotSignerError()); + +/** + * InvalidTokenStandard: 'Invalid token standard' + * + * @category Errors + * @category generated + */ +export class InvalidTokenStandardError extends Error { + readonly code: number = 0x87; + readonly name: string = 'InvalidTokenStandard'; + constructor() { + super('Invalid token standard'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidTokenStandardError); + } + } +} + +createErrorFromCodeLookup.set(0x87, () => new InvalidTokenStandardError()); +createErrorFromNameLookup.set('InvalidTokenStandard', () => new InvalidTokenStandardError()); + +/** + * InvalidMintForTokenStandard: 'Invalid mint account for specified token standard' + * + * @category Errors + * @category generated + */ +export class InvalidMintForTokenStandardError extends Error { + readonly code: number = 0x88; + readonly name: string = 'InvalidMintForTokenStandard'; + constructor() { + super('Invalid mint account for specified token standard'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMintForTokenStandardError); + } + } +} + +createErrorFromCodeLookup.set(0x88, () => new InvalidMintForTokenStandardError()); +createErrorFromNameLookup.set( + 'InvalidMintForTokenStandard', + () => new InvalidMintForTokenStandardError(), +); + +/** + * InvalidAuthorizationRules: 'Invalid authorization rules account' + * + * @category Errors + * @category generated + */ +export class InvalidAuthorizationRulesError extends Error { + readonly code: number = 0x89; + readonly name: string = 'InvalidAuthorizationRules'; + constructor() { + super('Invalid authorization rules account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidAuthorizationRulesError); + } + } +} + +createErrorFromCodeLookup.set(0x89, () => new InvalidAuthorizationRulesError()); +createErrorFromNameLookup.set( + 'InvalidAuthorizationRules', + () => new InvalidAuthorizationRulesError(), +); + +/** + * MissingAuthorizationRules: 'Missing authorization rules account' + * + * @category Errors + * @category generated + */ +export class MissingAuthorizationRulesError extends Error { + readonly code: number = 0x8a; + readonly name: string = 'MissingAuthorizationRules'; + constructor() { + super('Missing authorization rules account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingAuthorizationRulesError); + } + } +} + +createErrorFromCodeLookup.set(0x8a, () => new MissingAuthorizationRulesError()); +createErrorFromNameLookup.set( + 'MissingAuthorizationRules', + () => new MissingAuthorizationRulesError(), +); + +/** + * MissingProgrammableConfig: 'Missing programmable configuration' + * + * @category Errors + * @category generated + */ +export class MissingProgrammableConfigError extends Error { + readonly code: number = 0x8b; + readonly name: string = 'MissingProgrammableConfig'; + constructor() { + super('Missing programmable configuration'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingProgrammableConfigError); + } + } +} + +createErrorFromCodeLookup.set(0x8b, () => new MissingProgrammableConfigError()); +createErrorFromNameLookup.set( + 'MissingProgrammableConfig', + () => new MissingProgrammableConfigError(), +); + +/** + * InvalidProgrammableConfig: 'Invalid programmable configuration' + * + * @category Errors + * @category generated + */ +export class InvalidProgrammableConfigError extends Error { + readonly code: number = 0x8c; + readonly name: string = 'InvalidProgrammableConfig'; + constructor() { + super('Invalid programmable configuration'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidProgrammableConfigError); + } + } +} + +createErrorFromCodeLookup.set(0x8c, () => new InvalidProgrammableConfigError()); +createErrorFromNameLookup.set( + 'InvalidProgrammableConfig', + () => new InvalidProgrammableConfigError(), +); + +/** + * DelegateAlreadyExists: 'Delegate already exists' + * + * @category Errors + * @category generated + */ +export class DelegateAlreadyExistsError extends Error { + readonly code: number = 0x8d; + readonly name: string = 'DelegateAlreadyExists'; + constructor() { + super('Delegate already exists'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DelegateAlreadyExistsError); + } + } +} + +createErrorFromCodeLookup.set(0x8d, () => new DelegateAlreadyExistsError()); +createErrorFromNameLookup.set('DelegateAlreadyExists', () => new DelegateAlreadyExistsError()); + +/** + * DelegateNotFound: 'Delegate not found' + * + * @category Errors + * @category generated + */ +export class DelegateNotFoundError extends Error { + readonly code: number = 0x8e; + readonly name: string = 'DelegateNotFound'; + constructor() { + super('Delegate not found'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DelegateNotFoundError); + } + } +} + +createErrorFromCodeLookup.set(0x8e, () => new DelegateNotFoundError()); +createErrorFromNameLookup.set('DelegateNotFound', () => new DelegateNotFoundError()); + +/** + * MissingAccountInBuilder: 'Required account not set in instruction builder' + * + * @category Errors + * @category generated + */ +export class MissingAccountInBuilderError extends Error { + readonly code: number = 0x8f; + readonly name: string = 'MissingAccountInBuilder'; + constructor() { + super('Required account not set in instruction builder'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingAccountInBuilderError); + } + } +} + +createErrorFromCodeLookup.set(0x8f, () => new MissingAccountInBuilderError()); +createErrorFromNameLookup.set('MissingAccountInBuilder', () => new MissingAccountInBuilderError()); + +/** + * MissingArgumentInBuilder: 'Required argument not set in instruction builder' + * + * @category Errors + * @category generated + */ +export class MissingArgumentInBuilderError extends Error { + readonly code: number = 0x90; + readonly name: string = 'MissingArgumentInBuilder'; + constructor() { + super('Required argument not set in instruction builder'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingArgumentInBuilderError); + } + } +} + +createErrorFromCodeLookup.set(0x90, () => new MissingArgumentInBuilderError()); +createErrorFromNameLookup.set( + 'MissingArgumentInBuilder', + () => new MissingArgumentInBuilderError(), +); + +/** + * FeatureNotSupported: 'Feature not supported currently' + * + * @category Errors + * @category generated + */ +export class FeatureNotSupportedError extends Error { + readonly code: number = 0x91; + readonly name: string = 'FeatureNotSupported'; + constructor() { + super('Feature not supported currently'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, FeatureNotSupportedError); + } + } +} + +createErrorFromCodeLookup.set(0x91, () => new FeatureNotSupportedError()); +createErrorFromNameLookup.set('FeatureNotSupported', () => new FeatureNotSupportedError()); + +/** + * InvalidSystemWallet: 'Invalid system wallet' + * + * @category Errors + * @category generated + */ +export class InvalidSystemWalletError extends Error { + readonly code: number = 0x92; + readonly name: string = 'InvalidSystemWallet'; + constructor() { + super('Invalid system wallet'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidSystemWalletError); + } + } +} + +createErrorFromCodeLookup.set(0x92, () => new InvalidSystemWalletError()); +createErrorFromNameLookup.set('InvalidSystemWallet', () => new InvalidSystemWalletError()); + +/** + * OnlySaleDelegateCanTransfer: 'Only the sale delegate can transfer while its set' + * + * @category Errors + * @category generated + */ +export class OnlySaleDelegateCanTransferError extends Error { + readonly code: number = 0x93; + readonly name: string = 'OnlySaleDelegateCanTransfer'; + constructor() { + super('Only the sale delegate can transfer while its set'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, OnlySaleDelegateCanTransferError); + } + } +} + +createErrorFromCodeLookup.set(0x93, () => new OnlySaleDelegateCanTransferError()); +createErrorFromNameLookup.set( + 'OnlySaleDelegateCanTransfer', + () => new OnlySaleDelegateCanTransferError(), +); + +/** + * MissingTokenAccount: 'Missing token account' + * + * @category Errors + * @category generated + */ +export class MissingTokenAccountError extends Error { + readonly code: number = 0x94; + readonly name: string = 'MissingTokenAccount'; + constructor() { + super('Missing token account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingTokenAccountError); + } + } +} + +createErrorFromCodeLookup.set(0x94, () => new MissingTokenAccountError()); +createErrorFromNameLookup.set('MissingTokenAccount', () => new MissingTokenAccountError()); + +/** + * MissingSplTokenProgram: 'Missing SPL token program' + * + * @category Errors + * @category generated + */ +export class MissingSplTokenProgramError extends Error { + readonly code: number = 0x95; + readonly name: string = 'MissingSplTokenProgram'; + constructor() { + super('Missing SPL token program'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingSplTokenProgramError); + } + } +} + +createErrorFromCodeLookup.set(0x95, () => new MissingSplTokenProgramError()); +createErrorFromNameLookup.set('MissingSplTokenProgram', () => new MissingSplTokenProgramError()); + +/** + * MissingAuthorizationRulesProgram: 'Missing authorization rules program' + * + * @category Errors + * @category generated + */ +export class MissingAuthorizationRulesProgramError extends Error { + readonly code: number = 0x96; + readonly name: string = 'MissingAuthorizationRulesProgram'; + constructor() { + super('Missing authorization rules program'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingAuthorizationRulesProgramError); + } + } +} + +createErrorFromCodeLookup.set(0x96, () => new MissingAuthorizationRulesProgramError()); +createErrorFromNameLookup.set( + 'MissingAuthorizationRulesProgram', + () => new MissingAuthorizationRulesProgramError(), +); + +/** + * InvalidDelegateRoleForTransfer: 'Invalid delegate role for transfer' + * + * @category Errors + * @category generated + */ +export class InvalidDelegateRoleForTransferError extends Error { + readonly code: number = 0x97; + readonly name: string = 'InvalidDelegateRoleForTransfer'; + constructor() { + super('Invalid delegate role for transfer'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidDelegateRoleForTransferError); + } + } +} + +createErrorFromCodeLookup.set(0x97, () => new InvalidDelegateRoleForTransferError()); +createErrorFromNameLookup.set( + 'InvalidDelegateRoleForTransfer', + () => new InvalidDelegateRoleForTransferError(), +); + +/** + * InvalidTransferAuthority: 'Invalid transfer authority' + * + * @category Errors + * @category generated + */ +export class InvalidTransferAuthorityError extends Error { + readonly code: number = 0x98; + readonly name: string = 'InvalidTransferAuthority'; + constructor() { + super('Invalid transfer authority'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidTransferAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0x98, () => new InvalidTransferAuthorityError()); +createErrorFromNameLookup.set( + 'InvalidTransferAuthority', + () => new InvalidTransferAuthorityError(), +); + +/** + * InstructionNotSupported: 'Instruction not supported for ProgrammableNonFungible assets' + * + * @category Errors + * @category generated + */ +export class InstructionNotSupportedError extends Error { + readonly code: number = 0x99; + readonly name: string = 'InstructionNotSupported'; + constructor() { + super('Instruction not supported for ProgrammableNonFungible assets'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InstructionNotSupportedError); + } + } +} + +createErrorFromCodeLookup.set(0x99, () => new InstructionNotSupportedError()); +createErrorFromNameLookup.set('InstructionNotSupported', () => new InstructionNotSupportedError()); + +/** + * KeyMismatch: 'Public key does not match expected value' + * + * @category Errors + * @category generated + */ +export class KeyMismatchError extends Error { + readonly code: number = 0x9a; + readonly name: string = 'KeyMismatch'; + constructor() { + super('Public key does not match expected value'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, KeyMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x9a, () => new KeyMismatchError()); +createErrorFromNameLookup.set('KeyMismatch', () => new KeyMismatchError()); + +/** + * LockedToken: 'Token is locked' + * + * @category Errors + * @category generated + */ +export class LockedTokenError extends Error { + readonly code: number = 0x9b; + readonly name: string = 'LockedToken'; + constructor() { + super('Token is locked'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, LockedTokenError); + } + } +} + +createErrorFromCodeLookup.set(0x9b, () => new LockedTokenError()); +createErrorFromNameLookup.set('LockedToken', () => new LockedTokenError()); + +/** + * UnlockedToken: 'Token is unlocked' + * + * @category Errors + * @category generated + */ +export class UnlockedTokenError extends Error { + readonly code: number = 0x9c; + readonly name: string = 'UnlockedToken'; + constructor() { + super('Token is unlocked'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, UnlockedTokenError); + } + } +} + +createErrorFromCodeLookup.set(0x9c, () => new UnlockedTokenError()); +createErrorFromNameLookup.set('UnlockedToken', () => new UnlockedTokenError()); + +/** + * MissingDelegateRole: 'Missing delegate role' + * + * @category Errors + * @category generated + */ +export class MissingDelegateRoleError extends Error { + readonly code: number = 0x9d; + readonly name: string = 'MissingDelegateRole'; + constructor() { + super('Missing delegate role'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingDelegateRoleError); + } + } +} + +createErrorFromCodeLookup.set(0x9d, () => new MissingDelegateRoleError()); +createErrorFromNameLookup.set('MissingDelegateRole', () => new MissingDelegateRoleError()); + +/** + * InvalidAuthorityType: 'Invalid authority type' + * + * @category Errors + * @category generated + */ +export class InvalidAuthorityTypeError extends Error { + readonly code: number = 0x9e; + readonly name: string = 'InvalidAuthorityType'; + constructor() { + super('Invalid authority type'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidAuthorityTypeError); + } + } +} + +createErrorFromCodeLookup.set(0x9e, () => new InvalidAuthorityTypeError()); +createErrorFromNameLookup.set('InvalidAuthorityType', () => new InvalidAuthorityTypeError()); + +/** + * MissingTokenRecord: 'Missing token record account' + * + * @category Errors + * @category generated + */ +export class MissingTokenRecordError extends Error { + readonly code: number = 0x9f; + readonly name: string = 'MissingTokenRecord'; + constructor() { + super('Missing token record account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingTokenRecordError); + } + } +} + +createErrorFromCodeLookup.set(0x9f, () => new MissingTokenRecordError()); +createErrorFromNameLookup.set('MissingTokenRecord', () => new MissingTokenRecordError()); + +/** + * MintSupplyMustBeZero: 'Mint supply must be zero for programmable assets' + * + * @category Errors + * @category generated + */ +export class MintSupplyMustBeZeroError extends Error { + readonly code: number = 0xa0; + readonly name: string = 'MintSupplyMustBeZero'; + constructor() { + super('Mint supply must be zero for programmable assets'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MintSupplyMustBeZeroError); + } + } +} + +createErrorFromCodeLookup.set(0xa0, () => new MintSupplyMustBeZeroError()); +createErrorFromNameLookup.set('MintSupplyMustBeZero', () => new MintSupplyMustBeZeroError()); + +/** + * DataIsEmptyOrZeroed: 'Data is empty or zeroed' + * + * @category Errors + * @category generated + */ +export class DataIsEmptyOrZeroedError extends Error { + readonly code: number = 0xa1; + readonly name: string = 'DataIsEmptyOrZeroed'; + constructor() { + super('Data is empty or zeroed'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DataIsEmptyOrZeroedError); + } + } +} + +createErrorFromCodeLookup.set(0xa1, () => new DataIsEmptyOrZeroedError()); +createErrorFromNameLookup.set('DataIsEmptyOrZeroed', () => new DataIsEmptyOrZeroedError()); + +/** + * MissingTokenOwnerAccount: 'Missing token owner' + * + * @category Errors + * @category generated + */ +export class MissingTokenOwnerAccountError extends Error { + readonly code: number = 0xa2; + readonly name: string = 'MissingTokenOwnerAccount'; + constructor() { + super('Missing token owner'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingTokenOwnerAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xa2, () => new MissingTokenOwnerAccountError()); +createErrorFromNameLookup.set( + 'MissingTokenOwnerAccount', + () => new MissingTokenOwnerAccountError(), +); + +/** + * InvalidMasterEditionAccountLength: 'Master edition account has an invalid length' + * + * @category Errors + * @category generated + */ +export class InvalidMasterEditionAccountLengthError extends Error { + readonly code: number = 0xa3; + readonly name: string = 'InvalidMasterEditionAccountLength'; + constructor() { + super('Master edition account has an invalid length'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMasterEditionAccountLengthError); + } + } +} + +createErrorFromCodeLookup.set(0xa3, () => new InvalidMasterEditionAccountLengthError()); +createErrorFromNameLookup.set( + 'InvalidMasterEditionAccountLength', + () => new InvalidMasterEditionAccountLengthError(), +); + +/** + * IncorrectTokenState: 'Incorrect token state' + * + * @category Errors + * @category generated + */ +export class IncorrectTokenStateError extends Error { + readonly code: number = 0xa4; + readonly name: string = 'IncorrectTokenState'; + constructor() { + super('Incorrect token state'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, IncorrectTokenStateError); + } + } +} + +createErrorFromCodeLookup.set(0xa4, () => new IncorrectTokenStateError()); +createErrorFromNameLookup.set('IncorrectTokenState', () => new IncorrectTokenStateError()); + +/** + * InvalidDelegateRole: 'Invalid delegate role' + * + * @category Errors + * @category generated + */ +export class InvalidDelegateRoleError extends Error { + readonly code: number = 0xa5; + readonly name: string = 'InvalidDelegateRole'; + constructor() { + super('Invalid delegate role'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidDelegateRoleError); + } + } +} + +createErrorFromCodeLookup.set(0xa5, () => new InvalidDelegateRoleError()); +createErrorFromNameLookup.set('InvalidDelegateRole', () => new InvalidDelegateRoleError()); + +/** + * MissingPrintSupply: 'Print supply is required for non-fungibles' + * + * @category Errors + * @category generated + */ +export class MissingPrintSupplyError extends Error { + readonly code: number = 0xa6; + readonly name: string = 'MissingPrintSupply'; + constructor() { + super('Print supply is required for non-fungibles'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingPrintSupplyError); + } + } +} + +createErrorFromCodeLookup.set(0xa6, () => new MissingPrintSupplyError()); +createErrorFromNameLookup.set('MissingPrintSupply', () => new MissingPrintSupplyError()); + +/** + * MissingMasterEditionAccount: 'Missing master edition account' + * + * @category Errors + * @category generated + */ +export class MissingMasterEditionAccountError extends Error { + readonly code: number = 0xa7; + readonly name: string = 'MissingMasterEditionAccount'; + constructor() { + super('Missing master edition account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingMasterEditionAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xa7, () => new MissingMasterEditionAccountError()); +createErrorFromNameLookup.set( + 'MissingMasterEditionAccount', + () => new MissingMasterEditionAccountError(), +); + +/** + * AmountMustBeGreaterThanZero: 'Amount must be greater than zero' + * + * @category Errors + * @category generated + */ +export class AmountMustBeGreaterThanZeroError extends Error { + readonly code: number = 0xa8; + readonly name: string = 'AmountMustBeGreaterThanZero'; + constructor() { + super('Amount must be greater than zero'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, AmountMustBeGreaterThanZeroError); + } + } +} + +createErrorFromCodeLookup.set(0xa8, () => new AmountMustBeGreaterThanZeroError()); +createErrorFromNameLookup.set( + 'AmountMustBeGreaterThanZero', + () => new AmountMustBeGreaterThanZeroError(), +); + +/** + * InvalidDelegateArgs: 'Invalid delegate args' + * + * @category Errors + * @category generated + */ +export class InvalidDelegateArgsError extends Error { + readonly code: number = 0xa9; + readonly name: string = 'InvalidDelegateArgs'; + constructor() { + super('Invalid delegate args'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidDelegateArgsError); + } + } +} + +createErrorFromCodeLookup.set(0xa9, () => new InvalidDelegateArgsError()); +createErrorFromNameLookup.set('InvalidDelegateArgs', () => new InvalidDelegateArgsError()); + +/** + * MissingLockedTransferAddress: 'Missing address for locked transfer' + * + * @category Errors + * @category generated + */ +export class MissingLockedTransferAddressError extends Error { + readonly code: number = 0xaa; + readonly name: string = 'MissingLockedTransferAddress'; + constructor() { + super('Missing address for locked transfer'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingLockedTransferAddressError); + } + } +} + +createErrorFromCodeLookup.set(0xaa, () => new MissingLockedTransferAddressError()); +createErrorFromNameLookup.set( + 'MissingLockedTransferAddress', + () => new MissingLockedTransferAddressError(), +); + +/** + * InvalidLockedTransferAddress: 'Invalid destination address for locked transfer' + * + * @category Errors + * @category generated + */ +export class InvalidLockedTransferAddressError extends Error { + readonly code: number = 0xab; + readonly name: string = 'InvalidLockedTransferAddress'; + constructor() { + super('Invalid destination address for locked transfer'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidLockedTransferAddressError); + } + } +} + +createErrorFromCodeLookup.set(0xab, () => new InvalidLockedTransferAddressError()); +createErrorFromNameLookup.set( + 'InvalidLockedTransferAddress', + () => new InvalidLockedTransferAddressError(), +); + +/** + * DataIncrementLimitExceeded: 'Exceeded account realloc increase limit' + * + * @category Errors + * @category generated + */ +export class DataIncrementLimitExceededError extends Error { + readonly code: number = 0xac; + readonly name: string = 'DataIncrementLimitExceeded'; + constructor() { + super('Exceeded account realloc increase limit'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, DataIncrementLimitExceededError); + } + } +} + +createErrorFromCodeLookup.set(0xac, () => new DataIncrementLimitExceededError()); +createErrorFromNameLookup.set( + 'DataIncrementLimitExceeded', + () => new DataIncrementLimitExceededError(), +); + +/** + * CannotUpdateAssetWithDelegate: 'Cannot update the rule set of a programmable asset that has a delegate' + * + * @category Errors + * @category generated + */ +export class CannotUpdateAssetWithDelegateError extends Error { + readonly code: number = 0xad; + readonly name: string = 'CannotUpdateAssetWithDelegate'; + constructor() { + super('Cannot update the rule set of a programmable asset that has a delegate'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotUpdateAssetWithDelegateError); + } + } +} + +createErrorFromCodeLookup.set(0xad, () => new CannotUpdateAssetWithDelegateError()); +createErrorFromNameLookup.set( + 'CannotUpdateAssetWithDelegate', + () => new CannotUpdateAssetWithDelegateError(), +); + +/** + * InvalidAmount: 'Invalid token amount for this operation or token standard' + * + * @category Errors + * @category generated + */ +export class InvalidAmountError extends Error { + readonly code: number = 0xae; + readonly name: string = 'InvalidAmount'; + constructor() { + super('Invalid token amount for this operation or token standard'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidAmountError); + } + } +} + +createErrorFromCodeLookup.set(0xae, () => new InvalidAmountError()); +createErrorFromNameLookup.set('InvalidAmount', () => new InvalidAmountError()); + +/** + * MissingMasterEditionMintAccount: 'Missing master edition mint account' + * + * @category Errors + * @category generated + */ +export class MissingMasterEditionMintAccountError extends Error { + readonly code: number = 0xaf; + readonly name: string = 'MissingMasterEditionMintAccount'; + constructor() { + super('Missing master edition mint account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingMasterEditionMintAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xaf, () => new MissingMasterEditionMintAccountError()); +createErrorFromNameLookup.set( + 'MissingMasterEditionMintAccount', + () => new MissingMasterEditionMintAccountError(), +); + +/** + * MissingMasterEditionTokenAccount: 'Missing master edition token account' + * + * @category Errors + * @category generated + */ +export class MissingMasterEditionTokenAccountError extends Error { + readonly code: number = 0xb0; + readonly name: string = 'MissingMasterEditionTokenAccount'; + constructor() { + super('Missing master edition token account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingMasterEditionTokenAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xb0, () => new MissingMasterEditionTokenAccountError()); +createErrorFromNameLookup.set( + 'MissingMasterEditionTokenAccount', + () => new MissingMasterEditionTokenAccountError(), +); + +/** + * MissingEditionMarkerAccount: 'Missing edition marker account' + * + * @category Errors + * @category generated + */ +export class MissingEditionMarkerAccountError extends Error { + readonly code: number = 0xb1; + readonly name: string = 'MissingEditionMarkerAccount'; + constructor() { + super('Missing edition marker account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingEditionMarkerAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xb1, () => new MissingEditionMarkerAccountError()); +createErrorFromNameLookup.set( + 'MissingEditionMarkerAccount', + () => new MissingEditionMarkerAccountError(), +); + +/** + * CannotBurnWithDelegate: 'Cannot burn while persistent delegate is set' + * + * @category Errors + * @category generated + */ +export class CannotBurnWithDelegateError extends Error { + readonly code: number = 0xb2; + readonly name: string = 'CannotBurnWithDelegate'; + constructor() { + super('Cannot burn while persistent delegate is set'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CannotBurnWithDelegateError); + } + } +} + +createErrorFromCodeLookup.set(0xb2, () => new CannotBurnWithDelegateError()); +createErrorFromNameLookup.set('CannotBurnWithDelegate', () => new CannotBurnWithDelegateError()); + +/** + * MissingEdition: 'Missing edition account' + * + * @category Errors + * @category generated + */ +export class MissingEditionError extends Error { + readonly code: number = 0xb3; + readonly name: string = 'MissingEdition'; + constructor() { + super('Missing edition account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingEditionError); + } + } +} + +createErrorFromCodeLookup.set(0xb3, () => new MissingEditionError()); +createErrorFromNameLookup.set('MissingEdition', () => new MissingEditionError()); + +/** + * InvalidAssociatedTokenAccountProgram: 'Invalid Associated Token Account Program' + * + * @category Errors + * @category generated + */ +export class InvalidAssociatedTokenAccountProgramError extends Error { + readonly code: number = 0xb4; + readonly name: string = 'InvalidAssociatedTokenAccountProgram'; + constructor() { + super('Invalid Associated Token Account Program'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidAssociatedTokenAccountProgramError); + } + } +} + +createErrorFromCodeLookup.set(0xb4, () => new InvalidAssociatedTokenAccountProgramError()); +createErrorFromNameLookup.set( + 'InvalidAssociatedTokenAccountProgram', + () => new InvalidAssociatedTokenAccountProgramError(), +); + +/** + * InvalidInstructionsSysvar: 'Invalid InstructionsSysvar' + * + * @category Errors + * @category generated + */ +export class InvalidInstructionsSysvarError extends Error { + readonly code: number = 0xb5; + readonly name: string = 'InvalidInstructionsSysvar'; + constructor() { + super('Invalid InstructionsSysvar'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidInstructionsSysvarError); + } + } +} + +createErrorFromCodeLookup.set(0xb5, () => new InvalidInstructionsSysvarError()); +createErrorFromNameLookup.set( + 'InvalidInstructionsSysvar', + () => new InvalidInstructionsSysvarError(), +); + +/** + * InvalidParentAccounts: 'Invalid or Unneeded parent accounts' + * + * @category Errors + * @category generated + */ +export class InvalidParentAccountsError extends Error { + readonly code: number = 0xb6; + readonly name: string = 'InvalidParentAccounts'; + constructor() { + super('Invalid or Unneeded parent accounts'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidParentAccountsError); + } + } +} + +createErrorFromCodeLookup.set(0xb6, () => new InvalidParentAccountsError()); +createErrorFromNameLookup.set('InvalidParentAccounts', () => new InvalidParentAccountsError()); + +/** + * InvalidUpdateArgs: 'Authority cannot apply all update args' + * + * @category Errors + * @category generated + */ +export class InvalidUpdateArgsError extends Error { + readonly code: number = 0xb7; + readonly name: string = 'InvalidUpdateArgs'; + constructor() { + super('Authority cannot apply all update args'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidUpdateArgsError); + } + } +} + +createErrorFromCodeLookup.set(0xb7, () => new InvalidUpdateArgsError()); +createErrorFromNameLookup.set('InvalidUpdateArgs', () => new InvalidUpdateArgsError()); + +/** + * InsufficientTokenBalance: 'Token account does not have enough tokens' + * + * @category Errors + * @category generated + */ +export class InsufficientTokenBalanceError extends Error { + readonly code: number = 0xb8; + readonly name: string = 'InsufficientTokenBalance'; + constructor() { + super('Token account does not have enough tokens'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InsufficientTokenBalanceError); + } + } +} + +createErrorFromCodeLookup.set(0xb8, () => new InsufficientTokenBalanceError()); +createErrorFromNameLookup.set( + 'InsufficientTokenBalance', + () => new InsufficientTokenBalanceError(), +); + +/** + * MissingCollectionMint: 'Missing collection account' + * + * @category Errors + * @category generated + */ +export class MissingCollectionMintError extends Error { + readonly code: number = 0xb9; + readonly name: string = 'MissingCollectionMint'; + constructor() { + super('Missing collection account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingCollectionMintError); + } + } +} + +createErrorFromCodeLookup.set(0xb9, () => new MissingCollectionMintError()); +createErrorFromNameLookup.set('MissingCollectionMint', () => new MissingCollectionMintError()); + +/** + * MissingCollectionMasterEdition: 'Missing collection master edition account' + * + * @category Errors + * @category generated + */ +export class MissingCollectionMasterEditionError extends Error { + readonly code: number = 0xba; + readonly name: string = 'MissingCollectionMasterEdition'; + constructor() { + super('Missing collection master edition account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingCollectionMasterEditionError); + } + } +} + +createErrorFromCodeLookup.set(0xba, () => new MissingCollectionMasterEditionError()); +createErrorFromNameLookup.set( + 'MissingCollectionMasterEdition', + () => new MissingCollectionMasterEditionError(), +); + +/** + * InvalidTokenRecord: 'Invalid token record account' + * + * @category Errors + * @category generated + */ +export class InvalidTokenRecordError extends Error { + readonly code: number = 0xbb; + readonly name: string = 'InvalidTokenRecord'; + constructor() { + super('Invalid token record account'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidTokenRecordError); + } + } +} + +createErrorFromCodeLookup.set(0xbb, () => new InvalidTokenRecordError()); +createErrorFromNameLookup.set('InvalidTokenRecord', () => new InvalidTokenRecordError()); + +/** + * InvalidCloseAuthority: 'The close authority needs to be revoked by the Utility Delegate' + * + * @category Errors + * @category generated + */ +export class InvalidCloseAuthorityError extends Error { + readonly code: number = 0xbc; + readonly name: string = 'InvalidCloseAuthority'; + constructor() { + super('The close authority needs to be revoked by the Utility Delegate'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidCloseAuthorityError); + } + } +} + +createErrorFromCodeLookup.set(0xbc, () => new InvalidCloseAuthorityError()); +createErrorFromNameLookup.set('InvalidCloseAuthority', () => new InvalidCloseAuthorityError()); + +/** + * InvalidInstruction: 'Invalid or removed instruction' + * + * @category Errors + * @category generated + */ +export class InvalidInstructionError extends Error { + readonly code: number = 0xbd; + readonly name: string = 'InvalidInstruction'; + constructor() { + super('Invalid or removed instruction'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidInstructionError); + } + } +} + +createErrorFromCodeLookup.set(0xbd, () => new InvalidInstructionError()); +createErrorFromNameLookup.set('InvalidInstruction', () => new InvalidInstructionError()); + +/** + * MissingDelegateRecord: 'Missing delegate record' + * + * @category Errors + * @category generated + */ +export class MissingDelegateRecordError extends Error { + readonly code: number = 0xbe; + readonly name: string = 'MissingDelegateRecord'; + constructor() { + super('Missing delegate record'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MissingDelegateRecordError); + } + } +} + +createErrorFromCodeLookup.set(0xbe, () => new MissingDelegateRecordError()); +createErrorFromNameLookup.set('MissingDelegateRecord', () => new MissingDelegateRecordError()); + +/** + * InvalidFeeAccount: '' + * + * @category Errors + * @category generated + */ +export class InvalidFeeAccountError extends Error { + readonly code: number = 0xbf; + readonly name: string = 'InvalidFeeAccount'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidFeeAccountError); + } + } +} + +createErrorFromCodeLookup.set(0xbf, () => new InvalidFeeAccountError()); +createErrorFromNameLookup.set('InvalidFeeAccount', () => new InvalidFeeAccountError()); + +/** + * InvalidMetadataFlags: '' + * + * @category Errors + * @category generated + */ +export class InvalidMetadataFlagsError extends Error { + readonly code: number = 0xc0; + readonly name: string = 'InvalidMetadataFlags'; + constructor() { + super(''); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, InvalidMetadataFlagsError); + } + } +} + +createErrorFromCodeLookup.set(0xc0, () => new InvalidMetadataFlagsError()); +createErrorFromNameLookup.set('InvalidMetadataFlags', () => new InvalidMetadataFlagsError()); + +/** + * Attempts to resolve a custom program error from the provided error code. + * @category Errors + * @category generated + */ +export function errorFromCode(code: number): MaybeErrorWithCode { + const createError = createErrorFromCodeLookup.get(code); + return createError != null ? createError() : null; +} + +/** + * Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'. + * @category Errors + * @category generated + */ +export function errorFromName(name: string): MaybeErrorWithCode { + const createError = createErrorFromNameLookup.get(name); + return createError != null ? createError() : null; +} diff --git a/metadata/js/src/helpers.ts b/metadata/js/src/helpers.ts deleted file mode 100644 index 1e8cb0b0..00000000 --- a/metadata/js/src/helpers.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { PublicKey } from '@bbachain/web3.js'; -import { serialize } from 'borsh'; -import { PROGRAM_ID, PDA_SEED, MAX_NAME_LEN, MAX_SYMBOL_LEN, MAX_URI_LEN } from './constants'; -import { InitializeArgs, UpdateArgs, TokenInstructionKind } from './types'; -import { INSTRUCTION_SCHEMA } from './schema'; - -/** PDA derivation helper (sync, because web3.js v2). */ -export const deriveMetadataPDA = (mint: PublicKey): [PublicKey, number] => - PublicKey.findProgramAddressSync([Buffer.from(PDA_SEED), mint.toBuffer()], PROGRAM_ID); - -/** Length guards (throws early on oversized strings). */ -export function assertFieldLengths(obj: { name: string; symbol: string; uri: string }): void { - if (obj.name.length > MAX_NAME_LEN) throw new Error('name too long'); - if (obj.symbol.length > MAX_SYMBOL_LEN) throw new Error('symbol too long'); - if (obj.uri.length > MAX_URI_LEN) throw new Error('uri too long'); -} - -/** Prepends the enum discriminant to a Borsh‑encoded payload. */ -export function encodeInstructionData(kind: TokenInstructionKind, args: InitializeArgs | UpdateArgs): Buffer { - const data = serialize(INSTRUCTION_SCHEMA, args); - return Buffer.concat([Buffer.from([kind]), data]); -} diff --git a/metadata/js/src/helpers/index.ts b/metadata/js/src/helpers/index.ts new file mode 100644 index 00000000..b40ec8e0 --- /dev/null +++ b/metadata/js/src/helpers/index.ts @@ -0,0 +1 @@ +export * from './metadata-deserializer'; diff --git a/metadata/js/src/helpers/metadata-deserializer.ts b/metadata/js/src/helpers/metadata-deserializer.ts new file mode 100644 index 00000000..c4f4f248 --- /dev/null +++ b/metadata/js/src/helpers/metadata-deserializer.ts @@ -0,0 +1,103 @@ +import * as beet from '@bbachain/beet'; +import * as beetBBA from '@bbachain/beet-bbachain'; +import { Metadata } from '../accounts/Metadata'; +import { collectionBeet, collectionDetailsBeet, dataBeet, keyBeet, tokenStandardBeet, usesBeet } from '../types'; + +const NONE_BYTE_SIZE = beet.coptionNone('').byteSize; + +/** + * This is a custom deserializer for TokenMetadata in order to mitigate acounts with corrupted + * data on chain. + * + * Instead of failing the deserialization for the section that is possibly corrupt it just returns + * `null` for the fields that would normally be stored in that section. + * + * This deserializer matches the [fix implemented in the Rust program](https://github.com/metaplex-foundation/metaplex-program-library/blob/df36da5a78fb17e1690247b8041b761d27c83b1b/token-metadata/program/src/deser.rs#L6). + * Also @see ../../../program/src/deser.rs + */ +export function deserialize(buf: Buffer, offset = 0): [Metadata, number] { + let cursor = offset; + + // key + const key = keyBeet.read(buf, cursor); + cursor += keyBeet.byteSize; + + // updateAuthority + const updateAuthority = beetBBA.publicKey.read(buf, cursor); + cursor += beetBBA.publicKey.byteSize; + + // mint + const mint = beetBBA.publicKey.read(buf, cursor); + cursor += beetBBA.publicKey.byteSize; + + // data + const [data, dataDelta] = dataBeet.deserialize(buf, cursor); + cursor = dataDelta; + + // primarySaleHappened + const primarySaleHappened = beet.bool.read(buf, cursor); + cursor += beet.bool.byteSize; + + // isMutable + const isMutable = beet.bool.read(buf, cursor); + cursor += beet.bool.byteSize; + + // tokenStandard + const [tokenStandard, tokenDelta, tokenCorrupted] = tryReadOption(beet.coption(tokenStandardBeet), buf, cursor); + cursor += tokenDelta; + + // collection + const [collection, collectionDelta, collectionCorrupted] = tokenCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(collectionBeet), buf, cursor); + cursor += collectionDelta; + + // collection_details + const [collectionDetails, collectionDetailsDelta, collectionDetailsCorrupted] = + tokenCorrupted || collectionCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(collectionDetailsBeet), buf, cursor); + cursor += collectionDetailsDelta; + + // uses + const [uses, usesDelta, usesCorrupted] = + tokenCorrupted || collectionCorrupted || collectionDetailsCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(usesBeet), buf, cursor); + cursor += usesDelta; + + const anyCorrupted = + tokenCorrupted || + collectionCorrupted || + usesCorrupted || + collectionDetailsCorrupted; + + const args = { + key, + updateAuthority, + mint, + data, + primarySaleHappened, + isMutable, + tokenStandard: anyCorrupted ? null : tokenStandard, + collection: anyCorrupted ? null : collection, + collectionDetails: anyCorrupted ? null : collectionDetails, + uses: anyCorrupted ? null : uses, + }; + + return [Metadata.fromArgs(args), cursor]; +} + +function tryReadOption( + optionBeet: beet.FixableBeet>, + buf: Buffer, + offset: number +): [T | null, number, boolean] { + try { + const fixed = optionBeet.toFixedFromData(buf, offset); + const value = fixed.read(buf, offset); + return [value, fixed.byteSize, false]; + } catch (e) { + return [null, NONE_BYTE_SIZE, true]; + } +} diff --git a/metadata/js/src/index.ts b/metadata/js/src/index.ts index 7e1e567f..f0eacfad 100644 --- a/metadata/js/src/index.ts +++ b/metadata/js/src/index.ts @@ -1,6 +1,19 @@ -export * from './constants'; -export * from './types'; -export * from './schema'; -export * from './helpers'; +import { PublicKey } from '@bbachain/web3.js'; +export * from './accounts'; +export * from './errors'; export * from './instructions'; -export * from './read'; +export * from './types'; + +/** + * Program address + * + * @category constants + */ +export const PROGRAM_ADDRESS = 'metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F'; + +/** + * Program public key + * + * @category constants + */ +export const PROGRAM_ID = new PublicKey(PROGRAM_ADDRESS); diff --git a/metadata/js/src/instructions.ts b/metadata/js/src/instructions.ts deleted file mode 100644 index c1956a9e..00000000 --- a/metadata/js/src/instructions.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { PublicKey, SystemProgram, TransactionInstruction } from '@bbachain/web3.js'; -import { InitializeArgs, UpdateArgs, TokenInstructionKind } from './types'; -import { PROGRAM_ID } from './constants'; -import { assertFieldLengths, deriveMetadataPDA, encodeInstructionData } from './helpers'; - -/** Builds an `Initialize` instruction. */ -export const createInitializeMetadataIx = ( - payer: PublicKey, - mint: PublicKey, - args: InitializeArgs -): TransactionInstruction => { - assertFieldLengths(args); - - const [metadataPda] = deriveMetadataPDA(mint); - const keys = [ - { pubkey: metadataPda, isSigner: false, isWritable: true }, - { pubkey: mint, isSigner: false, isWritable: false }, - { pubkey: payer, isSigner: true, isWritable: true }, - { pubkey: SystemProgram.programId, isSigner: false, isWritable: false }, - ]; - const data = encodeInstructionData(TokenInstructionKind.Initialize, args); - return new TransactionInstruction({ programId: PROGRAM_ID, keys, data }); -}; - -/** Builds an `Update` instruction. */ -export const createUpdateMetadataIx = ( - authority: PublicKey, - mint: PublicKey, - args: UpdateArgs -): TransactionInstruction => { - assertFieldLengths(args); - - const [metadataPda] = deriveMetadataPDA(mint); - const keys = [ - { pubkey: metadataPda, isSigner: false, isWritable: true }, - { pubkey: mint, isSigner: false, isWritable: false }, - { pubkey: authority, isSigner: true, isWritable: false }, - ]; - const data = encodeInstructionData(TokenInstructionKind.Update, args); - return new TransactionInstruction({ programId: PROGRAM_ID, keys, data }); -}; diff --git a/metadata/js/src/instructions/CreateMetadataAccount.ts b/metadata/js/src/instructions/CreateMetadataAccount.ts new file mode 100644 index 00000000..b1893d41 --- /dev/null +++ b/metadata/js/src/instructions/CreateMetadataAccount.ts @@ -0,0 +1,124 @@ +import * as beet from '@bbachain/beet'; +import * as web3 from '@bbachain/web3.js'; +import { + CreateMetadataAccountArgs, + createMetadataAccountArgsBeet, +} from '../types'; +import { PROGRAM_ADDRESS } from '..'; + +/** + * @category Instructions + * @category CreateMetadataAccount + */ +export type CreateMetadataAccountInstructionArgs = { + createMetadataAccountArgs: CreateMetadataAccountArgs; +}; +/** + * @category Instructions + * @category CreateMetadataAccount + */ +export const CreateMetadataAccountStruct = new beet.FixableBeetArgsStruct< + CreateMetadataAccountInstructionArgs & { + instructionDiscriminator: number; + } +>( + [ + ['instructionDiscriminator', beet.u8], + ['createMetadataAccountArgs', createMetadataAccountArgsBeet], + ], + 'CreateMetadataAccountInstructionArgs', +); +/** + * Accounts required by the _CreateMetadataAccount_ instruction + * + * @property [_writable_] metadata Metadata key (pda of ['metadata', program id, mint id]) + * @property [] mint Mint of token asset + * @property [**signer**] mintAuthority Mint authority + * @property [_writable_, **signer**] payer payer + * @property [] updateAuthority update authority info + * @category Instructions + * @category CreateMetadataAccount + */ +export type CreateMetadataAccountInstructionAccounts = { + metadata: web3.PublicKey; + mint: web3.PublicKey; + mintAuthority: web3.PublicKey; + payer: web3.PublicKey; + updateAuthority: web3.PublicKey; + systemProgram?: web3.PublicKey; + rent?: web3.PublicKey; +}; + +export const createMetadataAccountInstructionDiscriminator = 0; + +/** + * Creates a _CreateMetadataAccount_ instruction. + * + * Optional accounts that are not provided will be omitted from the accounts + * array passed with the instruction. + * An optional account that is set cannot follow an optional account that is unset. + * Otherwise an Error is raised. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category CreateMetadataAccount + */ +export function createCreateMetadataAccountInstruction( + accounts: CreateMetadataAccountInstructionAccounts, + args: CreateMetadataAccountInstructionArgs, + programId = new web3.PublicKey(PROGRAM_ADDRESS), +) { + const [data] = CreateMetadataAccountStruct.serialize({ + instructionDiscriminator: createMetadataAccountInstructionDiscriminator, + ...args, + }); + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.metadata, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.mint, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.mintAuthority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.payer, + isWritable: true, + isSigner: true, + }, + { + pubkey: accounts.updateAuthority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.systemProgram ?? web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + + if (accounts.rent != null) { + keys.push({ + pubkey: accounts.rent, + isWritable: false, + isSigner: false, + }); + } + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }); + return ix; +} diff --git a/metadata/js/src/instructions/index.ts b/metadata/js/src/instructions/index.ts new file mode 100644 index 00000000..731fb680 --- /dev/null +++ b/metadata/js/src/instructions/index.ts @@ -0,0 +1 @@ +export * from './CreateMetadataAccount'; diff --git a/metadata/js/src/read.ts b/metadata/js/src/read.ts deleted file mode 100644 index 571ff5b0..00000000 --- a/metadata/js/src/read.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Connection, PublicKey } from '@bbachain/web3.js'; -import { deserializeUnchecked } from 'borsh'; -import { STATE_SCHEMA } from './schema'; -import { TokenMetadata } from './types'; -import { deriveMetadataPDA } from './helpers'; -import { TAIL_PADDING } from './constants'; - -/** Deserialises raw account data → `TokenMetadata`, forgiving the 1‑byte tail. */ -export const decodeMetadataAccount = (data: Buffer): TokenMetadata => { - try { - return deserializeUnchecked(STATE_SCHEMA, TokenMetadata, data); - } catch { - if (data.length > TAIL_PADDING) { - return deserializeUnchecked(STATE_SCHEMA, TokenMetadata, data.subarray(0, data.length - TAIL_PADDING)); - } - throw new Error('Failed to decode TokenMetadata'); - } -}; - -/** Fetches & decodes the account; returns `null` if it doesn’t exist. */ -export const fetchMetadata = async (connection: Connection, mint: PublicKey): Promise => { - const [pda] = deriveMetadataPDA(mint); - const info = await connection.getAccountInfo(pda); - return info ? decodeMetadataAccount(info.data) : null; -}; diff --git a/metadata/js/src/schema.ts b/metadata/js/src/schema.ts deleted file mode 100644 index fc11d791..00000000 --- a/metadata/js/src/schema.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Schema } from 'borsh'; -import { InitializeArgs, UpdateArgs, TokenMetadata } from './types'; - -/** Borsh schema for account state. */ -export const STATE_SCHEMA: Schema = new Map([ - [ - TokenMetadata, - { - kind: 'struct', - fields: [ - ['mint', [32]], - ['name', 'string'], - ['symbol', 'string'], - ['uri', 'string'], - ['authority', [32]], - ], - }, - ], -]); - -/** Borsh schema for instruction payloads. */ -export const INSTRUCTION_SCHEMA: Schema = new Map([ - [ - InitializeArgs, - { - kind: 'struct', - fields: [ - ['name', 'string'], - ['symbol', 'string'], - ['uri', 'string'], - ], - }, - ], - [ - UpdateArgs, - { - kind: 'struct', - fields: [ - ['name', 'string'], - ['symbol', 'string'], - ['uri', 'string'], - ], - }, - ], -]); diff --git a/metadata/js/src/types.ts b/metadata/js/src/types.ts deleted file mode 100644 index 48316550..00000000 --- a/metadata/js/src/types.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** Discriminant used on‑chain for the instruction enum. */ -export enum TokenInstructionKind { - Initialize = 0, - Update = 1, -} - -/** Args for the `Initialize` instruction. */ -export class InitializeArgs { - name!: string; - symbol!: string; - uri!: string; - constructor(props: InitializeArgs) { - Object.assign(this, props); - } -} - -/** Args for the `Update` instruction. */ -export class UpdateArgs { - name!: string; - symbol!: string; - uri!: string; - constructor(props: UpdateArgs) { - Object.assign(this, props); - } -} - -/** Layout of the on‑chain account. */ -export class TokenMetadata { - mint!: Uint8Array; // 32‑byte pubkey - name!: string; - symbol!: string; - uri!: string; - authority!: Uint8Array; // 32‑byte pubkey - constructor(props: TokenMetadata) { - Object.assign(this, props); - } -} diff --git a/metadata/js/src/types/Collection.ts b/metadata/js/src/types/Collection.ts new file mode 100644 index 00000000..4e2c0710 --- /dev/null +++ b/metadata/js/src/types/Collection.ts @@ -0,0 +1,19 @@ +import * as beet from '@bbachain/beet'; +import * as beetBBA from '@bbachain/beet-bbachain'; +import * as web3 from '@bbachain/web3.js'; + +export type Collection = { + verified: boolean; + key: web3.PublicKey; +}; + +/** + * @category userTypes + */ +export const collectionBeet = new beet.BeetArgsStruct( + [ + ['verified', beet.bool], + ['key', beetBBA.publicKey], + ], + 'Collection', +); diff --git a/metadata/js/src/types/CollectionDetails.ts b/metadata/js/src/types/CollectionDetails.ts new file mode 100644 index 00000000..9840560d --- /dev/null +++ b/metadata/js/src/types/CollectionDetails.ts @@ -0,0 +1,42 @@ +import * as beet from '@bbachain/beet'; + +/** + * This type is used to derive the {@link CollectionDetails} type as well as the de/serializer. + * However don't refer to it in your code but use the {@link CollectionDetails} type instead. + * + * @category userTypes + * @category enums + * @private + */ +export type CollectionDetailsRecord = { + V1: { size: beet.bignum }; +}; + +/** + * Union type respresenting the CollectionDetails data enum defined in Rust. + * + * NOTE: that it includes a `__kind` property which allows to narrow types in + * switch/if statements. + * Additionally `isCollectionDetails*` type guards are exposed below to narrow to a specific variant. + * + * @category userTypes + * @category enums + */ +export type CollectionDetails = beet.DataEnumKeyAsKind; + +export const isCollectionDetailsV1 = ( + x: CollectionDetails, +): x is CollectionDetails & { __kind: 'V1' } => x.__kind === 'V1'; + +/** + * @category userTypes + */ +export const collectionDetailsBeet = beet.dataEnum([ + [ + 'V1', + new beet.BeetArgsStruct( + [['size', beet.u64]], + 'CollectionDetailsRecord["V1"]', + ), + ], +]) as beet.FixableBeet; diff --git a/metadata/js/src/types/CreateMetadataAccountArgs.ts b/metadata/js/src/types/CreateMetadataAccountArgs.ts new file mode 100644 index 00000000..651aa00d --- /dev/null +++ b/metadata/js/src/types/CreateMetadataAccountArgs.ts @@ -0,0 +1,22 @@ +import * as beet from '@bbachain/beet'; +import { CollectionDetails, collectionDetailsBeet } from './CollectionDetails'; +import { Data, dataBeet } from './Data'; + +export type CreateMetadataAccountArgs = { + data: Data; + isMutable: boolean; + collectionDetails: beet.COption; +}; + +/** + * @category userTypes + */ +export const createMetadataAccountArgsBeet = + new beet.FixableBeetArgsStruct( + [ + ['data', dataBeet], + ['isMutable', beet.bool], + ['collectionDetails', beet.coption(collectionDetailsBeet)], + ], + 'CreateMetadataAccountArgs', + ); diff --git a/metadata/js/src/types/Creator.ts b/metadata/js/src/types/Creator.ts new file mode 100644 index 00000000..9b65bc81 --- /dev/null +++ b/metadata/js/src/types/Creator.ts @@ -0,0 +1,21 @@ +import * as beet from '@bbachain/beet'; +import * as beetBBA from '@bbachain/beet-bbachain'; +import * as web3 from '@bbachain/web3.js'; + +export type Creator = { + address: web3.PublicKey; + verified: boolean; + share: number; +}; + +/** + * @category userTypes + */ +export const creatorBeet = new beet.BeetArgsStruct( + [ + ['address', beetBBA.publicKey], + ['verified', beet.bool], + ['share', beet.u8], + ], + 'Creator', +); diff --git a/metadata/js/src/types/Data.ts b/metadata/js/src/types/Data.ts new file mode 100644 index 00000000..15de07f6 --- /dev/null +++ b/metadata/js/src/types/Data.ts @@ -0,0 +1,30 @@ +import * as beet from '@bbachain/beet'; +import { Creator, creatorBeet } from './Creator'; +import { Collection, collectionBeet } from './Collection'; +import { Uses, usesBeet } from './Uses'; + +export type Data = { + name: string; + symbol: string; + uri: string; + sellerFeeBasisPoints: number; + creators: beet.COption; + collection: beet.COption; + uses: beet.COption; +}; + +/** + * @category userTypes + */ +export const dataBeet = new beet.FixableBeetArgsStruct( + [ + ['name', beet.utf8String], + ['symbol', beet.utf8String], + ['uri', beet.utf8String], + ['sellerFeeBasisPoints', beet.u16], + ['creators', beet.coption(beet.array(creatorBeet))], + ['collection', beet.coption(collectionBeet)], + ['uses', beet.coption(usesBeet)], + ], + 'Data' +); diff --git a/metadata/js/src/types/Key.ts b/metadata/js/src/types/Key.ts new file mode 100644 index 00000000..8ef4cc76 --- /dev/null +++ b/metadata/js/src/types/Key.ts @@ -0,0 +1,14 @@ +import * as beet from '@bbachain/beet'; + +/** + * @category enums + */ +export enum Key { + Uninitialized, + Metadata, +} + +/** + * @category userTypes + */ +export const keyBeet = beet.fixedScalarEnum(Key) as beet.FixedSizeBeet; diff --git a/metadata/js/src/types/TokenStandard.ts b/metadata/js/src/types/TokenStandard.ts new file mode 100644 index 00000000..353ce04b --- /dev/null +++ b/metadata/js/src/types/TokenStandard.ts @@ -0,0 +1,17 @@ +import * as beet from '@bbachain/beet'; + +/** + * @category enums + */ +export enum TokenStandard { + NonFungible, + Fungible, +} + +/** + * @category userTypes + */ +export const tokenStandardBeet = beet.fixedScalarEnum(TokenStandard) as beet.FixedSizeBeet< + TokenStandard, + TokenStandard +>; diff --git a/metadata/js/src/types/UseMethod.ts b/metadata/js/src/types/UseMethod.ts new file mode 100644 index 00000000..d305e95c --- /dev/null +++ b/metadata/js/src/types/UseMethod.ts @@ -0,0 +1,18 @@ +import * as beet from '@bbachain/beet'; + +/** + * @category enums + */ +export enum UseMethod { + Burn, + Multiple, + Single, +} + +/** + * @category userTypes + */ +export const useMethodBeet = beet.fixedScalarEnum(UseMethod) as beet.FixedSizeBeet< + UseMethod, + UseMethod +>; diff --git a/metadata/js/src/types/Uses.ts b/metadata/js/src/types/Uses.ts new file mode 100644 index 00000000..cec7f9b6 --- /dev/null +++ b/metadata/js/src/types/Uses.ts @@ -0,0 +1,20 @@ +import * as beet from '@bbachain/beet'; +import { UseMethod, useMethodBeet } from './UseMethod'; + +export type Uses = { + useMethod: UseMethod; + remaining: beet.bignum; + total: beet.bignum; +}; + +/** + * @category userTypes + */ +export const usesBeet = new beet.BeetArgsStruct( + [ + ['useMethod', useMethodBeet], + ['remaining', beet.u64], + ['total', beet.u64], + ], + 'Uses', +); diff --git a/metadata/js/src/types/index.ts b/metadata/js/src/types/index.ts new file mode 100644 index 00000000..ead140d8 --- /dev/null +++ b/metadata/js/src/types/index.ts @@ -0,0 +1,9 @@ +export * from './Collection'; +export * from './CollectionDetails'; +export * from './CreateMetadataAccountArgs'; +export * from './Creator'; +export * from './Data'; +export * from './Key'; +export * from './TokenStandard'; +export * from './UseMethod'; +export * from './Uses'; diff --git a/metadata/js/test/common.ts b/metadata/js/test/common.ts deleted file mode 100644 index cbc7d442..00000000 --- a/metadata/js/test/common.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PublicKey, Keypair, Connection, Signer } from '@bbachain/web3.js'; -import { PROGRAM_ID } from '../src'; - -export async function getConnection(): Promise { - const url = 'http://localhost:8899'; - const connection = new Connection(url, 'confirmed'); - await connection.getVersion(); - return connection; -} - -export const TEST_PROGRAM_ID = process.env.TEST_PROGRAM_ID ? new PublicKey(process.env.TEST_PROGRAM_ID) : PROGRAM_ID; diff --git a/metadata/js/tsconfig.build.json b/metadata/js/tsconfig.build.json new file mode 100644 index 00000000..8103a509 --- /dev/null +++ b/metadata/js/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": false, + "strict": false, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "build", "lib"] +} diff --git a/metadata/js/tsconfig.cjs.json b/metadata/js/tsconfig.cjs.json deleted file mode 100644 index 443b583a..00000000 --- a/metadata/js/tsconfig.cjs.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "outDir": "lib/cjs", - "declarationDir": null, - "declaration": false - } -} diff --git a/metadata/js/tsconfig.json b/metadata/js/tsconfig.json index f06fe4da..549b4f9d 100644 --- a/metadata/js/tsconfig.json +++ b/metadata/js/tsconfig.json @@ -1,27 +1,7 @@ { - "include": ["src", "types"], - "exclude": ["node_modules"], - "compilerOptions": { - "target": "es2019", - "module": "esnext", - "outDir": "lib/esm", - "declarationDir": "lib/types", - "noEmit": false, - "declaration": true, - "sourceMap": true, - "noEmitOnError": true, - "stripInternal": true, - "moduleResolution": "node", - "jsx": "react", - "strict": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "isolatedModules": true, - "typeRoots": ["node_modules/@types"] - }, - "typedocOptions": { - "entryPoints": "src/index.ts", - "out": "docs", - "readme": "README.md" - } + "extends": "./tsconfig.build.json", + "compilerOptions": { + "rootDir": "." + }, + "include": ["src", "test"] } diff --git a/metadata/js/typedoc.json b/metadata/js/typedoc.json new file mode 100644 index 00000000..ac5ccd57 --- /dev/null +++ b/metadata/js/typedoc.json @@ -0,0 +1,21 @@ +{ + "entryPoints": ["src/index.ts"], + "excludeInternal": true, + "excludePrivate": true, + "categorizeByGroup": false, + "defaultCategory": "sdk", + "categoryOrder": [ + "Accounts", + "Instructions", + "Errors", + "constants", + "enums", + "userTypes", + "sdk", + "generated", + "*" + ], + "readme": "none", + "emit": "both", + "out": "../../docs/metadata" +} diff --git a/metadata/js/yarn.lock b/metadata/js/yarn.lock index 6f36e7b7..772587c3 100644 --- a/metadata/js/yarn.lock +++ b/metadata/js/yarn.lock @@ -3,11 +3,32 @@ "@babel/runtime@^7.12.5": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa" - integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.0.tgz#fbee7cf97c709518ecc1f590984481d5460d4762" + integrity sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.14.0" + +"@bbachain/beet-bbachain@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@bbachain/beet-bbachain/-/beet-bbachain-0.0.1.tgz#d22ffc4658ecd71947c18b800e8b42affdd111ca" + integrity sha512-3an3cRLwFhoAU58HG8AcUBD/zRr82p0UUo9HtLrTrB3Ba3QUgCctmScVQJ93nm5hop+D/YbW8c7RLRiq9TNw1Q== + dependencies: + "@bbachain/beet" ">=0.0.0" + "@bbachain/web3.js" "^1.1.3" + bs58 "^5.0.0" + debug "^4.3.4" + rpc-websockets "7.11.0" + +"@bbachain/beet@>=0.0.0", "@bbachain/beet@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@bbachain/beet/-/beet-0.0.1.tgz#07f56c2c4c9f478fa657d0ee9c2e0a54b2da90db" + integrity sha512-YO2PtYztheU/LblT8NuhnS8sUPv5b8XpSTh3oyZnRDxACAWUffBEZ29rFZbAYNhiKHOs/vxxEUEHxzCjkoDOnQ== + dependencies: + ansicolors "^0.3.2" + assert "^2.1.0" + bn.js "^5.2.0" + debug "^4.3.3" "@bbachain/buffer-layout-utils@^0.0.1": version "0.0.1" @@ -43,13 +64,6 @@ dependencies: buffer "~6.0.3" -"@bbachain/spl-memo@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@bbachain/spl-memo/-/spl-memo-0.0.1.tgz#ef6a66fb6a99dcb84a87bc6134fc135e26d39351" - integrity sha512-VejfDcl7CsAXPsNOhQzKXSyx4g31jSFh/DHaB+QZe2EevWaJLqjRqTi3DFCwZNcm1OW4T7u37bF46qJDrttVLQ== - dependencies: - buffer "^6.0.3" - "@bbachain/spl-token@^0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@bbachain/spl-token/-/spl-token-0.0.1.tgz#c7d69c002d32a49baebacf5182603cf6ab0bf71f" @@ -81,75 +95,103 @@ rpc-websockets "^7.5.0" superstruct "^0.14.2" -"@cspotcode/source-map-consumer@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" - integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== +"@esbuild/android-arm@0.15.12": + version "0.15.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.12.tgz#e548b10a5e55b9e10537a049ebf0bc72c453b769" + integrity sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA== -"@cspotcode/source-map-support@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" - integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== +"@esbuild/linux-loong64@0.15.12": + version "0.15.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz#475b33a2631a3d8ca8aa95ee127f9a61d95bf9c1" + integrity sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz#e4c58fdcf0696e7a5f19c30201ed43123ab15abc" + integrity sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw== dependencies: - "@cspotcode/source-map-consumer" "0.8.0" + eslint-visitor-keys "^3.4.3" -"@eslint/eslintrc@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" - integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ== +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.2.0" - globals "^13.9.0" - ignore "^4.0.6" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" - minimatch "^3.0.4" + minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@hapi/hoek@^9.0.0": - version "9.2.1" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.1.tgz#9551142a1980503752536b5050fd99f4a7f13b17" - integrity sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@hapi/hoek" "^9.0.0" + "@humanwhocodes/object-schema" "^2.0.3" + debug "^4.3.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" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== -"@humanwhocodes/config-array@^0.9.2": - version "0.9.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.2.tgz#68be55c737023009dfc5fe245d51181bb6476914" - integrity sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA== +"@ljharb/resumer@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@ljharb/resumer/-/resumer-0.1.3.tgz#5ef4a4958da1b4e71ffea8ef33499cc622672d89" + integrity sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" + "@ljharb/through" "^2.3.13" + call-bind "^1.0.7" -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@ljharb/through@^2.3.13": + version "2.3.14" + resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.14.tgz#a5df44295f44dc23bfe106af59426dd0677760b1" + integrity sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A== + dependencies: + call-bind "^1.0.8" -"@kristoferbaxter/estree-walker@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@kristoferbaxter/estree-walker/-/estree-walker-2.0.2.tgz#a448a7b298a42c87502c8ab53038d7c0ad2a73a2" - integrity sha512-aPFon+UXJ0758piFg/sp0tKr67675UWR9ssa39gN0ynJAY5wDQ8u57H0Z0uaeu0z1gEvLnLF8T1/rLrCZ4gFIg== +"@metaplex-foundation/cusper@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/cusper/-/cusper-0.0.2.tgz#dc2032a452d6c269e25f016aa4dd63600e2af975" + integrity sha512-S9RulC2fFCFOQraz61bij+5YCHhSO9llJegK8c8Y6731fSi6snUSQJdCUqYS8AIgR0TKbQvdvgSyIIdbDFZbBA== + +"@msgpack/msgpack@^2.8.0": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@msgpack/msgpack/-/msgpack-2.8.0.tgz#4210deb771ee3912964f14a15ddfb5ff877e70b9" + integrity sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ== "@noble/curves@^1.0.0": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff" - integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.0.tgz#13e0ca8be4a0ce66c113693a94514e5599f40cfc" + integrity sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg== dependencies: - "@noble/hashes" "1.7.1" + "@noble/hashes" "1.8.0" -"@noble/hashes@1.7.1", "@noble/hashes@^1.3.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f" - integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== +"@noble/hashes@1.8.0", "@noble/hashes@^1.3.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a" + integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -164,7 +206,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@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" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -172,150 +214,68 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@sideway/address@^4.1.3": - version "4.1.3" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.3.tgz#d93cce5d45c5daec92ad76db492cc2ee3c64ab27" - integrity sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" - integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - -"@tsconfig/node10@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" - integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== - -"@tsconfig/node12@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" - integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== - -"@tsconfig/node14@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" - integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== - -"@tsconfig/node16@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" - integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== - -"@types/bn.js@^5.1.6": +"@types/bn.js@^5.1.1": version "5.1.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.6.tgz#9ba818eec0c85e4d3c679518428afdf611d03203" integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== dependencies: "@types/node" "*" -"@types/chai-as-promised@^7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz#caf64e76fb056b8c8ced4b761ed499272b737601" - integrity sha512-1y3L1cHePcIm5vXkh1DSGf/zQq5n5xDKG1fpCvf18+uOkpce0Z1ozNFPkyWsVswK7ntN1sZBw3oU6gmN+pDUcA== - dependencies: - "@types/chai" "*" - -"@types/chai@*": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.0.tgz#23509ebc1fa32f1b4d50d6a66c4032d5b8eaabdc" - integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== - "@types/connect@^3.4.33": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== dependencies: "@types/node" "*" -"@types/eslint-plugin-prettier@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#451b5e1e5f148a38dc41e9c5b61d45cd2e97af2c" - integrity sha512-6/UIuz99F0IvtDez4U3bRwAmN4VKnuw10Ibblf0iZhtNbmbonMSLqs/qqsXrGIAWvjy+vXqYwOljgtLhrETSMg== +"@types/debug@^4.1.7": + version "4.1.12" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" + integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== dependencies: - "@types/eslint" "*" + "@types/ms" "*" -"@types/eslint@*", "@types/eslint@^8.4.0": - version "8.4.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.0.tgz#95712d5b32fd99a0d9493c31c6197ea7471c3ba6" - integrity sha512-JUYa/5JwoqikCy7O7jKtuNe9Z4ZZt615G+1EKfaDGSNEpzaA2OwbV/G1v08Oa7fd1XzlFoSCvt9ePl9/6FyAug== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -"@types/estree@*": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" - integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== +"@types/ms@*": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78" + integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA== -"@types/express-serve-static-core@^4.17.9": - version "4.17.28" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" - integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== +"@types/node@*": + version "22.15.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.2.tgz#1db55aa64618ee93a58c8912f74beefe44aca905" + integrity sha512-uKXqKN9beGoMdBfcaTY1ecwz6ctxuJAcUlwE55938g0ZJ8lRxwAZqRz2AJ4pzpt5dHdTPMB863UZ0ESiFUcP7A== dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/json-schema@*", "@types/json-schema@^7.0.9": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + undici-types "~6.21.0" -"@types/lodash@^4.14.159": - version "4.14.178" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" - integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/mocha@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.0.tgz#baf17ab2cca3fcce2d322ebc30454bff487efad5" - integrity sha512-QCWHkbMv4Y5U9oW10Uxbr45qMMSzl4OzijsozynUAgx3kEHUdXB00udx2dWDQ7f2TU2a2uuiFaRZjCe3unPpeg== +"@types/semver@^7.3.12": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.7.0.tgz#64c441bdae033b378b6eef7d0c3d77c329b9378e" + integrity sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA== -"@types/node-fetch@^2.6.12": - version "2.6.12" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03" - integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== +"@types/tape@^4.13.2": + version "4.13.4" + resolved "https://registry.yarnpkg.com/@types/tape/-/tape-4.13.4.tgz#2fe220e9040c1721e5b1af6cd71e9e018d07cafb" + integrity sha512-0Mw8/FAMheD2MvyaFYDaAix7X5GfNjl/XI+zvqJdzC6N05BmHKz6Hwn+r7+8PEXDEKrC3V/irC9z7mrl5a130g== dependencies: "@types/node" "*" - form-data "^4.0.0" - -"@types/node@*": - version "17.0.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.10.tgz#616f16e9d3a2a3d618136b1be244315d95bd7cab" - integrity sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog== + "@types/through" "*" -"@types/node@^12.12.54": - version "12.20.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.42.tgz#2f021733232c2130c26f9eabbdd3bfd881774733" - integrity sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw== - -"@types/node@^16.11.21": - version "16.11.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.21.tgz#474d7589a30afcf5291f59bd49cca9ad171ffde4" - integrity sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A== - -"@types/prettier@^2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.3.tgz#a3c65525b91fca7da00ab1a3ac2b5a2a4afbffbf" - integrity sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/through@*": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.33.tgz#14ebf599320e1c7851e7d598149af183c6b9ea56" + integrity sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ== + dependencies: + "@types/node" "*" "@types/ws@^7.4.4": version "7.4.7" @@ -324,90 +284,94 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz#e90afea96dff8620892ad216b0e4ccdf8ee32d3a" - integrity sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ== - dependencies: - "@typescript-eslint/scope-manager" "5.10.0" - "@typescript-eslint/type-utils" "5.10.0" - "@typescript-eslint/utils" "5.10.0" - debug "^4.3.2" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.2.0" - semver "^7.3.5" +"@typescript-eslint/eslint-plugin@^5.44.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.10.0.tgz#8f59e036f5f1cffc178cacbd5ccdd02aeb96c91c" - integrity sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw== +"@typescript-eslint/parser@^5.44.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.10.0" - "@typescript-eslint/types" "5.10.0" - "@typescript-eslint/typescript-estree" "5.10.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz#bb5d872e8b9e36203908595507fbc4d3105329cb" - integrity sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg== +"@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" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: - "@typescript-eslint/types" "5.10.0" - "@typescript-eslint/visitor-keys" "5.10.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz#8524b9479c19c478347a7df216827e749e4a51e5" - integrity sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ== +"@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" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/utils" "5.10.0" - debug "^4.3.2" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.10.0.tgz#beb3cb345076f5b088afe996d57bcd1dfddaa75c" - integrity sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz#4be24a3dea0f930bb1397c46187d0efdd955a224" - integrity sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA== +"@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" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.10.0" - "@typescript-eslint/visitor-keys" "5.10.0" - debug "^4.3.2" - globby "^11.0.4" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.10.0.tgz#c3d152a85da77c400e37281355561c72fb1b5a65" - integrity sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg== +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: + "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.10.0" - "@typescript-eslint/types" "5.10.0" - "@typescript-eslint/typescript-estree" "5.10.0" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz#770215497ad67cd15a572b52089991d5dfe06281" - integrity sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ== +"@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" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.10.0" - eslint-visitor-keys "^3.0.0" + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +"@ungap/structured-clone@^1.2.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" + integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== JSONStream@^1.3.5: version "1.3.5" @@ -417,25 +381,15 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.0.tgz#52311fd7037ae119cbb134309e901aa46295b3fe" - integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA== - -acorn@^8.4.1, acorn@^8.7.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" - integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== +acorn@^8.9.0: + version "8.14.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.1.tgz#721d5dc10f7d5b5609a891773d47731796935dfb" + integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== agentkeepalive@^4.2.1: version "4.6.0" @@ -444,7 +398,7 @@ agentkeepalive@^4.2.1: dependencies: humanize-ms "^1.2.1" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -454,92 +408,92 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-sequence-parser@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.3.tgz#f2cefb8b681aeb72b7cd50aebc00d509eba64d4c" + integrity sha512-+fksAx9eG3Ab6LDnLs3ZqZa8KVJ/jYnX+D4Qe1azX+LFGFAXqynCQLOdLpNYN/l9e7l6hMWwZbrnctqr6eSQSw== + +ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +ansicolors@^0.3.2, ansicolors@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" + integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-union@^1.0.1: +array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" + integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw== dependencies: - array-uniq "^1.0.1" + call-bound "^1.0.3" + is-array-buffer "^3.0.5" array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= +array.prototype.every@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/array.prototype.every/-/array.prototype.every-1.1.7.tgz#e019a90842b00569efce73263ff90de35096c907" + integrity sha512-BIP72rKvrKd08ptbetLb4qvrlGjkv30yOKgKcTtOIbHyQt3shr/jyOzdApiCOh3LPYrpJo5M6i0zmVldOF2pUw== + dependencies: + call-bound "^1.0.2" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + is-string "^1.1.0" -array.prototype.map@^1.0.3: +arraybuffer.prototype.slice@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.4.tgz#0d97b640cfdd036c1b41cfe706a5e699aa0711f2" - integrity sha512-Qds9QnX7A0qISY7JT5WuJO0NJPE9CMlC6JzHQfhpqAAQQzufVRoeH7EzUY5GcPTx72voG8LV/5eo+b8Qi8hmhA== + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + +assert@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -async@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +async-function@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b" + integrity sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA== -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== dependencies: - follow-redirects "^1.14.0" + possible-typed-array-names "^1.0.0" balanced-match@^1.0.0: version "1.0.2" @@ -547,12 +501,17 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + version "3.0.11" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.11.tgz#40d80e2a1aeacba29792ccc6c5354806421287ff" + integrity sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA== dependencies: safe-buffer "^5.0.1" +base-x@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.1.tgz#817fb7b57143c501f649805cb247617ad016a885" + integrity sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -566,14 +525,9 @@ bigint-buffer@^1.1.5: bindings "^1.3.0" bignumber.js@^9.0.1: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" - integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + version "9.3.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.3.0.tgz#bdba7e2a4c1a2eba08290e8dcad4f36393c92acd" + integrity sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA== bindings@^1.3.0: version "1.5.0" @@ -582,15 +536,10 @@ bindings@^1.3.0: dependencies: file-uri-to-path "1.0.0" -bluebird@3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - bn.js@^5.0.0, bn.js@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" - integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + version "5.2.2" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" + integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== borsh@^0.7.0: version "0.7.0" @@ -609,25 +558,39 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: - fill-range "^7.0.1" + balanced-match "^1.0.0" -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== dependencies: base-x "^3.0.2" +bs58@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== + dependencies: + base-x "^4.0.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + buffer@6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" @@ -645,50 +608,44 @@ buffer@^6.0.3, buffer@~6.0.3: ieee754 "^1.2.1" bufferutil@^4.0.1: - version "4.0.6" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" - integrity sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw== + version "4.0.9" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a" + integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== dependencies: node-gyp-build "^4.3.0" -call-bind@^1.0.0, call-bind@^1.0.2: +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.7, call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@~4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -696,40 +653,6 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - -check-more-types@2.24.0: - version "2.24.0" - resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" - integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= - -chokidar@3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -742,100 +665,131 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== -commander@^2.18.0, commander@^2.20.3: +commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cpr@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cpr/-/cpr-3.0.1.tgz#b9a55038b7cd81a35c17b9761895bd8496aef1e5" + integrity sha512-Xch4PXQ/KC8lJ+KfJ9JI6eG/nmppLrPPWg5Q+vh65Qr9EjuJEubxh/H/Le1TmCZ7+Xv7iJuNRqapyOFZB+wsxA== + dependencies: + graceful-fs "^4.1.5" + minimist "^1.2.0" + mkdirp "~0.5.1" + rimraf "^2.5.4" -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" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@^7.0.2: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -debug@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +data-view-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" + integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ== dependencies: - ms "2.1.2" + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" -debug@^4.1.1, debug@^4.3.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== +data-view-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735" + integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ== dependencies: - ms "2.1.2" + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" +data-view-byte-offset@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + +deep-equal@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.3.tgz#af89dafb23a396c7da3e862abc0be27cf51d56e1" + integrity sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.5" + es-get-iterator "^1.1.3" + get-intrinsic "^1.2.2" + is-arguments "^1.1.1" + is-array-buffer "^3.0.2" + is-date-object "^1.0.5" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + isarray "^2.0.5" + object-is "^1.1.5" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.13" deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: - object-keys "^1.0.12" + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-properties@^1.1.3, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +defined@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf" + integrity sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q== delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -850,74 +804,129 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -duplexer@~0.1.1: +dotignore@^0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -email-addresses@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb" - integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -es-abstract@^1.18.0-next.2, es-abstract@^1.19.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" - integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" - is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" + minimatch "^3.0.4" + +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +es-abstract@^1.23.5, es-abstract@^1.23.9: + version "1.23.9" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.9.tgz#5b45994b7de78dada5c1bebf1379646b32b9d606" + integrity sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.3" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.2.7" + get-proto "^1.0.0" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-regex "^1.2.1" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.0" + math-intrinsics "^1.1.0" + object-inspect "^1.13.3" object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.3" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.18" + +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-get-iterator@^1.0.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" - integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== +es-get-iterator@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.1.0" - has-symbols "^1.0.1" - is-arguments "^1.1.0" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" is-map "^2.0.2" is-set "^2.0.2" - is-string "^1.0.5" + is-string "^1.0.7" isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" es6-promise@^4.0.3: version "4.2.8" @@ -927,34 +936,160 @@ es6-promise@^4.0.3: es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== dependencies: es6-promise "^4.0.3" -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: +esbuild-android-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz#5e8151d5f0a748c71a7fbea8cee844ccf008e6fc" + integrity sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q== + +esbuild-android-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz#5ee72a6baa444bc96ffcb472a3ba4aba2cc80666" + integrity sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA== + +esbuild-darwin-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz#70047007e093fa1b3ba7ef86f9b3fa63db51fe25" + integrity sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q== + +esbuild-darwin-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz#41c951f23d9a70539bcca552bae6e5196696ae04" + integrity sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw== + +esbuild-freebsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz#a761b5afd12bbedb7d56c612e9cfa4d2711f33f0" + integrity sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw== + +esbuild-freebsd-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz#6b0839d4d58deabc6cbd96276eb8cbf94f7f335e" + integrity sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g== + +esbuild-linux-32@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz#bd50bfe22514d434d97d5150977496e2631345b4" + integrity sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA== + +esbuild-linux-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz#074bb2b194bf658245f8490f29c01ffcdfa8c931" + integrity sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA== + +esbuild-linux-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz#3bf789c4396dc032875a122988efd6f3733f28f5" + integrity sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ== + +esbuild-linux-arm@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz#b91b5a8d470053f6c2c9c8a5e67ec10a71fe4a67" + integrity sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A== + +esbuild-linux-mips64le@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz#2fb54099ada3c950a7536dfcba46172c61e580e2" + integrity sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A== + +esbuild-linux-ppc64le@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz#9e3b8c09825fb27886249dfb3142a750df29a1b7" + integrity sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg== + +esbuild-linux-riscv64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz#923d0f5b6e12ee0d1fe116b08e4ae4478fe40693" + integrity sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA== + +esbuild-linux-s390x@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz#3b1620220482b96266a0c6d9d471d451a1eab86f" + integrity sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww== + +esbuild-netbsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz#276730f80da646859b1af5a740e7802d8cd73e42" + integrity sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w== + +esbuild-openbsd-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz#bd0eea1dd2ca0722ed489d88c26714034429f8ae" + integrity sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw== + +esbuild-runner@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/esbuild-runner/-/esbuild-runner-2.2.2.tgz#4243089f14c9690bff70beee16da3c41fd1dec50" + integrity sha512-fRFVXcmYVmSmtYm2mL8RlUASt2TDkGh3uRcvHFOKNr/T58VrfVeKD9uT9nlgxk96u0LS0ehS/GY7Da/bXWKkhw== + dependencies: + source-map-support "0.5.21" + tslib "2.4.0" + +esbuild-sunos-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz#5e56bf9eef3b2d92360d6d29dcde7722acbecc9e" + integrity sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg== + +esbuild-windows-32@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz#a4f1a301c1a2fa7701fcd4b91ef9d2620cf293d0" + integrity sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw== + +esbuild-windows-64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz#bc2b467541744d653be4fe64eaa9b0dbbf8e07f6" + integrity sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA== + +esbuild-windows-arm64@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz#9a7266404334a86be800957eaee9aef94c3df328" + integrity sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA== + +esbuild@0.15.12: + version "0.15.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.12.tgz#6c8e22d6d3b7430d165c33848298d3fc9a1f251c" + integrity sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng== + optionalDependencies: + "@esbuild/android-arm" "0.15.12" + "@esbuild/linux-loong64" "0.15.12" + esbuild-android-64 "0.15.12" + esbuild-android-arm64 "0.15.12" + esbuild-darwin-64 "0.15.12" + esbuild-darwin-arm64 "0.15.12" + esbuild-freebsd-64 "0.15.12" + esbuild-freebsd-arm64 "0.15.12" + esbuild-linux-32 "0.15.12" + esbuild-linux-64 "0.15.12" + esbuild-linux-arm "0.15.12" + esbuild-linux-arm64 "0.15.12" + esbuild-linux-mips64le "0.15.12" + esbuild-linux-ppc64le "0.15.12" + esbuild-linux-riscv64 "0.15.12" + esbuild-linux-s390x "0.15.12" + esbuild-netbsd-64 "0.15.12" + esbuild-openbsd-64 "0.15.12" + esbuild-sunos-64 "0.15.12" + esbuild-windows-32 "0.15.12" + esbuild-windows-64 "0.15.12" + esbuild-windows-arm64 "0.15.12" + +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" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +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" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== -eslint-config-prettier@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" - integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== - -eslint-plugin-prettier@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0" - integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ== +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -966,85 +1101,76 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153" - integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" - integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== - -eslint@^8.7.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.7.0.tgz#22e036842ee5b7cf87b03fe237731675b4d3633c" - integrity sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w== - dependencies: - "@eslint/eslintrc" "^1.0.5" - "@humanwhocodes/config-array" "^0.9.2" - ajv "^6.10.0" +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" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.3.0: + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" + "@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" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.0" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.2.0" - espree "^9.3.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.6.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + is-path-inside "^3.0.3" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^9.2.0, espree@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8" - integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.7.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^3.1.0" + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -1070,43 +1196,15 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -event-stream@=3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" - eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -execa@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" - integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" @@ -1114,32 +1212,20 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - -fast-glob@3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" glob-parent "^5.1.2" merge2 "^1.3.0" - micromatch "^4.0.4" + micromatch "^4.0.8" fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -1149,17 +1235,17 @@ fast-json-stable-stringify@^2.0.0: fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fast-stable-stringify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" - integrity sha1-XFVDRisiru79NtBbNOUceMuG0xM= + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.19.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" + integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== dependencies: reusify "^1.0.4" @@ -1175,37 +1261,23 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= - -filenamify@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.3.0.tgz#62391cb58f02b09971c9d4f9d63b3cf9aba03106" - integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.1" - trim-repeated "^1.0.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== +find-process@^1.4.7: + version "1.4.10" + resolved "https://registry.yarnpkg.com/find-process/-/find-process-1.4.10.tgz#006af3349d8debdb9fb79fb1e859959350307c02" + integrity sha512-ncYFnWEIwL7PzmrK1yZtaccN8GhethD37RzBHG6iOZoFYB4vSmLLXfeWJjeN5nMvCJMjOtBvBBF8OgxEcikiZg== dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" + chalk "~4.1.2" + commander "^12.1.0" + loglevel "^1.9.2" -find-up@5.0.0: +find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -1213,171 +1285,134 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" 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.1.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2" - integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== - -follow-redirects@^1.14.0: - version "1.14.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== - -form-data@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" - integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +flatted@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" + integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== +for-each@^0.3.3, for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" + is-callable "^1.2.7" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +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.prototype.name@^1.1.6, function.prototype.name@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78" + integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.2, get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +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" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -functional-red-black-tree@^1.0.1: +get-proto@^1.0.0, get-proto@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -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" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== +get-symbol-description@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -gh-pages@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-3.2.3.tgz#897e5f15e111f42af57d21d430b83e5cdf29472c" - integrity sha512-jA1PbapQ1jqzacECfjUaO9gV8uBgU6XNMV0oXLtfCX3haGLe5Atq8BxlrADhbD6/UdG9j6tZLWAkAybndOXTJg== - dependencies: - async "^2.6.1" - commander "^2.18.0" - email-addresses "^3.0.1" - filenamify "^4.3.0" - find-cache-dir "^3.3.1" - fs-extra "^8.1.0" - globby "^6.1.0" - -glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + +glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob-parent@^6.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" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" -glob@7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== +glob@^7.1.3, glob@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.3, glob@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +globals@^13.19.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" + type-fest "^0.20.2" -globals@^13.6.0, globals@^13.9.0: - version "13.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.0.tgz#4d733760304230a0082ed96e21e5c565f898089e" - integrity sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg== +globalthis@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== dependencies: - type-fest "^0.20.2" + define-properties "^1.2.1" + gopd "^1.0.1" -globby@^11.0.4: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -1389,65 +1424,72 @@ globby@^11.0.4: merge2 "^1.4.1" slash "^3.0.0" -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graceful-fs@^4.1.5: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== +has-bigints@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe" + integrity sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg== -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-dynamic-import@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/has-dynamic-import/-/has-dynamic-import-2.1.1.tgz#c81e5ad210483b76b4fbe3393c96c2269c0b06b8" + integrity sha512-DuTCn6K/RW8S27npDMumGKsjG6HE7MxzedZka5tJP+9dqfxks+UMqKBmeCijHtIhsBEZPlbMg0qMHi2nKYVtKQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.1, has-symbols@^1.0.2: +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== dependencies: - has-symbols "^1.0.2" + dunder-proto "^1.0.0" -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" humanize-ms@^1.2.1: version "1.2.1" @@ -1461,20 +1503,15 @@ ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.1.8, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +ignore@^5.2.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== +import-fresh@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -1482,176 +1519,227 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== +is-arguments@^1.0.4, is-arguments@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.2.0.tgz#ad58c6aecf563b78ef2bf04df540da8f5d7d8e1b" + integrity sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" -is-arguments@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== +is-array-buffer@^3.0.2, is-array-buffer@^3.0.4, is-array-buffer@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== +is-async-function@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.1.1.tgz#3e69018c8e04e73b738793d020bfe884b9fd3523" + integrity sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ== dependencies: - has-bigints "^1.0.1" + async-function "^1.0.0" + call-bound "^1.0.3" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== dependencies: - binary-extensions "^2.0.0" + has-bigints "^1.0.2" -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== +is-boolean-object@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" + integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bound "^1.0.3" + has-tostringtag "^1.0.2" -is-callable@^1.1.4, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.8.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== +is-core-module@^2.13.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: - has "^1.0.3" + hasown "^2.0.2" -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== +is-data-view@^1.0.1, is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + +is-date-object@^1.0.5, is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== dependencies: - has-tostringtag "^1.0.0" + call-bound "^1.0.2" + has-tostringtag "^1.0.2" is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -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" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-generator-function@^1.0.10, is-generator-function@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.0.tgz#bf3eeda931201394f57b5dba2800f91a238309ca" + integrity sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ== + dependencies: + call-bound "^1.0.3" + get-proto "^1.0.0" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + +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" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" -is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-map@^2.0.2, is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== -is-negative-zero@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-nan@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" -is-number-object@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" - integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== dependencies: - has-tostringtag "^1.0.0" + call-bound "^1.0.3" + has-tostringtag "^1.0.2" is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +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" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== +is-regex@^1.1.4, is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" -is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== +is-set@^2.0.2, is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== -is-shared-array-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" - integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-string@^1.0.7, is-string@^1.1.0, is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== dependencies: - has-tostringtag "^1.0.0" + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== +is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15, is-typed-array@^1.1.3: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== dependencies: - has-symbols "^1.0.2" + which-typed-array "^1.1.16" -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== -is-weakref@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== +is-weakref@^1.0.2, is-weakref@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293" + integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew== dependencies: - call-bind "^1.0.2" + call-bound "^1.0.3" + +is-weakset@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.4.tgz#c9f5deb0bc1906c6d6f1027f284ddf459249daca" + integrity sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ== + dependencies: + call-bound "^1.0.3" + get-intrinsic "^1.2.6" isarray@^2.0.5: version "2.0.5" @@ -1661,34 +1749,19 @@ isarray@^2.0.5: isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== -iterate-iterator@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.2.tgz#551b804c9eaa15b847ea6a7cdc2f5bf1ec150f91" - integrity sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw== - -iterate-value@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" - integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== - dependencies: - es-get-iterator "^1.0.2" - iterate-iterator "^1.0.1" - jayson@^3.4.4: - version "3.6.6" - resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.6.6.tgz#189984f624e398f831bd2be8e8c80eb3abf764a1" - integrity sha512-f71uvrAWTtrwoww6MKcl9phQTC+56AopLyEenWvKVAIMz+q0oVGj6tenLZ7Z6UiPBkJtKLj4kt0tACllFQruGQ== + version "3.7.0" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.7.0.tgz#b735b12d06d348639ae8230d7a1e2916cb078f25" + integrity sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ== dependencies: "@types/connect" "^3.4.33" - "@types/express-serve-static-core" "^4.17.9" - "@types/lodash" "^4.14.159" "@types/node" "^12.12.54" "@types/ws" "^7.4.4" JSONStream "^1.3.5" @@ -1702,24 +1775,18 @@ jayson@^3.4.4: uuid "^8.3.2" ws "^7.4.5" -joi@^17.4.0: - version "17.6.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" - integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.0" - "@sideway/pinpoint" "^2.0.0" - -js-yaml@4.1.0, js-yaml@^4.1.0: +js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" +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-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" @@ -1728,34 +1795,29 @@ json-schema-traverse@^0.4.1: 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" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + 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" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsonc-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" - integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" +jsonc-parser@^3.2.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" + integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -lazy-ass@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" - integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= +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" levn@^0.4.1: version "0.4.1" @@ -1765,13 +1827,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - 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" @@ -1784,161 +1839,97 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.14, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.20: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" +loglevel@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.9.2.tgz#c2e028d6c757720107df4e64508530db6621ba08" + integrity sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg== lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== -magic-string@0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" - integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== - dependencies: - sourcemap-codec "^1.4.4" - -make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= - -marked@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.10.tgz#423e295385cc0c3a70fa495e0df68b007b879423" - integrity sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw== +marked@^4.2.12: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.1" - picomatch "^2.2.3" + braces "^3.0.3" + picomatch "^2.3.1" -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== +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" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== +minimatch@^7.1.3: + version "7.4.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" + integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== dependencies: - mime-db "1.52.0" + brace-expansion "^2.0.1" -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +mkdirp@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.3, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mocha@^9.1.4: - version "9.1.4" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.4.tgz#5a332d6ade6345b975fd97b5b39139854c8e1b32" - integrity sha512-+q2aV5VlJZuLgCWoBvGI5zEwPF9eEI0kr/sAA9Jm4xMND7RfIEyF8JE7C0JIg8WXRG+P1sdIAb5ccoHPlXLzcw== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.2" - debug "4.3.2" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.7" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "3.0.4" - ms "2.1.3" - nanoid "3.1.25" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - workerpool "6.1.5" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -mri@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6" - integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== + minimist "^1.2.6" -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mock-property@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mock-property/-/mock-property-1.1.0.tgz#b38b9961476d2e54cde2033b62847b9546b3670d" + integrity sha512-1/JjbLoGwv87xVsutkX0XJc0M0W4kb40cZl/K41xtTViBOD9JuFPKfyMNTrLJ/ivYAd0aPqu/vduamXO0emTFQ== + dependencies: + define-data-property "^1.1.4" + functions-have-names "^1.2.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + hasown "^2.0.2" + isarray "^2.0.5" + object-inspect "^1.13.2" -ms@2.1.3, ms@^2.0.0: +ms@^2.0.0, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.1.25: - version "3.1.25" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" - integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== +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" + 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" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== node-fetch@2: version "2.7.0" @@ -1948,79 +1939,67 @@ node-fetch@2: whatwg-url "^5.0.0" node-gyp-build@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" - integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== + version "4.8.4" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8" + integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +object-inspect@^1.13.2, object-inspect@^1.13.3: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== -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" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== +object-is@^1.1.5, object-is@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== dependencies: - path-key "^3.0.0" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + call-bind "^1.0.7" + define-properties "^1.2.1" -object-inspect@^1.11.0, object-inspect@^1.9.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" - integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== - -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== +object.assign@^4.1.4, object.assign@^4.1.5, object.assign@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" object-keys "^1.1.1" once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" + word-wrap "^1.2.5" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== +own-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" + integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg== dependencies: - p-try "^2.0.0" + get-intrinsic "^1.2.6" + object-keys "^1.1.1" + safe-push-apply "^1.0.0" p-limit@^3.0.2: version "3.1.0" @@ -2029,13 +2008,6 @@ p-limit@^3.0.2: 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" - 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" @@ -2043,11 +2015,6 @@ p-locate@^5.0.0: 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" - 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" @@ -2063,9 +2030,9 @@ path-exists@^4.0.0: 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" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -2080,46 +2047,15 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= - dependencies: - through "~2.3" - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: +picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== prelude-ls@^1.2.1: version "1.2.1" @@ -2134,93 +2070,76 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" - integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== - -promise.allsettled@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.4.tgz#65e71f2a604082ed69c548b68603294090ee6803" - integrity sha512-o73CbvQh/OnPFShxHcHxk0baXR2a1m4ozb85ha0H14VEoi/EJJLa9mnPfEWJx9RjA9MLfhdjZ8I6HhWtBa64Ag== - dependencies: - array.prototype.map "^1.0.3" - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - get-intrinsic "^1.0.2" - iterate-value "^1.0.2" - -ps-tree@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" - integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== - dependencies: - event-stream "=3.3.4" + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9" + integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.7" + get-proto "^1.0.1" + which-builtin-type "^1.2.1" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +regexp.prototype.flags@^1.5.1, regexp.prototype.flags@^1.5.3: + version "1.5.4" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19" + integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-errors "^1.3.0" + get-proto "^1.0.1" + gopd "^1.2.0" + set-function-name "^2.0.2" resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.1.6: - version "1.21.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.21.1.tgz#1a88c73f5ca8ab0aabc8b888c4170de26c92c4cc" - integrity sha512-lfEImVbnolPuaSZuLQ52cAxPBHeI77sPwCOWRdy12UG/CNa8an7oBHH1R+Fp1/mUqSJi4c8TIP6FOIPSZAUrEQ== +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== dependencies: - is-core-module "^2.8.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +rimraf@^2.5.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" rimraf@^3.0.2: version "3.0.2" @@ -2260,36 +2179,74 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.1.0: - version "7.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d" - integrity sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ== +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== dependencies: - tslib "^2.1.0" + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" -safe-buffer@^5.0.1, safe-buffer@^5.1.0: +safe-buffer@^5.0.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -semver@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +safe-push-apply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5" + integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA== + dependencies: + es-errors "^1.3.0" + isarray "^2.0.5" -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + +semver@^7.3.7: + version "7.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" + integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== + +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== dependencies: - lru-cache "^6.0.0" + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== +set-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e" + integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw== dependencies: - randombytes "^2.1.0" + dunder-proto "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" shebang-command@^2.0.0: version "2.0.0" @@ -2303,144 +2260,139 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== +shiki@^0.14.1: + version "0.14.7" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" + integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" -shiki@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.0.tgz#85f21ecfa95b377ff64db6c71442c22c220e9540" - integrity sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA== +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== dependencies: - jsonc-parser "^3.0.0" - vscode-oniguruma "^1.6.1" - vscode-textmate "5.2.0" + es-errors "^1.3.0" + object-inspect "^1.13.3" -shx@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" - integrity sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g== +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== dependencies: - minimist "^1.2.3" - shelljs "^0.8.5" + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" -signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +side-channel@^1.0.4, side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -sourcemap-codec@^1.4.4: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= - dependencies: - through "2" - -start-server-and-test@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/start-server-and-test/-/start-server-and-test-1.14.0.tgz#c57f04f73eac15dd51733b551d775b40837fdde3" - integrity sha512-on5ELuxO2K0t8EmNj9MtVlFqwBMxfWOhu4U7uZD1xccVpFlOQKR93CSe0u98iQzfNxRyaNTb/CdadbNllplTsw== - dependencies: - bluebird "3.7.2" - check-more-types "2.24.0" - debug "4.3.2" - execa "5.1.1" - lazy-ass "1.6.0" - ps-tree "1.2.0" - wait-on "6.0.0" - -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= - dependencies: - duplexer "~0.1.1" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" +source-map-support@0.5.21: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spok@^1.4.3: + version "1.5.5" + resolved "https://registry.yarnpkg.com/spok/-/spok-1.5.5.tgz#a51f7f290a53131d7b7a922dfedc461dda0aed72" + integrity sha512-IrJIXY54sCNFASyHPOY+jEirkiJ26JDqsGiI0Dvhwcnkl0PEWi1PSsrkYql0rzDw8LFVTcA7rdUCAJdE2HE+2Q== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" + ansicolors "~0.3.2" + find-process "^1.4.7" -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== +stop-iteration-iterator@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" + integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ== + dependencies: + es-errors "^1.3.0" + internal-slot "^1.1.0" + +string.prototype.trim@^1.2.10, string.prototype.trim@^1.2.9: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + +string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.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" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" -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" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +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" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-outer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - superstruct@^0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.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" @@ -2448,11 +2400,44 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^9.2.3: + version "9.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== + 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" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tape@^5.5.3: + version "5.9.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-5.9.0.tgz#8d1a7472c6a154b82ce23b20dd9dc70ec0729b46" + integrity sha512-czbGgxSVwRlbB3Ly/aqQrNwrDAzKHDW/kVXegp4hSFmR2c8qqm3hCgZbUy1+3QAQFGhPDG7J56UsV1uNilBFCA== + dependencies: + "@ljharb/resumer" "^0.1.3" + "@ljharb/through" "^2.3.13" + array.prototype.every "^1.1.6" + call-bind "^1.0.7" + deep-equal "^2.2.3" + defined "^1.0.1" + dotignore "^0.1.2" + for-each "^0.3.3" + get-package-type "^0.1.0" + glob "^7.2.3" + has-dynamic-import "^2.1.0" + hasown "^2.0.2" + inherits "^2.0.4" + is-regex "^1.1.4" + minimist "^1.2.8" + mock-property "^1.1.0" + object-inspect "^1.13.2" + object-is "^1.1.6" + object-keys "^1.1.1" + object.assign "^4.1.5" + resolve "^2.0.0-next.5" + string.prototype.trim "^1.2.9" + text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" @@ -2461,12 +2446,12 @@ text-encoding-utf-8@^1.0.2: text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -through@2, "through@>=2.2.7 <3", through@~2.3, through@~2.3.1: +"through@>=2.2.7 <3": version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== to-regex-range@^5.0.1: version "5.0.1" @@ -2478,43 +2463,18 @@ to-regex-range@^5.0.1: tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= - dependencies: - escape-string-regexp "^1.0.2" - -ts-node@^10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.4.0.tgz#680f88945885f4e6cf450e7f0d6223dd404895f7" - integrity sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A== - dependencies: - "@cspotcode/source-map-support" "0.7.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - yn "3.1.1" +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -2529,64 +2489,85 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - 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" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typedoc@^0.22.11: - version "0.22.11" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.11.tgz#a3d7f4577eef9fc82dd2e8f4e2915e69f884c250" - integrity sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA== +typed-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + +typed-array-byte-length@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + +typed-array-byte-offset@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + +typedoc@^0.23.16: + version "0.23.28" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd" + integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== dependencies: - glob "^7.2.0" lunr "^2.3.9" - marked "^4.0.10" - minimatch "^3.0.4" - shiki "^0.10.0" + marked "^4.2.12" + minimatch "^7.1.3" + shiki "^0.14.1" -typescript-esm@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/typescript-esm/-/typescript-esm-2.0.0.tgz#07857699d339e28f2fc88e1fafd6a855170e39f6" - integrity sha512-/dERe64gRgZ3pSzP6Lc2DNiCdVPz1+mVlbkV9cl9eDunAqfelZHRA8MRTqEJLK6u6Adc6Z8Yy1lQY4nWUIh/5A== - dependencies: - "@kristoferbaxter/estree-walker" "2.0.2" - acorn "8.1.0" - fast-glob "3.2.5" - magic-string "0.25.7" - mri "1.1.6" - promise.allsettled "1.0.4" - typescript "4.2.3" - -typescript@4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" - integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== - -typescript@^4.5.5: - version "4.5.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== +typescript@^4.9.3: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +unbox-primitive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" + integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" + call-bound "^1.0.3" + has-bigints "^1.0.2" + has-symbols "^1.1.0" + which-boxed-primitive "^1.1.1" -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== uri-js@^4.2.2: version "4.4.1" @@ -2596,155 +2577,130 @@ uri-js@^4.2.2: punycode "^2.1.0" utf-8-validate@^5.0.2: - version "5.0.8" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.8.tgz#4a735a61661dbb1c59a0868c397d2fe263f14e58" - integrity sha512-k4dW/Qja1BYDl2qD4tOMB9PFVha/UJtxTc1cXYOe3WwA/2m0Yn4qB7wLMpJyLJ/7DR0XnTut3HsCSzDT4ZvKgA== + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== dependencies: node-gyp-build "^4.3.0" +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -vscode-oniguruma@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz#2bf4dfcfe3dd2e56eb549a3068c8ee39e6c30ce5" - integrity sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ== +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== -vscode-textmate@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" - integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== - -wait-on@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.0.tgz#7e9bf8e3d7fe2daecbb7a570ac8ca41e9311c7e7" - integrity sha512-tnUJr9p5r+bEYXPUdRseolmz5XqJTTj98JgOsfBn7Oz2dxfE2g3zw1jE+Mo8lopM3j3et/Mq1yW7kKX6qw7RVw== - dependencies: - axios "^0.21.1" - joi "^17.4.0" - lodash "^4.17.21" - minimist "^1.2.5" - rxjs "^7.1.0" +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== +which-boxed-primitive@^1.0.2, which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" -which@2.0.2, which@^2.0.1: +which-collection@^1.0.1, which-collection@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + +which-typed-array@^1.1.13, which-typed-array@^1.1.16, which-typed-array@^1.1.18, which-typed-array@^1.1.2: + version "1.1.19" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.19.tgz#df03842e870b6b88e117524a4b364b6fc689f956" + integrity sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -workerpool@6.1.5: - version "6.1.5" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" - integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@^7.4.5: - version "7.5.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" - integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== ws@^8.5.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + version "8.18.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.1.tgz#ea131d3784e1dfdff91adb0a4a116b127515e3cb" + integrity sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w== yocto-queue@^0.1.0: version "0.1.0" From 1cb480ae203e60448c4a6e30e10d9b86cca0225c Mon Sep 17 00:00:00 2001 From: Philip James Date: Sun, 27 Apr 2025 19:19:23 +0300 Subject: [PATCH 13/18] bump major lib --- metadata/js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/js/package.json b/metadata/js/package.json index 9a6de289..b1df2fa8 100644 --- a/metadata/js/package.json +++ b/metadata/js/package.json @@ -1,6 +1,6 @@ { "name": "@bbachain/spl-token-metadata", - "version": "0.0.6", + "version": "0.1.0", "author": "BBAChain Labs ", "repository": "https://github.com/bbachain/program-executor", "license": "Apache-2.0", From 6d940392dffc578b4400fb87b7bf12adb4bf78aa Mon Sep 17 00:00:00 2001 From: Philip James Date: Sun, 27 Apr 2025 19:25:42 +0300 Subject: [PATCH 14/18] fix lint js lib --- metadata/js/.prettierrc.js | 1 - metadata/js/.prettierrc.json | 10 + metadata/js/src/accounts/Metadata.ts | 337 +++--- metadata/js/src/errors.ts | 1015 ++++++++++++----- .../js/src/helpers/metadata-deserializer.ts | 177 +-- .../src/instructions/CreateMetadataAccount.ts | 4 +- metadata/js/src/types/Collection.ts | 2 +- metadata/js/src/types/CollectionDetails.ts | 4 +- .../js/src/types/CreateMetadataAccountArgs.ts | 2 +- metadata/js/src/types/Creator.ts | 2 +- metadata/js/src/types/Data.ts | 34 +- metadata/js/src/types/Key.ts | 9 +- metadata/js/src/types/TokenStandard.ts | 5 +- metadata/js/src/types/UseMethod.ts | 5 +- metadata/js/src/types/Uses.ts | 2 +- 15 files changed, 1074 insertions(+), 535 deletions(-) delete mode 100644 metadata/js/.prettierrc.js create mode 100644 metadata/js/.prettierrc.json diff --git a/metadata/js/.prettierrc.js b/metadata/js/.prettierrc.js deleted file mode 100644 index c6ea425e..00000000 --- a/metadata/js/.prettierrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../.prettierrc'); diff --git a/metadata/js/.prettierrc.json b/metadata/js/.prettierrc.json new file mode 100644 index 00000000..3453ff69 --- /dev/null +++ b/metadata/js/.prettierrc.json @@ -0,0 +1,10 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "useTabs": false, + "tabWidth": 2, + "arrowParens": "always", + "printWidth": 80, + "parser": "typescript" +} diff --git a/metadata/js/src/accounts/Metadata.ts b/metadata/js/src/accounts/Metadata.ts index c7cfdf9e..297df0bc 100644 --- a/metadata/js/src/accounts/Metadata.ts +++ b/metadata/js/src/accounts/Metadata.ts @@ -2,18 +2,18 @@ import * as beet from '@bbachain/beet'; import * as beetBBA from '@bbachain/beet-bbachain'; import * as web3 from '@bbachain/web3.js'; import { - Collection, - collectionBeet, - CollectionDetails, - collectionDetailsBeet, - Data, - dataBeet, - Key, - keyBeet, - TokenStandard, - tokenStandardBeet, - Uses, - usesBeet, + Collection, + collectionBeet, + CollectionDetails, + collectionDetailsBeet, + Data, + dataBeet, + Key, + keyBeet, + TokenStandard, + tokenStandardBeet, + Uses, + usesBeet, } from '../types'; import * as customSerializer from '../helpers/metadata-deserializer'; import { PROGRAM_ADDRESS } from '..'; @@ -23,16 +23,16 @@ import { PROGRAM_ADDRESS } from '..'; * @category Accounts */ export type MetadataArgs = { - key: Key; - updateAuthority: web3.PublicKey; - mint: web3.PublicKey; - data: Data; - primarySaleHappened: boolean; - isMutable: boolean; - tokenStandard: beet.COption; - collection: beet.COption; - collectionDetails: beet.COption; - uses: beet.COption; + key: Key; + updateAuthority: web3.PublicKey; + mint: web3.PublicKey; + data: Data; + primarySaleHappened: boolean; + isMutable: boolean; + tokenStandard: beet.COption; + collection: beet.COption; + collectionDetails: beet.COption; + uses: beet.COption; }; /** * Holds the data for the {@link Metadata} Account and provides de/serialization @@ -41,167 +41,178 @@ export type MetadataArgs = { * @category Accounts */ export class Metadata implements MetadataArgs { - private constructor( - readonly key: Key, - readonly updateAuthority: web3.PublicKey, - readonly mint: web3.PublicKey, - readonly data: Data, - readonly primarySaleHappened: boolean, - readonly isMutable: boolean, - readonly tokenStandard: beet.COption, - readonly collection: beet.COption, - readonly collectionDetails: beet.COption, - readonly uses: beet.COption - ) {} + private constructor( + readonly key: Key, + readonly updateAuthority: web3.PublicKey, + readonly mint: web3.PublicKey, + readonly data: Data, + readonly primarySaleHappened: boolean, + readonly isMutable: boolean, + readonly tokenStandard: beet.COption, + readonly collection: beet.COption, + readonly collectionDetails: beet.COption, + readonly uses: beet.COption + ) {} - /** - * Creates a {@link Metadata} instance from the provided args. - */ - static fromArgs(args: MetadataArgs) { - return new Metadata( - args.key, - args.updateAuthority, - args.mint, - args.data, - args.primarySaleHappened, - args.isMutable, - args.tokenStandard, - args.collection, - args.collectionDetails, - args.uses - ); - } + /** + * Creates a {@link Metadata} instance from the provided args. + */ + static fromArgs(args: MetadataArgs) { + return new Metadata( + args.key, + args.updateAuthority, + args.mint, + args.data, + args.primarySaleHappened, + args.isMutable, + args.tokenStandard, + args.collection, + args.collectionDetails, + args.uses + ); + } - /** - * Deserializes the {@link Metadata} from the data of the provided {@link web3.AccountInfo}. - * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. - */ - static fromAccountInfo(accountInfo: web3.AccountInfo, offset = 0): [Metadata, number] { - return Metadata.deserialize(accountInfo.data, offset); - } + /** + * Deserializes the {@link Metadata} from the data of the provided {@link web3.AccountInfo}. + * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. + */ + static fromAccountInfo( + accountInfo: web3.AccountInfo, + offset = 0 + ): [Metadata, number] { + return Metadata.deserialize(accountInfo.data, offset); + } - /** - * Retrieves the account info from the provided address and deserializes - * the {@link Metadata} from its data. - * - * @throws Error if no account info is found at the address or if deserialization fails - */ - static async fromAccountAddress( - connection: web3.Connection, - address: web3.PublicKey, - commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig - ): Promise { - const accountInfo = await connection.getAccountInfo(address, commitmentOrConfig); - if (accountInfo == null) { - throw new Error(`Unable to find Metadata account at ${address}`); - } - return Metadata.fromAccountInfo(accountInfo, 0)[0]; + /** + * Retrieves the account info from the provided address and deserializes + * the {@link Metadata} from its data. + * + * @throws Error if no account info is found at the address or if deserialization fails + */ + static async fromAccountAddress( + connection: web3.Connection, + address: web3.PublicKey, + commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig + ): Promise { + const accountInfo = await connection.getAccountInfo( + address, + commitmentOrConfig + ); + if (accountInfo == null) { + throw new Error(`Unable to find Metadata account at ${address}`); } + return Metadata.fromAccountInfo(accountInfo, 0)[0]; + } - /** - * Provides a {@link web3.Connection.getProgramAccounts} config builder, - * to fetch accounts matching filters that can be specified via that builder. - * - * @param programId - the program that owns the accounts we are filtering - */ - static gpaBuilder(programId: web3.PublicKey = new web3.PublicKey(PROGRAM_ADDRESS)) { - return beetBBA.GpaBuilder.fromStruct(programId, metadataBeet); - } + /** + * Provides a {@link web3.Connection.getProgramAccounts} config builder, + * to fetch accounts matching filters that can be specified via that builder. + * + * @param programId - the program that owns the accounts we are filtering + */ + static gpaBuilder( + programId: web3.PublicKey = new web3.PublicKey(PROGRAM_ADDRESS) + ) { + return beetBBA.GpaBuilder.fromStruct(programId, metadataBeet); + } - /** - * Deserializes the {@link Metadata} from the provided data Buffer. - * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. - */ - static deserialize(buf: Buffer, offset = 0): [Metadata, number] { - return resolvedDeserialize(buf, offset); - } + /** + * Deserializes the {@link Metadata} from the provided data Buffer. + * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it. + */ + static deserialize(buf: Buffer, offset = 0): [Metadata, number] { + return resolvedDeserialize(buf, offset); + } - /** - * Serializes the {@link Metadata} into a Buffer. - * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it. - */ - serialize(): [Buffer, number] { - return resolvedSerialize(this); - } + /** + * Serializes the {@link Metadata} into a Buffer. + * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it. + */ + serialize(): [Buffer, number] { + return resolvedSerialize(this); + } - /** - * Returns the byteSize of a {@link Buffer} holding the serialized data of - * {@link Metadata} for the provided args. - * - * @param args need to be provided since the byte size for this account - * depends on them - */ - static byteSize(args: MetadataArgs) { - const instance = Metadata.fromArgs(args); - return metadataBeet.toFixedFromValue(instance).byteSize; - } + /** + * Returns the byteSize of a {@link Buffer} holding the serialized data of + * {@link Metadata} for the provided args. + * + * @param args need to be provided since the byte size for this account + * depends on them + */ + static byteSize(args: MetadataArgs) { + const instance = Metadata.fromArgs(args); + return metadataBeet.toFixedFromValue(instance).byteSize; + } - /** - * Fetches the minimum balance needed to exempt an account holding - * {@link Metadata} data from rent - * - * @param args need to be provided since the byte size for this account - * depends on them - * @param connection used to retrieve the rent exemption information - */ - static async getMinimumBalanceForRentExemption( - args: MetadataArgs, - connection: web3.Connection, - commitment?: web3.Commitment - ): Promise { - return connection.getMinimumBalanceForRentExemption(Metadata.byteSize(args), commitment); - } + /** + * Fetches the minimum balance needed to exempt an account holding + * {@link Metadata} data from rent + * + * @param args need to be provided since the byte size for this account + * depends on them + * @param connection used to retrieve the rent exemption information + */ + static async getMinimumBalanceForRentExemption( + args: MetadataArgs, + connection: web3.Connection, + commitment?: web3.Commitment + ): Promise { + return connection.getMinimumBalanceForRentExemption( + Metadata.byteSize(args), + commitment + ); + } - /** - * Returns a readable version of {@link Metadata} properties - * and can be used to convert to JSON and/or logging - */ - pretty() { - return { - key: 'Key.' + Key[this.key], - updateAuthority: this.updateAuthority.toBase58(), - mint: this.mint.toBase58(), - data: this.data, - primarySaleHappened: this.primarySaleHappened, - isMutable: this.isMutable, - tokenStandard: this.tokenStandard, - collection: this.collection, - collectionDetails: this.collectionDetails, - uses: this.uses, - }; - } + /** + * Returns a readable version of {@link Metadata} properties + * and can be used to convert to JSON and/or logging + */ + pretty() { + return { + key: 'Key.' + Key[this.key], + updateAuthority: this.updateAuthority.toBase58(), + mint: this.mint.toBase58(), + data: this.data, + primarySaleHappened: this.primarySaleHappened, + isMutable: this.isMutable, + tokenStandard: this.tokenStandard, + collection: this.collection, + collectionDetails: this.collectionDetails, + uses: this.uses, + }; + } } /** * @category Accounts */ export const metadataBeet = new beet.FixableBeetStruct( - [ - ['key', keyBeet], - ['updateAuthority', beetBBA.publicKey], - ['mint', beetBBA.publicKey], - ['data', dataBeet], - ['primarySaleHappened', beet.bool], - ['isMutable', beet.bool], - ['tokenStandard', beet.coption(tokenStandardBeet)], - ['collection', beet.coption(collectionBeet)], - ['collectionDetails', beet.coption(collectionDetailsBeet)], - ['uses', beet.coption(usesBeet)], - ], - Metadata.fromArgs, - 'Metadata' + [ + ['key', keyBeet], + ['updateAuthority', beetBBA.publicKey], + ['mint', beetBBA.publicKey], + ['data', dataBeet], + ['primarySaleHappened', beet.bool], + ['isMutable', beet.bool], + ['tokenStandard', beet.coption(tokenStandardBeet)], + ['collection', beet.coption(collectionBeet)], + ['collectionDetails', beet.coption(collectionDetailsBeet)], + ['uses', beet.coption(usesBeet)], + ], + Metadata.fromArgs, + 'Metadata' ); const serializer = customSerializer as unknown as { - serialize: typeof metadataBeet.serialize; - deserialize: typeof metadataBeet.deserialize; + serialize: typeof metadataBeet.serialize; + deserialize: typeof metadataBeet.deserialize; }; const resolvedSerialize = - typeof serializer.serialize === 'function' - ? serializer.serialize.bind(serializer) - : metadataBeet.serialize.bind(metadataBeet); + typeof serializer.serialize === 'function' + ? serializer.serialize.bind(serializer) + : metadataBeet.serialize.bind(metadataBeet); const resolvedDeserialize = - typeof serializer.deserialize === 'function' - ? serializer.deserialize.bind(serializer) - : metadataBeet.deserialize.bind(metadataBeet); + typeof serializer.deserialize === 'function' + ? serializer.deserialize.bind(serializer) + : metadataBeet.deserialize.bind(metadataBeet); diff --git a/metadata/js/src/errors.ts b/metadata/js/src/errors.ts index a2841190..18661486 100644 --- a/metadata/js/src/errors.ts +++ b/metadata/js/src/errors.ts @@ -22,7 +22,10 @@ export class InstructionUnpackErrorError extends Error { } createErrorFromCodeLookup.set(0x0, () => new InstructionUnpackErrorError()); -createErrorFromNameLookup.set('InstructionUnpackError', () => new InstructionUnpackErrorError()); +createErrorFromNameLookup.set( + 'InstructionUnpackError', + () => new InstructionUnpackErrorError() +); /** * InstructionPackError: '' @@ -42,7 +45,10 @@ export class InstructionPackErrorError extends Error { } createErrorFromCodeLookup.set(0x1, () => new InstructionPackErrorError()); -createErrorFromNameLookup.set('InstructionPackError', () => new InstructionPackErrorError()); +createErrorFromNameLookup.set( + 'InstructionPackError', + () => new InstructionPackErrorError() +); /** * NotRentExempt: 'Lamport balance below rent-exempt threshold' @@ -82,7 +88,10 @@ export class AlreadyInitializedError extends Error { } createErrorFromCodeLookup.set(0x3, () => new AlreadyInitializedError()); -createErrorFromNameLookup.set('AlreadyInitialized', () => new AlreadyInitializedError()); +createErrorFromNameLookup.set( + 'AlreadyInitialized', + () => new AlreadyInitializedError() +); /** * Uninitialized: 'Uninitialized' @@ -114,7 +123,9 @@ export class InvalidMetadataKeyError extends Error { readonly code: number = 0x5; readonly name: string = 'InvalidMetadataKey'; constructor() { - super(" Metadata's key must match seed of ['metadata', program id, mint] provided"); + super( + " Metadata's key must match seed of ['metadata', program id, mint] provided" + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, InvalidMetadataKeyError); } @@ -122,7 +133,10 @@ export class InvalidMetadataKeyError extends Error { } createErrorFromCodeLookup.set(0x5, () => new InvalidMetadataKeyError()); -createErrorFromNameLookup.set('InvalidMetadataKey', () => new InvalidMetadataKeyError()); +createErrorFromNameLookup.set( + 'InvalidMetadataKey', + () => new InvalidMetadataKeyError() +); /** * InvalidEditionKey: 'Edition's key must match seed of ['metadata', program id, name, 'edition'] provided' @@ -134,7 +148,9 @@ export class InvalidEditionKeyError extends Error { readonly code: number = 0x6; readonly name: string = 'InvalidEditionKey'; constructor() { - super("Edition's key must match seed of ['metadata', program id, name, 'edition'] provided"); + super( + "Edition's key must match seed of ['metadata', program id, name, 'edition'] provided" + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, InvalidEditionKeyError); } @@ -142,7 +158,10 @@ export class InvalidEditionKeyError extends Error { } createErrorFromCodeLookup.set(0x6, () => new InvalidEditionKeyError()); -createErrorFromNameLookup.set('InvalidEditionKey', () => new InvalidEditionKeyError()); +createErrorFromNameLookup.set( + 'InvalidEditionKey', + () => new InvalidEditionKeyError() +); /** * UpdateAuthorityIncorrect: 'Update Authority given does not match' @@ -164,7 +183,7 @@ export class UpdateAuthorityIncorrectError extends Error { createErrorFromCodeLookup.set(0x7, () => new UpdateAuthorityIncorrectError()); createErrorFromNameLookup.set( 'UpdateAuthorityIncorrect', - () => new UpdateAuthorityIncorrectError(), + () => new UpdateAuthorityIncorrectError() ); /** @@ -187,7 +206,7 @@ export class UpdateAuthorityIsNotSignerError extends Error { createErrorFromCodeLookup.set(0x8, () => new UpdateAuthorityIsNotSignerError()); createErrorFromNameLookup.set( 'UpdateAuthorityIsNotSigner', - () => new UpdateAuthorityIsNotSignerError(), + () => new UpdateAuthorityIsNotSignerError() ); /** @@ -208,7 +227,10 @@ export class NotMintAuthorityError extends Error { } createErrorFromCodeLookup.set(0x9, () => new NotMintAuthorityError()); -createErrorFromNameLookup.set('NotMintAuthority', () => new NotMintAuthorityError()); +createErrorFromNameLookup.set( + 'NotMintAuthority', + () => new NotMintAuthorityError() +); /** * InvalidMintAuthority: 'Mint authority provided does not match the authority on the mint' @@ -228,7 +250,10 @@ export class InvalidMintAuthorityError extends Error { } createErrorFromCodeLookup.set(0xa, () => new InvalidMintAuthorityError()); -createErrorFromNameLookup.set('InvalidMintAuthority', () => new InvalidMintAuthorityError()); +createErrorFromNameLookup.set( + 'InvalidMintAuthority', + () => new InvalidMintAuthorityError() +); /** * NameTooLong: 'Name too long' @@ -298,22 +323,26 @@ createErrorFromNameLookup.set('UriTooLong', () => new UriTooLongError()); */ export class UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError extends Error { readonly code: number = 0xe; - readonly name: string = 'UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner'; + readonly name: string = + 'UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner'; constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError); + Error.captureStackTrace( + this, + UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError + ); } } } createErrorFromCodeLookup.set( 0xe, - () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError(), + () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError() ); createErrorFromNameLookup.set( 'UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner', - () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError(), + () => new UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError() ); /** @@ -353,10 +382,13 @@ export class EditionsMustHaveExactlyOneTokenError extends Error { } } -createErrorFromCodeLookup.set(0x10, () => new EditionsMustHaveExactlyOneTokenError()); +createErrorFromCodeLookup.set( + 0x10, + () => new EditionsMustHaveExactlyOneTokenError() +); createErrorFromNameLookup.set( 'EditionsMustHaveExactlyOneToken', - () => new EditionsMustHaveExactlyOneTokenError(), + () => new EditionsMustHaveExactlyOneTokenError() ); /** @@ -379,7 +411,7 @@ export class MaxEditionsMintedAlreadyError extends Error { createErrorFromCodeLookup.set(0x11, () => new MaxEditionsMintedAlreadyError()); createErrorFromNameLookup.set( 'MaxEditionsMintedAlready', - () => new MaxEditionsMintedAlreadyError(), + () => new MaxEditionsMintedAlreadyError() ); /** @@ -400,7 +432,10 @@ export class TokenMintToFailedError extends Error { } createErrorFromCodeLookup.set(0x12, () => new TokenMintToFailedError()); -createErrorFromNameLookup.set('TokenMintToFailed', () => new TokenMintToFailedError()); +createErrorFromNameLookup.set( + 'TokenMintToFailed', + () => new TokenMintToFailedError() +); /** * MasterRecordMismatch: '' @@ -420,7 +455,10 @@ export class MasterRecordMismatchError extends Error { } createErrorFromCodeLookup.set(0x13, () => new MasterRecordMismatchError()); -createErrorFromNameLookup.set('MasterRecordMismatch', () => new MasterRecordMismatchError()); +createErrorFromNameLookup.set( + 'MasterRecordMismatch', + () => new MasterRecordMismatchError() +); /** * DestinationMintMismatch: '' @@ -440,7 +478,10 @@ export class DestinationMintMismatchError extends Error { } createErrorFromCodeLookup.set(0x14, () => new DestinationMintMismatchError()); -createErrorFromNameLookup.set('DestinationMintMismatch', () => new DestinationMintMismatchError()); +createErrorFromNameLookup.set( + 'DestinationMintMismatch', + () => new DestinationMintMismatchError() +); /** * EditionAlreadyMinted: '' @@ -460,7 +501,10 @@ export class EditionAlreadyMintedError extends Error { } createErrorFromCodeLookup.set(0x15, () => new EditionAlreadyMintedError()); -createErrorFromNameLookup.set('EditionAlreadyMinted', () => new EditionAlreadyMintedError()); +createErrorFromNameLookup.set( + 'EditionAlreadyMinted', + () => new EditionAlreadyMintedError() +); /** * PrintingMintDecimalsShouldBeZero: '' @@ -479,10 +523,13 @@ export class PrintingMintDecimalsShouldBeZeroError extends Error { } } -createErrorFromCodeLookup.set(0x16, () => new PrintingMintDecimalsShouldBeZeroError()); +createErrorFromCodeLookup.set( + 0x16, + () => new PrintingMintDecimalsShouldBeZeroError() +); createErrorFromNameLookup.set( 'PrintingMintDecimalsShouldBeZero', - () => new PrintingMintDecimalsShouldBeZeroError(), + () => new PrintingMintDecimalsShouldBeZeroError() ); /** @@ -493,22 +540,26 @@ createErrorFromNameLookup.set( */ export class OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError extends Error { readonly code: number = 0x17; - readonly name: string = 'OneTimePrintingAuthorizationMintDecimalsShouldBeZero'; + readonly name: string = + 'OneTimePrintingAuthorizationMintDecimalsShouldBeZero'; constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError); + Error.captureStackTrace( + this, + OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError + ); } } } createErrorFromCodeLookup.set( 0x17, - () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError(), + () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError() ); createErrorFromNameLookup.set( 'OneTimePrintingAuthorizationMintDecimalsShouldBeZero', - () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError(), + () => new OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError() ); /** @@ -528,10 +579,13 @@ export class EditionMintDecimalsShouldBeZeroError extends Error { } } -createErrorFromCodeLookup.set(0x18, () => new EditionMintDecimalsShouldBeZeroError()); +createErrorFromCodeLookup.set( + 0x18, + () => new EditionMintDecimalsShouldBeZeroError() +); createErrorFromNameLookup.set( 'EditionMintDecimalsShouldBeZero', - () => new EditionMintDecimalsShouldBeZeroError(), + () => new EditionMintDecimalsShouldBeZeroError() ); /** @@ -552,7 +606,10 @@ export class TokenBurnFailedError extends Error { } createErrorFromCodeLookup.set(0x19, () => new TokenBurnFailedError()); -createErrorFromNameLookup.set('TokenBurnFailed', () => new TokenBurnFailedError()); +createErrorFromNameLookup.set( + 'TokenBurnFailed', + () => new TokenBurnFailedError() +); /** * TokenAccountOneTimeAuthMintMismatch: '' @@ -571,10 +628,13 @@ export class TokenAccountOneTimeAuthMintMismatchError extends Error { } } -createErrorFromCodeLookup.set(0x1a, () => new TokenAccountOneTimeAuthMintMismatchError()); +createErrorFromCodeLookup.set( + 0x1a, + () => new TokenAccountOneTimeAuthMintMismatchError() +); createErrorFromNameLookup.set( 'TokenAccountOneTimeAuthMintMismatch', - () => new TokenAccountOneTimeAuthMintMismatchError(), + () => new TokenAccountOneTimeAuthMintMismatchError() ); /** @@ -595,7 +655,10 @@ export class DerivedKeyInvalidError extends Error { } createErrorFromCodeLookup.set(0x1b, () => new DerivedKeyInvalidError()); -createErrorFromNameLookup.set('DerivedKeyInvalid', () => new DerivedKeyInvalidError()); +createErrorFromNameLookup.set( + 'DerivedKeyInvalid', + () => new DerivedKeyInvalidError() +); /** * PrintingMintMismatch: 'The Printing mint does not match that on the master edition!' @@ -615,7 +678,10 @@ export class PrintingMintMismatchError extends Error { } createErrorFromCodeLookup.set(0x1c, () => new PrintingMintMismatchError()); -createErrorFromNameLookup.set('PrintingMintMismatch', () => new PrintingMintMismatchError()); +createErrorFromNameLookup.set( + 'PrintingMintMismatch', + () => new PrintingMintMismatchError() +); /** * OneTimePrintingAuthMintMismatch: 'The One Time Printing Auth mint does not match that on the master edition!' @@ -627,17 +693,22 @@ export class OneTimePrintingAuthMintMismatchError extends Error { readonly code: number = 0x1d; readonly name: string = 'OneTimePrintingAuthMintMismatch'; constructor() { - super('The One Time Printing Auth mint does not match that on the master edition!'); + super( + 'The One Time Printing Auth mint does not match that on the master edition!' + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, OneTimePrintingAuthMintMismatchError); } } } -createErrorFromCodeLookup.set(0x1d, () => new OneTimePrintingAuthMintMismatchError()); +createErrorFromCodeLookup.set( + 0x1d, + () => new OneTimePrintingAuthMintMismatchError() +); createErrorFromNameLookup.set( 'OneTimePrintingAuthMintMismatch', - () => new OneTimePrintingAuthMintMismatchError(), + () => new OneTimePrintingAuthMintMismatchError() ); /** @@ -660,7 +731,7 @@ export class TokenAccountMintMismatchError extends Error { createErrorFromCodeLookup.set(0x1e, () => new TokenAccountMintMismatchError()); createErrorFromNameLookup.set( 'TokenAccountMintMismatch', - () => new TokenAccountMintMismatchError(), + () => new TokenAccountMintMismatchError() ); /** @@ -673,17 +744,22 @@ export class TokenAccountMintMismatchV2Error extends Error { readonly code: number = 0x1f; readonly name: string = 'TokenAccountMintMismatchV2'; constructor() { - super('The mint of the token account does not match the master metadata mint!'); + super( + 'The mint of the token account does not match the master metadata mint!' + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, TokenAccountMintMismatchV2Error); } } } -createErrorFromCodeLookup.set(0x1f, () => new TokenAccountMintMismatchV2Error()); +createErrorFromCodeLookup.set( + 0x1f, + () => new TokenAccountMintMismatchV2Error() +); createErrorFromNameLookup.set( 'TokenAccountMintMismatchV2', - () => new TokenAccountMintMismatchV2Error(), + () => new TokenAccountMintMismatchV2Error() ); /** @@ -704,7 +780,10 @@ export class NotEnoughTokensError extends Error { } createErrorFromCodeLookup.set(0x20, () => new NotEnoughTokensError()); -createErrorFromNameLookup.set('NotEnoughTokens', () => new NotEnoughTokensError()); +createErrorFromNameLookup.set( + 'NotEnoughTokens', + () => new NotEnoughTokensError() +); /** * PrintingMintAuthorizationAccountMismatch: '' @@ -718,15 +797,21 @@ export class PrintingMintAuthorizationAccountMismatchError extends Error { constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, PrintingMintAuthorizationAccountMismatchError); + Error.captureStackTrace( + this, + PrintingMintAuthorizationAccountMismatchError + ); } } } -createErrorFromCodeLookup.set(0x21, () => new PrintingMintAuthorizationAccountMismatchError()); +createErrorFromCodeLookup.set( + 0x21, + () => new PrintingMintAuthorizationAccountMismatchError() +); createErrorFromNameLookup.set( 'PrintingMintAuthorizationAccountMismatch', - () => new PrintingMintAuthorizationAccountMismatchError(), + () => new PrintingMintAuthorizationAccountMismatchError() ); /** @@ -741,15 +826,21 @@ export class AuthorizationTokenAccountOwnerMismatchError extends Error { constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, AuthorizationTokenAccountOwnerMismatchError); + Error.captureStackTrace( + this, + AuthorizationTokenAccountOwnerMismatchError + ); } } } -createErrorFromCodeLookup.set(0x22, () => new AuthorizationTokenAccountOwnerMismatchError()); +createErrorFromCodeLookup.set( + 0x22, + () => new AuthorizationTokenAccountOwnerMismatchError() +); createErrorFromNameLookup.set( 'AuthorizationTokenAccountOwnerMismatch', - () => new AuthorizationTokenAccountOwnerMismatchError(), + () => new AuthorizationTokenAccountOwnerMismatchError() ); /** @@ -790,7 +881,10 @@ export class CreatorsTooLongError extends Error { } createErrorFromCodeLookup.set(0x24, () => new CreatorsTooLongError()); -createErrorFromNameLookup.set('CreatorsTooLong', () => new CreatorsTooLongError()); +createErrorFromNameLookup.set( + 'CreatorsTooLong', + () => new CreatorsTooLongError() +); /** * CreatorsMustBeAtleastOne: 'Creators must be at least one if set' @@ -812,7 +906,7 @@ export class CreatorsMustBeAtleastOneError extends Error { createErrorFromCodeLookup.set(0x25, () => new CreatorsMustBeAtleastOneError()); createErrorFromNameLookup.set( 'CreatorsMustBeAtleastOne', - () => new CreatorsMustBeAtleastOneError(), + () => new CreatorsMustBeAtleastOneError() ); /** @@ -833,7 +927,10 @@ export class MustBeOneOfCreatorsError extends Error { } createErrorFromCodeLookup.set(0x26, () => new MustBeOneOfCreatorsError()); -createErrorFromNameLookup.set('MustBeOneOfCreators', () => new MustBeOneOfCreatorsError()); +createErrorFromNameLookup.set( + 'MustBeOneOfCreators', + () => new MustBeOneOfCreatorsError() +); /** * NoCreatorsPresentOnMetadata: 'This metadata does not have creators' @@ -852,10 +949,13 @@ export class NoCreatorsPresentOnMetadataError extends Error { } } -createErrorFromCodeLookup.set(0x27, () => new NoCreatorsPresentOnMetadataError()); +createErrorFromCodeLookup.set( + 0x27, + () => new NoCreatorsPresentOnMetadataError() +); createErrorFromNameLookup.set( 'NoCreatorsPresentOnMetadata', - () => new NoCreatorsPresentOnMetadataError(), + () => new NoCreatorsPresentOnMetadataError() ); /** @@ -876,7 +976,10 @@ export class CreatorNotFoundError extends Error { } createErrorFromCodeLookup.set(0x28, () => new CreatorNotFoundError()); -createErrorFromNameLookup.set('CreatorNotFound', () => new CreatorNotFoundError()); +createErrorFromNameLookup.set( + 'CreatorNotFound', + () => new CreatorNotFoundError() +); /** * InvalidBasisPoints: 'Basis points cannot be more than 10000' @@ -896,7 +999,10 @@ export class InvalidBasisPointsError extends Error { } createErrorFromCodeLookup.set(0x29, () => new InvalidBasisPointsError()); -createErrorFromNameLookup.set('InvalidBasisPoints', () => new InvalidBasisPointsError()); +createErrorFromNameLookup.set( + 'InvalidBasisPoints', + () => new InvalidBasisPointsError() +); /** * PrimarySaleCanOnlyBeFlippedToTrue: 'Primary sale can only be flipped to true and is immutable' @@ -915,10 +1021,13 @@ export class PrimarySaleCanOnlyBeFlippedToTrueError extends Error { } } -createErrorFromCodeLookup.set(0x2a, () => new PrimarySaleCanOnlyBeFlippedToTrueError()); +createErrorFromCodeLookup.set( + 0x2a, + () => new PrimarySaleCanOnlyBeFlippedToTrueError() +); createErrorFromNameLookup.set( 'PrimarySaleCanOnlyBeFlippedToTrue', - () => new PrimarySaleCanOnlyBeFlippedToTrueError(), + () => new PrimarySaleCanOnlyBeFlippedToTrueError() ); /** @@ -958,10 +1067,13 @@ export class NoBalanceInAccountForAuthorizationError extends Error { } } -createErrorFromCodeLookup.set(0x2c, () => new NoBalanceInAccountForAuthorizationError()); +createErrorFromCodeLookup.set( + 0x2c, + () => new NoBalanceInAccountForAuthorizationError() +); createErrorFromNameLookup.set( 'NoBalanceInAccountForAuthorization', - () => new NoBalanceInAccountForAuthorizationError(), + () => new NoBalanceInAccountForAuthorizationError() ); /** @@ -982,7 +1094,10 @@ export class ShareTotalMustBe100Error extends Error { } createErrorFromCodeLookup.set(0x2d, () => new ShareTotalMustBe100Error()); -createErrorFromNameLookup.set('ShareTotalMustBe100', () => new ShareTotalMustBe100Error()); +createErrorFromNameLookup.set( + 'ShareTotalMustBe100', + () => new ShareTotalMustBe100Error() +); /** * ReservationExists: '' @@ -1002,7 +1117,10 @@ export class ReservationExistsError extends Error { } createErrorFromCodeLookup.set(0x2e, () => new ReservationExistsError()); -createErrorFromNameLookup.set('ReservationExists', () => new ReservationExistsError()); +createErrorFromNameLookup.set( + 'ReservationExists', + () => new ReservationExistsError() +); /** * ReservationDoesNotExist: '' @@ -1022,7 +1140,10 @@ export class ReservationDoesNotExistError extends Error { } createErrorFromCodeLookup.set(0x2f, () => new ReservationDoesNotExistError()); -createErrorFromNameLookup.set('ReservationDoesNotExist', () => new ReservationDoesNotExistError()); +createErrorFromNameLookup.set( + 'ReservationDoesNotExist', + () => new ReservationDoesNotExistError() +); /** * ReservationNotSet: '' @@ -1042,7 +1163,10 @@ export class ReservationNotSetError extends Error { } createErrorFromCodeLookup.set(0x30, () => new ReservationNotSetError()); -createErrorFromNameLookup.set('ReservationNotSet', () => new ReservationNotSetError()); +createErrorFromNameLookup.set( + 'ReservationNotSet', + () => new ReservationNotSetError() +); /** * ReservationAlreadyMade: '' @@ -1062,7 +1186,10 @@ export class ReservationAlreadyMadeError extends Error { } createErrorFromCodeLookup.set(0x31, () => new ReservationAlreadyMadeError()); -createErrorFromNameLookup.set('ReservationAlreadyMade', () => new ReservationAlreadyMadeError()); +createErrorFromNameLookup.set( + 'ReservationAlreadyMade', + () => new ReservationAlreadyMadeError() +); /** * BeyondMaxAddressSize: '' @@ -1082,7 +1209,10 @@ export class BeyondMaxAddressSizeError extends Error { } createErrorFromCodeLookup.set(0x32, () => new BeyondMaxAddressSizeError()); -createErrorFromNameLookup.set('BeyondMaxAddressSize', () => new BeyondMaxAddressSizeError()); +createErrorFromNameLookup.set( + 'BeyondMaxAddressSize', + () => new BeyondMaxAddressSizeError() +); /** * NumericalOverflowError: 'NumericalOverflowError' @@ -1102,7 +1232,10 @@ export class NumericalOverflowErrorError extends Error { } createErrorFromCodeLookup.set(0x33, () => new NumericalOverflowErrorError()); -createErrorFromNameLookup.set('NumericalOverflowError', () => new NumericalOverflowErrorError()); +createErrorFromNameLookup.set( + 'NumericalOverflowError', + () => new NumericalOverflowErrorError() +); /** * ReservationBreachesMaximumSupply: '' @@ -1121,10 +1254,13 @@ export class ReservationBreachesMaximumSupplyError extends Error { } } -createErrorFromCodeLookup.set(0x34, () => new ReservationBreachesMaximumSupplyError()); +createErrorFromCodeLookup.set( + 0x34, + () => new ReservationBreachesMaximumSupplyError() +); createErrorFromNameLookup.set( 'ReservationBreachesMaximumSupply', - () => new ReservationBreachesMaximumSupplyError(), + () => new ReservationBreachesMaximumSupplyError() ); /** @@ -1145,7 +1281,10 @@ export class AddressNotInReservationError extends Error { } createErrorFromCodeLookup.set(0x35, () => new AddressNotInReservationError()); -createErrorFromNameLookup.set('AddressNotInReservation', () => new AddressNotInReservationError()); +createErrorFromNameLookup.set( + 'AddressNotInReservation', + () => new AddressNotInReservationError() +); /** * CannotVerifyAnotherCreator: 'You cannot unilaterally verify another creator, they must sign' @@ -1164,10 +1303,13 @@ export class CannotVerifyAnotherCreatorError extends Error { } } -createErrorFromCodeLookup.set(0x36, () => new CannotVerifyAnotherCreatorError()); +createErrorFromCodeLookup.set( + 0x36, + () => new CannotVerifyAnotherCreatorError() +); createErrorFromNameLookup.set( 'CannotVerifyAnotherCreator', - () => new CannotVerifyAnotherCreatorError(), + () => new CannotVerifyAnotherCreatorError() ); /** @@ -1187,10 +1329,13 @@ export class CannotUnverifyAnotherCreatorError extends Error { } } -createErrorFromCodeLookup.set(0x37, () => new CannotUnverifyAnotherCreatorError()); +createErrorFromCodeLookup.set( + 0x37, + () => new CannotUnverifyAnotherCreatorError() +); createErrorFromNameLookup.set( 'CannotUnverifyAnotherCreator', - () => new CannotUnverifyAnotherCreatorError(), + () => new CannotUnverifyAnotherCreatorError() ); /** @@ -1231,7 +1376,10 @@ export class IncorrectOwnerError extends Error { } createErrorFromCodeLookup.set(0x39, () => new IncorrectOwnerError()); -createErrorFromNameLookup.set('IncorrectOwner', () => new IncorrectOwnerError()); +createErrorFromNameLookup.set( + 'IncorrectOwner', + () => new IncorrectOwnerError() +); /** * PrintingWouldBreachMaximumSupply: '' @@ -1250,10 +1398,13 @@ export class PrintingWouldBreachMaximumSupplyError extends Error { } } -createErrorFromCodeLookup.set(0x3a, () => new PrintingWouldBreachMaximumSupplyError()); +createErrorFromCodeLookup.set( + 0x3a, + () => new PrintingWouldBreachMaximumSupplyError() +); createErrorFromNameLookup.set( 'PrintingWouldBreachMaximumSupply', - () => new PrintingWouldBreachMaximumSupplyError(), + () => new PrintingWouldBreachMaximumSupplyError() ); /** @@ -1274,7 +1425,10 @@ export class DataIsImmutableError extends Error { } createErrorFromCodeLookup.set(0x3b, () => new DataIsImmutableError()); -createErrorFromNameLookup.set('DataIsImmutable', () => new DataIsImmutableError()); +createErrorFromNameLookup.set( + 'DataIsImmutable', + () => new DataIsImmutableError() +); /** * DuplicateCreatorAddress: 'No duplicate creator addresses' @@ -1294,7 +1448,10 @@ export class DuplicateCreatorAddressError extends Error { } createErrorFromCodeLookup.set(0x3c, () => new DuplicateCreatorAddressError()); -createErrorFromNameLookup.set('DuplicateCreatorAddress', () => new DuplicateCreatorAddressError()); +createErrorFromNameLookup.set( + 'DuplicateCreatorAddress', + () => new DuplicateCreatorAddressError() +); /** * ReservationSpotsRemainingShouldMatchTotalSpotsAtStart: '' @@ -1304,22 +1461,26 @@ createErrorFromNameLookup.set('DuplicateCreatorAddress', () => new DuplicateCrea */ export class ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError extends Error { readonly code: number = 0x3d; - readonly name: string = 'ReservationSpotsRemainingShouldMatchTotalSpotsAtStart'; + readonly name: string = + 'ReservationSpotsRemainingShouldMatchTotalSpotsAtStart'; constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError); + Error.captureStackTrace( + this, + ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError + ); } } } createErrorFromCodeLookup.set( 0x3d, - () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError(), + () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError() ); createErrorFromNameLookup.set( 'ReservationSpotsRemainingShouldMatchTotalSpotsAtStart', - () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError(), + () => new ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError() ); /** @@ -1340,7 +1501,10 @@ export class InvalidTokenProgramError extends Error { } createErrorFromCodeLookup.set(0x3e, () => new InvalidTokenProgramError()); -createErrorFromNameLookup.set('InvalidTokenProgram', () => new InvalidTokenProgramError()); +createErrorFromNameLookup.set( + 'InvalidTokenProgram', + () => new InvalidTokenProgramError() +); /** * DataTypeMismatch: 'Data type mismatch' @@ -1360,7 +1524,10 @@ export class DataTypeMismatchError extends Error { } createErrorFromCodeLookup.set(0x3f, () => new DataTypeMismatchError()); -createErrorFromNameLookup.set('DataTypeMismatch', () => new DataTypeMismatchError()); +createErrorFromNameLookup.set( + 'DataTypeMismatch', + () => new DataTypeMismatchError() +); /** * BeyondAlottedAddressSize: '' @@ -1382,7 +1549,7 @@ export class BeyondAlottedAddressSizeError extends Error { createErrorFromCodeLookup.set(0x40, () => new BeyondAlottedAddressSizeError()); createErrorFromNameLookup.set( 'BeyondAlottedAddressSize', - () => new BeyondAlottedAddressSizeError(), + () => new BeyondAlottedAddressSizeError() ); /** @@ -1403,7 +1570,10 @@ export class ReservationNotCompleteError extends Error { } createErrorFromCodeLookup.set(0x41, () => new ReservationNotCompleteError()); -createErrorFromNameLookup.set('ReservationNotComplete', () => new ReservationNotCompleteError()); +createErrorFromNameLookup.set( + 'ReservationNotComplete', + () => new ReservationNotCompleteError() +); /** * TriedToReplaceAnExistingReservation: '' @@ -1422,10 +1592,13 @@ export class TriedToReplaceAnExistingReservationError extends Error { } } -createErrorFromCodeLookup.set(0x42, () => new TriedToReplaceAnExistingReservationError()); +createErrorFromCodeLookup.set( + 0x42, + () => new TriedToReplaceAnExistingReservationError() +); createErrorFromNameLookup.set( 'TriedToReplaceAnExistingReservation', - () => new TriedToReplaceAnExistingReservationError(), + () => new TriedToReplaceAnExistingReservationError() ); /** @@ -1446,7 +1619,10 @@ export class InvalidOperationError extends Error { } createErrorFromCodeLookup.set(0x43, () => new InvalidOperationError()); -createErrorFromNameLookup.set('InvalidOperation', () => new InvalidOperationError()); +createErrorFromNameLookup.set( + 'InvalidOperation', + () => new InvalidOperationError() +); /** * InvalidOwner: 'Invalid Owner' @@ -1480,15 +1656,21 @@ export class PrintingMintSupplyMustBeZeroForConversionError extends Error { constructor() { super('Printing mint supply must be zero for conversion'); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, PrintingMintSupplyMustBeZeroForConversionError); + Error.captureStackTrace( + this, + PrintingMintSupplyMustBeZeroForConversionError + ); } } } -createErrorFromCodeLookup.set(0x45, () => new PrintingMintSupplyMustBeZeroForConversionError()); +createErrorFromCodeLookup.set( + 0x45, + () => new PrintingMintSupplyMustBeZeroForConversionError() +); createErrorFromNameLookup.set( 'PrintingMintSupplyMustBeZeroForConversion', - () => new PrintingMintSupplyMustBeZeroForConversionError(), + () => new PrintingMintSupplyMustBeZeroForConversionError() ); /** @@ -1503,15 +1685,21 @@ export class OneTimeAuthMintSupplyMustBeZeroForConversionError extends Error { constructor() { super('One Time Auth mint supply must be zero for conversion'); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, OneTimeAuthMintSupplyMustBeZeroForConversionError); + Error.captureStackTrace( + this, + OneTimeAuthMintSupplyMustBeZeroForConversionError + ); } } } -createErrorFromCodeLookup.set(0x46, () => new OneTimeAuthMintSupplyMustBeZeroForConversionError()); +createErrorFromCodeLookup.set( + 0x46, + () => new OneTimeAuthMintSupplyMustBeZeroForConversionError() +); createErrorFromNameLookup.set( 'OneTimeAuthMintSupplyMustBeZeroForConversion', - () => new OneTimeAuthMintSupplyMustBeZeroForConversionError(), + () => new OneTimeAuthMintSupplyMustBeZeroForConversionError() ); /** @@ -1532,7 +1720,10 @@ export class InvalidEditionIndexError extends Error { } createErrorFromCodeLookup.set(0x47, () => new InvalidEditionIndexError()); -createErrorFromNameLookup.set('InvalidEditionIndex', () => new InvalidEditionIndexError()); +createErrorFromNameLookup.set( + 'InvalidEditionIndex', + () => new InvalidEditionIndexError() +); /** * ReservationArrayShouldBeSizeOne: '' @@ -1551,10 +1742,13 @@ export class ReservationArrayShouldBeSizeOneError extends Error { } } -createErrorFromCodeLookup.set(0x48, () => new ReservationArrayShouldBeSizeOneError()); +createErrorFromCodeLookup.set( + 0x48, + () => new ReservationArrayShouldBeSizeOneError() +); createErrorFromNameLookup.set( 'ReservationArrayShouldBeSizeOne', - () => new ReservationArrayShouldBeSizeOneError(), + () => new ReservationArrayShouldBeSizeOneError() ); /** @@ -1574,10 +1768,13 @@ export class IsMutableCanOnlyBeFlippedToFalseError extends Error { } } -createErrorFromCodeLookup.set(0x49, () => new IsMutableCanOnlyBeFlippedToFalseError()); +createErrorFromCodeLookup.set( + 0x49, + () => new IsMutableCanOnlyBeFlippedToFalseError() +); createErrorFromNameLookup.set( 'IsMutableCanOnlyBeFlippedToFalse', - () => new IsMutableCanOnlyBeFlippedToFalseError(), + () => new IsMutableCanOnlyBeFlippedToFalseError() ); /** @@ -1592,15 +1789,21 @@ export class CollectionCannotBeVerifiedInThisInstructionError extends Error { constructor() { super('Collection cannot be verified in this instruction'); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, CollectionCannotBeVerifiedInThisInstructionError); + Error.captureStackTrace( + this, + CollectionCannotBeVerifiedInThisInstructionError + ); } } } -createErrorFromCodeLookup.set(0x4a, () => new CollectionCannotBeVerifiedInThisInstructionError()); +createErrorFromCodeLookup.set( + 0x4a, + () => new CollectionCannotBeVerifiedInThisInstructionError() +); createErrorFromNameLookup.set( 'CollectionCannotBeVerifiedInThisInstruction', - () => new CollectionCannotBeVerifiedInThisInstructionError(), + () => new CollectionCannotBeVerifiedInThisInstructionError() ); /** @@ -1613,7 +1816,9 @@ export class RemovedError extends Error { readonly code: number = 0x4b; readonly name: string = 'Removed'; constructor() { - super('This instruction was deprecated in a previous release and is now removed'); + super( + 'This instruction was deprecated in a previous release and is now removed' + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, RemovedError); } @@ -1661,7 +1866,10 @@ export class InvalidUseMethodError extends Error { } createErrorFromCodeLookup.set(0x4d, () => new InvalidUseMethodError()); -createErrorFromNameLookup.set('InvalidUseMethod', () => new InvalidUseMethodError()); +createErrorFromNameLookup.set( + 'InvalidUseMethod', + () => new InvalidUseMethodError() +); /** * CannotChangeUseMethodAfterFirstUse: 'Cannot Change Use Method after the first use' @@ -1680,10 +1888,13 @@ export class CannotChangeUseMethodAfterFirstUseError extends Error { } } -createErrorFromCodeLookup.set(0x4e, () => new CannotChangeUseMethodAfterFirstUseError()); +createErrorFromCodeLookup.set( + 0x4e, + () => new CannotChangeUseMethodAfterFirstUseError() +); createErrorFromNameLookup.set( 'CannotChangeUseMethodAfterFirstUse', - () => new CannotChangeUseMethodAfterFirstUseError(), + () => new CannotChangeUseMethodAfterFirstUseError() ); /** @@ -1703,10 +1914,13 @@ export class CannotChangeUsesAfterFirstUseError extends Error { } } -createErrorFromCodeLookup.set(0x4f, () => new CannotChangeUsesAfterFirstUseError()); +createErrorFromCodeLookup.set( + 0x4f, + () => new CannotChangeUsesAfterFirstUseError() +); createErrorFromNameLookup.set( 'CannotChangeUsesAfterFirstUse', - () => new CannotChangeUsesAfterFirstUseError(), + () => new CannotChangeUsesAfterFirstUseError() ); /** @@ -1727,7 +1941,10 @@ export class CollectionNotFoundError extends Error { } createErrorFromCodeLookup.set(0x50, () => new CollectionNotFoundError()); -createErrorFromNameLookup.set('CollectionNotFound', () => new CollectionNotFoundError()); +createErrorFromNameLookup.set( + 'CollectionNotFound', + () => new CollectionNotFoundError() +); /** * InvalidCollectionUpdateAuthority: 'Collection Update Authority is invalid' @@ -1746,10 +1963,13 @@ export class InvalidCollectionUpdateAuthorityError extends Error { } } -createErrorFromCodeLookup.set(0x51, () => new InvalidCollectionUpdateAuthorityError()); +createErrorFromCodeLookup.set( + 0x51, + () => new InvalidCollectionUpdateAuthorityError() +); createErrorFromNameLookup.set( 'InvalidCollectionUpdateAuthority', - () => new InvalidCollectionUpdateAuthorityError(), + () => new InvalidCollectionUpdateAuthorityError() ); /** @@ -1769,10 +1989,13 @@ export class CollectionMustBeAUniqueMasterEditionError extends Error { } } -createErrorFromCodeLookup.set(0x52, () => new CollectionMustBeAUniqueMasterEditionError()); +createErrorFromCodeLookup.set( + 0x52, + () => new CollectionMustBeAUniqueMasterEditionError() +); createErrorFromNameLookup.set( 'CollectionMustBeAUniqueMasterEdition', - () => new CollectionMustBeAUniqueMasterEditionError(), + () => new CollectionMustBeAUniqueMasterEditionError() ); /** @@ -1785,17 +2008,22 @@ export class UseAuthorityRecordAlreadyExistsError extends Error { readonly code: number = 0x53; readonly name: string = 'UseAuthorityRecordAlreadyExists'; constructor() { - super('The Use Authority Record Already Exists, to modify it Revoke, then Approve'); + super( + 'The Use Authority Record Already Exists, to modify it Revoke, then Approve' + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, UseAuthorityRecordAlreadyExistsError); } } } -createErrorFromCodeLookup.set(0x53, () => new UseAuthorityRecordAlreadyExistsError()); +createErrorFromCodeLookup.set( + 0x53, + () => new UseAuthorityRecordAlreadyExistsError() +); createErrorFromNameLookup.set( 'UseAuthorityRecordAlreadyExists', - () => new UseAuthorityRecordAlreadyExistsError(), + () => new UseAuthorityRecordAlreadyExistsError() ); /** @@ -1815,10 +2043,13 @@ export class UseAuthorityRecordAlreadyRevokedError extends Error { } } -createErrorFromCodeLookup.set(0x54, () => new UseAuthorityRecordAlreadyRevokedError()); +createErrorFromCodeLookup.set( + 0x54, + () => new UseAuthorityRecordAlreadyRevokedError() +); createErrorFromNameLookup.set( 'UseAuthorityRecordAlreadyRevoked', - () => new UseAuthorityRecordAlreadyRevokedError(), + () => new UseAuthorityRecordAlreadyRevokedError() ); /** @@ -1873,15 +2104,21 @@ export class CollectionAuthorityRecordAlreadyExistsError extends Error { constructor() { super('This Collection Authority Record Already Exists.'); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, CollectionAuthorityRecordAlreadyExistsError); + Error.captureStackTrace( + this, + CollectionAuthorityRecordAlreadyExistsError + ); } } } -createErrorFromCodeLookup.set(0x57, () => new CollectionAuthorityRecordAlreadyExistsError()); +createErrorFromCodeLookup.set( + 0x57, + () => new CollectionAuthorityRecordAlreadyExistsError() +); createErrorFromNameLookup.set( 'CollectionAuthorityRecordAlreadyExists', - () => new CollectionAuthorityRecordAlreadyExistsError(), + () => new CollectionAuthorityRecordAlreadyExistsError() ); /** @@ -1901,10 +2138,13 @@ export class CollectionAuthorityDoesNotExistError extends Error { } } -createErrorFromCodeLookup.set(0x58, () => new CollectionAuthorityDoesNotExistError()); +createErrorFromCodeLookup.set( + 0x58, + () => new CollectionAuthorityDoesNotExistError() +); createErrorFromNameLookup.set( 'CollectionAuthorityDoesNotExist', - () => new CollectionAuthorityDoesNotExistError(), + () => new CollectionAuthorityDoesNotExistError() ); /** @@ -1927,7 +2167,7 @@ export class InvalidUseAuthorityRecordError extends Error { createErrorFromCodeLookup.set(0x59, () => new InvalidUseAuthorityRecordError()); createErrorFromNameLookup.set( 'InvalidUseAuthorityRecord', - () => new InvalidUseAuthorityRecordError(), + () => new InvalidUseAuthorityRecordError() ); /** @@ -1947,10 +2187,13 @@ export class InvalidCollectionAuthorityRecordError extends Error { } } -createErrorFromCodeLookup.set(0x5a, () => new InvalidCollectionAuthorityRecordError()); +createErrorFromCodeLookup.set( + 0x5a, + () => new InvalidCollectionAuthorityRecordError() +); createErrorFromNameLookup.set( 'InvalidCollectionAuthorityRecord', - () => new InvalidCollectionAuthorityRecordError(), + () => new InvalidCollectionAuthorityRecordError() ); /** @@ -1971,7 +2214,10 @@ export class InvalidFreezeAuthorityError extends Error { } createErrorFromCodeLookup.set(0x5b, () => new InvalidFreezeAuthorityError()); -createErrorFromNameLookup.set('InvalidFreezeAuthority', () => new InvalidFreezeAuthorityError()); +createErrorFromNameLookup.set( + 'InvalidFreezeAuthority', + () => new InvalidFreezeAuthorityError() +); /** * InvalidDelegate: 'All tokens in this account have not been delegated to this user.' @@ -1991,7 +2237,10 @@ export class InvalidDelegateError extends Error { } createErrorFromCodeLookup.set(0x5c, () => new InvalidDelegateError()); -createErrorFromNameLookup.set('InvalidDelegate', () => new InvalidDelegateError()); +createErrorFromNameLookup.set( + 'InvalidDelegate', + () => new InvalidDelegateError() +); /** * CannotAdjustVerifiedCreator: '' @@ -2010,10 +2259,13 @@ export class CannotAdjustVerifiedCreatorError extends Error { } } -createErrorFromCodeLookup.set(0x5d, () => new CannotAdjustVerifiedCreatorError()); +createErrorFromCodeLookup.set( + 0x5d, + () => new CannotAdjustVerifiedCreatorError() +); createErrorFromNameLookup.set( 'CannotAdjustVerifiedCreator', - () => new CannotAdjustVerifiedCreatorError(), + () => new CannotAdjustVerifiedCreatorError() ); /** @@ -2033,10 +2285,13 @@ export class CannotRemoveVerifiedCreatorError extends Error { } } -createErrorFromCodeLookup.set(0x5e, () => new CannotRemoveVerifiedCreatorError()); +createErrorFromCodeLookup.set( + 0x5e, + () => new CannotRemoveVerifiedCreatorError() +); createErrorFromNameLookup.set( 'CannotRemoveVerifiedCreator', - () => new CannotRemoveVerifiedCreatorError(), + () => new CannotRemoveVerifiedCreatorError() ); /** @@ -2056,10 +2311,13 @@ export class CannotWipeVerifiedCreatorsError extends Error { } } -createErrorFromCodeLookup.set(0x5f, () => new CannotWipeVerifiedCreatorsError()); +createErrorFromCodeLookup.set( + 0x5f, + () => new CannotWipeVerifiedCreatorsError() +); createErrorFromNameLookup.set( 'CannotWipeVerifiedCreators', - () => new CannotWipeVerifiedCreatorsError(), + () => new CannotWipeVerifiedCreatorsError() ); /** @@ -2074,15 +2332,21 @@ export class NotAllowedToChangeSellerFeeBasisPointsError extends Error { constructor() { super(''); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, NotAllowedToChangeSellerFeeBasisPointsError); + Error.captureStackTrace( + this, + NotAllowedToChangeSellerFeeBasisPointsError + ); } } } -createErrorFromCodeLookup.set(0x60, () => new NotAllowedToChangeSellerFeeBasisPointsError()); +createErrorFromCodeLookup.set( + 0x60, + () => new NotAllowedToChangeSellerFeeBasisPointsError() +); createErrorFromNameLookup.set( 'NotAllowedToChangeSellerFeeBasisPoints', - () => new NotAllowedToChangeSellerFeeBasisPointsError(), + () => new NotAllowedToChangeSellerFeeBasisPointsError() ); /** @@ -2102,10 +2366,13 @@ export class EditionOverrideCannotBeZeroError extends Error { } } -createErrorFromCodeLookup.set(0x61, () => new EditionOverrideCannotBeZeroError()); +createErrorFromCodeLookup.set( + 0x61, + () => new EditionOverrideCannotBeZeroError() +); createErrorFromNameLookup.set( 'EditionOverrideCannotBeZero', - () => new EditionOverrideCannotBeZeroError(), + () => new EditionOverrideCannotBeZeroError() ); /** @@ -2140,15 +2407,21 @@ export class RevokeCollectionAuthoritySignerIncorrectError extends Error { constructor() { super('Revoke Collection Authority signer is incorrect'); if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, RevokeCollectionAuthoritySignerIncorrectError); + Error.captureStackTrace( + this, + RevokeCollectionAuthoritySignerIncorrectError + ); } } } -createErrorFromCodeLookup.set(0x63, () => new RevokeCollectionAuthoritySignerIncorrectError()); +createErrorFromCodeLookup.set( + 0x63, + () => new RevokeCollectionAuthoritySignerIncorrectError() +); createErrorFromNameLookup.set( 'RevokeCollectionAuthoritySignerIncorrect', - () => new RevokeCollectionAuthoritySignerIncorrectError(), + () => new RevokeCollectionAuthoritySignerIncorrectError() ); /** @@ -2169,7 +2442,10 @@ export class TokenCloseFailedError extends Error { } createErrorFromCodeLookup.set(0x64, () => new TokenCloseFailedError()); -createErrorFromNameLookup.set('TokenCloseFailed', () => new TokenCloseFailedError()); +createErrorFromNameLookup.set( + 'TokenCloseFailed', + () => new TokenCloseFailedError() +); /** * UnsizedCollection: 'Can't use this function on unsized collection' @@ -2189,7 +2465,10 @@ export class UnsizedCollectionError extends Error { } createErrorFromCodeLookup.set(0x65, () => new UnsizedCollectionError()); -createErrorFromNameLookup.set('UnsizedCollection', () => new UnsizedCollectionError()); +createErrorFromNameLookup.set( + 'UnsizedCollection', + () => new UnsizedCollectionError() +); /** * SizedCollection: 'Can't use this function on a sized collection' @@ -2209,7 +2488,10 @@ export class SizedCollectionError extends Error { } createErrorFromCodeLookup.set(0x66, () => new SizedCollectionError()); -createErrorFromNameLookup.set('SizedCollection', () => new SizedCollectionError()); +createErrorFromNameLookup.set( + 'SizedCollection', + () => new SizedCollectionError() +); /** * MissingCollectionMetadata: 'Missing collection metadata account' @@ -2231,7 +2513,7 @@ export class MissingCollectionMetadataError extends Error { createErrorFromCodeLookup.set(0x67, () => new MissingCollectionMetadataError()); createErrorFromNameLookup.set( 'MissingCollectionMetadata', - () => new MissingCollectionMetadataError(), + () => new MissingCollectionMetadataError() ); /** @@ -2252,7 +2534,10 @@ export class NotAMemberOfCollectionError extends Error { } createErrorFromCodeLookup.set(0x68, () => new NotAMemberOfCollectionError()); -createErrorFromNameLookup.set('NotAMemberOfCollection', () => new NotAMemberOfCollectionError()); +createErrorFromNameLookup.set( + 'NotAMemberOfCollection', + () => new NotAMemberOfCollectionError() +); /** * NotVerifiedMemberOfCollection: 'This NFT is not a verified member of the specified collection.' @@ -2271,10 +2556,13 @@ export class NotVerifiedMemberOfCollectionError extends Error { } } -createErrorFromCodeLookup.set(0x69, () => new NotVerifiedMemberOfCollectionError()); +createErrorFromCodeLookup.set( + 0x69, + () => new NotVerifiedMemberOfCollectionError() +); createErrorFromNameLookup.set( 'NotVerifiedMemberOfCollection', - () => new NotVerifiedMemberOfCollectionError(), + () => new NotVerifiedMemberOfCollectionError() ); /** @@ -2295,7 +2583,10 @@ export class NotACollectionParentError extends Error { } createErrorFromCodeLookup.set(0x6a, () => new NotACollectionParentError()); -createErrorFromNameLookup.set('NotACollectionParent', () => new NotACollectionParentError()); +createErrorFromNameLookup.set( + 'NotACollectionParent', + () => new NotACollectionParentError() +); /** * CouldNotDetermineTokenStandard: 'Could not determine a TokenStandard type.' @@ -2314,10 +2605,13 @@ export class CouldNotDetermineTokenStandardError extends Error { } } -createErrorFromCodeLookup.set(0x6b, () => new CouldNotDetermineTokenStandardError()); +createErrorFromCodeLookup.set( + 0x6b, + () => new CouldNotDetermineTokenStandardError() +); createErrorFromNameLookup.set( 'CouldNotDetermineTokenStandard', - () => new CouldNotDetermineTokenStandardError(), + () => new CouldNotDetermineTokenStandardError() ); /** @@ -2338,7 +2632,10 @@ export class MissingEditionAccountError extends Error { } createErrorFromCodeLookup.set(0x6c, () => new MissingEditionAccountError()); -createErrorFromNameLookup.set('MissingEditionAccount', () => new MissingEditionAccountError()); +createErrorFromNameLookup.set( + 'MissingEditionAccount', + () => new MissingEditionAccountError() +); /** * NotAMasterEdition: 'This edition is not a Master Edition' @@ -2358,7 +2655,10 @@ export class NotAMasterEditionError extends Error { } createErrorFromCodeLookup.set(0x6d, () => new NotAMasterEditionError()); -createErrorFromNameLookup.set('NotAMasterEdition', () => new NotAMasterEditionError()); +createErrorFromNameLookup.set( + 'NotAMasterEdition', + () => new NotAMasterEditionError() +); /** * MasterEditionHasPrints: 'This Master Edition has existing prints' @@ -2378,7 +2678,10 @@ export class MasterEditionHasPrintsError extends Error { } createErrorFromCodeLookup.set(0x6e, () => new MasterEditionHasPrintsError()); -createErrorFromNameLookup.set('MasterEditionHasPrints', () => new MasterEditionHasPrintsError()); +createErrorFromNameLookup.set( + 'MasterEditionHasPrints', + () => new MasterEditionHasPrintsError() +); /** * BorshDeserializationError: '' @@ -2400,7 +2703,7 @@ export class BorshDeserializationErrorError extends Error { createErrorFromCodeLookup.set(0x6f, () => new BorshDeserializationErrorError()); createErrorFromNameLookup.set( 'BorshDeserializationError', - () => new BorshDeserializationErrorError(), + () => new BorshDeserializationErrorError() ); /** @@ -2420,10 +2723,13 @@ export class CannotUpdateVerifiedCollectionError extends Error { } } -createErrorFromCodeLookup.set(0x70, () => new CannotUpdateVerifiedCollectionError()); +createErrorFromCodeLookup.set( + 0x70, + () => new CannotUpdateVerifiedCollectionError() +); createErrorFromNameLookup.set( 'CannotUpdateVerifiedCollection', - () => new CannotUpdateVerifiedCollectionError(), + () => new CannotUpdateVerifiedCollectionError() ); /** @@ -2443,10 +2749,13 @@ export class CollectionMasterEditionAccountInvalidError extends Error { } } -createErrorFromCodeLookup.set(0x71, () => new CollectionMasterEditionAccountInvalidError()); +createErrorFromCodeLookup.set( + 0x71, + () => new CollectionMasterEditionAccountInvalidError() +); createErrorFromNameLookup.set( 'CollectionMasterEditionAccountInvalid', - () => new CollectionMasterEditionAccountInvalidError(), + () => new CollectionMasterEditionAccountInvalidError() ); /** @@ -2467,7 +2776,10 @@ export class AlreadyVerifiedError extends Error { } createErrorFromCodeLookup.set(0x72, () => new AlreadyVerifiedError()); -createErrorFromNameLookup.set('AlreadyVerified', () => new AlreadyVerifiedError()); +createErrorFromNameLookup.set( + 'AlreadyVerified', + () => new AlreadyVerifiedError() +); /** * AlreadyUnverified: '' @@ -2487,7 +2799,10 @@ export class AlreadyUnverifiedError extends Error { } createErrorFromCodeLookup.set(0x73, () => new AlreadyUnverifiedError()); -createErrorFromNameLookup.set('AlreadyUnverified', () => new AlreadyUnverifiedError()); +createErrorFromNameLookup.set( + 'AlreadyUnverified', + () => new AlreadyUnverifiedError() +); /** * NotAPrintEdition: 'This edition is not a Print Edition' @@ -2507,7 +2822,10 @@ export class NotAPrintEditionError extends Error { } createErrorFromCodeLookup.set(0x74, () => new NotAPrintEditionError()); -createErrorFromNameLookup.set('NotAPrintEdition', () => new NotAPrintEditionError()); +createErrorFromNameLookup.set( + 'NotAPrintEdition', + () => new NotAPrintEditionError() +); /** * InvalidMasterEdition: 'Invalid Master Edition' @@ -2527,7 +2845,10 @@ export class InvalidMasterEditionError extends Error { } createErrorFromCodeLookup.set(0x75, () => new InvalidMasterEditionError()); -createErrorFromNameLookup.set('InvalidMasterEdition', () => new InvalidMasterEditionError()); +createErrorFromNameLookup.set( + 'InvalidMasterEdition', + () => new InvalidMasterEditionError() +); /** * InvalidPrintEdition: 'Invalid Print Edition' @@ -2547,7 +2868,10 @@ export class InvalidPrintEditionError extends Error { } createErrorFromCodeLookup.set(0x76, () => new InvalidPrintEditionError()); -createErrorFromNameLookup.set('InvalidPrintEdition', () => new InvalidPrintEditionError()); +createErrorFromNameLookup.set( + 'InvalidPrintEdition', + () => new InvalidPrintEditionError() +); /** * InvalidEditionMarker: 'Invalid Edition Marker' @@ -2567,7 +2891,10 @@ export class InvalidEditionMarkerError extends Error { } createErrorFromCodeLookup.set(0x77, () => new InvalidEditionMarkerError()); -createErrorFromNameLookup.set('InvalidEditionMarker', () => new InvalidEditionMarkerError()); +createErrorFromNameLookup.set( + 'InvalidEditionMarker', + () => new InvalidEditionMarkerError() +); /** * ReservationListDeprecated: 'Reservation List is Deprecated' @@ -2589,7 +2916,7 @@ export class ReservationListDeprecatedError extends Error { createErrorFromCodeLookup.set(0x78, () => new ReservationListDeprecatedError()); createErrorFromNameLookup.set( 'ReservationListDeprecated', - () => new ReservationListDeprecatedError(), + () => new ReservationListDeprecatedError() ); /** @@ -2609,10 +2936,13 @@ export class PrintEditionDoesNotMatchMasterEditionError extends Error { } } -createErrorFromCodeLookup.set(0x79, () => new PrintEditionDoesNotMatchMasterEditionError()); +createErrorFromCodeLookup.set( + 0x79, + () => new PrintEditionDoesNotMatchMasterEditionError() +); createErrorFromNameLookup.set( 'PrintEditionDoesNotMatchMasterEdition', - () => new PrintEditionDoesNotMatchMasterEditionError(), + () => new PrintEditionDoesNotMatchMasterEditionError() ); /** @@ -2632,10 +2962,13 @@ export class EditionNumberGreaterThanMaxSupplyError extends Error { } } -createErrorFromCodeLookup.set(0x7a, () => new EditionNumberGreaterThanMaxSupplyError()); +createErrorFromCodeLookup.set( + 0x7a, + () => new EditionNumberGreaterThanMaxSupplyError() +); createErrorFromNameLookup.set( 'EditionNumberGreaterThanMaxSupply', - () => new EditionNumberGreaterThanMaxSupplyError(), + () => new EditionNumberGreaterThanMaxSupplyError() ); /** @@ -2676,7 +3009,10 @@ export class InvalidEscrowBumpSeedError extends Error { } createErrorFromCodeLookup.set(0x7c, () => new InvalidEscrowBumpSeedError()); -createErrorFromNameLookup.set('InvalidEscrowBumpSeed', () => new InvalidEscrowBumpSeedError()); +createErrorFromNameLookup.set( + 'InvalidEscrowBumpSeed', + () => new InvalidEscrowBumpSeedError() +); /** * MustBeEscrowAuthority: 'Must Escrow Authority' @@ -2696,7 +3032,10 @@ export class MustBeEscrowAuthorityError extends Error { } createErrorFromCodeLookup.set(0x7d, () => new MustBeEscrowAuthorityError()); -createErrorFromNameLookup.set('MustBeEscrowAuthority', () => new MustBeEscrowAuthorityError()); +createErrorFromNameLookup.set( + 'MustBeEscrowAuthority', + () => new MustBeEscrowAuthorityError() +); /** * InvalidSystemProgram: 'Invalid System Program' @@ -2716,7 +3055,10 @@ export class InvalidSystemProgramError extends Error { } createErrorFromCodeLookup.set(0x7e, () => new InvalidSystemProgramError()); -createErrorFromNameLookup.set('InvalidSystemProgram', () => new InvalidSystemProgramError()); +createErrorFromNameLookup.set( + 'InvalidSystemProgram', + () => new InvalidSystemProgramError() +); /** * MustBeNonFungible: 'Must be a Non Fungible Token' @@ -2736,7 +3078,10 @@ export class MustBeNonFungibleError extends Error { } createErrorFromCodeLookup.set(0x7f, () => new MustBeNonFungibleError()); -createErrorFromNameLookup.set('MustBeNonFungible', () => new MustBeNonFungibleError()); +createErrorFromNameLookup.set( + 'MustBeNonFungible', + () => new MustBeNonFungibleError() +); /** * InsufficientTokens: 'Insufficient tokens for transfer' @@ -2756,7 +3101,10 @@ export class InsufficientTokensError extends Error { } createErrorFromCodeLookup.set(0x80, () => new InsufficientTokensError()); -createErrorFromNameLookup.set('InsufficientTokens', () => new InsufficientTokensError()); +createErrorFromNameLookup.set( + 'InsufficientTokens', + () => new InsufficientTokensError() +); /** * BorshSerializationError: 'Borsh Serialization Error' @@ -2776,7 +3124,10 @@ export class BorshSerializationErrorError extends Error { } createErrorFromCodeLookup.set(0x81, () => new BorshSerializationErrorError()); -createErrorFromNameLookup.set('BorshSerializationError', () => new BorshSerializationErrorError()); +createErrorFromNameLookup.set( + 'BorshSerializationError', + () => new BorshSerializationErrorError() +); /** * NoFreezeAuthoritySet: 'Cannot create NFT with no Freeze Authority.' @@ -2796,7 +3147,10 @@ export class NoFreezeAuthoritySetError extends Error { } createErrorFromCodeLookup.set(0x82, () => new NoFreezeAuthoritySetError()); -createErrorFromNameLookup.set('NoFreezeAuthoritySet', () => new NoFreezeAuthoritySetError()); +createErrorFromNameLookup.set( + 'NoFreezeAuthoritySet', + () => new NoFreezeAuthoritySetError() +); /** * InvalidCollectionSizeChange: 'Invalid collection size change' @@ -2815,10 +3169,13 @@ export class InvalidCollectionSizeChangeError extends Error { } } -createErrorFromCodeLookup.set(0x83, () => new InvalidCollectionSizeChangeError()); +createErrorFromCodeLookup.set( + 0x83, + () => new InvalidCollectionSizeChangeError() +); createErrorFromNameLookup.set( 'InvalidCollectionSizeChange', - () => new InvalidCollectionSizeChangeError(), + () => new InvalidCollectionSizeChangeError() ); /** @@ -2839,7 +3196,10 @@ export class InvalidBubblegumSignerError extends Error { } createErrorFromCodeLookup.set(0x84, () => new InvalidBubblegumSignerError()); -createErrorFromNameLookup.set('InvalidBubblegumSigner', () => new InvalidBubblegumSignerError()); +createErrorFromNameLookup.set( + 'InvalidBubblegumSigner', + () => new InvalidBubblegumSignerError() +); /** * EscrowParentHasDelegate: 'Escrow parent cannot have a delegate' @@ -2859,7 +3219,10 @@ export class EscrowParentHasDelegateError extends Error { } createErrorFromCodeLookup.set(0x85, () => new EscrowParentHasDelegateError()); -createErrorFromNameLookup.set('EscrowParentHasDelegate', () => new EscrowParentHasDelegateError()); +createErrorFromNameLookup.set( + 'EscrowParentHasDelegate', + () => new EscrowParentHasDelegateError() +); /** * MintIsNotSigner: 'Mint needs to be signer to initialize the account' @@ -2879,7 +3242,10 @@ export class MintIsNotSignerError extends Error { } createErrorFromCodeLookup.set(0x86, () => new MintIsNotSignerError()); -createErrorFromNameLookup.set('MintIsNotSigner', () => new MintIsNotSignerError()); +createErrorFromNameLookup.set( + 'MintIsNotSigner', + () => new MintIsNotSignerError() +); /** * InvalidTokenStandard: 'Invalid token standard' @@ -2899,7 +3265,10 @@ export class InvalidTokenStandardError extends Error { } createErrorFromCodeLookup.set(0x87, () => new InvalidTokenStandardError()); -createErrorFromNameLookup.set('InvalidTokenStandard', () => new InvalidTokenStandardError()); +createErrorFromNameLookup.set( + 'InvalidTokenStandard', + () => new InvalidTokenStandardError() +); /** * InvalidMintForTokenStandard: 'Invalid mint account for specified token standard' @@ -2918,10 +3287,13 @@ export class InvalidMintForTokenStandardError extends Error { } } -createErrorFromCodeLookup.set(0x88, () => new InvalidMintForTokenStandardError()); +createErrorFromCodeLookup.set( + 0x88, + () => new InvalidMintForTokenStandardError() +); createErrorFromNameLookup.set( 'InvalidMintForTokenStandard', - () => new InvalidMintForTokenStandardError(), + () => new InvalidMintForTokenStandardError() ); /** @@ -2944,7 +3316,7 @@ export class InvalidAuthorizationRulesError extends Error { createErrorFromCodeLookup.set(0x89, () => new InvalidAuthorizationRulesError()); createErrorFromNameLookup.set( 'InvalidAuthorizationRules', - () => new InvalidAuthorizationRulesError(), + () => new InvalidAuthorizationRulesError() ); /** @@ -2967,7 +3339,7 @@ export class MissingAuthorizationRulesError extends Error { createErrorFromCodeLookup.set(0x8a, () => new MissingAuthorizationRulesError()); createErrorFromNameLookup.set( 'MissingAuthorizationRules', - () => new MissingAuthorizationRulesError(), + () => new MissingAuthorizationRulesError() ); /** @@ -2990,7 +3362,7 @@ export class MissingProgrammableConfigError extends Error { createErrorFromCodeLookup.set(0x8b, () => new MissingProgrammableConfigError()); createErrorFromNameLookup.set( 'MissingProgrammableConfig', - () => new MissingProgrammableConfigError(), + () => new MissingProgrammableConfigError() ); /** @@ -3013,7 +3385,7 @@ export class InvalidProgrammableConfigError extends Error { createErrorFromCodeLookup.set(0x8c, () => new InvalidProgrammableConfigError()); createErrorFromNameLookup.set( 'InvalidProgrammableConfig', - () => new InvalidProgrammableConfigError(), + () => new InvalidProgrammableConfigError() ); /** @@ -3034,7 +3406,10 @@ export class DelegateAlreadyExistsError extends Error { } createErrorFromCodeLookup.set(0x8d, () => new DelegateAlreadyExistsError()); -createErrorFromNameLookup.set('DelegateAlreadyExists', () => new DelegateAlreadyExistsError()); +createErrorFromNameLookup.set( + 'DelegateAlreadyExists', + () => new DelegateAlreadyExistsError() +); /** * DelegateNotFound: 'Delegate not found' @@ -3054,7 +3429,10 @@ export class DelegateNotFoundError extends Error { } createErrorFromCodeLookup.set(0x8e, () => new DelegateNotFoundError()); -createErrorFromNameLookup.set('DelegateNotFound', () => new DelegateNotFoundError()); +createErrorFromNameLookup.set( + 'DelegateNotFound', + () => new DelegateNotFoundError() +); /** * MissingAccountInBuilder: 'Required account not set in instruction builder' @@ -3074,7 +3452,10 @@ export class MissingAccountInBuilderError extends Error { } createErrorFromCodeLookup.set(0x8f, () => new MissingAccountInBuilderError()); -createErrorFromNameLookup.set('MissingAccountInBuilder', () => new MissingAccountInBuilderError()); +createErrorFromNameLookup.set( + 'MissingAccountInBuilder', + () => new MissingAccountInBuilderError() +); /** * MissingArgumentInBuilder: 'Required argument not set in instruction builder' @@ -3096,7 +3477,7 @@ export class MissingArgumentInBuilderError extends Error { createErrorFromCodeLookup.set(0x90, () => new MissingArgumentInBuilderError()); createErrorFromNameLookup.set( 'MissingArgumentInBuilder', - () => new MissingArgumentInBuilderError(), + () => new MissingArgumentInBuilderError() ); /** @@ -3117,7 +3498,10 @@ export class FeatureNotSupportedError extends Error { } createErrorFromCodeLookup.set(0x91, () => new FeatureNotSupportedError()); -createErrorFromNameLookup.set('FeatureNotSupported', () => new FeatureNotSupportedError()); +createErrorFromNameLookup.set( + 'FeatureNotSupported', + () => new FeatureNotSupportedError() +); /** * InvalidSystemWallet: 'Invalid system wallet' @@ -3137,7 +3521,10 @@ export class InvalidSystemWalletError extends Error { } createErrorFromCodeLookup.set(0x92, () => new InvalidSystemWalletError()); -createErrorFromNameLookup.set('InvalidSystemWallet', () => new InvalidSystemWalletError()); +createErrorFromNameLookup.set( + 'InvalidSystemWallet', + () => new InvalidSystemWalletError() +); /** * OnlySaleDelegateCanTransfer: 'Only the sale delegate can transfer while its set' @@ -3156,10 +3543,13 @@ export class OnlySaleDelegateCanTransferError extends Error { } } -createErrorFromCodeLookup.set(0x93, () => new OnlySaleDelegateCanTransferError()); +createErrorFromCodeLookup.set( + 0x93, + () => new OnlySaleDelegateCanTransferError() +); createErrorFromNameLookup.set( 'OnlySaleDelegateCanTransfer', - () => new OnlySaleDelegateCanTransferError(), + () => new OnlySaleDelegateCanTransferError() ); /** @@ -3180,7 +3570,10 @@ export class MissingTokenAccountError extends Error { } createErrorFromCodeLookup.set(0x94, () => new MissingTokenAccountError()); -createErrorFromNameLookup.set('MissingTokenAccount', () => new MissingTokenAccountError()); +createErrorFromNameLookup.set( + 'MissingTokenAccount', + () => new MissingTokenAccountError() +); /** * MissingSplTokenProgram: 'Missing SPL token program' @@ -3200,7 +3593,10 @@ export class MissingSplTokenProgramError extends Error { } createErrorFromCodeLookup.set(0x95, () => new MissingSplTokenProgramError()); -createErrorFromNameLookup.set('MissingSplTokenProgram', () => new MissingSplTokenProgramError()); +createErrorFromNameLookup.set( + 'MissingSplTokenProgram', + () => new MissingSplTokenProgramError() +); /** * MissingAuthorizationRulesProgram: 'Missing authorization rules program' @@ -3219,10 +3615,13 @@ export class MissingAuthorizationRulesProgramError extends Error { } } -createErrorFromCodeLookup.set(0x96, () => new MissingAuthorizationRulesProgramError()); +createErrorFromCodeLookup.set( + 0x96, + () => new MissingAuthorizationRulesProgramError() +); createErrorFromNameLookup.set( 'MissingAuthorizationRulesProgram', - () => new MissingAuthorizationRulesProgramError(), + () => new MissingAuthorizationRulesProgramError() ); /** @@ -3242,10 +3641,13 @@ export class InvalidDelegateRoleForTransferError extends Error { } } -createErrorFromCodeLookup.set(0x97, () => new InvalidDelegateRoleForTransferError()); +createErrorFromCodeLookup.set( + 0x97, + () => new InvalidDelegateRoleForTransferError() +); createErrorFromNameLookup.set( 'InvalidDelegateRoleForTransfer', - () => new InvalidDelegateRoleForTransferError(), + () => new InvalidDelegateRoleForTransferError() ); /** @@ -3268,7 +3670,7 @@ export class InvalidTransferAuthorityError extends Error { createErrorFromCodeLookup.set(0x98, () => new InvalidTransferAuthorityError()); createErrorFromNameLookup.set( 'InvalidTransferAuthority', - () => new InvalidTransferAuthorityError(), + () => new InvalidTransferAuthorityError() ); /** @@ -3289,7 +3691,10 @@ export class InstructionNotSupportedError extends Error { } createErrorFromCodeLookup.set(0x99, () => new InstructionNotSupportedError()); -createErrorFromNameLookup.set('InstructionNotSupported', () => new InstructionNotSupportedError()); +createErrorFromNameLookup.set( + 'InstructionNotSupported', + () => new InstructionNotSupportedError() +); /** * KeyMismatch: 'Public key does not match expected value' @@ -3369,7 +3774,10 @@ export class MissingDelegateRoleError extends Error { } createErrorFromCodeLookup.set(0x9d, () => new MissingDelegateRoleError()); -createErrorFromNameLookup.set('MissingDelegateRole', () => new MissingDelegateRoleError()); +createErrorFromNameLookup.set( + 'MissingDelegateRole', + () => new MissingDelegateRoleError() +); /** * InvalidAuthorityType: 'Invalid authority type' @@ -3389,7 +3797,10 @@ export class InvalidAuthorityTypeError extends Error { } createErrorFromCodeLookup.set(0x9e, () => new InvalidAuthorityTypeError()); -createErrorFromNameLookup.set('InvalidAuthorityType', () => new InvalidAuthorityTypeError()); +createErrorFromNameLookup.set( + 'InvalidAuthorityType', + () => new InvalidAuthorityTypeError() +); /** * MissingTokenRecord: 'Missing token record account' @@ -3409,7 +3820,10 @@ export class MissingTokenRecordError extends Error { } createErrorFromCodeLookup.set(0x9f, () => new MissingTokenRecordError()); -createErrorFromNameLookup.set('MissingTokenRecord', () => new MissingTokenRecordError()); +createErrorFromNameLookup.set( + 'MissingTokenRecord', + () => new MissingTokenRecordError() +); /** * MintSupplyMustBeZero: 'Mint supply must be zero for programmable assets' @@ -3429,7 +3843,10 @@ export class MintSupplyMustBeZeroError extends Error { } createErrorFromCodeLookup.set(0xa0, () => new MintSupplyMustBeZeroError()); -createErrorFromNameLookup.set('MintSupplyMustBeZero', () => new MintSupplyMustBeZeroError()); +createErrorFromNameLookup.set( + 'MintSupplyMustBeZero', + () => new MintSupplyMustBeZeroError() +); /** * DataIsEmptyOrZeroed: 'Data is empty or zeroed' @@ -3449,7 +3866,10 @@ export class DataIsEmptyOrZeroedError extends Error { } createErrorFromCodeLookup.set(0xa1, () => new DataIsEmptyOrZeroedError()); -createErrorFromNameLookup.set('DataIsEmptyOrZeroed', () => new DataIsEmptyOrZeroedError()); +createErrorFromNameLookup.set( + 'DataIsEmptyOrZeroed', + () => new DataIsEmptyOrZeroedError() +); /** * MissingTokenOwnerAccount: 'Missing token owner' @@ -3471,7 +3891,7 @@ export class MissingTokenOwnerAccountError extends Error { createErrorFromCodeLookup.set(0xa2, () => new MissingTokenOwnerAccountError()); createErrorFromNameLookup.set( 'MissingTokenOwnerAccount', - () => new MissingTokenOwnerAccountError(), + () => new MissingTokenOwnerAccountError() ); /** @@ -3491,10 +3911,13 @@ export class InvalidMasterEditionAccountLengthError extends Error { } } -createErrorFromCodeLookup.set(0xa3, () => new InvalidMasterEditionAccountLengthError()); +createErrorFromCodeLookup.set( + 0xa3, + () => new InvalidMasterEditionAccountLengthError() +); createErrorFromNameLookup.set( 'InvalidMasterEditionAccountLength', - () => new InvalidMasterEditionAccountLengthError(), + () => new InvalidMasterEditionAccountLengthError() ); /** @@ -3515,7 +3938,10 @@ export class IncorrectTokenStateError extends Error { } createErrorFromCodeLookup.set(0xa4, () => new IncorrectTokenStateError()); -createErrorFromNameLookup.set('IncorrectTokenState', () => new IncorrectTokenStateError()); +createErrorFromNameLookup.set( + 'IncorrectTokenState', + () => new IncorrectTokenStateError() +); /** * InvalidDelegateRole: 'Invalid delegate role' @@ -3535,7 +3961,10 @@ export class InvalidDelegateRoleError extends Error { } createErrorFromCodeLookup.set(0xa5, () => new InvalidDelegateRoleError()); -createErrorFromNameLookup.set('InvalidDelegateRole', () => new InvalidDelegateRoleError()); +createErrorFromNameLookup.set( + 'InvalidDelegateRole', + () => new InvalidDelegateRoleError() +); /** * MissingPrintSupply: 'Print supply is required for non-fungibles' @@ -3555,7 +3984,10 @@ export class MissingPrintSupplyError extends Error { } createErrorFromCodeLookup.set(0xa6, () => new MissingPrintSupplyError()); -createErrorFromNameLookup.set('MissingPrintSupply', () => new MissingPrintSupplyError()); +createErrorFromNameLookup.set( + 'MissingPrintSupply', + () => new MissingPrintSupplyError() +); /** * MissingMasterEditionAccount: 'Missing master edition account' @@ -3574,10 +4006,13 @@ export class MissingMasterEditionAccountError extends Error { } } -createErrorFromCodeLookup.set(0xa7, () => new MissingMasterEditionAccountError()); +createErrorFromCodeLookup.set( + 0xa7, + () => new MissingMasterEditionAccountError() +); createErrorFromNameLookup.set( 'MissingMasterEditionAccount', - () => new MissingMasterEditionAccountError(), + () => new MissingMasterEditionAccountError() ); /** @@ -3597,10 +4032,13 @@ export class AmountMustBeGreaterThanZeroError extends Error { } } -createErrorFromCodeLookup.set(0xa8, () => new AmountMustBeGreaterThanZeroError()); +createErrorFromCodeLookup.set( + 0xa8, + () => new AmountMustBeGreaterThanZeroError() +); createErrorFromNameLookup.set( 'AmountMustBeGreaterThanZero', - () => new AmountMustBeGreaterThanZeroError(), + () => new AmountMustBeGreaterThanZeroError() ); /** @@ -3621,7 +4059,10 @@ export class InvalidDelegateArgsError extends Error { } createErrorFromCodeLookup.set(0xa9, () => new InvalidDelegateArgsError()); -createErrorFromNameLookup.set('InvalidDelegateArgs', () => new InvalidDelegateArgsError()); +createErrorFromNameLookup.set( + 'InvalidDelegateArgs', + () => new InvalidDelegateArgsError() +); /** * MissingLockedTransferAddress: 'Missing address for locked transfer' @@ -3640,10 +4081,13 @@ export class MissingLockedTransferAddressError extends Error { } } -createErrorFromCodeLookup.set(0xaa, () => new MissingLockedTransferAddressError()); +createErrorFromCodeLookup.set( + 0xaa, + () => new MissingLockedTransferAddressError() +); createErrorFromNameLookup.set( 'MissingLockedTransferAddress', - () => new MissingLockedTransferAddressError(), + () => new MissingLockedTransferAddressError() ); /** @@ -3663,10 +4107,13 @@ export class InvalidLockedTransferAddressError extends Error { } } -createErrorFromCodeLookup.set(0xab, () => new InvalidLockedTransferAddressError()); +createErrorFromCodeLookup.set( + 0xab, + () => new InvalidLockedTransferAddressError() +); createErrorFromNameLookup.set( 'InvalidLockedTransferAddress', - () => new InvalidLockedTransferAddressError(), + () => new InvalidLockedTransferAddressError() ); /** @@ -3686,10 +4133,13 @@ export class DataIncrementLimitExceededError extends Error { } } -createErrorFromCodeLookup.set(0xac, () => new DataIncrementLimitExceededError()); +createErrorFromCodeLookup.set( + 0xac, + () => new DataIncrementLimitExceededError() +); createErrorFromNameLookup.set( 'DataIncrementLimitExceeded', - () => new DataIncrementLimitExceededError(), + () => new DataIncrementLimitExceededError() ); /** @@ -3702,17 +4152,22 @@ export class CannotUpdateAssetWithDelegateError extends Error { readonly code: number = 0xad; readonly name: string = 'CannotUpdateAssetWithDelegate'; constructor() { - super('Cannot update the rule set of a programmable asset that has a delegate'); + super( + 'Cannot update the rule set of a programmable asset that has a delegate' + ); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, CannotUpdateAssetWithDelegateError); } } } -createErrorFromCodeLookup.set(0xad, () => new CannotUpdateAssetWithDelegateError()); +createErrorFromCodeLookup.set( + 0xad, + () => new CannotUpdateAssetWithDelegateError() +); createErrorFromNameLookup.set( 'CannotUpdateAssetWithDelegate', - () => new CannotUpdateAssetWithDelegateError(), + () => new CannotUpdateAssetWithDelegateError() ); /** @@ -3752,10 +4207,13 @@ export class MissingMasterEditionMintAccountError extends Error { } } -createErrorFromCodeLookup.set(0xaf, () => new MissingMasterEditionMintAccountError()); +createErrorFromCodeLookup.set( + 0xaf, + () => new MissingMasterEditionMintAccountError() +); createErrorFromNameLookup.set( 'MissingMasterEditionMintAccount', - () => new MissingMasterEditionMintAccountError(), + () => new MissingMasterEditionMintAccountError() ); /** @@ -3775,10 +4233,13 @@ export class MissingMasterEditionTokenAccountError extends Error { } } -createErrorFromCodeLookup.set(0xb0, () => new MissingMasterEditionTokenAccountError()); +createErrorFromCodeLookup.set( + 0xb0, + () => new MissingMasterEditionTokenAccountError() +); createErrorFromNameLookup.set( 'MissingMasterEditionTokenAccount', - () => new MissingMasterEditionTokenAccountError(), + () => new MissingMasterEditionTokenAccountError() ); /** @@ -3798,10 +4259,13 @@ export class MissingEditionMarkerAccountError extends Error { } } -createErrorFromCodeLookup.set(0xb1, () => new MissingEditionMarkerAccountError()); +createErrorFromCodeLookup.set( + 0xb1, + () => new MissingEditionMarkerAccountError() +); createErrorFromNameLookup.set( 'MissingEditionMarkerAccount', - () => new MissingEditionMarkerAccountError(), + () => new MissingEditionMarkerAccountError() ); /** @@ -3822,7 +4286,10 @@ export class CannotBurnWithDelegateError extends Error { } createErrorFromCodeLookup.set(0xb2, () => new CannotBurnWithDelegateError()); -createErrorFromNameLookup.set('CannotBurnWithDelegate', () => new CannotBurnWithDelegateError()); +createErrorFromNameLookup.set( + 'CannotBurnWithDelegate', + () => new CannotBurnWithDelegateError() +); /** * MissingEdition: 'Missing edition account' @@ -3842,7 +4309,10 @@ export class MissingEditionError extends Error { } createErrorFromCodeLookup.set(0xb3, () => new MissingEditionError()); -createErrorFromNameLookup.set('MissingEdition', () => new MissingEditionError()); +createErrorFromNameLookup.set( + 'MissingEdition', + () => new MissingEditionError() +); /** * InvalidAssociatedTokenAccountProgram: 'Invalid Associated Token Account Program' @@ -3861,10 +4331,13 @@ export class InvalidAssociatedTokenAccountProgramError extends Error { } } -createErrorFromCodeLookup.set(0xb4, () => new InvalidAssociatedTokenAccountProgramError()); +createErrorFromCodeLookup.set( + 0xb4, + () => new InvalidAssociatedTokenAccountProgramError() +); createErrorFromNameLookup.set( 'InvalidAssociatedTokenAccountProgram', - () => new InvalidAssociatedTokenAccountProgramError(), + () => new InvalidAssociatedTokenAccountProgramError() ); /** @@ -3887,7 +4360,7 @@ export class InvalidInstructionsSysvarError extends Error { createErrorFromCodeLookup.set(0xb5, () => new InvalidInstructionsSysvarError()); createErrorFromNameLookup.set( 'InvalidInstructionsSysvar', - () => new InvalidInstructionsSysvarError(), + () => new InvalidInstructionsSysvarError() ); /** @@ -3908,7 +4381,10 @@ export class InvalidParentAccountsError extends Error { } createErrorFromCodeLookup.set(0xb6, () => new InvalidParentAccountsError()); -createErrorFromNameLookup.set('InvalidParentAccounts', () => new InvalidParentAccountsError()); +createErrorFromNameLookup.set( + 'InvalidParentAccounts', + () => new InvalidParentAccountsError() +); /** * InvalidUpdateArgs: 'Authority cannot apply all update args' @@ -3928,7 +4404,10 @@ export class InvalidUpdateArgsError extends Error { } createErrorFromCodeLookup.set(0xb7, () => new InvalidUpdateArgsError()); -createErrorFromNameLookup.set('InvalidUpdateArgs', () => new InvalidUpdateArgsError()); +createErrorFromNameLookup.set( + 'InvalidUpdateArgs', + () => new InvalidUpdateArgsError() +); /** * InsufficientTokenBalance: 'Token account does not have enough tokens' @@ -3950,7 +4429,7 @@ export class InsufficientTokenBalanceError extends Error { createErrorFromCodeLookup.set(0xb8, () => new InsufficientTokenBalanceError()); createErrorFromNameLookup.set( 'InsufficientTokenBalance', - () => new InsufficientTokenBalanceError(), + () => new InsufficientTokenBalanceError() ); /** @@ -3971,7 +4450,10 @@ export class MissingCollectionMintError extends Error { } createErrorFromCodeLookup.set(0xb9, () => new MissingCollectionMintError()); -createErrorFromNameLookup.set('MissingCollectionMint', () => new MissingCollectionMintError()); +createErrorFromNameLookup.set( + 'MissingCollectionMint', + () => new MissingCollectionMintError() +); /** * MissingCollectionMasterEdition: 'Missing collection master edition account' @@ -3990,10 +4472,13 @@ export class MissingCollectionMasterEditionError extends Error { } } -createErrorFromCodeLookup.set(0xba, () => new MissingCollectionMasterEditionError()); +createErrorFromCodeLookup.set( + 0xba, + () => new MissingCollectionMasterEditionError() +); createErrorFromNameLookup.set( 'MissingCollectionMasterEdition', - () => new MissingCollectionMasterEditionError(), + () => new MissingCollectionMasterEditionError() ); /** @@ -4014,7 +4499,10 @@ export class InvalidTokenRecordError extends Error { } createErrorFromCodeLookup.set(0xbb, () => new InvalidTokenRecordError()); -createErrorFromNameLookup.set('InvalidTokenRecord', () => new InvalidTokenRecordError()); +createErrorFromNameLookup.set( + 'InvalidTokenRecord', + () => new InvalidTokenRecordError() +); /** * InvalidCloseAuthority: 'The close authority needs to be revoked by the Utility Delegate' @@ -4034,7 +4522,10 @@ export class InvalidCloseAuthorityError extends Error { } createErrorFromCodeLookup.set(0xbc, () => new InvalidCloseAuthorityError()); -createErrorFromNameLookup.set('InvalidCloseAuthority', () => new InvalidCloseAuthorityError()); +createErrorFromNameLookup.set( + 'InvalidCloseAuthority', + () => new InvalidCloseAuthorityError() +); /** * InvalidInstruction: 'Invalid or removed instruction' @@ -4054,7 +4545,10 @@ export class InvalidInstructionError extends Error { } createErrorFromCodeLookup.set(0xbd, () => new InvalidInstructionError()); -createErrorFromNameLookup.set('InvalidInstruction', () => new InvalidInstructionError()); +createErrorFromNameLookup.set( + 'InvalidInstruction', + () => new InvalidInstructionError() +); /** * MissingDelegateRecord: 'Missing delegate record' @@ -4074,7 +4568,10 @@ export class MissingDelegateRecordError extends Error { } createErrorFromCodeLookup.set(0xbe, () => new MissingDelegateRecordError()); -createErrorFromNameLookup.set('MissingDelegateRecord', () => new MissingDelegateRecordError()); +createErrorFromNameLookup.set( + 'MissingDelegateRecord', + () => new MissingDelegateRecordError() +); /** * InvalidFeeAccount: '' @@ -4094,7 +4591,10 @@ export class InvalidFeeAccountError extends Error { } createErrorFromCodeLookup.set(0xbf, () => new InvalidFeeAccountError()); -createErrorFromNameLookup.set('InvalidFeeAccount', () => new InvalidFeeAccountError()); +createErrorFromNameLookup.set( + 'InvalidFeeAccount', + () => new InvalidFeeAccountError() +); /** * InvalidMetadataFlags: '' @@ -4114,7 +4614,10 @@ export class InvalidMetadataFlagsError extends Error { } createErrorFromCodeLookup.set(0xc0, () => new InvalidMetadataFlagsError()); -createErrorFromNameLookup.set('InvalidMetadataFlags', () => new InvalidMetadataFlagsError()); +createErrorFromNameLookup.set( + 'InvalidMetadataFlags', + () => new InvalidMetadataFlagsError() +); /** * Attempts to resolve a custom program error from the provided error code. diff --git a/metadata/js/src/helpers/metadata-deserializer.ts b/metadata/js/src/helpers/metadata-deserializer.ts index c4f4f248..4ebe0580 100644 --- a/metadata/js/src/helpers/metadata-deserializer.ts +++ b/metadata/js/src/helpers/metadata-deserializer.ts @@ -1,7 +1,14 @@ import * as beet from '@bbachain/beet'; import * as beetBBA from '@bbachain/beet-bbachain'; import { Metadata } from '../accounts/Metadata'; -import { collectionBeet, collectionDetailsBeet, dataBeet, keyBeet, tokenStandardBeet, usesBeet } from '../types'; +import { + collectionBeet, + collectionDetailsBeet, + dataBeet, + keyBeet, + tokenStandardBeet, + usesBeet, +} from '../types'; const NONE_BYTE_SIZE = beet.coptionNone('').byteSize; @@ -16,88 +23,96 @@ const NONE_BYTE_SIZE = beet.coptionNone('').byteSize; * Also @see ../../../program/src/deser.rs */ export function deserialize(buf: Buffer, offset = 0): [Metadata, number] { - let cursor = offset; - - // key - const key = keyBeet.read(buf, cursor); - cursor += keyBeet.byteSize; - - // updateAuthority - const updateAuthority = beetBBA.publicKey.read(buf, cursor); - cursor += beetBBA.publicKey.byteSize; - - // mint - const mint = beetBBA.publicKey.read(buf, cursor); - cursor += beetBBA.publicKey.byteSize; - - // data - const [data, dataDelta] = dataBeet.deserialize(buf, cursor); - cursor = dataDelta; - - // primarySaleHappened - const primarySaleHappened = beet.bool.read(buf, cursor); - cursor += beet.bool.byteSize; - - // isMutable - const isMutable = beet.bool.read(buf, cursor); - cursor += beet.bool.byteSize; - - // tokenStandard - const [tokenStandard, tokenDelta, tokenCorrupted] = tryReadOption(beet.coption(tokenStandardBeet), buf, cursor); - cursor += tokenDelta; - - // collection - const [collection, collectionDelta, collectionCorrupted] = tokenCorrupted - ? [null, NONE_BYTE_SIZE, true] - : tryReadOption(beet.coption(collectionBeet), buf, cursor); - cursor += collectionDelta; - - // collection_details - const [collectionDetails, collectionDetailsDelta, collectionDetailsCorrupted] = - tokenCorrupted || collectionCorrupted - ? [null, NONE_BYTE_SIZE, true] - : tryReadOption(beet.coption(collectionDetailsBeet), buf, cursor); - cursor += collectionDetailsDelta; - - // uses - const [uses, usesDelta, usesCorrupted] = - tokenCorrupted || collectionCorrupted || collectionDetailsCorrupted - ? [null, NONE_BYTE_SIZE, true] - : tryReadOption(beet.coption(usesBeet), buf, cursor); - cursor += usesDelta; - - const anyCorrupted = - tokenCorrupted || - collectionCorrupted || - usesCorrupted || - collectionDetailsCorrupted; - - const args = { - key, - updateAuthority, - mint, - data, - primarySaleHappened, - isMutable, - tokenStandard: anyCorrupted ? null : tokenStandard, - collection: anyCorrupted ? null : collection, - collectionDetails: anyCorrupted ? null : collectionDetails, - uses: anyCorrupted ? null : uses, - }; - - return [Metadata.fromArgs(args), cursor]; + let cursor = offset; + + // key + const key = keyBeet.read(buf, cursor); + cursor += keyBeet.byteSize; + + // updateAuthority + const updateAuthority = beetBBA.publicKey.read(buf, cursor); + cursor += beetBBA.publicKey.byteSize; + + // mint + const mint = beetBBA.publicKey.read(buf, cursor); + cursor += beetBBA.publicKey.byteSize; + + // data + const [data, dataDelta] = dataBeet.deserialize(buf, cursor); + cursor = dataDelta; + + // primarySaleHappened + const primarySaleHappened = beet.bool.read(buf, cursor); + cursor += beet.bool.byteSize; + + // isMutable + const isMutable = beet.bool.read(buf, cursor); + cursor += beet.bool.byteSize; + + // tokenStandard + const [tokenStandard, tokenDelta, tokenCorrupted] = tryReadOption( + beet.coption(tokenStandardBeet), + buf, + cursor + ); + cursor += tokenDelta; + + // collection + const [collection, collectionDelta, collectionCorrupted] = tokenCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(collectionBeet), buf, cursor); + cursor += collectionDelta; + + // collection_details + const [ + collectionDetails, + collectionDetailsDelta, + collectionDetailsCorrupted, + ] = + tokenCorrupted || collectionCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(collectionDetailsBeet), buf, cursor); + cursor += collectionDetailsDelta; + + // uses + const [uses, usesDelta, usesCorrupted] = + tokenCorrupted || collectionCorrupted || collectionDetailsCorrupted + ? [null, NONE_BYTE_SIZE, true] + : tryReadOption(beet.coption(usesBeet), buf, cursor); + cursor += usesDelta; + + const anyCorrupted = + tokenCorrupted || + collectionCorrupted || + usesCorrupted || + collectionDetailsCorrupted; + + const args = { + key, + updateAuthority, + mint, + data, + primarySaleHappened, + isMutable, + tokenStandard: anyCorrupted ? null : tokenStandard, + collection: anyCorrupted ? null : collection, + collectionDetails: anyCorrupted ? null : collectionDetails, + uses: anyCorrupted ? null : uses, + }; + + return [Metadata.fromArgs(args), cursor]; } function tryReadOption( - optionBeet: beet.FixableBeet>, - buf: Buffer, - offset: number + optionBeet: beet.FixableBeet>, + buf: Buffer, + offset: number ): [T | null, number, boolean] { - try { - const fixed = optionBeet.toFixedFromData(buf, offset); - const value = fixed.read(buf, offset); - return [value, fixed.byteSize, false]; - } catch (e) { - return [null, NONE_BYTE_SIZE, true]; - } + try { + const fixed = optionBeet.toFixedFromData(buf, offset); + const value = fixed.read(buf, offset); + return [value, fixed.byteSize, false]; + } catch (e) { + return [null, NONE_BYTE_SIZE, true]; + } } diff --git a/metadata/js/src/instructions/CreateMetadataAccount.ts b/metadata/js/src/instructions/CreateMetadataAccount.ts index b1893d41..096f9ead 100644 --- a/metadata/js/src/instructions/CreateMetadataAccount.ts +++ b/metadata/js/src/instructions/CreateMetadataAccount.ts @@ -26,7 +26,7 @@ export const CreateMetadataAccountStruct = new beet.FixableBeetArgsStruct< ['instructionDiscriminator', beet.u8], ['createMetadataAccountArgs', createMetadataAccountArgsBeet], ], - 'CreateMetadataAccountInstructionArgs', + 'CreateMetadataAccountInstructionArgs' ); /** * Accounts required by the _CreateMetadataAccount_ instruction @@ -68,7 +68,7 @@ export const createMetadataAccountInstructionDiscriminator = 0; export function createCreateMetadataAccountInstruction( accounts: CreateMetadataAccountInstructionAccounts, args: CreateMetadataAccountInstructionArgs, - programId = new web3.PublicKey(PROGRAM_ADDRESS), + programId = new web3.PublicKey(PROGRAM_ADDRESS) ) { const [data] = CreateMetadataAccountStruct.serialize({ instructionDiscriminator: createMetadataAccountInstructionDiscriminator, diff --git a/metadata/js/src/types/Collection.ts b/metadata/js/src/types/Collection.ts index 4e2c0710..4c817313 100644 --- a/metadata/js/src/types/Collection.ts +++ b/metadata/js/src/types/Collection.ts @@ -15,5 +15,5 @@ export const collectionBeet = new beet.BeetArgsStruct( ['verified', beet.bool], ['key', beetBBA.publicKey], ], - 'Collection', + 'Collection' ); diff --git a/metadata/js/src/types/CollectionDetails.ts b/metadata/js/src/types/CollectionDetails.ts index 9840560d..574b8686 100644 --- a/metadata/js/src/types/CollectionDetails.ts +++ b/metadata/js/src/types/CollectionDetails.ts @@ -25,7 +25,7 @@ export type CollectionDetailsRecord = { export type CollectionDetails = beet.DataEnumKeyAsKind; export const isCollectionDetailsV1 = ( - x: CollectionDetails, + x: CollectionDetails ): x is CollectionDetails & { __kind: 'V1' } => x.__kind === 'V1'; /** @@ -36,7 +36,7 @@ export const collectionDetailsBeet = beet.dataEnum([ 'V1', new beet.BeetArgsStruct( [['size', beet.u64]], - 'CollectionDetailsRecord["V1"]', + 'CollectionDetailsRecord["V1"]' ), ], ]) as beet.FixableBeet; diff --git a/metadata/js/src/types/CreateMetadataAccountArgs.ts b/metadata/js/src/types/CreateMetadataAccountArgs.ts index 651aa00d..0164d872 100644 --- a/metadata/js/src/types/CreateMetadataAccountArgs.ts +++ b/metadata/js/src/types/CreateMetadataAccountArgs.ts @@ -18,5 +18,5 @@ export const createMetadataAccountArgsBeet = ['isMutable', beet.bool], ['collectionDetails', beet.coption(collectionDetailsBeet)], ], - 'CreateMetadataAccountArgs', + 'CreateMetadataAccountArgs' ); diff --git a/metadata/js/src/types/Creator.ts b/metadata/js/src/types/Creator.ts index 9b65bc81..6e8de4f9 100644 --- a/metadata/js/src/types/Creator.ts +++ b/metadata/js/src/types/Creator.ts @@ -17,5 +17,5 @@ export const creatorBeet = new beet.BeetArgsStruct( ['verified', beet.bool], ['share', beet.u8], ], - 'Creator', + 'Creator' ); diff --git a/metadata/js/src/types/Data.ts b/metadata/js/src/types/Data.ts index 15de07f6..f74956d9 100644 --- a/metadata/js/src/types/Data.ts +++ b/metadata/js/src/types/Data.ts @@ -4,27 +4,27 @@ import { Collection, collectionBeet } from './Collection'; import { Uses, usesBeet } from './Uses'; export type Data = { - name: string; - symbol: string; - uri: string; - sellerFeeBasisPoints: number; - creators: beet.COption; - collection: beet.COption; - uses: beet.COption; + name: string; + symbol: string; + uri: string; + sellerFeeBasisPoints: number; + creators: beet.COption; + collection: beet.COption; + uses: beet.COption; }; /** * @category userTypes */ export const dataBeet = new beet.FixableBeetArgsStruct( - [ - ['name', beet.utf8String], - ['symbol', beet.utf8String], - ['uri', beet.utf8String], - ['sellerFeeBasisPoints', beet.u16], - ['creators', beet.coption(beet.array(creatorBeet))], - ['collection', beet.coption(collectionBeet)], - ['uses', beet.coption(usesBeet)], - ], - 'Data' + [ + ['name', beet.utf8String], + ['symbol', beet.utf8String], + ['uri', beet.utf8String], + ['sellerFeeBasisPoints', beet.u16], + ['creators', beet.coption(beet.array(creatorBeet))], + ['collection', beet.coption(collectionBeet)], + ['uses', beet.coption(usesBeet)], + ], + 'Data' ); diff --git a/metadata/js/src/types/Key.ts b/metadata/js/src/types/Key.ts index 8ef4cc76..bb02d2d7 100644 --- a/metadata/js/src/types/Key.ts +++ b/metadata/js/src/types/Key.ts @@ -4,11 +4,14 @@ import * as beet from '@bbachain/beet'; * @category enums */ export enum Key { - Uninitialized, - Metadata, + Uninitialized, + Metadata, } /** * @category userTypes */ -export const keyBeet = beet.fixedScalarEnum(Key) as beet.FixedSizeBeet; +export const keyBeet = beet.fixedScalarEnum(Key) as beet.FixedSizeBeet< + Key, + Key +>; diff --git a/metadata/js/src/types/TokenStandard.ts b/metadata/js/src/types/TokenStandard.ts index 353ce04b..81c30a2f 100644 --- a/metadata/js/src/types/TokenStandard.ts +++ b/metadata/js/src/types/TokenStandard.ts @@ -11,7 +11,6 @@ export enum TokenStandard { /** * @category userTypes */ -export const tokenStandardBeet = beet.fixedScalarEnum(TokenStandard) as beet.FixedSizeBeet< - TokenStandard, +export const tokenStandardBeet = beet.fixedScalarEnum( TokenStandard ->; +) as beet.FixedSizeBeet; diff --git a/metadata/js/src/types/UseMethod.ts b/metadata/js/src/types/UseMethod.ts index d305e95c..d8b5f1ca 100644 --- a/metadata/js/src/types/UseMethod.ts +++ b/metadata/js/src/types/UseMethod.ts @@ -12,7 +12,6 @@ export enum UseMethod { /** * @category userTypes */ -export const useMethodBeet = beet.fixedScalarEnum(UseMethod) as beet.FixedSizeBeet< - UseMethod, +export const useMethodBeet = beet.fixedScalarEnum( UseMethod ->; +) as beet.FixedSizeBeet; diff --git a/metadata/js/src/types/Uses.ts b/metadata/js/src/types/Uses.ts index cec7f9b6..d907f00b 100644 --- a/metadata/js/src/types/Uses.ts +++ b/metadata/js/src/types/Uses.ts @@ -16,5 +16,5 @@ export const usesBeet = new beet.BeetArgsStruct( ['remaining', beet.u64], ['total', beet.u64], ], - 'Uses', + 'Uses' ); From 159e3ce0e9cc8e5cce5a9a387edd8df0e34d3fed Mon Sep 17 00:00:00 2001 From: Philip James Date: Sun, 27 Apr 2025 22:43:54 +0300 Subject: [PATCH 15/18] update program --- metadata/program/src/assertions/metadata.rs | 17 +- metadata/program/src/error.rs | 745 +++++++++++++++++- .../metadata/update_metadata_accounts.rs | 89 ++- metadata/program/src/utils/metadata.rs | 23 +- 4 files changed, 836 insertions(+), 38 deletions(-) diff --git a/metadata/program/src/assertions/metadata.rs b/metadata/program/src/assertions/metadata.rs index 82e7ad2b..9016cc92 100644 --- a/metadata/program/src/assertions/metadata.rs +++ b/metadata/program/src/assertions/metadata.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use solana_program::{entrypoint::ProgramResult, pubkey::Pubkey}; +use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; use crate::{ error::MetadataError, @@ -143,3 +143,18 @@ pub fn assert_data_valid( Ok(()) } + +pub fn assert_update_authority_is_correct( + metadata: &Metadata, + update_authority_info: &AccountInfo, +) -> ProgramResult { + if metadata.update_authority != *update_authority_info.key { + return Err(MetadataError::UpdateAuthorityIncorrect.into()); + } + + if !update_authority_info.is_signer { + return Err(MetadataError::UpdateAuthorityIsNotSigner.into()); + } + + Ok(()) +} diff --git a/metadata/program/src/error.rs b/metadata/program/src/error.rs index ee777c25..82b40f35 100644 --- a/metadata/program/src/error.rs +++ b/metadata/program/src/error.rs @@ -9,29 +9,50 @@ use thiserror::Error; /// Errors that may be returned by the Metadata program. #[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)] pub enum MetadataError { - #[error("This instruction was deprecated in a previous release and is now removed")] - Removed, //For the curious we cannot get rid of an instruction in the enum or move them or it will break our api, this is a friendly way to get rid of them - /// 0 Failed to unpack instruction data #[error("")] InstructionUnpackError, + /// Failed to pack instruction data + #[error("")] + InstructionPackError, + + /// Lamport balance below rent-exempt threshold. + #[error("Lamport balance below rent-exempt threshold")] + NotRentExempt, + + /// Already initialized + #[error("Already initialized")] + AlreadyInitialized, + + /// Uninitialized + #[error("Uninitialized")] + Uninitialized, + /// Metadata's key must match seed of ['metadata', program id, mint] provided #[error(" Metadata's key must match seed of ['metadata', program id, mint] provided")] InvalidMetadataKey, - /// NumericalOverflowError - #[error("NumericalOverflowError")] - NumericalOverflowError, + /// Edition's key must match seed of ['metadata', program id, name, 'edition'] provided + #[error("Edition's key must match seed of ['metadata', program id, name, 'edition'] provided")] + InvalidEditionKey, - /// Incorrect account owner - #[error("Incorrect account owner")] - IncorrectOwner, + /// Update Authority given does not match + #[error("Update Authority given does not match")] + UpdateAuthorityIncorrect, + + /// Update Authority needs to be signer to update metadata + #[error("Update Authority needs to be signer to update metadata")] + UpdateAuthorityIsNotSigner, /// You must be the mint authority and signer on this transaction #[error("You must be the mint authority and signer on this transaction")] NotMintAuthority, + /// 10 - Mint authority provided does not match the authority on the mint + #[error("Mint authority provided does not match the authority on the mint")] + InvalidMintAuthority, + /// Name too long #[error("Name too long")] NameTooLong, @@ -44,9 +65,93 @@ pub enum MetadataError { #[error("URI too long")] UriTooLong, - /// Basis points cannot be more than 10000 - #[error("Basis points cannot be more than 10000")] - InvalidBasisPoints, + /// Update authority must be equivalent to the metadata's authority and also signer of this transaction + #[error("")] + UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner, + + /// Mint given does not match mint on Metadata + #[error("Mint given does not match mint on Metadata")] + MintMismatch, + + /// Editions must have exactly one token + #[error("Editions must have exactly one token")] + EditionsMustHaveExactlyOneToken, + + /// Maximum editions printed already + #[error("")] + MaxEditionsMintedAlready, + + /// Token mint to failed + #[error("")] + TokenMintToFailed, + + /// The master edition record passed must match the master record on the edition given + #[error("")] + MasterRecordMismatch, + + /// 20 - The destination account does not have the right mint + #[error("")] + DestinationMintMismatch, + + /// An edition can only mint one of its kind! + #[error("")] + EditionAlreadyMinted, + + /// Printing mint decimals should be zero + #[error("")] + PrintingMintDecimalsShouldBeZero, + + /// OneTimePrintingAuthorizationMint mint decimals should be zero + #[error("")] + OneTimePrintingAuthorizationMintDecimalsShouldBeZero, + + /// Edition mint decimals should be zero + #[error("EditionMintDecimalsShouldBeZero")] + EditionMintDecimalsShouldBeZero, + + /// Token burn failed + #[error("")] + TokenBurnFailed, + + /// The One Time authorization mint does not match that on the token account! + #[error("")] + TokenAccountOneTimeAuthMintMismatch, + + /// Derived key invalid + #[error("Derived key invalid")] + DerivedKeyInvalid, + + /// The Printing mint does not match that on the master edition! + #[error("The Printing mint does not match that on the master edition!")] + PrintingMintMismatch, + + /// The One Time Printing Auth mint does not match that on the master edition! + #[error("The One Time Printing Auth mint does not match that on the master edition!")] + OneTimePrintingAuthMintMismatch, + + /// 30 - The mint of the token account does not match the Printing mint! + #[error("The mint of the token account does not match the Printing mint!")] + TokenAccountMintMismatch, + + /// The mint of the token account does not match the master metadata mint! + #[error("The mint of the token account does not match the master metadata mint!")] + TokenAccountMintMismatchV2, + + /// Not enough tokens to mint a limited edition + #[error("Not enough tokens to mint a limited edition")] + NotEnoughTokens, + + /// The mint on your authorization token holding account does not match your Printing mint! + #[error("")] + PrintingMintAuthorizationAccountMismatch, + + /// The authorization token account has a different owner than the update authority for the master edition! + #[error("")] + AuthorizationTokenAccountOwnerMismatch, + + /// This feature is currently disabled. + #[error("")] + Disabled, /// Creators list too long #[error("Creators list too long")] @@ -56,16 +161,69 @@ pub enum MetadataError { #[error("Creators must be at least one if set")] CreatorsMustBeAtleastOne, - /// 10 - Mint authority provided does not match the authority on the mint - #[error("Mint authority provided does not match the authority on the mint")] - InvalidMintAuthority, + /// If using a creators array, you must be one of the creators listed + #[error("")] + MustBeOneOfCreators, - /// Data type mismatch - #[error("Data type mismatch")] - DataTypeMismatch, + /// This metadata does not have creators + #[error("This metadata does not have creators")] + NoCreatorsPresentOnMetadata, - #[error("Verified creators cannot be removed.")] - CannotRemoveVerifiedCreator, + /// 40 - This creator address was not found + #[error("This creator address was not found")] + CreatorNotFound, + + /// Basis points cannot be more than 10000 + #[error("Basis points cannot be more than 10000")] + InvalidBasisPoints, + + /// Primary sale can only be flipped to true and is immutable + #[error("Primary sale can only be flipped to true and is immutable")] + PrimarySaleCanOnlyBeFlippedToTrue, + + /// Owner does not match that on the account given + #[error("Owner does not match that on the account given")] + OwnerMismatch, + + /// This account has no tokens to be used for authorization + #[error("This account has no tokens to be used for authorization")] + NoBalanceInAccountForAuthorization, + + /// Share total must equal 100 for creator array + #[error("Share total must equal 100 for creator array")] + ShareTotalMustBe100, + + /// This reservation list already exists! + #[error("")] + ReservationExists, + + /// This reservation list does not exist! + #[error("")] + ReservationDoesNotExist, + + /// This reservation list exists but was never set with reservations + #[error("")] + ReservationNotSet, + + /// This reservation list has already been set! + #[error("")] + ReservationAlreadyMade, + + /// 50 - Provided more addresses than max allowed in single reservation + #[error("")] + BeyondMaxAddressSize, + + /// NumericalOverflowError + #[error("NumericalOverflowError")] + NumericalOverflowError, + + /// This reservation would go beyond the maximum supply of the master edition! + #[error("")] + ReservationBreachesMaximumSupply, + + /// Address not in reservation! + #[error("")] + AddressNotInReservation, /// You cannot unilaterally verify another creator, they must sign #[error("You cannot unilaterally verify another creator, they must sign")] @@ -75,14 +233,87 @@ pub enum MetadataError { #[error("You cannot unilaterally unverify another creator")] CannotUnverifyAnotherCreator, - /// Share total must equal 100 for creator array - #[error("Share total must equal 100 for creator array")] - ShareTotalMustBe100, + /// In initial reservation setting, spots remaining should equal total spots + #[error("")] + SpotMismatch, + + /// Incorrect account owner + #[error("Incorrect account owner")] + IncorrectOwner, + + /// printing these tokens would breach the maximum supply limit of the master edition + #[error("")] + PrintingWouldBreachMaximumSupply, + + /// Data is immutable + #[error("Data is immutable")] + DataIsImmutable, /// 60 - No duplicate creator addresses #[error("No duplicate creator addresses")] DuplicateCreatorAddress, + /// Reservation spots remaining should match total spots when first being created + #[error("")] + ReservationSpotsRemainingShouldMatchTotalSpotsAtStart, + + /// Invalid token program + #[error("Invalid token program")] + InvalidTokenProgram, + + /// Data type mismatch + #[error("Data type mismatch")] + DataTypeMismatch, + + /// Beyond alotted address size in reservation! + #[error("")] + BeyondAlottedAddressSize, + + /// The reservation has only been partially alotted + #[error("")] + ReservationNotComplete, + + /// You cannot splice over an existing reservation! + #[error("")] + TriedToReplaceAnExistingReservation, + + /// Invalid operation + #[error("Invalid operation")] + InvalidOperation, + + /// Invalid owner + #[error("Invalid Owner")] + InvalidOwner, + + /// Printing mint supply must be zero for conversion + #[error("Printing mint supply must be zero for conversion")] + PrintingMintSupplyMustBeZeroForConversion, + + /// 70 - One Time Auth mint supply must be zero for conversion + #[error("One Time Auth mint supply must be zero for conversion")] + OneTimeAuthMintSupplyMustBeZeroForConversion, + + /// You tried to insert one edition too many into an edition mark pda + #[error("You tried to insert one edition too many into an edition mark pda")] + InvalidEditionIndex, + + // In the legacy system the reservation needs to be of size one for cpu limit reasons + #[error("")] + ReservationArrayShouldBeSizeOne, + + /// Is Mutable can only be flipped to false + #[error("Is Mutable can only be flipped to false")] + IsMutableCanOnlyBeFlippedToFalse, + + #[error("Collection cannot be verified in this instruction")] + CollectionCannotBeVerifiedInThisInstruction, + + #[error("This instruction was deprecated in a previous release and is now removed")] + Removed, //For the curious we cannot get rid of an instruction in the enum or move them or it will break our api, this is a friendly way to get rid of them + + #[error("")] + MustBeBurned, + #[error("This use method is invalid")] InvalidUseMethod, @@ -92,16 +323,480 @@ pub enum MetadataError { #[error("Cannot Change Remaining or Available uses after the first use")] CannotChangeUsesAfterFirstUse, - #[error("Collection cannot be verified in this instruction")] - CollectionCannotBeVerifiedInThisInstruction, + // 80 + #[error("Collection Not Found on Metadata")] + CollectionNotFound, + + #[error("Collection Update Authority is invalid")] + InvalidCollectionUpdateAuthority, + + #[error("Collection Must Be a Unique Master Edition v2")] + CollectionMustBeAUniqueMasterEdition, + + #[error("The Use Authority Record Already Exists, to modify it Revoke, then Approve")] + UseAuthorityRecordAlreadyExists, + + #[error("The Use Authority Record is empty or already revoked")] + UseAuthorityRecordAlreadyRevoked, + + #[error("This token has no uses")] + Unusable, + + #[error("There are not enough Uses left on this token.")] + NotEnoughUses, + + #[error("This Collection Authority Record Already Exists.")] + CollectionAuthorityRecordAlreadyExists, + + #[error("This Collection Authority Record Does Not Exist.")] + CollectionAuthorityDoesNotExist, + + #[error("This Use Authority Record is invalid.")] + InvalidUseAuthorityRecord, + + // 90 + #[error("")] + InvalidCollectionAuthorityRecord, + + #[error("Metadata does not match the freeze authority on the mint")] + InvalidFreezeAuthority, + + #[error("All tokens in this account have not been delegated to this user.")] + InvalidDelegate, + + #[error("")] + CannotAdjustVerifiedCreator, + + #[error("Verified creators cannot be removed.")] + CannotRemoveVerifiedCreator, + + #[error("")] + CannotWipeVerifiedCreators, + + #[error("")] + NotAllowedToChangeSellerFeeBasisPoints, + + /// Edition override cannot be zero + #[error("Edition override cannot be zero")] + EditionOverrideCannotBeZero, + + #[error("Invalid User")] + InvalidUser, + + /// Revoke Collection Authority signer is incorrect + #[error("Revoke Collection Authority signer is incorrect")] + RevokeCollectionAuthoritySignerIncorrect, + + // 100 + #[error("")] + TokenCloseFailed, + + /// 101 - Calling v1.3 function on unsized collection + #[error("Can't use this function on unsized collection")] + UnsizedCollection, + + /// 102 - Calling v1.2 function on a sized collection + #[error("Can't use this function on a sized collection")] + SizedCollection, + + /// 103 - Missing collection metadata account. + #[error("Missing collection metadata account")] + MissingCollectionMetadata, + + /// 104 - This NFT is not a member of the specified collection. + #[error("This NFT is not a member of the specified collection.")] + NotAMemberOfCollection, + + /// 105 - This NFT is not a verified member of the specified collection. + #[error("This NFT is not a verified member of the specified collection.")] + NotVerifiedMemberOfCollection, + + /// 106 - This NFT is not a collection parent NFT. + #[error("This NFT is not a collection parent NFT.")] + NotACollectionParent, + + /// 107 - Could not determine a TokenStandard type. + #[error("Could not determine a TokenStandard type.")] + CouldNotDetermineTokenStandard, + + /// 108 - Missing edition account for a non-fungible token type. + #[error("This mint account has an edition but none was provided.")] + MissingEditionAccount, + + /// 109 - Not a Master Edition + #[error("This edition is not a Master Edition")] + NotAMasterEdition, + + /// 110 - Master Edition has prints. + #[error("This Master Edition has existing prints")] + MasterEditionHasPrints, + + /// 111 - Borsh Deserialization Error + #[error("")] + BorshDeserializationError, + + /// 112 - Cannot update a verified colleciton in this command + #[error("Cannot update a verified collection in this command")] + CannotUpdateVerifiedCollection, + + /// 113 - Edition Account Doesnt Match Collection + #[error("Edition account doesnt match collection ")] + CollectionMasterEditionAccountInvalid, + + /// 114 - Item is already verified. + #[error("Item is already verified.")] + AlreadyVerified, + + /// 115 - Item is already unverified. + #[error("")] + AlreadyUnverified, + + /// 116 - Not a Print Edition + #[error("This edition is not a Print Edition")] + NotAPrintEdition, + + /// 117 - Invalid Edition Marker + #[error("Invalid Master Edition")] + InvalidMasterEdition, + + /// 118 - Invalid Edition Marker + #[error("Invalid Print Edition")] + InvalidPrintEdition, + + /// 119 - Invalid Edition Marker + #[error("Invalid Edition Marker")] + InvalidEditionMarker, + + /// 120 - Reservation List is Deprecated + #[error("Reservation List is Deprecated")] + ReservationListDeprecated, + + /// 121 - Print Edition doesn't match Master Edition + #[error("Print Edition does not match Master Edition")] + PrintEditionDoesNotMatchMasterEdition, + + /// 122 - Edition Number greater than max supply + #[error("Edition Number greater than max supply")] + EditionNumberGreaterThanMaxSupply, + + /// 123 - Must unverify before migrating collections. + #[error("Must unverify before migrating collections.")] + MustUnverify, + + /// 124 - Invalid Escrow Account Bump Seed + #[error("Invalid Escrow Account Bump Seed")] + InvalidEscrowBumpSeed, + + /// 125 - Must be Escrow Authority + #[error("Must Escrow Authority")] + MustBeEscrowAuthority, + + /// 126 - Invalid System Program + #[error("Invalid System Program")] + InvalidSystemProgram, + + /// 127 - Must be a Non Fungible Token + #[error("Must be a Non Fungible Token")] + MustBeNonFungible, + + /// 128 - Insufficient tokens for transfer + #[error("Insufficient tokens for transfer")] + InsufficientTokens, + + /// 129 - Borsh Serialization Error + #[error("Borsh Serialization Error")] + BorshSerializationError, + + /// 130 - Cannot create NFT with no Freeze Authority. + #[error("Cannot create NFT with no Freeze Authority.")] + NoFreezeAuthoritySet, + + /// 131 + #[error("Invalid collection size change")] + InvalidCollectionSizeChange, + + /// 132 + #[error("Invalid bubblegum signer")] + InvalidBubblegumSigner, + /// 133 + #[error("Escrow parent cannot have a delegate")] + EscrowParentHasDelegate, + + /// 134 + #[error("Mint needs to be signer to initialize the account")] + MintIsNotSigner, + + /// 135 + #[error("Invalid token standard")] + InvalidTokenStandard, + + /// 136 + #[error("Invalid mint account for specified token standard")] + InvalidMintForTokenStandard, + + /// 137 + #[error("Invalid authorization rules account")] + InvalidAuthorizationRules, + + /// 138 + #[error("Missing authorization rules account")] + MissingAuthorizationRules, + + /// 139 + #[error("Missing programmable configuration")] + MissingProgrammableConfig, + + /// 140 + #[error("Invalid programmable configuration")] + InvalidProgrammableConfig, + + /// 141 + #[error("Delegate already exists")] + DelegateAlreadyExists, + + /// 142 + #[error("Delegate not found")] + DelegateNotFound, + + /// 143 + #[error("Required account not set in instruction builder")] + MissingAccountInBuilder, + + /// 144 + #[error("Required argument not set in instruction builder")] + MissingArgumentInBuilder, + + /// 145 + #[error("Feature not supported currently")] + FeatureNotSupported, + + /// 146 + #[error("Invalid system wallet")] + InvalidSystemWallet, + + /// 147 + #[error("Only the sale delegate can transfer while its set")] + OnlySaleDelegateCanTransfer, + + /// 148 + #[error("Missing token account")] + MissingTokenAccount, + + /// 149 + #[error("Missing SPL token program")] + MissingSplTokenProgram, + + /// 150 + #[error("Missing authorization rules program")] + MissingAuthorizationRulesProgram, + + /// 151 + #[error("Invalid delegate role for transfer")] + InvalidDelegateRoleForTransfer, + + /// 152 + #[error("Invalid transfer authority")] + InvalidTransferAuthority, + + /// 153 + #[error("Instruction not supported for ProgrammableNonFungible assets")] + InstructionNotSupported, + + /// 154 + #[error("Public key does not match expected value")] + KeyMismatch, + + /// 155 + #[error("Token is locked")] + LockedToken, + + /// 156 + #[error("Token is unlocked")] + UnlockedToken, + + /// 157 + #[error("Missing delegate role")] + MissingDelegateRole, + + /// 158 + #[error("Invalid authority type")] + InvalidAuthorityType, + + /// 159 + #[error("Missing token record account")] + MissingTokenRecord, + + /// 160 + #[error("Mint supply must be zero for programmable assets")] + MintSupplyMustBeZero, + + /// 161 + #[error("Data is empty or zeroed")] + DataIsEmptyOrZeroed, + + /// 162 + #[error("Missing token owner")] + MissingTokenOwnerAccount, + + /// 163 + #[error("Master edition account has an invalid length")] + InvalidMasterEditionAccountLength, + + /// 164 + #[error("Incorrect token state")] + IncorrectTokenState, + + /// 165 + #[error("Invalid delegate role")] + InvalidDelegateRole, + + /// 166 + #[error("Print supply is required for non-fungibles")] + MissingPrintSupply, + + /// 167 + #[error("Missing master edition account")] + MissingMasterEditionAccount, + + /// 168 + #[error("Amount must be greater than zero")] + AmountMustBeGreaterThanZero, + + /// 169 + #[error("Invalid delegate args")] + InvalidDelegateArgs, + + /// 170 + #[error("Missing address for locked transfer")] + MissingLockedTransferAddress, + + /// 171 + #[error("Invalid destination address for locked transfer")] + InvalidLockedTransferAddress, + + /// 172 + #[error("Exceeded account realloc increase limit")] + DataIncrementLimitExceeded, + + /// 173 + #[error("Cannot update the rule set of a programmable asset that has a delegate")] + CannotUpdateAssetWithDelegate, + + /// 174 + #[error("Invalid token amount for this operation or token standard")] + InvalidAmount, + + /// 175 + #[error("Missing master edition mint account")] + MissingMasterEditionMintAccount, + + /// 176 + #[error("Missing master edition token account")] + MissingMasterEditionTokenAccount, + + /// 177 + #[error("Missing edition marker account")] + MissingEditionMarkerAccount, + + /// 178 + #[error("Cannot burn while persistent delegate is set")] + CannotBurnWithDelegate, + + /// 179 + #[error("Missing edition account")] + MissingEdition, + + /// 180 + #[error("Invalid Associated Token Account Program")] + InvalidAssociatedTokenAccountProgram, + + /// 181 + #[error("Invalid InstructionsSysvar")] + InvalidInstructionsSysvar, + + /// 182 + #[error("Invalid or Unneeded parent accounts")] + InvalidParentAccounts, + + /// 183 + #[error("Authority cannot apply all update args")] + InvalidUpdateArgs, + + /// 184 + #[error("Token account does not have enough tokens")] + InsufficientTokenBalance, + + /// 185 + #[error("Missing collection account")] + MissingCollectionMint, + + /// 186 + #[error("Missing collection master edition account")] + MissingCollectionMasterEdition, + + /// 187 + #[error("Invalid token record account")] + InvalidTokenRecord, + + /// 188 + #[error("The close authority needs to be revoked by the Utility Delegate")] + InvalidCloseAuthority, /// 189 #[error("Invalid or removed instruction")] InvalidInstruction, + /// 190 + #[error("Missing delegate record")] + MissingDelegateRecord, + + /// 191 + #[error("")] + InvalidFeeAccount, + + /// 192 + #[error("")] + InvalidMetadataFlags, + + /// 193 + #[error("Cannot change the update authority with a delegate")] + CannotChangeUpdateAuthorityWithDelegate, + + /// 194 + #[error("Invalid mint extension type")] + InvalidMintExtensionType, + + /// 195 + #[error("Invalid mint close authority")] + InvalidMintCloseAuthority, + + /// 196 + #[error("Invalid metadata pointer")] + InvalidMetadataPointer, + + /// 197 + #[error("Invalid token extension type")] + InvalidTokenExtensionType, + + /// 198 + #[error("Missing immutable owner extension")] + MissingImmutableOwnerExtension, + /// 199 #[error("Expected account to be uninitialized")] ExpectedUninitializedAccount, + + /// 200 + #[error("Edition account has an invalid length")] + InvalidEditionAccountLength, + + /// 201 + #[error("Account has already been resized")] + AccountAlreadyResized, + + /// 202 + #[error("Conditions for closing not met")] + ConditionsForClosingNotMet, } impl PrintProgramError for MetadataError { diff --git a/metadata/program/src/processor/metadata/update_metadata_accounts.rs b/metadata/program/src/processor/metadata/update_metadata_accounts.rs index 83f7c86d..ddb28297 100644 --- a/metadata/program/src/processor/metadata/update_metadata_accounts.rs +++ b/metadata/program/src/processor/metadata/update_metadata_accounts.rs @@ -1,15 +1,88 @@ use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; -use crate::state::Data; +use crate::{ + assertions::{ + assert_owned_by, + collection::assert_collection_update_is_valid, + metadata::{assert_data_valid, assert_update_authority_is_correct}, + uses::assert_valid_use, + }, + error::MetadataError, + processor::all_account_infos, + state::{Data, Metadata, TokenMetadataAccount}, + utils::{metadata::clean_write_metadata, puff_out_data_fields}, +}; // Update existing account instruction pub fn process_update_metadata_accounts( - _program_id: &Pubkey, - _accounts: &[AccountInfo], - _optional_data: Option, - _update_authority: Option, - _primary_sale_happened: Option, - _is_mutable: Option, + program_id: &Pubkey, + accounts: &[AccountInfo], + optional_data: Option, + update_authority: Option, + primary_sale_happened: Option, + is_mutable: Option, ) -> ProgramResult { - todo!("process_update_metadata_accounts"); + all_account_infos!(accounts, metadata_account_info, update_authority_info); + + let mut metadata = Metadata::from_account_info(metadata_account_info)?; + + assert_owned_by(metadata_account_info, program_id)?; + assert_update_authority_is_correct(&metadata, update_authority_info)?; + + if let Some(data) = optional_data { + if metadata.is_mutable { + assert_data_valid( + &data, + update_authority_info.key, + &metadata, + false, + update_authority_info.is_signer, + )?; + metadata.data = data.clone(); + // If the user passes in Collection data, only allow updating if it's unverified + // or if it exactly matches the existing collection info. + // If the user passes in None for the Collection data then only set it if it's unverified. + if data.collection.is_some() { + assert_collection_update_is_valid(&metadata.collection, &data.collection)?; + metadata.collection = data.collection; + } else if let Some(collection) = metadata.collection.as_ref() { + // Can't change a verified collection in this command. + if collection.verified { + return Err(MetadataError::CannotUpdateVerifiedCollection.into()); + } + // If it's unverified, it's ok to set to None. + metadata.collection = data.collection; + } + // If already None leave it as None. + assert_valid_use(&data.uses, &metadata.uses)?; + metadata.uses = data.uses; + } else { + return Err(MetadataError::DataIsImmutable.into()); + } + } + + if let Some(val) = update_authority { + metadata.update_authority = val; + } + + if let Some(val) = primary_sale_happened { + // If received val is true, flip to true. + if val || !metadata.primary_sale_happened { + metadata.primary_sale_happened = val + } else { + return Err(MetadataError::PrimarySaleCanOnlyBeFlippedToTrue.into()); + } + } + + if let Some(val) = is_mutable { + // If received value is false, flip to false. + if !val || metadata.is_mutable { + metadata.is_mutable = val + } else { + return Err(MetadataError::IsMutableCanOnlyBeFlippedToFalse.into()); + } + } + + puff_out_data_fields(&mut metadata); + clean_write_metadata(&mut metadata, metadata_account_info) } diff --git a/metadata/program/src/utils/metadata.rs b/metadata/program/src/utils/metadata.rs index f17ad5bb..18027533 100644 --- a/metadata/program/src/utils/metadata.rs +++ b/metadata/program/src/utils/metadata.rs @@ -1,7 +1,5 @@ use borsh::{maybestd::io::Error as BorshError, BorshDeserialize}; -use solana_program::{ - account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, -}; +use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; use spl_utils::{ create_or_allocate_account_raw, token::{get_mint_authority, SPL_TOKEN_PROGRAM_IDS}, @@ -16,7 +14,7 @@ use crate::{ }, state::{ Collection, CollectionDetails, Data, Key, Metadata, TokenStandard, Uses, MAX_METADATA_LEN, - PREFIX, + METADATA_FEE_FLAG_OFFSET, PREFIX, }, }; @@ -192,3 +190,20 @@ pub fn meta_deser_unchecked(buf: &mut &[u8]) -> Result { Ok(metadata) } + +pub fn clean_write_metadata( + metadata: &mut Metadata, + metadata_account_info: &AccountInfo, +) -> ProgramResult { + let end = metadata_account_info + .data_len() + .checked_sub(METADATA_FEE_FLAG_OFFSET) + .ok_or(MetadataError::NumericalOverflowError)?; + // Clear all data to ensure it is serialized cleanly with no trailing data due to creators array resizing. + let mut metadata_account_info_data = metadata_account_info.try_borrow_mut_data()?; + // Don't overwrite fee flag. + metadata_account_info_data[0..end].fill(0); + + metadata.save(&mut metadata_account_info_data)?; + Ok(()) +} From 37c44b697246001fa397bed33edf0ca83a1b1e64 Mon Sep 17 00:00:00 2001 From: Philip James Date: Sun, 27 Apr 2025 23:17:23 +0300 Subject: [PATCH 16/18] npm lib update metadata --- metadata/js/package.json | 2 +- .../src/instructions/UpdateMetadataAccount.ts | 83 +++++++++++++++++++ metadata/js/src/instructions/index.ts | 1 + .../js/src/types/UpdateMetadataAccountArgs.ts | 25 ++++++ metadata/js/src/types/index.ts | 1 + 5 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 metadata/js/src/instructions/UpdateMetadataAccount.ts create mode 100644 metadata/js/src/types/UpdateMetadataAccountArgs.ts diff --git a/metadata/js/package.json b/metadata/js/package.json index b1df2fa8..ecf736e2 100644 --- a/metadata/js/package.json +++ b/metadata/js/package.json @@ -1,6 +1,6 @@ { "name": "@bbachain/spl-token-metadata", - "version": "0.1.0", + "version": "0.1.1", "author": "BBAChain Labs ", "repository": "https://github.com/bbachain/program-executor", "license": "Apache-2.0", diff --git a/metadata/js/src/instructions/UpdateMetadataAccount.ts b/metadata/js/src/instructions/UpdateMetadataAccount.ts new file mode 100644 index 00000000..28bd905c --- /dev/null +++ b/metadata/js/src/instructions/UpdateMetadataAccount.ts @@ -0,0 +1,83 @@ +import * as beet from '@bbachain/beet'; +import * as web3 from '@bbachain/web3.js'; +import { + UpdateMetadataAccountArgs, + updateMetadataAccountArgsBeet, +} from '../types'; +import { PROGRAM_ADDRESS } from '..'; + +/** + * @category Instructions + * @category UpdateMetadataAccount + */ +export type UpdateMetadataAccountInstructionArgs = { + updateMetadataAccountArgs: UpdateMetadataAccountArgs; +}; +/** + * @category Instructions + * @category UpdateMetadataAccount + */ +export const UpdateMetadataAccountStruct = new beet.FixableBeetArgsStruct< + UpdateMetadataAccountInstructionArgs & { + instructionDiscriminator: number; + } +>( + [ + ['instructionDiscriminator', beet.u8], + ['updateMetadataAccountArgs', updateMetadataAccountArgsBeet], + ], + 'UpdateMetadataAccountInstructionArgs' +); +/** + * Accounts required by the _UpdateMetadataAccount_ instruction + * + * @property [_writable_] metadata Metadata account + * @property [**signer**] updateAuthority Update authority key + * @category Instructions + * @category UpdateMetadataAccount + */ +export type UpdateMetadataAccountInstructionAccounts = { + metadata: web3.PublicKey; + updateAuthority: web3.PublicKey; +}; + +export const updateMetadataAccountInstructionDiscriminator = 1; + +/** + * Creates a _UpdateMetadataAccount_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category UpdateMetadataAccount + */ +export function createUpdateMetadataAccountInstruction( + accounts: UpdateMetadataAccountInstructionAccounts, + args: UpdateMetadataAccountInstructionArgs, + programId = new web3.PublicKey(PROGRAM_ADDRESS) +) { + const [data] = UpdateMetadataAccountStruct.serialize({ + instructionDiscriminator: updateMetadataAccountInstructionDiscriminator, + ...args, + }); + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.metadata, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.updateAuthority, + isWritable: false, + isSigner: true, + }, + ]; + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }); + return ix; +} diff --git a/metadata/js/src/instructions/index.ts b/metadata/js/src/instructions/index.ts index 731fb680..f79f0865 100644 --- a/metadata/js/src/instructions/index.ts +++ b/metadata/js/src/instructions/index.ts @@ -1 +1,2 @@ export * from './CreateMetadataAccount'; +export * from './UpdateMetadataAccount'; diff --git a/metadata/js/src/types/UpdateMetadataAccountArgs.ts b/metadata/js/src/types/UpdateMetadataAccountArgs.ts new file mode 100644 index 00000000..b09a0827 --- /dev/null +++ b/metadata/js/src/types/UpdateMetadataAccountArgs.ts @@ -0,0 +1,25 @@ +import * as beet from '@bbachain/beet'; +import * as beetBBA from '@bbachain/beet-bbachain'; +import * as web3 from '@bbachain/web3.js'; +import { Data, dataBeet } from './Data'; + +export type UpdateMetadataAccountArgs = { + data: beet.COption; + updateAuthority: beet.COption; + primarySaleHappened: beet.COption; + isMutable: beet.COption; +}; + +/** + * @category userTypes + */ +export const updateMetadataAccountArgsBeet = + new beet.FixableBeetArgsStruct( + [ + ['data', beet.coption(dataBeet)], + ['updateAuthority', beet.coption(beetBBA.publicKey)], + ['primarySaleHappened', beet.coption(beet.bool)], + ['isMutable', beet.coption(beet.bool)], + ], + 'UpdateMetadataAccountArgs' + ); diff --git a/metadata/js/src/types/index.ts b/metadata/js/src/types/index.ts index ead140d8..16da513e 100644 --- a/metadata/js/src/types/index.ts +++ b/metadata/js/src/types/index.ts @@ -5,5 +5,6 @@ export * from './Creator'; export * from './Data'; export * from './Key'; export * from './TokenStandard'; +export * from './UpdateMetadataAccountArgs'; export * from './UseMethod'; export * from './Uses'; From 398316602193ff3422271ebbe4f6d89fa2b03fb4 Mon Sep 17 00:00:00 2001 From: Philip James Date: Mon, 28 Apr 2025 21:54:01 +0300 Subject: [PATCH 17/18] change program id --- metadata/program/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/program/src/lib.rs b/metadata/program/src/lib.rs index 4ade945d..c7b07719 100644 --- a/metadata/program/src/lib.rs +++ b/metadata/program/src/lib.rs @@ -15,4 +15,4 @@ pub mod utils; pub use solana_program; // SPL Token Metadata Program ID -solana_program::declare_id!("metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F"); +solana_program::declare_id!("meta9hXUUHmM7FT8haXiCVsw168kWb8UkFFhAWMEzim"); From 7829fe8b687645ccf820316fb6df5c8ea8843442 Mon Sep 17 00:00:00 2001 From: Philip James Date: Mon, 28 Apr 2025 21:54:33 +0300 Subject: [PATCH 18/18] change program id --- metadata/js/package.json | 2 +- metadata/js/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata/js/package.json b/metadata/js/package.json index ecf736e2..58ab821c 100644 --- a/metadata/js/package.json +++ b/metadata/js/package.json @@ -1,6 +1,6 @@ { "name": "@bbachain/spl-token-metadata", - "version": "0.1.1", + "version": "0.1.2", "author": "BBAChain Labs ", "repository": "https://github.com/bbachain/program-executor", "license": "Apache-2.0", diff --git a/metadata/js/src/index.ts b/metadata/js/src/index.ts index f0eacfad..9e67f4e0 100644 --- a/metadata/js/src/index.ts +++ b/metadata/js/src/index.ts @@ -9,7 +9,7 @@ export * from './types'; * * @category constants */ -export const PROGRAM_ADDRESS = 'metaAig5QsCBSfstkwqPQxzdjXdUB8JxjfvtvEPNe3F'; +export const PROGRAM_ADDRESS = 'meta9hXUUHmM7FT8haXiCVsw168kWb8UkFFhAWMEzim'; /** * Program public key