From 9f4dd158330b1681d7d2388601636e4a8cf48422 Mon Sep 17 00:00:00 2001 From: kagren Date: Thu, 9 May 2024 19:44:00 +0200 Subject: [PATCH] Added instruction, set_metaplex_update_authority, for updating the metaplex metadata authority for the mint token --- .vscode/settings.json | 2 +- Anchor.toml | 9 + Cargo.lock | 2 + package.json | 2 + programs/quarry-mint-wrapper/Cargo.toml | 2 + .../src/account_validators.rs | 12 + .../src/instructions/mod.rs | 2 + .../set_metaplex_update_authority.rs | 245 +++++++ programs/quarry-mint-wrapper/src/lib.rs | 7 + scripts/generate-idl-types.sh | 8 +- scripts/parse-idls.sh | 3 +- src/wrappers/mintWrapper/mintWrapper.ts | 115 +++- tests/mintWrapper.spec.ts | 86 ++- yarn.lock | 613 +++++++++++++++++- 14 files changed, 1093 insertions(+), 15 deletions(-) create mode 100644 programs/quarry-mint-wrapper/src/instructions/set_metaplex_update_authority.rs diff --git a/.vscode/settings.json b/.vscode/settings.json index 57caea41..a9d3492b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,5 @@ "eslint.nodePath": ".yarn/sdks", "typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, - "prettier.prettierPath": ".yarn/sdks/prettier/index.js" + "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs" } diff --git a/Anchor.toml b/Anchor.toml index 160bcf5a..33e247ab 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -18,6 +18,7 @@ quarry_mint_wrapper = "QMWoBmAyJLAsA1Lh9ugMTw2gciTihncciphzdNzdZYV" quarry_operator = "QoP6NfrQbaGnccXQrMLUkog2tQZ4C1RFgJcwDnT8Kmz" quarry_redeemer = "QRDxhMw1P2NEfiw5mYXG79bwfgHTdasY2xNP76XSea9" quarry_registry = "QREGBnEj9Sa5uR91AV8u3FxThgP5ZCvdZUW2bHAkfNc" +token_metadata = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" [programs.devnet] quarry_merge_mine = "QMMD16kjauP5knBwxNUJRZ1Z5o3deBuFrqVjBVmmqto" @@ -26,6 +27,7 @@ quarry_mint_wrapper = "QMWoBmAyJLAsA1Lh9ugMTw2gciTihncciphzdNzdZYV" quarry_operator = "QoP6NfrQbaGnccXQrMLUkog2tQZ4C1RFgJcwDnT8Kmz" quarry_redeemer = "QRDxhMw1P2NEfiw5mYXG79bwfgHTdasY2xNP76XSea9" quarry_registry = "QREGBnEj9Sa5uR91AV8u3FxThgP5ZCvdZUW2bHAkfNc" +token_metadata = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" [programs.testnet] quarry_merge_mine = "QMMD16kjauP5knBwxNUJRZ1Z5o3deBuFrqVjBVmmqto" @@ -34,6 +36,7 @@ quarry_mint_wrapper = "QMWoBmAyJLAsA1Lh9ugMTw2gciTihncciphzdNzdZYV" quarry_operator = "QoP6NfrQbaGnccXQrMLUkog2tQZ4C1RFgJcwDnT8Kmz" quarry_redeemer = "QRDxhMw1P2NEfiw5mYXG79bwfgHTdasY2xNP76XSea9" quarry_registry = "QREGBnEj9Sa5uR91AV8u3FxThgP5ZCvdZUW2bHAkfNc" +token_metadata = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" [programs.localnet] quarry_merge_mine = "QMMD16kjauP5knBwxNUJRZ1Z5o3deBuFrqVjBVmmqto" @@ -42,3 +45,9 @@ quarry_mint_wrapper = "QMWoBmAyJLAsA1Lh9ugMTw2gciTihncciphzdNzdZYV" quarry_operator = "QoP6NfrQbaGnccXQrMLUkog2tQZ4C1RFgJcwDnT8Kmz" quarry_redeemer = "QRDxhMw1P2NEfiw5mYXG79bwfgHTdasY2xNP76XSea9" quarry_registry = "QREGBnEj9Sa5uR91AV8u3FxThgP5ZCvdZUW2bHAkfNc" +token_metadata = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + +[test.validator] +[[test.genesis]] +address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" +program = "target/deploy/token_metadata.so" \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 0e7e3ebf..b41010de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1042,6 +1042,8 @@ version = "5.3.0" dependencies = [ "anchor-lang", "anchor-spl", + "borsh 0.9.3", + "solana-program", "solana-security-txt", "vipers", ] diff --git a/package.json b/package.json index 70e6435a..242773a4 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,12 @@ "lint": "eslint . --cache", "lint:ci": "eslint . --max-warnings=0", "test:e2e": "anchor test --skip-build 'tests/**/*.ts'", + "test:e2e:mintwrapper": "anchor test --skip-build 'tests/**/*mintWrapper*.ts'", "docs:generate": "typedoc --excludePrivate --includeVersion --out site/ts/ src/index.ts", "prepare": "husky install" }, "devDependencies": { + "@metaplex-foundation/mpl-token-metadata": "2.8.6", "@project-serum/anchor": "^0.25.0", "@rushstack/eslint-patch": "^1.2.0", "@saberhq/anchor-contrib": "^1.14.8", diff --git a/programs/quarry-mint-wrapper/Cargo.toml b/programs/quarry-mint-wrapper/Cargo.toml index 12fb2ad2..3bc0155e 100644 --- a/programs/quarry-mint-wrapper/Cargo.toml +++ b/programs/quarry-mint-wrapper/Cargo.toml @@ -24,3 +24,5 @@ anchor-lang = ">=0.22, <=0.25" anchor-spl = ">=0.22, <=0.25" solana-security-txt = "1.0.1" vipers = "^2.0" +solana-program = "1.9.16" +borsh = ">=0.9.0,<1.0.0" \ No newline at end of file diff --git a/programs/quarry-mint-wrapper/src/account_validators.rs b/programs/quarry-mint-wrapper/src/account_validators.rs index c9fb66b1..b1435603 100644 --- a/programs/quarry-mint-wrapper/src/account_validators.rs +++ b/programs/quarry-mint-wrapper/src/account_validators.rs @@ -54,6 +54,18 @@ impl<'info> Validate<'info> for PerformMint<'info> { } } +impl<'info> Validate<'info> for SetMetaplexUpdateAuthority<'info> { + fn validate(&self) -> Result<()> { + invariant!( + self.mint_wrapper.to_account_info().is_writable, + Unauthorized + ); + + assert_keys_eq!(self.token_mint, self.mint_wrapper.token_mint); + Ok(()) + } +} + /// -------------------------------- /// Account Structs /// -------------------------------- diff --git a/programs/quarry-mint-wrapper/src/instructions/mod.rs b/programs/quarry-mint-wrapper/src/instructions/mod.rs index 09a39d0f..5f82b48f 100644 --- a/programs/quarry-mint-wrapper/src/instructions/mod.rs +++ b/programs/quarry-mint-wrapper/src/instructions/mod.rs @@ -1,4 +1,6 @@ pub mod new_minter; pub mod new_wrapper; +pub mod set_metaplex_update_authority; +pub use set_metaplex_update_authority::*; pub use new_minter::*; pub use new_wrapper::*; diff --git a/programs/quarry-mint-wrapper/src/instructions/set_metaplex_update_authority.rs b/programs/quarry-mint-wrapper/src/instructions/set_metaplex_update_authority.rs new file mode 100644 index 00000000..454262e5 --- /dev/null +++ b/programs/quarry-mint-wrapper/src/instructions/set_metaplex_update_authority.rs @@ -0,0 +1,245 @@ +use crate::*; + +use borsh::BorshSerialize; +use borsh::BorshDeserialize; +use solana_program::pubkey; + +static METADATA_PROGRAM_ID: Pubkey = pubkey!("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"); + +pub fn handler(ctx: Context) -> Result<()> { + + let mint_wrapper = &ctx.accounts.mint_wrapper; + + check_mpl_metadata_account_address(&ctx.accounts.metadata_info.key(), &ctx.accounts.token_mint.key())?; + + // Check if we should udpate or create + if ctx.accounts.metadata_info.data_is_empty() { + + // Metadata account does not yet exists so we need to create it first + let new_metadata_instruction = create_metadata_accounts_v3( + *ctx.accounts.metadata_program.key, + *ctx.accounts.metadata_info.key, + ctx.accounts.token_mint.key(), + ctx.accounts.mint_wrapper.key(), + ctx.accounts.minter_authority.key(), /* payer */ + ctx.accounts.mint_wrapper.key(), /* update authority */ + String::from(""), + String::from(""), + String::from(""), + ); + + let seeds = gen_wrapper_signer_seeds!(mint_wrapper); + let proxy_signer = &[&seeds[..]]; + + solana_program::program::invoke_signed( + &new_metadata_instruction, + &[ + ctx.accounts.metadata_info.clone(), + ctx.accounts.token_mint.to_account_info(), + ctx.accounts.mint_wrapper.to_account_info(), + ctx.accounts.minter_authority.to_account_info(), + ctx.accounts.mint_wrapper.to_account_info(), /* update authority */ + ctx.accounts.system_program.to_account_info(), + ], + proxy_signer, + )?; + + } + + let update_metadata_accounts_instruction = update_metadata_accounts_v2( + *ctx.accounts.metadata_program.key, + *ctx.accounts.metadata_info.key, + ctx.accounts.mint_wrapper.key(), + Some(ctx.accounts.new_update_authority.key()), + Some(DataV2 { + name: String::from(""), + symbol: String::from(""), + uri: String::from(""), + seller_fee_basis_points: 0, + creators: None, + collection: None, + uses: None, + }), + None, + Some(true), + ); + + let seeds = gen_wrapper_signer_seeds!(mint_wrapper); + let proxy_signer = &[&seeds[..]]; + + solana_program::program::invoke_signed( + &update_metadata_accounts_instruction, + &[ctx.accounts.metadata_info.to_account_info(), ctx.accounts.mint_wrapper.to_account_info()], + proxy_signer, + )?; + + Ok(()) +} + + +pub mod pda { + use {super::METADATA_PROGRAM_ID, solana_program::pubkey::Pubkey}; + const PREFIX: &str = "metadata"; + /// Helper to find a metadata account address + pub fn find_metadata_account(mint: &Pubkey) -> (Pubkey, u8) { + let id = METADATA_PROGRAM_ID; + Pubkey::find_program_address(&[PREFIX.as_bytes(), id.as_ref(), mint.as_ref()], &id) + } +} + +/// Check mpl metadata account address +fn check_mpl_metadata_account_address( + metadata_address: &Pubkey, + mint: &Pubkey, +) -> Result<()> { + let (metadata_account_pubkey, _) = pda::find_metadata_account(mint); + + if metadata_account_pubkey != *metadata_address { + Err(super::super::ErrorCode::Unauthorized.into()) + } else { + Ok(()) + } +} + +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +struct DataV2 { + /// 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, + /// UNUSED Array of creators, optional + pub creators: Option, + /// UNUSED Collection + pub collection: Option, + /// UNUSED Uses + pub uses: Option, +} + +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +struct CreateMetadataAccountArgsV3 { + /// Note that unique metadatas are disabled for now. + pub data: DataV2, + /// Whether you want your metadata to be updateable in the future. + pub is_mutable: bool, + /// UNUSED If this is a collection parent NFT. + pub collection_details: Option, +} + +#[allow(clippy::too_many_arguments)] +pub(crate) fn create_metadata_accounts_v3( + program_id: Pubkey, + metadata_account: Pubkey, + mint: Pubkey, + mint_authority: Pubkey, + payer: Pubkey, + update_authority: Pubkey, + name: String, + symbol: String, + uri: String, +) -> solana_program::instruction::Instruction { + let mut data = vec![33]; // CreateMetadataAccountV3 + data.append( + &mut borsh::to_vec(&CreateMetadataAccountArgsV3 { + data: DataV2 { + name, + symbol, + uri, + seller_fee_basis_points: 0, + creators: None, + collection: None, + uses: None, + }, + is_mutable: true, + collection_details: None, + }) + .unwrap(), + ); + solana_program::instruction::Instruction { + program_id, + accounts: vec![ + AccountMeta::new(metadata_account, false), + AccountMeta::new_readonly(mint, false), + AccountMeta::new_readonly(mint_authority, true), + AccountMeta::new(payer, true), + AccountMeta::new_readonly(update_authority, true), + AccountMeta::new_readonly(solana_program::system_program::ID, false), + ], + data, + } +} + +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +struct UpdateMetadataAccountArgsV2 { + pub data: Option, + pub update_authority: Option, + pub primary_sale_happened: Option, + pub is_mutable: Option, +} + +fn update_metadata_accounts_v2( + program_id: Pubkey, + metadata_account: Pubkey, + update_authority: Pubkey, + new_update_authority: Option, + metadata: Option, + primary_sale_happened: Option, + is_mutable: Option, +) -> solana_program::instruction::Instruction { + let mut data = vec![15]; // UpdateMetadataAccountV2 + data.append( + &mut borsh::to_vec(&UpdateMetadataAccountArgsV2 { + data: metadata, + update_authority: new_update_authority, + primary_sale_happened, + is_mutable, + }) + .unwrap(), + ); + solana_program::instruction::Instruction { + program_id, + accounts: vec![ + AccountMeta::new(metadata_account, false), + AccountMeta::new_readonly(update_authority, true), + ], + data, + } +} + + +#[derive(Accounts, Clone)] +pub struct SetMetaplexUpdateAuthority<'info> { + /// [MintWrapper]. + #[account(mut)] + pub mint_wrapper: Account<'info, MintWrapper>, + + /// [Minter]'s authority. + pub minter_authority: Signer<'info>, + + /// Token [Mint]. + #[account(mut)] + pub token_mint: Account<'info, Mint>, + + /// CHECK: OK + #[account(address = METADATA_PROGRAM_ID)] + #[account(executable)] + pub metadata_program: AccountInfo<'info>, + + /// CHECK: OK + #[account(mut)] + pub metadata_info: AccountInfo<'info>, + + /// CHECK: OK + #[account(mut)] + pub new_update_authority: AccountInfo<'info>, + + pub system_program: Program<'info, System>, + + /// CHECK: OK + #[account(address = solana_program::sysvar::instructions::ID)] + pub sysvar_instructions: AccountInfo<'info>, +} diff --git a/programs/quarry-mint-wrapper/src/lib.rs b/programs/quarry-mint-wrapper/src/lib.rs index 787cc05e..805e48eb 100644 --- a/programs/quarry-mint-wrapper/src/lib.rs +++ b/programs/quarry-mint-wrapper/src/lib.rs @@ -168,6 +168,13 @@ pub mod quarry_mint_wrapper { }); Ok(()) } + + /// Creates metadata for the mint token + #[access_control(ctx.accounts.validate())] + pub fn set_metaplex_update_authority(ctx: Context) -> Result<()> { + instructions::set_metaplex_update_authority::handler(ctx) + } + } // -------------------------------- diff --git a/scripts/generate-idl-types.sh b/scripts/generate-idl-types.sh index bafdae34..9c692656 100755 --- a/scripts/generate-idl-types.sh +++ b/scripts/generate-idl-types.sh @@ -10,11 +10,7 @@ generate_declaration_file() { prog="$(basename $PROGRAM_SO .json)" OUT_PATH="$OUT_DIR/$prog.ts" - if [ ! $(which gsed) ]; then - PREFIX=$(echo $prog | sed -E 's/(^|_)([a-z])/\U\2/g') - else - PREFIX=$(echo $prog | gsed -E 's/(^|_)([a-z])/\U\2/g') - fi + PREFIX=$(echo $prog | gsed -E 's/(^|_)([a-z])/\U\2/g') typename="${PREFIX}IDL" rawName="${PREFIX}JSON" @@ -57,4 +53,4 @@ generate_sdk_idls() { fi } -generate_sdk_idls ./src/idls 'artifacts/idl/*.json' +generate_sdk_idls ./src/idls 'artifacts/idl/*.json' \ No newline at end of file diff --git a/scripts/parse-idls.sh b/scripts/parse-idls.sh index 0eb3b5fb..99e1c8f1 100755 --- a/scripts/parse-idls.sh +++ b/scripts/parse-idls.sh @@ -5,6 +5,7 @@ rm -fr artifacts/idl/ mkdir -p artifacts/idl/ +echo "Anchor version $(anchor --version)" for PROGRAM in $(find programs/ -maxdepth 3 -name lib.rs); do PROGRAM_NAME=$(dirname $PROGRAM | xargs dirname | xargs basename | tr '-' '_') echo "Parsing IDL for $PROGRAM_NAME" @@ -12,4 +13,4 @@ for PROGRAM in $(find programs/ -maxdepth 3 -name lib.rs); do echo "Could not parse IDL" exit 1 } -done +done \ No newline at end of file diff --git a/src/wrappers/mintWrapper/mintWrapper.ts b/src/wrappers/mintWrapper/mintWrapper.ts index 43493ea9..845c66c7 100644 --- a/src/wrappers/mintWrapper/mintWrapper.ts +++ b/src/wrappers/mintWrapper/mintWrapper.ts @@ -3,14 +3,19 @@ import type { AugmentedProvider, TransactionEnvelope, } from "@saberhq/solana-contrib"; -import type { TokenAmount, u64 } from "@saberhq/token-utils"; +import type { Token, TokenAmount, u64 } from "@saberhq/token-utils"; import { createInitMintInstructions, getOrCreateATA, TOKEN_PROGRAM_ID, } from "@saberhq/token-utils"; -import type { AccountInfo, PublicKey, Signer } from "@solana/web3.js"; -import { Keypair, SystemProgram } from "@solana/web3.js"; +import type { AccountInfo, Signer } from "@solana/web3.js"; +import { + Keypair, + PublicKey, + SystemProgram, + SYSVAR_INSTRUCTIONS_PUBKEY, +} from "@solana/web3.js"; import type { MinterData, @@ -378,6 +383,110 @@ export class MintWrapper { ]); } + /** + * Create metadata in metaplex + */ + async createMintMetadata( + name: string, + symbol: string, + uri: string, + tokenMint: Token, + mintWrapper: PublicKey + ): Promise { + const minterAuthority = this.provider.wallet.publicKey; + // Public key that identifies the metadata program. + const METADATA_PROGRAM_ID = new PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + + async function findMetadataAddress(mint: PublicKey) { + const [publicKey] = await PublicKey.findProgramAddress( + [ + Buffer.from("metadata"), + METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + ], + METADATA_PROGRAM_ID + ); + return publicKey; + } + + const metadataInfo = await findMetadataAddress( + new PublicKey(tokenMint.address) + ); + + console.log("mintWrapper", mintWrapper.toBase58()); + console.log("minterAuthority", minterAuthority.toBase58()); + console.log("tokenMint", tokenMint.address); + console.log("metadataInfo", metadataInfo.toBase58()); + + return this.sdk.provider.newTX([ + this.program.instruction.createMintMetadata(name, symbol, uri, { + accounts: { + mintWrapper, + minterAuthority, + tokenMint: tokenMint.address, + metadataProgram: METADATA_PROGRAM_ID, + metadataInfo: metadataInfo, + systemProgram: SystemProgram.programId, + }, + }), + ]); + } + + /** + * Create metadata in metaplex + */ + async setMetaplexUpdateAuthority( + tokenMint: Token, + mintWrapper: PublicKey, + newUpdateAuthority: PublicKey + ): Promise { + const minterAuthority = this.provider.wallet.publicKey; + // Public key that identifies the metadata program. + const METADATA_PROGRAM_ID = new PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + + async function findMetadataAddress(mint: PublicKey) { + const [publicKey] = await PublicKey.findProgramAddress( + [ + Buffer.from("metadata"), + METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + ], + METADATA_PROGRAM_ID + ); + return publicKey; + } + + const metadataInfo = await findMetadataAddress( + new PublicKey(tokenMint.address) + ); + + /* + console.log("mintWrapper", mintWrapper.toBase58()); + console.log("minterAuthority", minterAuthority.toBase58()); + console.log("tokenMint", tokenMint.address); + console.log("metadataInfo", metadataInfo.toBase58()); + console.log("newUpdateAuthority", newUpdateAuthority.toBase58()); + */ + + return this.sdk.provider.newTX([ + this.program.instruction.setMetaplexUpdateAuthority({ + accounts: { + mintWrapper, + minterAuthority, + tokenMint: tokenMint.address, + metadataProgram: METADATA_PROGRAM_ID, + metadataInfo: metadataInfo, + systemProgram: SystemProgram.programId, + sysvarInstructions: SYSVAR_INSTRUCTIONS_PUBKEY, + newUpdateAuthority: newUpdateAuthority, + }, + }), + ]); + } /** * Performs a mint of tokens to an account. * @deprecated use {@link performMintWithMinter} diff --git a/tests/mintWrapper.spec.ts b/tests/mintWrapper.spec.ts index 13108f9c..81fc8c6f 100644 --- a/tests/mintWrapper.spec.ts +++ b/tests/mintWrapper.spec.ts @@ -1,3 +1,4 @@ +import * as metaplex from "@metaplex-foundation/mpl-token-metadata"; import * as anchor from "@project-serum/anchor"; import { assertTXSuccess, expectTX } from "@saberhq/chai-solana"; import type { Provider } from "@saberhq/solana-contrib"; @@ -9,8 +10,7 @@ import { TokenAmount, u64, } from "@saberhq/token-utils"; -import type { PublicKey } from "@solana/web3.js"; -import { Keypair, LAMPORTS_PER_SOL } from "@solana/web3.js"; +import { Keypair, LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js"; import * as assert from "assert"; import { expect } from "chai"; @@ -286,5 +286,87 @@ describe("MintWrapper", () => { "mint" ).to.be.rejected; }); + + it("Change the metadata update authority", async () => { + const newAuthority = Keypair.generate(); + const tx = await mintWrapper.setMetaplexUpdateAuthority( + token, + mintWrapperKey, + newAuthority.publicKey + ); + + await expectTX(tx, "set new metadata update authority").to.be.fulfilled; + + // Verify that we can update the metadata with the new authority + const tokenMetadata = { + name: "test", + symbol: "test", + uri: "test", + sellerFeeBasisPoints: 0, + creators: null, + collection: null, + uses: null, + } as metaplex.DataV2; + + const metadataPDA = ( + await PublicKey.findProgramAddress( + [ + Buffer.from("metadata"), + metaplex.PROGRAM_ID.toBuffer(), + new PublicKey(token.address).toBuffer(), + ], + metaplex.PROGRAM_ID + ) + )[0]; + + const alternateAuthority = Keypair.generate(); + + const metadataIxUpdateWithNewAuthority = + metaplex.createUpdateMetadataAccountV2Instruction( + { + metadata: metadataPDA, + updateAuthority: newAuthority.publicKey, + }, + { + updateMetadataAccountArgsV2: { + data: tokenMetadata, + updateAuthority: alternateAuthority.publicKey, + primarySaleHappened: true, + isMutable: true, + }, + } + ); + + const metaplexTx1 = sdk.provider.newTX( + [metadataIxUpdateWithNewAuthority], + [newAuthority] + ); + + await expectTX(metaplexTx1, "update metadata with new update authority") + .to.be.fulfilled; + + // Verify that we can no longer update the metadata with the old authority + const metadataIxUsingOldAuthority = + metaplex.createUpdateMetadataAccountV2Instruction( + { + metadata: metadataPDA, + updateAuthority: mintWrapperKey, + }, + { + updateMetadataAccountArgsV2: { + data: tokenMetadata, + updateAuthority: alternateAuthority.publicKey, + primarySaleHappened: true, + isMutable: true, + }, + } + ); + + const metaplexTx2 = sdk.provider.newTX([metadataIxUsingOldAuthority]); + await expectTX( + metaplexTx2, + "update metadata with old update authority should fail" + ).to.be.rejected; + }); }); }); diff --git a/yarn.lock b/yarn.lock index 4916f5c2..c97b0c62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,6 +23,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: 31b9da9b4e0a45b12b768e4c88edc68bdcd699b5dd48b76c666f596ae0ae7d62f1995a24c49e9594cc19d5a4532251eaa58193202ae3c8c85d7717c48cf7554f + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -139,6 +148,61 @@ __metadata: languageName: node linkType: hard +"@metaplex-foundation/beet-solana@npm:^0.4.0": + version: 0.4.1 + resolution: "@metaplex-foundation/beet-solana@npm:0.4.1" + dependencies: + "@metaplex-foundation/beet": "npm:>=0.1.0" + "@solana/web3.js": "npm:^1.56.2" + bs58: "npm:^5.0.0" + debug: "npm:^4.3.4" + checksum: abba34328cc431428f8dd3e56ceb6b117ddda27ed617418f2b761f59178ee946c416e5e59c27e83c9df4ba0e50ff2cd210c6a5fd52587230f680e12466010b11 + languageName: node + linkType: hard + +"@metaplex-foundation/beet@npm:>=0.1.0, @metaplex-foundation/beet@npm:^0.7.1": + version: 0.7.2 + resolution: "@metaplex-foundation/beet@npm:0.7.2" + dependencies: + ansicolors: "npm:^0.3.2" + assert: "npm:^2.1.0" + bn.js: "npm:^5.2.0" + debug: "npm:^4.3.3" + checksum: 52b9cbf1224887e2946b5dd8c68bdf249b7287aa0b847820035d04a921abbe24b689d4e58e35bccf72829bb10fd93360f2dc8bcf1c995dd223632d32f1c1022b + languageName: node + linkType: hard + +"@metaplex-foundation/cusper@npm:^0.0.2": + version: 0.0.2 + resolution: "@metaplex-foundation/cusper@npm:0.0.2" + checksum: 8b6af391298f0fe3e77764809beda40d82fa4276794495d21e9b87aeb51791e7145086cd525de93b585c80e0c0e9f71e3accdc05d7b649d40544fafa89c95318 + languageName: node + linkType: hard + +"@metaplex-foundation/mpl-token-metadata@npm:2.8.6": + version: 2.8.6 + resolution: "@metaplex-foundation/mpl-token-metadata@npm:2.8.6" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + "@metaplex-foundation/cusper": "npm:^0.0.2" + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.66.2" + bn.js: "npm:^5.2.0" + debug: "npm:^4.3.4" + checksum: a99037760060a5ac0ec5f31b4445424a637bf315bb3e16ac0bf8deca8ddebe205ef37fea5c5b60bf30d6fd48faf5094afe75afe785172da8ddb76593a7f89ca0 + languageName: node + linkType: hard + +"@noble/curves@npm:^1.4.0": + version: 1.4.0 + resolution: "@noble/curves@npm:1.4.0" + dependencies: + "@noble/hashes": "npm:1.4.0" + checksum: 7875ed1d41614215f59b15d91d90e2307c3e45a78f8c7f3044548c7250068ebee25b5b2338a2d46f443f314f2a5f4ad8c41466a56d5e92ea79532f336d43c8c3 + languageName: node + linkType: hard + "@noble/ed25519@npm:^1.7.0": version: 1.7.1 resolution: "@noble/ed25519@npm:1.7.1" @@ -146,6 +210,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: a21c2e12eb7a827b94edefc4a01cb1dd7af20dffe1096501339a37fa34ce98ec8f270362054e27bca167e54a43cf91cc4b11de04f285df43edb2d5001eab819c + languageName: node + linkType: hard + "@noble/hashes@npm:^1.1.2": version: 1.1.2 resolution: "@noble/hashes@npm:1.1.2" @@ -246,6 +317,7 @@ __metadata: version: 0.0.0-use.local resolution: "@quarryprotocol/quarry-sdk@workspace:." dependencies: + "@metaplex-foundation/mpl-token-metadata": "npm:2.8.6" "@project-serum/anchor": "npm:^0.25.0" "@rushstack/eslint-patch": "npm:^1.2.0" "@saberhq/anchor-contrib": "npm:^1.14.8" @@ -408,6 +480,18 @@ __metadata: languageName: node linkType: hard +"@solana/buffer-layout-utils@npm:^0.2.0": + version: 0.2.0 + resolution: "@solana/buffer-layout-utils@npm:0.2.0" + dependencies: + "@solana/buffer-layout": "npm:^4.0.0" + "@solana/web3.js": "npm:^1.32.0" + bigint-buffer: "npm:^1.1.5" + bignumber.js: "npm:^9.0.1" + checksum: df7f3f35f2ad2dd97eab97259b705efbe75ff3d232cb82f1c70ad4c2b5661de8330148a41576c6ccf8b7013cb84259500a9e66ea157e881bc9f8092f792f311f + languageName: node + linkType: hard + "@solana/buffer-layout@npm:^3.0.0": version: 3.0.0 resolution: "@solana/buffer-layout@npm:3.0.0" @@ -426,6 +510,105 @@ __metadata: languageName: node linkType: hard +"@solana/buffer-layout@npm:^4.0.1": + version: 4.0.1 + resolution: "@solana/buffer-layout@npm:4.0.1" + dependencies: + buffer: "npm:~6.0.3" + checksum: 6ad1a15e79021526dda8a0b8d3c39afffec5f70cdc76189e35ddbd8fe7d207bf0f6861cf04b5fff88e5349396875bd089ba97b7085a080e3064d474a09477cc6 + languageName: node + linkType: hard + +"@solana/codecs-core@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/codecs-core@npm:2.0.0-preview.2" + dependencies: + "@solana/errors": "npm:2.0.0-preview.2" + checksum: efd413fcf2cd6d523c4ebfba01354f0fe5afe8429b66acf8e6d2265d45edf22b16548f16efa8cffd4cf5692d6fc8cf97e38e971ef39b95067f5a77976e087358 + languageName: node + linkType: hard + +"@solana/codecs-data-structures@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/codecs-data-structures@npm:2.0.0-preview.2" + dependencies: + "@solana/codecs-core": "npm:2.0.0-preview.2" + "@solana/codecs-numbers": "npm:2.0.0-preview.2" + "@solana/errors": "npm:2.0.0-preview.2" + checksum: cce35c4b9985cac5f73bfa44539f3e5f56687fb238e08643a77360eceb41bdff26d54a8f9adaab92d5715a1be79945d363ad8596a2c9c264ea512d30569f7e25 + languageName: node + linkType: hard + +"@solana/codecs-numbers@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/codecs-numbers@npm:2.0.0-preview.2" + dependencies: + "@solana/codecs-core": "npm:2.0.0-preview.2" + "@solana/errors": "npm:2.0.0-preview.2" + checksum: 396f3df9b31ceb4b0b0d1e3b34d4c5b9f848d5f8a90cdc9a5bb4ae70c0c26d615ffc06212b8728acf82761952b6eb3128a02d518d1f7c50a22c6d55a62e1f82c + languageName: node + linkType: hard + +"@solana/codecs-strings@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/codecs-strings@npm:2.0.0-preview.2" + dependencies: + "@solana/codecs-core": "npm:2.0.0-preview.2" + "@solana/codecs-numbers": "npm:2.0.0-preview.2" + "@solana/errors": "npm:2.0.0-preview.2" + peerDependencies: + fastestsmallesttextencoderdecoder: ^1.0.22 + checksum: 1479137489108090f656f54244c92a9ad29e484181e28a08c1b3bfa52680230942d82c0aae519e4007ae9ad40771108ab724530964a1414414b7f355c62f53d3 + languageName: node + linkType: hard + +"@solana/codecs@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/codecs@npm:2.0.0-preview.2" + dependencies: + "@solana/codecs-core": "npm:2.0.0-preview.2" + "@solana/codecs-data-structures": "npm:2.0.0-preview.2" + "@solana/codecs-numbers": "npm:2.0.0-preview.2" + "@solana/codecs-strings": "npm:2.0.0-preview.2" + "@solana/options": "npm:2.0.0-preview.2" + checksum: ce5e7dd4d13622653cd54c2ec9cba909deae6048336d26a21edae8e2a2013201a204df2d0a7f02395b8a7d0a1bcd110584c0e84021224ae9955c4d1bf1b18ffd + languageName: node + linkType: hard + +"@solana/errors@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/errors@npm:2.0.0-preview.2" + dependencies: + chalk: "npm:^5.3.0" + commander: "npm:^12.0.0" + bin: + errors: bin/cli.js + checksum: 9e0afbfcc19eee33b36259c1a63375fb8767c062a3f50aacd7b32db973086d978c645a643f62677b8e1a27937b05eafceaff7ae0832524848a72f3f5cf1c8ff8 + languageName: node + linkType: hard + +"@solana/options@npm:2.0.0-preview.2": + version: 2.0.0-preview.2 + resolution: "@solana/options@npm:2.0.0-preview.2" + dependencies: + "@solana/codecs-core": "npm:2.0.0-preview.2" + "@solana/codecs-numbers": "npm:2.0.0-preview.2" + checksum: 47c923c9c08dc9e4095988b6ad7e4ab92ecbe075084a446134b26d203aa84d9e756f867247aa0502d2988528ec45a082ae0441de041a3cbf6b245d0d884c36bc + languageName: node + linkType: hard + +"@solana/spl-token-metadata@npm:^0.1.2": + version: 0.1.4 + resolution: "@solana/spl-token-metadata@npm:0.1.4" + dependencies: + "@solana/codecs": "npm:2.0.0-preview.2" + "@solana/spl-type-length-value": "npm:0.1.0" + peerDependencies: + "@solana/web3.js": ^1.91.6 + checksum: 29d7263c566d492926c5c4fb2a3ddec100a4f6ac1f2607c4e78a5e218d9fa7d29b2bcfd9220444224afb1f0f53825fd3291f88b300309cc9f377135bd079a314 + languageName: node + linkType: hard + "@solana/spl-token@npm:^0.1.8": version: 0.1.8 resolution: "@solana/spl-token@npm:0.1.8" @@ -440,6 +623,29 @@ __metadata: languageName: node linkType: hard +"@solana/spl-token@npm:^0.3.6": + version: 0.3.11 + resolution: "@solana/spl-token@npm:0.3.11" + dependencies: + "@solana/buffer-layout": "npm:^4.0.0" + "@solana/buffer-layout-utils": "npm:^0.2.0" + "@solana/spl-token-metadata": "npm:^0.1.2" + buffer: "npm:^6.0.3" + peerDependencies: + "@solana/web3.js": ^1.88.0 + checksum: f0822f57f65576292c283dc757aae3c536c412d4d84c7d987fe1de028071435a9650895f509de1edbe7b2260516ad2c035860bb37f709e36948aa4813eab496c + languageName: node + linkType: hard + +"@solana/spl-type-length-value@npm:0.1.0": + version: 0.1.0 + resolution: "@solana/spl-type-length-value@npm:0.1.0" + dependencies: + buffer: "npm:^6.0.3" + checksum: 7bfd060c2bd80a15e161970b1051b14719673e6a32b300b6d4be2d00048dfacadb75a1e7c1da57af2579dc708353f5d981f554f11643290cf0646f1831cdea2a + languageName: node + linkType: hard + "@solana/web3.js@npm:^1.21.0": version: 1.29.2 resolution: "@solana/web3.js@npm:1.29.2" @@ -462,6 +668,29 @@ __metadata: languageName: node linkType: hard +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2": + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" + dependencies: + "@babel/runtime": "npm:^7.24.5" + "@noble/curves": "npm:^1.4.0" + "@noble/hashes": "npm:^1.4.0" + "@solana/buffer-layout": "npm:^4.0.1" + agentkeepalive: "npm:^4.5.0" + bigint-buffer: "npm:^1.1.5" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + bs58: "npm:^4.0.1" + buffer: "npm:6.0.3" + fast-stable-stringify: "npm:^1.0.0" + jayson: "npm:^4.1.0" + node-fetch: "npm:^2.7.0" + rpc-websockets: "npm:^7.11.0" + superstruct: "npm:^0.14.2" + checksum: 213d574510da932aee24117bc2989ad19e48a50be49f1ed422ae10ed0910c78f629ebaf91e3666641cd4ab3f863337835df6d6f4c82c6b9bc96e99ec6a0f2a76 + languageName: node + linkType: hard + "@solana/web3.js@npm:^1.36.0": version: 1.36.0 resolution: "@solana/web3.js@npm:1.36.0" @@ -948,6 +1177,15 @@ __metadata: languageName: node linkType: hard +"agentkeepalive@npm:^4.5.0": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: "npm:^1.2.1" + checksum: edc8946e4ac83d164748853cffd381ffea5035cb24b60247d2531e2a3d8a779d9e83984441a2ab46a435bc5e5642b6eba91b6a5fd378ea2b12e68232219e4b5b + languageName: node + linkType: hard + "aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" @@ -1030,6 +1268,13 @@ __metadata: languageName: node linkType: hard +"ansicolors@npm:^0.3.2": + version: 0.3.2 + resolution: "ansicolors@npm:0.3.2" + checksum: ec244826ff48ce81097507b8d273d05b94d3378d2a83cdcd1643b71a547dcc744023fa783a4aadf1a8fc98aa6fc63e27b6e9f8855bb344b1b447973b7b8d98ae + languageName: node + linkType: hard + "anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -1102,6 +1347,19 @@ __metadata: languageName: node linkType: hard +"assert@npm:^2.1.0": + version: 2.1.0 + resolution: "assert@npm:2.1.0" + dependencies: + call-bind: "npm:^1.0.2" + is-nan: "npm:^1.3.2" + object-is: "npm:^1.1.5" + object.assign: "npm:^4.1.4" + util: "npm:^0.12.5" + checksum: c12c205d1d8c9af97758ca6f488ed24367938dc93aa7e8ddea0302ab682d42cde38269965123a93d146151b88b86db30a745b8cb95c87b0a1ff55f07f81df205 + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -1116,6 +1374,15 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: "npm:^1.0.0" + checksum: 57f21e90922b1dd7e15ac9690fab68bf41e0f2d188d3563c283d62c13bda9fb27cb33e409415441c17e6f0c5411a6b27eccfcfa71f19694ad3f1f1131861388a + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -1132,6 +1399,13 @@ __metadata: languageName: node linkType: hard +"base-x@npm:^4.0.0": + version: 4.0.0 + resolution: "base-x@npm:4.0.0" + checksum: a7374c828d9be4c874b739211cc2b9781117c67cbd880dfe44ee79c2baeae20fe8fec0ca4e6803a7f4acb965f974cd04ff7ffe3137eabdf722b264410a749bc7 + languageName: node + linkType: hard + "base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -1156,6 +1430,13 @@ __metadata: languageName: node linkType: hard +"bignumber.js@npm:^9.0.1": + version: 9.1.2 + resolution: "bignumber.js@npm:9.1.2" + checksum: 4094a36bc4441d9bf812b76a1174f4d7ff8588c2c3f31a80693c32557a9c564d3408c9980e0e87ed017b1914eb73803457abe17d407c4bf8331a64a1e38b8071 + languageName: node + linkType: hard + "binary-extensions@npm:^2.0.0": version: 2.2.0 resolution: "binary-extensions@npm:2.2.0" @@ -1253,6 +1534,15 @@ __metadata: languageName: node linkType: hard +"bs58@npm:^5.0.0": + version: 5.0.0 + resolution: "bs58@npm:5.0.0" + dependencies: + base-x: "npm:^4.0.0" + checksum: d2c271f80f2d404e6df387de2bdcffe07568fe73404ed686ea5be49f87cf74ca29be918d14cae3b01e8fe31696b82f28cdee730b11f27c01543870d239b5dddd + languageName: node + linkType: hard + "buffer-layout@npm:^1.2.0, buffer-layout@npm:^1.2.2": version: 1.2.2 resolution: "buffer-layout@npm:1.2.2" @@ -1270,7 +1560,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:6.0.3, buffer@npm:~6.0.3": +"buffer@npm:6.0.3, buffer@npm:^6.0.3, buffer@npm:~6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" dependencies: @@ -1326,6 +1616,19 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.5, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + set-function-length: "npm:^1.2.1" + checksum: e391279d5567893d56dfca77630032c9cda3caac980e7ccd12dded5bbdd72dff9a8fd49d4f0a5c5a28bdfc0693a14dbdd3bfffc3b0934ec6be66269f79f9b7af + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -1392,6 +1695,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: b35496b395338e78f891796bd55d641d8907e4930a8ecbff087644241f2435d7a6764e65562b43ec8581b2cc35c68fe213ffe5bc710fb39a774f4497617a7ff2 + languageName: node + linkType: hard + "check-error@npm:^1.0.2": version: 1.0.2 resolution: "check-error@npm:1.0.2" @@ -1523,6 +1833,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^12.0.0": + version: 12.0.0 + resolution: "commander@npm:12.0.0" + checksum: 0da964bf148eb91478965c5a492020830897a2db3b775e04fce166bd2b223b34f6e290fb9134cc0e270ddaca0baf8ac8e718c611eee6f8f05bff06f9148cd3f2 + languageName: node + linkType: hard + "commander@npm:^2.20.3": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -1613,7 +1930,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.3.4, debug@npm:^4.3.4": +"debug@npm:4.3.4, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -1673,6 +1990,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.0.1" + checksum: b1d5655d262812e583ce0e31ef91cb97760dae48de41d5a701a564a9fd8c3a3582e8ba69a824958a2c884be2bd76fab39502edcf9bc78969d800c9746024f513 + languageName: node + linkType: hard + "define-properties@npm:^1.1.3": version: 1.1.3 resolution: "define-properties@npm:1.1.3" @@ -1682,6 +2010,17 @@ __metadata: languageName: node linkType: hard +"define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: b78cc64241801c4caa1a4fcb8fe3edcb246c4e9e2b77168ce6532579486bffd8a7684cb23d1fc6820dfc1c8c8451680ec2db0aa90dd618a08bc7776750812c23 + languageName: node + linkType: hard + "delay@npm:^5.0.0": version: 5.0.0 resolution: "delay@npm:5.0.0" @@ -1841,6 +2180,22 @@ __metadata: languageName: node linkType: hard +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: "npm:^1.2.4" + checksum: a6c4e89c242faaa65afbc406cf287a2473755ebe0271c5d75d8a000debe90e3dd96f18b3da874ac5c58aad96a6d2cbbea52a109e6ce128913ed4007533118f40 + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 4b3bff44e202da9a88cb0f1bd21a2d008a35de038ea2ce18d33be2764e36008245547b3f13d5fa350d28263d770aeaa35d49dd470db2705d54cdb34804cd7eee + languageName: node + linkType: hard + "es-to-primitive@npm:^1.2.1": version: 1.2.1 resolution: "es-to-primitive@npm:1.2.1" @@ -2284,6 +2639,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: "npm:^1.1.3" + checksum: dc4e3e28f5ee9472680b6361a85d0d27aa1e8ddbd1720dfb680020456cddc142ee7ba69145921fe12c4ec2d7740f12c1c6c7f90ecdd7ca2b39c7fcd8bc506ad6 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -2326,6 +2690,13 @@ __metadata: languageName: node linkType: hard +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 0b7e4d0c3fcfa16999aceaadd1ae760404ef10b98f88d992971de3e4f4d79079651eeec472971ea02a300ffcddd44adcd33d3c39c735d2784d6ad3e711e4ddd0 + languageName: node + linkType: hard + "gauge@npm:~2.7.3": version: 2.7.4 resolution: "gauge@npm:2.7.4" @@ -2367,6 +2738,19 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" + checksum: 8062ad56845cd40a508344564aa661ffea91bfbe7f46a0c2f5e39c9932a92baca1fc64623989def576cdd4c976fea13ccdc17d4d1aa8acef002827171ca0978c + languageName: node + linkType: hard + "get-stream@npm:^6.0.1": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -2453,6 +2837,15 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: "npm:^1.1.3" + checksum: c29f62be0655b0fb6d12d1ba77b1a40fee46fbb80f0a27e0538b696a0ac057899dd997b5aaf3c6daa02bd51af93ec7b8fe2ef7bbb44945c1ea3cf640e4b66cf7 + languageName: node + linkType: hard + "graceful-fs@npm:^4.2.6": version: 4.2.8 resolution: "graceful-fs@npm:4.2.8" @@ -2481,6 +2874,22 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: "npm:^1.0.0" + checksum: 6ab7488c96987848545aa1b6db9fbb0b934a06bfec569bfb246254dcd8f808569574491efb5a7485445225baaa94e0eda819cd3bb858b210171192ad2247ae07 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: 739d945c42d3aee36292da788dddf4743500af4c443c8b9730b07a8fff4011fef73d774e412b04a6eb498fa62ed937df8bc20701491a5e97417d465b99cba83b + languageName: node + linkType: hard + "has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": version: 1.0.2 resolution: "has-symbols@npm:1.0.2" @@ -2488,6 +2897,13 @@ __metadata: languageName: node linkType: hard +"has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: 2d0abb3382da2945b1b8d9a4afebc8a0770fe07198e727b4fbd7f616c70796f040bf2bd8d6db47e0c590507812a2680594fc77f871238289f6c7870318cf62c9 + languageName: node + linkType: hard + "has-tostringtag@npm:^1.0.0": version: 1.0.0 resolution: "has-tostringtag@npm:1.0.0" @@ -2497,6 +2913,15 @@ __metadata: languageName: node linkType: hard +"has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: "npm:^1.0.3" + checksum: 83daf75923d74d1530ebf5820ddf68efc37c0bfe135ad5d430a5609485131b09599b6c1542b45cd26efd211ff6cc64acccf7cfeffded42a79e0141f906d29fa5 + languageName: node + linkType: hard + "has-unicode@npm:^2.0.0": version: 2.0.1 resolution: "has-unicode@npm:2.0.1" @@ -2523,6 +2948,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.0": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 385a1939a16d3df36860cd9e9326910c187e0fe97a8f28d7a87ee0ef0af4756bd8bd42060c8ac87eb55f0c0d8fa78bf49d81471ee05abd7923314c78491a571a + languageName: node + linkType: hard + "he@npm:1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" @@ -2685,6 +3119,16 @@ __metadata: languageName: node linkType: hard +"is-arguments@npm:^1.0.4": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 3eae41e0267725f644140c795cdcefd265f2ed9f946d4e114b4ccf1f255f42afccfb6f8d79b0124e16cf59ec05841288439435140f9a4450d701f74a271c649c + languageName: node + linkType: hard + "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -2713,6 +3157,13 @@ __metadata: languageName: node linkType: hard +"is-callable@npm:^1.1.3": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 39d7787a6cd66d620ee4e9d09bb36587c29b39f50550d27dd7bea1d0d46b2a87ad9ac2b3d11f751836f08befc20afc4cb36201de1de26aaf02f298c8c512c102 + languageName: node + linkType: hard + "is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": version: 1.2.4 resolution: "is-callable@npm:1.2.4" @@ -2784,6 +3235,15 @@ __metadata: languageName: node linkType: hard +"is-generator-function@npm:^1.0.7": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 5ddb05cd61c043348eaee42bd003d52fa2307827dd1690e6cdb6b205a6b62750f4e41d34d0a6a84793dda6dc6b147405e0ba349e631996beea00631302e36294 + languageName: node + linkType: hard + "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": version: 4.0.1 resolution: "is-glob@npm:4.0.1" @@ -2809,6 +3269,16 @@ __metadata: languageName: node linkType: hard +"is-nan@npm:^1.3.2": + version: 1.3.2 + resolution: "is-nan@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.0" + define-properties: "npm:^1.1.3" + checksum: 20a17670f2b8ad6f37a5c49124b7eaea973b670831b74e195cd093656d10b0978bd24152dfea4d1de50edbac4feb9012c5f1e84a808dba0d8f8fb24d26763fd5 + languageName: node + linkType: hard + "is-negative-zero@npm:^2.0.1": version: 2.0.1 resolution: "is-negative-zero@npm:2.0.1" @@ -2881,6 +3351,15 @@ __metadata: languageName: node linkType: hard +"is-typed-array@npm:^1.1.3": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" + dependencies: + which-typed-array: "npm:^1.1.14" + checksum: 9b4d87fb3604a7c27727741735d9da789275dff9ffef6d67788531662d91dc79341ff6c62d4f7c6dd3302d2e378ec09e12674a6021093729176dce6863d69f54 + languageName: node + linkType: hard + "is-unicode-supported@npm:^0.1.0": version: 0.1.0 resolution: "is-unicode-supported@npm:0.1.0" @@ -2945,6 +3424,28 @@ __metadata: languageName: node linkType: hard +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" + dependencies: + "@types/connect": "npm:^3.4.33" + "@types/node": "npm:^12.12.54" + "@types/ws": "npm:^7.4.4" + JSONStream: "npm:^1.3.5" + commander: "npm:^2.20.3" + delay: "npm:^5.0.0" + es6-promisify: "npm:^5.0.0" + eyes: "npm:^0.1.8" + isomorphic-ws: "npm:^4.0.1" + json-stringify-safe: "npm:^5.0.1" + uuid: "npm:^8.3.2" + ws: "npm:^7.4.5" + bin: + jayson: bin/jayson.js + checksum: b5222b60dae16a724cf166ac6278b20726896aa4374a690cb2e9169ea27e1bde13d4ad1ae56bf29a5f75f777c87e56331876017361fff19927858b8f9aa2b404 + languageName: node + linkType: hard + "js-sdsl@npm:^4.1.4": version: 4.1.4 resolution: "js-sdsl@npm:4.1.4" @@ -3525,6 +4026,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.7.0": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: a3ad7889038bf6c49046272515d4f0e3167088b40fd37e1cc6eeea745f5a68cec798d55ac3210e2bc51891cb745e3dc30a734cc5f4b4df764f45886881b198b1 + languageName: node + linkType: hard + "node-gyp-build@npm:^4.2.0": version: 4.3.0 resolution: "node-gyp-build@npm:4.3.0" @@ -3623,6 +4138,16 @@ __metadata: languageName: node linkType: hard +"object-is@npm:^1.1.5": + version: 1.1.6 + resolution: "object-is@npm:1.1.6" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + checksum: 4cf6bc53308808b736d7bd6ffaab603248f1358af42b1a2efa8b30e4088fe2871806c8fd02e08ed88a8147f61ab1b45e1b784b3db51efefc0b42ede6dbea4512 + languageName: node + linkType: hard + "object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -3642,6 +4167,18 @@ __metadata: languageName: node linkType: hard +"object.assign@npm:^4.1.4": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + has-symbols: "npm:^1.0.3" + object-keys: "npm:^1.1.1" + checksum: 998de950330cbb0acd38bdfcdf358c73669292c2f05598921c2a6897b7a0843cbb3e5def5e101a2a3460493bce258e73d442631ebe1eaf7a9714a04ae4879a02 + languageName: node + linkType: hard + "object.values@npm:^1.1.5": version: 1.1.5 resolution: "object.values@npm:1.1.5" @@ -3841,6 +4378,13 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: 6c2a3079f170d87e991f6ef5a8c7c5757b8b1170a9487b8a5ff5893f72bba5e25c9db2a40e5c60369bdf1009e8e6a9c0374e3074f565994c547dc833d9e19aca + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -3944,6 +4488,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: d9f1dddc312277d021707ee66fdfb9fca63d32330489e0087ec75a8d61e18f7ebfe33d290d4a7934aceda055ff16322820286f0217b1fe061c4f1facfaea6e18 + languageName: node + linkType: hard + "regexpp@npm:^3.2.0": version: 3.2.0 resolution: "regexpp@npm:3.2.0" @@ -4060,6 +4611,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: "npm:^4.0.1" + eventemitter3: "npm:^4.0.7" + utf-8-validate: "npm:^5.0.2" + uuid: "npm:^8.3.2" + ws: "npm:^8.5.0" + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c6e0c70816b97020ad83c5a964d7bf63b3495f8ca966f32d745b65123dbe0ed5e47d15242a8e3635d4bdd281c92f4d36c3415c6084d198d41546994f31fe2e6d + languageName: node + linkType: hard + "rpc-websockets@npm:^7.4.2": version: 7.4.14 resolution: "rpc-websockets@npm:7.4.14" @@ -4188,6 +4757,20 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" + dependencies: + define-data-property: "npm:^1.1.4" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + checksum: 9de5b50ca7cd6649389081b24689db7058a4700a8d9ecb377de694eb557ec55f4c7a47afaaf022ba1bd5e570ceb63494af710e2c86791d8ef8cc05e4b56bc65b + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -4807,6 +5390,19 @@ __metadata: languageName: node linkType: hard +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: "npm:^2.0.3" + is-arguments: "npm:^1.0.4" + is-generator-function: "npm:^1.0.7" + is-typed-array: "npm:^1.1.3" + which-typed-array: "npm:^1.1.2" + checksum: b64a6d3e8ab48037b0f3fb38b6df96e180ab8c430d49386be8444fa2402f26450239bc1fd13aa29c02f3165be380f01aaf88eadb284e77f14df63664a5536e92 + languageName: node + linkType: hard + "uuid@npm:^3.4.0": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -4876,6 +5472,19 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.2" + checksum: 1baac161a5055f9ead91059f277358154b15a69d1b5d67515218bd38b92c0495283df639294eb7c28f17901503a8fc97e90b16d3878c2bfb06d043bac3801d7c + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2"