diff --git a/clients/js-solita/package.json b/clients/js-solita/package.json index 16c4d418..11c2e680 100644 --- a/clients/js-solita/package.json +++ b/clients/js-solita/package.json @@ -17,7 +17,7 @@ "run-tests": "jest tests --detectOpenHandles", "test": "start-server-and-test start-validator http://localhost:8899/health run-tests", "api:gen": "DEBUG='(solita|rustbin):(info|error)' solita", - "lint": "eslint \"{src,test}/**/*.ts\" --format stylish", + "lint": "eslint \"{src,tests}/**/*.ts\" --format stylish", "fix:lint": "yarn lint --fix", "prettier": "prettier \"{src,test}/**/*.ts\" --check", "fix:prettier": "prettier --write src/", @@ -54,12 +54,13 @@ "@metaplex-foundation/amman": "0.12.1", "@metaplex-foundation/rustbin": "^0.3.5", "@metaplex-foundation/solita": "0.20.0", + "@metaplex-foundation/js": "^0.19.4", "@solana/spl-account-compression": "^0.1.4", + "@types/bn.js": "^5.1.1", "@types/chai": "^4.3.0", "@types/jest": "^29.1.1", "@types/mocha": "^9.0.0", "@types/tape": "^4.13.2", - "@types/bn.js": "^5.1.1", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "chai": "^4.3.4", diff --git a/clients/js-solita/src/generated/errors/index.ts b/clients/js-solita/src/generated/errors/index.ts index 2bd63848..3f9783cf 100644 --- a/clients/js-solita/src/generated/errors/index.ts +++ b/clients/js-solita/src/generated/errors/index.ts @@ -718,6 +718,152 @@ export class DecompressionDisabledError extends Error { createErrorFromCodeLookup.set(0x1791, () => new DecompressionDisabledError()); createErrorFromNameLookup.set('DecompressionDisabled', () => new DecompressionDisabledError()); +/** + * MetadataImmutable: 'Metadata not mutable' + * + * @category Errors + * @category generated + */ +export class MetadataImmutableError extends Error { + readonly code: number = 0x1792; + readonly name: string = 'MetadataImmutable'; + constructor() { + super('Metadata not mutable'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MetadataImmutableError); + } + } +} + +createErrorFromCodeLookup.set(0x1792, () => new MetadataImmutableError()); +createErrorFromNameLookup.set('MetadataImmutable', () => new MetadataImmutableError()); + +/** + * CollectionMismatch: 'Collection mismatch' + * + * @category Errors + * @category generated + */ +export class CollectionMismatchError extends Error { + readonly code: number = 0x1793; + readonly name: string = 'CollectionMismatch'; + constructor() { + super('Collection mismatch'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CollectionMismatchError); + } + } +} + +createErrorFromCodeLookup.set(0x1793, () => new CollectionMismatchError()); +createErrorFromNameLookup.set('CollectionMismatch', () => new CollectionMismatchError()); + +/** + * MetadataArgsAmbiguous: 'MetadataArgs ambiguous' + * + * @category Errors + * @category generated + */ +export class MetadataArgsAmbiguousError extends Error { + readonly code: number = 0x1794; + readonly name: string = 'MetadataArgsAmbiguous'; + constructor() { + super('MetadataArgs ambiguous'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MetadataArgsAmbiguousError); + } + } +} + +createErrorFromCodeLookup.set(0x1794, () => new MetadataArgsAmbiguousError()); +createErrorFromNameLookup.set('MetadataArgsAmbiguous', () => new MetadataArgsAmbiguousError()); + +/** + * MetadataArgsMissing: 'MetadataArgs missing' + * + * @category Errors + * @category generated + */ +export class MetadataArgsMissingError extends Error { + readonly code: number = 0x1795; + readonly name: string = 'MetadataArgsMissing'; + constructor() { + super('MetadataArgs missing'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MetadataArgsMissingError); + } + } +} + +createErrorFromCodeLookup.set(0x1795, () => new MetadataArgsMissingError()); +createErrorFromNameLookup.set('MetadataArgsMissing', () => new MetadataArgsMissingError()); + +/** + * NFTLinkedToCollection: 'NFT linked to collection' + * + * @category Errors + * @category generated + */ +export class NFTLinkedToCollectionError extends Error { + readonly code: number = 0x1796; + readonly name: string = 'NFTLinkedToCollection'; + constructor() { + super('NFT linked to collection'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NFTLinkedToCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x1796, () => new NFTLinkedToCollectionError()); +createErrorFromNameLookup.set('NFTLinkedToCollection', () => new NFTLinkedToCollectionError()); + +/** + * NFTNotLinkedToVerifiedCollection: 'NFT not linked to verified collection' + * + * @category Errors + * @category generated + */ +export class NFTNotLinkedToVerifiedCollectionError extends Error { + readonly code: number = 0x1797; + readonly name: string = 'NFTNotLinkedToVerifiedCollection'; + constructor() { + super('NFT not linked to verified collection'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, NFTNotLinkedToVerifiedCollectionError); + } + } +} + +createErrorFromCodeLookup.set(0x1797, () => new NFTNotLinkedToVerifiedCollectionError()); +createErrorFromNameLookup.set( + 'NFTNotLinkedToVerifiedCollection', + () => new NFTNotLinkedToVerifiedCollectionError(), +); + +/** + * PrimarySaleCanOnlyBeFlippedToTrue: 'Can only update primary sale to true' + * + * @category Errors + * @category generated + */ +export class PrimarySaleCanOnlyBeFlippedToTrueError extends Error { + readonly code: number = 0x1798; + readonly name: string = 'PrimarySaleCanOnlyBeFlippedToTrue'; + constructor() { + super('Can only update primary sale to true'); + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, PrimarySaleCanOnlyBeFlippedToTrueError); + } + } +} + +createErrorFromCodeLookup.set(0x1798, () => new PrimarySaleCanOnlyBeFlippedToTrueError()); +createErrorFromNameLookup.set( + 'PrimarySaleCanOnlyBeFlippedToTrue', + () => new PrimarySaleCanOnlyBeFlippedToTrueError(), +); + /** * Attempts to resolve a custom program error from the provided error code. * @category Errors diff --git a/clients/js-solita/src/generated/instructions/index.ts b/clients/js-solita/src/generated/instructions/index.ts index 72604411..0097b597 100644 --- a/clients/js-solita/src/generated/instructions/index.ts +++ b/clients/js-solita/src/generated/instructions/index.ts @@ -13,5 +13,7 @@ export * from './setTreeDelegate'; export * from './transfer'; export * from './unverifyCollection'; export * from './unverifyCreator'; +export * from './updateMetadata'; +export * from './updateMetadataCollectionNft'; export * from './verifyCollection'; export * from './verifyCreator'; diff --git a/clients/js-solita/src/generated/instructions/updateMetadata.ts b/clients/js-solita/src/generated/instructions/updateMetadata.ts new file mode 100644 index 00000000..cb706629 --- /dev/null +++ b/clients/js-solita/src/generated/instructions/updateMetadata.ts @@ -0,0 +1,171 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet'; +import * as web3 from '@solana/web3.js'; +import { MetadataArgs, metadataArgsBeet } from '../types/MetadataArgs'; +import { UpdateArgs, updateArgsBeet } from '../types/UpdateArgs'; + +/** + * @category Instructions + * @category UpdateMetadata + * @category generated + */ +export type UpdateMetadataInstructionArgs = { + root: number[] /* size: 32 */; + nonce: beet.bignum; + index: number; + currentMetadata: beet.COption; + updateArgs: UpdateArgs; +}; +/** + * @category Instructions + * @category UpdateMetadata + * @category generated + */ +export const updateMetadataStruct = new beet.FixableBeetArgsStruct< + UpdateMetadataInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */; + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['nonce', beet.u64], + ['index', beet.u32], + ['currentMetadata', beet.coption(metadataArgsBeet)], + ['updateArgs', updateArgsBeet], + ], + 'UpdateMetadataInstructionArgs', +); +/** + * Accounts required by the _updateMetadata_ instruction + * + * @property [] metadataBuffer (optional) + * @property [] treeAuthority + * @property [**signer**] treeDelegate + * @property [] leafOwner + * @property [] leafDelegate + * @property [**signer**] payer + * @property [_writable_] merkleTree + * @property [] logWrapper + * @property [] compressionProgram + * @property [] tokenMetadataProgram + * @category Instructions + * @category UpdateMetadata + * @category generated + */ +export type UpdateMetadataInstructionAccounts = { + metadataBuffer?: web3.PublicKey; + treeAuthority: web3.PublicKey; + treeDelegate: web3.PublicKey; + leafOwner: web3.PublicKey; + leafDelegate: web3.PublicKey; + payer: web3.PublicKey; + merkleTree: web3.PublicKey; + logWrapper: web3.PublicKey; + compressionProgram: web3.PublicKey; + tokenMetadataProgram: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +}; + +export const updateMetadataInstructionDiscriminator = [170, 182, 43, 239, 97, 78, 225, 186]; + +/** + * Creates a _UpdateMetadata_ instruction. + * + * Optional accounts that are not provided default to the program ID since + * this was indicated in the IDL from which this instruction was generated. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category UpdateMetadata + * @category generated + */ +export function createUpdateMetadataInstruction( + accounts: UpdateMetadataInstructionAccounts, + args: UpdateMetadataInstructionArgs, + programId = new web3.PublicKey('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'), +) { + const [data] = updateMetadataStruct.serialize({ + instructionDiscriminator: updateMetadataInstructionDiscriminator, + ...args, + }); + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.metadataBuffer ?? programId, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.treeAuthority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.treeDelegate, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.leafOwner, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.leafDelegate, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.payer, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.merkleTree, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.logWrapper, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.compressionProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.tokenMetadataProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.systemProgram ?? web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + + if (accounts.anchorRemainingAccounts != null) { + for (const acc of accounts.anchorRemainingAccounts) { + keys.push(acc); + } + } + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }); + return ix; +} diff --git a/clients/js-solita/src/generated/instructions/updateMetadataCollectionNft.ts b/clients/js-solita/src/generated/instructions/updateMetadataCollectionNft.ts new file mode 100644 index 00000000..36dec258 --- /dev/null +++ b/clients/js-solita/src/generated/instructions/updateMetadataCollectionNft.ts @@ -0,0 +1,201 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet'; +import * as web3 from '@solana/web3.js'; +import { MetadataArgs, metadataArgsBeet } from '../types/MetadataArgs'; +import { UpdateArgs, updateArgsBeet } from '../types/UpdateArgs'; + +/** + * @category Instructions + * @category UpdateMetadataCollectionNft + * @category generated + */ +export type UpdateMetadataCollectionNftInstructionArgs = { + root: number[] /* size: 32 */; + nonce: beet.bignum; + index: number; + currentMetadata: beet.COption; + updateArgs: UpdateArgs; +}; +/** + * @category Instructions + * @category UpdateMetadataCollectionNft + * @category generated + */ +export const updateMetadataCollectionNftStruct = new beet.FixableBeetArgsStruct< + UpdateMetadataCollectionNftInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */; + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['nonce', beet.u64], + ['index', beet.u32], + ['currentMetadata', beet.coption(metadataArgsBeet)], + ['updateArgs', updateArgsBeet], + ], + 'UpdateMetadataCollectionNftInstructionArgs', +); +/** + * Accounts required by the _updateMetadataCollectionNft_ instruction + * + * @property [] metadataBuffer (optional) + * @property [] treeAuthority + * @property [**signer**] treeDelegate + * @property [**signer**] collectionAuthority + * @property [] collectionMint + * @property [] collectionMetadata + * @property [] collectionAuthorityRecordPda (optional) + * @property [] leafOwner + * @property [] leafDelegate + * @property [**signer**] payer + * @property [_writable_] merkleTree + * @property [] logWrapper + * @property [] compressionProgram + * @property [] tokenMetadataProgram + * @category Instructions + * @category UpdateMetadataCollectionNft + * @category generated + */ +export type UpdateMetadataCollectionNftInstructionAccounts = { + metadataBuffer?: web3.PublicKey; + treeAuthority: web3.PublicKey; + treeDelegate: web3.PublicKey; + collectionAuthority: web3.PublicKey; + collectionMint: web3.PublicKey; + collectionMetadata: web3.PublicKey; + collectionAuthorityRecordPda?: web3.PublicKey; + leafOwner: web3.PublicKey; + leafDelegate: web3.PublicKey; + payer: web3.PublicKey; + merkleTree: web3.PublicKey; + logWrapper: web3.PublicKey; + compressionProgram: web3.PublicKey; + tokenMetadataProgram: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +}; + +export const updateMetadataCollectionNftInstructionDiscriminator = [ + 244, 12, 175, 194, 227, 28, 102, 215, +]; + +/** + * Creates a _UpdateMetadataCollectionNft_ instruction. + * + * Optional accounts that are not provided default to the program ID since + * this was indicated in the IDL from which this instruction was generated. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category UpdateMetadataCollectionNft + * @category generated + */ +export function createUpdateMetadataCollectionNftInstruction( + accounts: UpdateMetadataCollectionNftInstructionAccounts, + args: UpdateMetadataCollectionNftInstructionArgs, + programId = new web3.PublicKey('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'), +) { + const [data] = updateMetadataCollectionNftStruct.serialize({ + instructionDiscriminator: updateMetadataCollectionNftInstructionDiscriminator, + ...args, + }); + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.metadataBuffer ?? programId, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.treeAuthority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.treeDelegate, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.collectionAuthority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.collectionMint, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.collectionMetadata, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.collectionAuthorityRecordPda ?? programId, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.leafOwner, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.leafDelegate, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.payer, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.merkleTree, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.logWrapper, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.compressionProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.tokenMetadataProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.systemProgram ?? web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + + if (accounts.anchorRemainingAccounts != null) { + for (const acc of accounts.anchorRemainingAccounts) { + keys.push(acc); + } + } + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }); + return ix; +} diff --git a/clients/js-solita/src/generated/types/InstructionName.ts b/clients/js-solita/src/generated/types/InstructionName.ts index 1c925099..62701e45 100644 --- a/clients/js-solita/src/generated/types/InstructionName.ts +++ b/clients/js-solita/src/generated/types/InstructionName.ts @@ -28,6 +28,8 @@ export enum InstructionName { SetAndVerifyCollection, MintToCollectionV1, SetDecompressableState, + UpdateMetadata, + UpdateMetadataCollectionNft, } /** diff --git a/clients/js-solita/src/generated/types/UpdateArgs.ts b/clients/js-solita/src/generated/types/UpdateArgs.ts new file mode 100644 index 00000000..66624959 --- /dev/null +++ b/clients/js-solita/src/generated/types/UpdateArgs.ts @@ -0,0 +1,35 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet'; +import { Creator, creatorBeet } from './Creator'; +export type UpdateArgs = { + name: beet.COption; + symbol: beet.COption; + uri: beet.COption; + creators: beet.COption; + sellerFeeBasisPoints: beet.COption; + primarySaleHappened: beet.COption; + isMutable: beet.COption; +}; + +/** + * @category userTypes + * @category generated + */ +export const updateArgsBeet = new beet.FixableBeetArgsStruct( + [ + ['name', beet.coption(beet.utf8String)], + ['symbol', beet.coption(beet.utf8String)], + ['uri', beet.coption(beet.utf8String)], + ['creators', beet.coption(beet.array(creatorBeet))], + ['sellerFeeBasisPoints', beet.coption(beet.u16)], + ['primarySaleHappened', beet.coption(beet.bool)], + ['isMutable', beet.coption(beet.bool)], + ], + 'UpdateArgs', +); diff --git a/clients/js-solita/src/generated/types/index.ts b/clients/js-solita/src/generated/types/index.ts index d89ada2e..d57211ea 100644 --- a/clients/js-solita/src/generated/types/index.ts +++ b/clients/js-solita/src/generated/types/index.ts @@ -7,6 +7,7 @@ export * from './LeafSchema'; export * from './MetadataArgs'; export * from './TokenProgramVersion'; export * from './TokenStandard'; +export * from './UpdateArgs'; export * from './UseMethod'; export * from './Uses'; export * from './Version'; diff --git a/clients/js-solita/src/mpl-bubblegum.ts b/clients/js-solita/src/mpl-bubblegum.ts index 503bf092..a420d988 100644 --- a/clients/js-solita/src/mpl-bubblegum.ts +++ b/clients/js-solita/src/mpl-bubblegum.ts @@ -30,7 +30,7 @@ export function computeCreatorHash(creators: Creator[]) { Buffer.from([creator.verified ? 1 : 0]), Buffer.from([creator.share]), ]); - }) + }), ); return Buffer.from(keccak_256.digest(bufferOfCreatorData)); } diff --git a/clients/js-solita/tests/main.test.ts b/clients/js-solita/tests/main.test.ts index c70c4074..85b38263 100644 --- a/clients/js-solita/tests/main.test.ts +++ b/clients/js-solita/tests/main.test.ts @@ -15,7 +15,7 @@ import { ConcurrentMerkleTreeAccount, SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, SPL_NOOP_PROGRAM_ID, - ValidDepthSizePair + ValidDepthSizePair, } from '@solana/spl-account-compression'; import { @@ -25,24 +25,30 @@ import { createBurnInstruction, createRedeemInstruction, createDecompressV1Instruction, + createUpdateMetadataInstruction, + createVerifyCreatorInstruction, MetadataArgs, PROGRAM_ID as BUBBLEGUM_PROGRAM_ID, TokenProgramVersion, TokenStandard, Creator, + createMintToCollectionV1Instruction, + createUpdateMetadataCollectionNftInstruction, } from '../src/generated'; -import { getLeafAssetId, computeDataHash, computeCreatorHash, computeCompressedNFTHash } from '../src/mpl-bubblegum'; -import { BN } from 'bn.js'; -import { PROGRAM_ID as TOKEN_METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID -} from "@solana/spl-token"; + getLeafAssetId, + computeDataHash, + computeCreatorHash, + computeCompressedNFTHash, +} from '../src/mpl-bubblegum'; +import { BN } from 'bn.js'; +import { PROGRAM_ID as TOKEN_METADATA_PROGRAM_ID } from '@metaplex-foundation/mpl-token-metadata'; +import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'; +import { assert } from 'chai'; +import { Metaplex, keypairIdentity, CreateCompressedNftOutput } from '@metaplex-foundation/js'; function keypairFromSeed(seed: string) { - const expandedSeed = Uint8Array.from( - Buffer.from(`${seed}`), - ); + const expandedSeed = Uint8Array.from(Buffer.from(`${seed}`)); return Keypair.fromSeed(expandedSeed.slice(0, 32)); } @@ -59,7 +65,53 @@ function makeCompressedNFT(name: string, symbol: string, creators: Creator[] = [ collection: null, primarySaleHappened: false, sellerFeeBasisPoints: 0, - isMutable: false, + isMutable: true, + }; +} + +async function setupCertifiedCollection( + connection: Connection, + name: string, + symbol: string, + uri: string, + updateAuthority: Keypair, +): Promise { + const metaplex = Metaplex.make(connection).use(keypairIdentity(updateAuthority)); + const collectionInfo = await metaplex.nfts().create({ + uri, + name, + sellerFeeBasisPoints: 500, + updateAuthority, + tokenOwner: updateAuthority.publicKey, + symbol, + creators: [{ address: updateAuthority.publicKey, share: 100, authority: updateAuthority }], + isMutable: true, + primarySaleHappened: false, + isCollection: true, + }); + return collectionInfo; +} + +function makeCompressedCollectionNFT( + name: string, + symbol: string, + uri: string, + collection: PublicKey, + creators: Creator[] = [], +): MetadataArgs { + return { + name: name, + symbol: symbol, + uri, + creators, + editionNonce: 0, + tokenProgramVersion: TokenProgramVersion.Original, + tokenStandard: TokenStandard.NonFungible, + uses: null, + collection: { key: collection, verified: false }, + primarySaleHappened: false, + sellerFeeBasisPoints: 0, + isMutable: true, }; } @@ -69,8 +121,8 @@ async function setupTreeWithCompressedNFT( compressedNFT: MetadataArgs, depthSizePair: ValidDepthSizePair = { maxDepth: 14, - maxBufferSize: 64 - } + maxBufferSize: 64, + }, ): Promise<{ merkleTree: PublicKey; }> { @@ -78,7 +130,11 @@ async function setupTreeWithCompressedNFT( const merkleTreeKeypair = Keypair.generate(); const merkleTree = merkleTreeKeypair.publicKey; - const space = getConcurrentMerkleTreeAccountSize(depthSizePair.maxDepth, depthSizePair.maxBufferSize); + const space = getConcurrentMerkleTreeAccountSize( + depthSizePair.maxDepth, + depthSizePair.maxBufferSize, + depthSizePair.maxDepth, + ); const allocTreeIx = SystemProgram.createAccount({ fromPubkey: payer, newAccountPubkey: merkleTree, @@ -135,13 +191,51 @@ async function setupTreeWithCompressedNFT( }; } +async function verifyLeaf( + connection: Connection, + payerKeypair: Keypair, + owner: PublicKey, + delegate: PublicKey, + index: number, + merkleTree: PublicKey, + metadata: MetadataArgs, +): Promise<{ success: boolean }> { + const accountInfo = await connection.getAccountInfo(merkleTree, { commitment: 'confirmed' }); + const account = ConcurrentMerkleTreeAccount.fromBuffer(accountInfo!.data!); + + // Verify leaf exists. + const leafIndex = new BN.BN(index); + const assetId = await getLeafAssetId(merkleTree, leafIndex); + const verifyLeafIx = createVerifyLeafIx(merkleTree, { + root: account.getCurrentRoot(), + leaf: computeCompressedNFTHash(assetId, owner, delegate, leafIndex, metadata), + leafIndex: index, + proof: [], + }); + const tx = new Transaction().add(verifyLeafIx); + const txId = await sendAndConfirmTransaction(connection, tx, [payerKeypair], { + commitment: 'confirmed', + skipPreflight: true, + }); + console.log('Verified NFT existence:', txId); + return { + success: true, + }; +} + describe('Bubblegum tests', () => { - const connection = new Connection('http://localhost:8899'); + const connection = new Connection('http://127.0.0.1:8899'); const payerKeypair = keypairFromSeed('metaplex-test09870987098709870987009709870987098709870987'); const payer = payerKeypair.publicKey; beforeEach(async () => { - await connection.requestAirdrop(payer, LAMPORTS_PER_SOL); + const airdropSig = await connection.requestAirdrop(payer, 10 * LAMPORTS_PER_SOL); + const latestBlockhash = await connection.getLatestBlockhash(); + await connection.confirmTransaction({ + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature: airdropSig, + }); }); it('Can create a Bubblegum tree and mint to it', async () => { const compressedNFT: MetadataArgs = { @@ -158,60 +252,612 @@ describe('Bubblegum tests', () => { sellerFeeBasisPoints: 0, isMutable: false, }; - await setupTreeWithCompressedNFT(connection, payerKeypair, compressedNFT, { maxDepth: 14, maxBufferSize: 64 }); + await setupTreeWithCompressedNFT(connection, payerKeypair, compressedNFT, { + maxDepth: 14, + maxBufferSize: 64, + }); }); describe('Unit test compressed NFT instructions', () => { - let merkleTree: PublicKey; - let creators: Creator[] = [ + const MAX_DEPTH = 14; + const secondCreator = new Keypair(); + const creators: Creator[] = [ { address: payer, share: 55, verified: false, }, { - address: new Keypair().publicKey, + address: secondCreator.publicKey, share: 45, verified: false, }, - ] + ]; + let merkleTree: PublicKey; const originalCompressedNFT = makeCompressedNFT('test', 'TST', creators); beforeEach(async () => { - await connection.requestAirdrop(payer, LAMPORTS_PER_SOL); const result = await setupTreeWithCompressedNFT( connection, payerKeypair, originalCompressedNFT, { - maxDepth: 14, + maxDepth: MAX_DEPTH, maxBufferSize: 64, - } + }, ); merkleTree = result.merkleTree; }); - it('Can verify existence a compressed NFT', async () => { - // Todo(@ngundotra): expose commitment level in ConcurrentMerkleTreeAccount.fromAddress - const accountInfo = await connection.getAccountInfo(merkleTree, { commitment: 'confirmed' }); - const account = ConcurrentMerkleTreeAccount.fromBuffer(accountInfo!.data!); - // Verify leaf exists. - const leafIndex = new BN.BN(0); - const assetId = await getLeafAssetId(merkleTree, leafIndex); - const verifyLeafIx = createVerifyLeafIx( + it('Can verify existence of a compressed NFT', async () => { + const result = await verifyLeaf( + connection, + payerKeypair, + payerKeypair.publicKey, + payerKeypair.publicKey, + 0, merkleTree, - { - root: account.getCurrentRoot(), - leaf: computeCompressedNFTHash(assetId, payer, payer, leafIndex, originalCompressedNFT), - leafIndex: 0, - proof: [], - } + originalCompressedNFT, ); - const tx = new Transaction().add(verifyLeafIx); - const txId = await sendAndConfirmTransaction(connection, tx, [payerKeypair], { - commitment: 'confirmed', - skipPreflight: true, + assert(result.success, 'Failed to verify leaf'); + }); + + describe('Update metadata', () => { + let treeAuthority: PublicKey; + beforeEach(async () => { + [treeAuthority] = PublicKey.findProgramAddressSync( + [merkleTree.toBuffer()], + BUBBLEGUM_PROGRAM_ID, + ); + }); + describe('Not linked to collection', () => { + let merkleAccount: ConcurrentMerkleTreeAccount; + beforeEach(async () => { + const merkleAccountInfo = await connection.getAccountInfo(merkleTree, { + commitment: 'confirmed', + }); + merkleAccount = ConcurrentMerkleTreeAccount.fromBuffer(merkleAccountInfo!.data!); + }); + it('Simple update', async () => { + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: null, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 0, + index: 0, + currentMetadata: originalCompressedNFT, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + const updateMetadataTxId = await sendAndConfirmTransaction( + connection, + updateMetadataTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('Update metadata tx success:', updateMetadataTxId); + + const newMetadataArgs: MetadataArgs = { + ...originalCompressedNFT, + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + }; + + // We should now be able to verify the new leaf with the metadata replaced + await verifyLeaf( + connection, + payerKeypair, + payerKeypair.publicKey, + payerKeypair.publicKey, + 0, + merkleTree, + newMetadataArgs, + ); + }); + it('Cannot verify currently unverified creator if not signer', async () => { + // Attempt to verify second creator, should not work. + const updatedCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: false, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: true, + }, + ]; + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: updatedCreators, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 0, + index: 0, + currentMetadata: originalCompressedNFT, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + try { + await sendAndConfirmTransaction(connection, updateMetadataTx, [payerKeypair], { + commitment: 'confirmed', + skipPreflight: true, + }); + assert.fail( + 'Metadata update verifiying currently unverified creator if not signer should fail', + ); + } catch (err) { + assert( + err.message.includes('"Custom":6006'), + 'Did not fail for correct reason! ' + err.message, + ); + } + }); + + it('Can verify currently unverified creator if signer', async () => { + // Attempt to verify payer, should work. + const updatedCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: true, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: false, + }, + ]; + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: updatedCreators, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 0, + index: 0, + currentMetadata: originalCompressedNFT, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + const updateMetadataTxId = await sendAndConfirmTransaction( + connection, + updateMetadataTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('Update metadata success, payer verified:', updateMetadataTxId); + }); + + it('Cannot unverify currently verified creator if not signer', async () => { + // Verify second creator. + await connection.requestAirdrop(secondCreator.publicKey, LAMPORTS_PER_SOL); + const verifyCreatorIx = createVerifyCreatorInstruction( + { + treeAuthority, + leafOwner: payer, + leafDelegate: payer, + merkleTree, + payer: secondCreator.publicKey, + creator: secondCreator.publicKey, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + dataHash: Array.from(computeDataHash(originalCompressedNFT)), + creatorHash: Array.from(computeCreatorHash(originalCompressedNFT.creators)), + nonce: 0, + index: 0, + message: originalCompressedNFT, + }, + ); + + const verifyCreatorTx = new Transaction().add(verifyCreatorIx); + verifyCreatorTx.feePayer = secondCreator.publicKey; + const verifyCreatorTxId = await sendAndConfirmTransaction( + connection, + verifyCreatorTx, + [secondCreator], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('NFT verify second creator Tx:', verifyCreatorTxId); + + // This is the state after previous creator verification. + const currentCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: false, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: true, + }, + ]; + const currentMetadata = makeCompressedNFT('test', 'TST', currentCreators); + + // Attempt to unverify second creator, should not work. + const updatedCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: false, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: false, + }, + ]; + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: updatedCreators, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 0, + index: 0, + currentMetadata, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + try { + await sendAndConfirmTransaction(connection, updateMetadataTx, [payerKeypair], { + commitment: 'confirmed', + skipPreflight: true, + }); + assert.fail( + 'Metadata update unverifying currently verified creator if not signer should fail', + ); + } catch (err) { + assert( + err.message.includes('"Custom":6041'), + 'Did not fail for correct reason! ' + err.message, + ); + } + }); + + it('Can unverify currently verified creator if signer', async () => { + // Verify payer. + const verifyCreatorIx = createVerifyCreatorInstruction( + { + treeAuthority, + leafOwner: payer, + leafDelegate: payer, + merkleTree, + payer, + creator: payer, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + dataHash: Array.from(computeDataHash(originalCompressedNFT)), + creatorHash: Array.from(computeCreatorHash(originalCompressedNFT.creators)), + nonce: 0, + index: 0, + message: originalCompressedNFT, + }, + ); + + const verifyCreatorTx = new Transaction().add(verifyCreatorIx); + verifyCreatorTx.feePayer = payer; + const verifyCreatorTxId = await sendAndConfirmTransaction( + connection, + verifyCreatorTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('NFT verify first creator Tx:', verifyCreatorTxId); + + // This is the state after previous creator verification. + const currentCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: true, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: false, + }, + ]; + const currentMetadata = makeCompressedNFT('test', 'TST', currentCreators); + + // Attempt to unverify payer, should work. + const updatedCreators: Creator[] = [ + { + address: payer, + share: 55, + verified: false, + }, + { + address: secondCreator.publicKey, + share: 45, + verified: false, + }, + ]; + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: updatedCreators, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 0, + index: 0, + currentMetadata, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + const updateMetadataTxId = await sendAndConfirmTransaction( + connection, + updateMetadataTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('Update metadata success, payer unverified:', updateMetadataTxId); + }); + }); + it('Linked to verified collection update', async () => { + const collection = await setupCertifiedCollection( + connection, + 'ColName', + 'ColSymbol', + 'https://mycollection.com', + payerKeypair, + ); + const [bubblegumSigner] = PublicKey.findProgramAddressSync( + [Buffer.from('collection_cpi')], + BUBBLEGUM_PROGRAM_ID, + ); + const metadataArgs = makeCompressedCollectionNFT( + 'cname', + 'csymbol', + 'https://myuri.com', + collection.mintAddress, + ); + + // Mint a New NFT to a Collection + const mintToCollectionIx = createMintToCollectionV1Instruction( + { + treeAuthority, + leafOwner: payer, + leafDelegate: payer, + merkleTree, + payer, + treeDelegate: payer, + collectionAuthority: payer, + collectionAuthorityRecordPda: BUBBLEGUM_PROGRAM_ID, + collectionMint: collection.mintAddress, + collectionMetadata: collection.metadataAddress, + editionAccount: collection.masterEditionAddress, + bubblegumSigner, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + metadataArgs: metadataArgs, + }, + ); + + const mintToCollectionTxId = await sendAndConfirmTransaction( + connection, + new Transaction().add(mintToCollectionIx), + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('Mint to Collection Success:', mintToCollectionTxId); + + const merkleAccountInfo = await connection.getAccountInfo(merkleTree, { + commitment: 'confirmed', + }); + const merkleAccount = ConcurrentMerkleTreeAccount.fromBuffer(merkleAccountInfo!.data!); + + // MintToCollectionV1 will update verified to true in MetadataArgs before minting to the tree + // Thus we must alter the MetadataArgs object we expect to exist in the leaf before the update to match + const currentMetadataArgs = { + ...metadataArgs, + collection: { key: metadataArgs.collection!.key, verified: true }, + }; + + const updateArgs = { + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + creators: null, + sellerFeeBasisPoints: null, + primarySaleHappened: null, + isMutable: null, + }; + const updateMetadataIx = createUpdateMetadataCollectionNftInstruction( + { + metadataBuffer: BUBBLEGUM_PROGRAM_ID, + collectionAuthority: payer, + collectionMint: collection.mintAddress, + collectionMetadata: collection.metadataAddress, + collectionAuthorityRecordPda: BUBBLEGUM_PROGRAM_ID, + treeAuthority, + treeDelegate: payer, + leafOwner: payer, + leafDelegate: payer, + payer, + merkleTree, + logWrapper: SPL_NOOP_PROGRAM_ID, + compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + }, + { + root: Array.from(merkleAccount.getCurrentRoot()), + nonce: 1, + index: 1, + currentMetadata: currentMetadataArgs, + updateArgs: updateArgs, + }, + ); + + const updateMetadataTx = new Transaction().add(updateMetadataIx); + const updateMetadataTxId = await sendAndConfirmTransaction( + connection, + updateMetadataTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); + + console.log('Update metadata tx success:', updateMetadataTxId); + + const newMetadataArgs: MetadataArgs = { + ...currentMetadataArgs, + name: 'NewName', + symbol: 'NewSymbol', + uri: 'https://foobar.com', + }; + + // We should now be able to verify the new leaf with the metadata replaced + await verifyLeaf( + connection, + payerKeypair, + payerKeypair.publicKey, + payerKeypair.publicKey, + 1, + merkleTree, + newMetadataArgs, + ); }); - console.log('Verified NFT existence:', txId); }); it('Can transfer and burn a compressed NFT', async () => { @@ -240,7 +886,7 @@ describe('Bubblegum tests', () => { dataHash: Array.from(computeDataHash(originalCompressedNFT)), creatorHash: Array.from(computeCreatorHash(originalCompressedNFT.creators)), nonce: 0, - index: 0 + index: 0, }, ); @@ -268,16 +914,21 @@ describe('Bubblegum tests', () => { dataHash: Array.from(computeDataHash(originalCompressedNFT)), creatorHash: Array.from(computeCreatorHash(originalCompressedNFT.creators)), nonce: 0, - index: 0 + index: 0, }, ); const burnTx = new Transaction().add(burnIx); burnTx.feePayer = payer; - const burnTxId = await sendAndConfirmTransaction(connection, burnTx, [payerKeypair, newLeafOwnerKeypair], { - commitment: 'confirmed', - skipPreflight: true, - }); + const burnTxId = await sendAndConfirmTransaction( + connection, + burnTx, + [payerKeypair, newLeafOwnerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); console.log('NFT burn tx:', burnTxId); }); @@ -292,7 +943,11 @@ describe('Bubblegum tests', () => { ); const nonce = new BN.BN(0); const [voucher] = PublicKey.findProgramAddressSync( - [Buffer.from('voucher', 'utf8'), merkleTree.toBuffer(), Uint8Array.from(nonce.toArray('le', 8))], + [ + Buffer.from('voucher', 'utf8'), + merkleTree.toBuffer(), + Uint8Array.from(nonce.toArray('le', 8)), + ], BUBBLEGUM_PROGRAM_ID, ); @@ -311,7 +966,7 @@ describe('Bubblegum tests', () => { dataHash: Array.from(computeDataHash(originalCompressedNFT)), creatorHash: Array.from(computeCreatorHash(originalCompressedNFT.creators)), nonce, - index: 0 + index: 0, }, ); @@ -326,7 +981,11 @@ describe('Bubblegum tests', () => { // Decompress. const [mint] = PublicKey.findProgramAddressSync( - [Buffer.from('asset', 'utf8'), merkleTree.toBuffer(), Uint8Array.from(nonce.toArray('le', 8))], + [ + Buffer.from('asset', 'utf8'), + merkleTree.toBuffer(), + Uint8Array.from(nonce.toArray('le', 8)), + ], BUBBLEGUM_PROGRAM_ID, ); const [tokenAccount] = PublicKey.findProgramAddressSync( @@ -335,14 +994,19 @@ describe('Bubblegum tests', () => { ); const [mintAuthority] = PublicKey.findProgramAddressSync( [mint.toBuffer()], - BUBBLEGUM_PROGRAM_ID + BUBBLEGUM_PROGRAM_ID, ); const [metadata] = PublicKey.findProgramAddressSync( [Buffer.from('metadata', 'utf8'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), mint.toBuffer()], TOKEN_METADATA_PROGRAM_ID, ); const [masterEdition] = PublicKey.findProgramAddressSync( - [Buffer.from('metadata', 'utf8'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), mint.toBuffer(), Buffer.from('edition', 'utf8')], + [ + Buffer.from('metadata', 'utf8'), + TOKEN_METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + Buffer.from('edition', 'utf8'), + ], TOKEN_METADATA_PROGRAM_ID, ); @@ -361,20 +1025,23 @@ describe('Bubblegum tests', () => { logWrapper: SPL_NOOP_PROGRAM_ID, }, { - metadata: originalCompressedNFT + metadata: originalCompressedNFT, }, ); const decompressTx = new Transaction().add(decompressIx); decompressTx.feePayer = payer; - const decompressTxId = await sendAndConfirmTransaction(connection, decompressTx, [payerKeypair], { - commitment: 'confirmed', - skipPreflight: true, - }); + const decompressTxId = await sendAndConfirmTransaction( + connection, + decompressTx, + [payerKeypair], + { + commitment: 'confirmed', + skipPreflight: true, + }, + ); console.log('NFT decompress tx:', decompressTxId); }); - - // TODO(@metaplex): add collection tests here }); }); diff --git a/clients/js-solita/yarn.lock b/clients/js-solita/yarn.lock index 835d2253..2ca153ce 100644 --- a/clients/js-solita/yarn.lock +++ b/clients/js-solita/yarn.lock @@ -311,6 +311,31 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@bundlr-network/client@^0.8.8": + version "0.8.9" + resolved "https://registry.yarnpkg.com/@bundlr-network/client/-/client-0.8.9.tgz#58e969a5d80f8d25d212d46bb7a060730a3c1736" + integrity sha512-SJ7BAt/KhONeFQ0+nbqrw2DUWrsev6y6cmlXt+3x7fPCkw7OJwudtxV/h2nBteZd65NXjqw8yzkmLiLfZ7CCRA== + dependencies: + "@solana/wallet-adapter-base" "^0.9.2" + "@solana/web3.js" "^1.36.0" + "@supercharge/promise-pool" "^2.1.0" + algosdk "^1.13.1" + arbundles "^0.6.21" + arweave "^1.11.4" + async-retry "^1.3.3" + axios "^0.25.0" + base64url "^3.0.1" + bignumber.js "^9.0.1" + bs58 "^4.0.1" + commander "^8.2.0" + csv "^6.0.5" + ethers "^5.5.1" + inquirer "^8.2.0" + js-sha256 "^0.9.0" + mime-types "^2.1.34" + near-api-js "^0.44.2" + near-seed-phrase "^0.2.0" + "@eslint/eslintrc@^1.3.3": version "1.3.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" @@ -326,6 +351,348 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@hapi/hoek@^9.0.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -664,7 +1031,7 @@ bs58 "^5.0.0" debug "^4.3.4" -"@metaplex-foundation/beet-solana@^0.3.1": +"@metaplex-foundation/beet-solana@^0.3.0", "@metaplex-foundation/beet-solana@^0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet-solana/-/beet-solana-0.3.1.tgz#4b37cda5c7f32ffd2bdd8b3164edc05c6463ab35" integrity sha512-tgyEl6dvtLln8XX81JyBvWjIiEcjTkUwZbrM5dIobTmoqMuGewSyk9CClno8qsMsFdB5T3jC91Rjeqmu/6xk2g== @@ -683,11 +1050,132 @@ bn.js "^5.2.0" debug "^4.3.3" +"@metaplex-foundation/beet@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet/-/beet-0.4.0.tgz#eb2a0a6eb084bb25d67dd9bed2f7387ee7e63a55" + integrity sha512-2OAKJnLatCc3mBXNL0QmWVQKAWK2C7XDfepgL0p/9+8oSx4bmRAFHFqptl1A/C0U5O3dxGwKfmKluW161OVGcA== + dependencies: + ansicolors "^0.3.2" + bn.js "^5.2.0" + debug "^4.3.3" + +"@metaplex-foundation/beet@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet/-/beet-0.6.1.tgz#6331bdde0648bf2cae6f9e482f8e3552db05d69f" + integrity sha512-OYgnijLFzw0cdUlRKH5POp0unQECPOW9muJ2X3QIVyak5G6I6l/rKo72sICgPLIFKdmsi2jmnkuLY7wp14iXdw== + dependencies: + ansicolors "^0.3.2" + bn.js "^5.2.0" + debug "^4.3.3" + "@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== +"@metaplex-foundation/js@^0.19.4": + version "0.19.4" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/js/-/js-0.19.4.tgz#992fe6b48e8dd0374d99028a07f75547cb6381d7" + integrity sha512-fiAaMl4p7v1tcU7ZoEr1lCzE6JR2gEWGeHOBarLTpiCjMe8ni3E+cukJQC6p0Ik+Z6IIFtEVNNy5OnMS3LLS4A== + dependencies: + "@bundlr-network/client" "^0.8.8" + "@metaplex-foundation/beet" "0.7.1" + "@metaplex-foundation/mpl-auction-house" "^2.3.0" + "@metaplex-foundation/mpl-bubblegum" "^0.6.2" + "@metaplex-foundation/mpl-candy-guard" "^0.3.0" + "@metaplex-foundation/mpl-candy-machine" "^5.0.0" + "@metaplex-foundation/mpl-candy-machine-core" "^0.1.2" + "@metaplex-foundation/mpl-token-metadata" "^2.11.0" + "@noble/ed25519" "^1.7.1" + "@noble/hashes" "^1.1.3" + "@solana/spl-account-compression" "^0.1.8" + "@solana/spl-token" "^0.3.5" + "@solana/web3.js" "^1.63.1" + bignumber.js "^9.0.2" + bn.js "^5.2.1" + bs58 "^5.0.0" + buffer "^6.0.3" + debug "^4.3.4" + eventemitter3 "^4.0.7" + lodash.clonedeep "^4.5.0" + lodash.isequal "^4.5.0" + merkletreejs "^0.2.32" + mime "^3.0.0" + node-fetch "^2.6.7" + +"@metaplex-foundation/mpl-auction-house@^2.3.0": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-auction-house/-/mpl-auction-house-2.5.1.tgz#ea0e21e594b0db5e73f88688eb2e7c9b748b378b" + integrity sha512-O+IAdYVaoOvgACB8pm+1lF5BNEjl0COkqny2Ho8KQZwka6aC/vHbZ239yRwAMtJhf5992BPFdT4oifjyE0O+Mw== + dependencies: + "@metaplex-foundation/beet" "^0.6.1" + "@metaplex-foundation/beet-solana" "^0.3.1" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/spl-token" "^0.3.5" + "@solana/web3.js" "^1.56.2" + bn.js "^5.2.0" + +"@metaplex-foundation/mpl-bubblegum@^0.6.2": + version "0.6.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-bubblegum/-/mpl-bubblegum-0.6.2.tgz#e1b098ccef10899b0d759a03e3d4b1ae7bdc9f0c" + integrity sha512-4tF7/FFSNtpozuIGD7gMKcqK2D49eVXZ144xiowC5H1iBeu009/oj2m8Tj6n4DpYFKWJ2JQhhhk0a2q7x0Begw== + dependencies: + "@metaplex-foundation/beet" "0.7.1" + "@metaplex-foundation/beet-solana" "0.4.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@metaplex-foundation/mpl-token-metadata" "^2.5.2" + "@solana/spl-account-compression" "^0.1.4" + "@solana/spl-token" "^0.1.8" + "@solana/web3.js" "^1.50.1" + bn.js "^5.2.0" + js-sha3 "^0.8.0" + +"@metaplex-foundation/mpl-candy-guard@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-candy-guard/-/mpl-candy-guard-0.3.2.tgz#426e89793676b42e9bbb5e523303fba36ccd5281" + integrity sha512-QWXzPDz+6OR3957LtfW6/rcGvFWS/0AeHJa/BUO2VEVQxN769dupsKGtrsS8o5RzXCeap3wrCtDSNxN3dnWu4Q== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/web3.js" "^1.66.2" + bn.js "^5.2.0" + +"@metaplex-foundation/mpl-candy-machine-core@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-candy-machine-core/-/mpl-candy-machine-core-0.1.2.tgz#07e19558d0ef120fac1d8612ae4de90d52cd4d1f" + integrity sha512-jjDkRvMR+iykt7guQ7qVnOHTZedql0lq3xqWDMaenAUCH3Xrf2zKATThhJppIVNX1/YtgBOO3lGqhaFbaI4pCw== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/web3.js" "^1.56.2" + bn.js "^5.2.0" + +"@metaplex-foundation/mpl-candy-machine@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-candy-machine/-/mpl-candy-machine-5.1.0.tgz#9469914b312ac36b7cf608123508f3f3f5080010" + integrity sha512-pjHpUpWVOCDxK3l6dXxfmJKNQmbjBqnm5ElOl1mJAygnzO8NIPQvrP89y6xSNyo8qZsJyt4ZMYUyD0TdbtKZXQ== + dependencies: + "@metaplex-foundation/beet" "^0.7.1" + "@metaplex-foundation/beet-solana" "^0.4.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/spl-token" "^0.3.6" + "@solana/web3.js" "^1.66.2" + +"@metaplex-foundation/mpl-token-metadata@^2.11.0": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.12.0.tgz#9817b2d133c5af46c28ab284316b6985ef62b331" + integrity sha512-DetC2F5MwMRt4TmLXwj8PJ8nClRYGMecSQ4pr9iKKa+rWertHgKoJHl2XhheRa084GtL7i0ssOKbX2gfYFosuQ== + dependencies: + "@metaplex-foundation/beet" "^0.7.1" + "@metaplex-foundation/beet-solana" "^0.4.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/spl-token" "^0.3.6" + "@solana/web3.js" "^1.66.2" + bn.js "^5.2.0" + debug "^4.3.4" + "@metaplex-foundation/mpl-token-metadata@^2.5.2": version "2.5.2" resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.5.2.tgz#ec84464e2bf65bf491abdc71c3882e5973dd9978" @@ -745,12 +1233,17 @@ dependencies: "@noble/hashes" "1.3.2" +"@noble/ed25519@^1.6.1", "@noble/ed25519@^1.7.1": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.3.tgz#57e1677bf6885354b466c38e2b620c62f45a7123" + integrity sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ== + "@noble/ed25519@^1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.1.tgz#6899660f6fbb97798a6fbd227227c4589a454724" integrity sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw== -"@noble/hashes@1.3.2", "@noble/hashes@^1.3.1": +"@noble/hashes@1.3.2", "@noble/hashes@^1.1.3", "@noble/hashes@^1.3.1": version "1.3.2" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== @@ -786,6 +1279,18 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@randlabs/communication-bridge@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@randlabs/communication-bridge/-/communication-bridge-1.0.1.tgz#d1ecfc29157afcbb0ca2d73122d67905eecb5bf3" + integrity sha512-CzS0U8IFfXNK7QaJFE4pjbxDGfPjbXBEsEaCn9FN15F+ouSAEUQkva3Gl66hrkBZOGexKFEWMwUHIDKpZ2hfVg== + +"@randlabs/myalgo-connect@^1.1.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@randlabs/myalgo-connect/-/myalgo-connect-1.4.2.tgz#ce3ad97b3889ea21da75852187511d3f6be0fa05" + integrity sha512-K9hEyUi7G8tqOp7kWIALJLVbGCByhilcy6123WfcorxWwiE1sbQupPyIU5f3YdQK6wMjBsyTWiLW52ZBMp7sXA== + dependencies: + "@randlabs/communication-bridge" "1.0.1" + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -854,6 +1359,18 @@ bn.js "^5.2.1" borsh "^0.7.0" +"@solana/spl-account-compression@^0.1.8": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@solana/spl-account-compression/-/spl-account-compression-0.1.8.tgz#0c1fd052befddd90c2e8704b0b685761799d4bae" + integrity sha512-vsvsx358pVFPtyNd8zIZy0lezR0NuvOykQ29Zq+8oto+kHfTXMGXXQ1tKHUYke6XkINIWLFVg/jDi+1D9RYaqQ== + dependencies: + "@metaplex-foundation/beet" "^0.7.1" + "@metaplex-foundation/beet-solana" "^0.4.0" + bn.js "^5.2.1" + borsh "^0.7.0" + js-sha3 "^0.8.0" + typescript-collections "^1.3.3" + "@solana/spl-token-registry@^0.2.2405": version "0.2.4574" resolved "https://registry.yarnpkg.com/@solana/spl-token-registry/-/spl-token-registry-0.2.4574.tgz#13f4636b7bec90d2bb43bbbb83512cd90d2ce257" @@ -883,6 +1400,15 @@ "@solana/web3.js" "^1.32.0" start-server-and-test "^1.14.0" +"@solana/spl-token@^0.3.5": + version "0.3.8" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.8.tgz#8e9515ea876e40a4cc1040af865f61fc51d27edf" + integrity sha512-ogwGDcunP9Lkj+9CODOWMiVJEdRtqHAtX2rWF62KxnnSWtMZtV9rDhTrZFshiyJmxDnRL/1nKE1yJHg4jjs3gg== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + buffer "^6.0.3" + "@solana/spl-token@^0.3.6": version "0.3.6" resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.6.tgz#35473ad2ed71fe91e5754a2ac72901e1b8b26a42" @@ -892,6 +1418,24 @@ "@solana/buffer-layout-utils" "^0.2.0" buffer "^6.0.3" +"@solana/wallet-adapter-base@^0.9.2": + version "0.9.23" + resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.23.tgz#3b17c28afd44e173f44f658bf9700fd637e12a11" + integrity sha512-apqMuYwFp1jFi55NxDfvXUX2x1T0Zh07MxhZ/nCCTGys5raSfYUh82zen2BLv8BSDj/JxZ2P/s7jrQZGrX8uAw== + dependencies: + "@solana/wallet-standard-features" "^1.1.0" + "@wallet-standard/base" "^1.0.1" + "@wallet-standard/features" "^1.0.3" + eventemitter3 "^4.0.7" + +"@solana/wallet-standard-features@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@solana/wallet-standard-features/-/wallet-standard-features-1.1.0.tgz#516d78626dd0802d299db49298e4ebbec3433940" + integrity sha512-oVyygxfYkkF5INYL0GuD8GFmNO/wd45zNesIqGCFE6X66BYxmI6HmyzQJCcZTZ0BNsezlVg4t+3MCL5AhfFoGA== + dependencies: + "@wallet-standard/base" "^1.0.1" + "@wallet-standard/features" "^1.0.3" + "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.50.1", "@solana/web3.js@^1.56.2", "@solana/web3.js@^1.66.2": version "1.69.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.69.0.tgz#1756b1a26087172291c0b5163d3b44d24eef8aa7" @@ -913,6 +1457,27 @@ rpc-websockets "^7.5.0" superstruct "^0.14.2" +"@solana/web3.js@^1.36.0": + version "1.78.5" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.78.5.tgz#591cd47423cdb0b5e5cb7e8dc4dc70b2abe02f80" + integrity sha512-2ZHsDNqkKdglJQrIvJ3p2DmgS3cGnary3VJyqt9C1SPrpAtLYzcElr3xyXJOznyQTU/8AMw+GoF11lFoKbicKg== + dependencies: + "@babel/runtime" "^7.22.6" + "@noble/curves" "^1.0.0" + "@noble/hashes" "^1.3.1" + "@solana/buffer-layout" "^4.0.0" + agentkeepalive "^4.3.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.0" + node-fetch "^2.6.12" + rpc-websockets "^7.5.1" + superstruct "^0.14.2" + "@solana/web3.js@^1.63.1": version "1.78.4" resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.4.tgz#e8ca9abe4ec2af5fc540c1d272efee24aaffedb3" @@ -934,6 +1499,11 @@ rpc-websockets "^7.5.1" superstruct "^0.14.2" +"@supercharge/promise-pool@^2.1.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@supercharge/promise-pool/-/promise-pool-2.4.0.tgz#6050eea8c2d7f92ddd4ddc582ee328b15c034ad3" + integrity sha512-O9CMipBlq5OObdt1uKJGIzm9cdjpPWfj+a+Zw9EgWKxaMNHKC7EU7X9taj3H0EGQNLOSq2jAcOa3EzxlfHsD6w== + "@types/babel__core@^7.1.14": version "7.1.20" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" @@ -967,7 +1537,7 @@ dependencies: "@babel/types" "^7.3.0" -"@types/bn.js@^5.1.1": +"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== @@ -1052,16 +1622,35 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== +"@types/node@11.11.6": + version "11.11.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" + integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== + "@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/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + "@types/prettier@^2.1.5": version "2.7.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.12": version "7.3.13" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" @@ -1193,6 +1782,18 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +"@wallet-standard/base@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@wallet-standard/base/-/base-1.0.1.tgz#860dd94d47c9e3c5c43b79d91c6afdbd7a36264e" + integrity sha512-1To3ekMfzhYxe0Yhkpri+Fedq0SYcfrOfJi3vbLjMwF2qiKPjTGLwZkf2C9ftdQmxES+hmxhBzTwF4KgcOwf8w== + +"@wallet-standard/features@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@wallet-standard/features/-/features-1.0.3.tgz#c992876c5e4f7a0672f8869c4146c87e0dfe48c8" + integrity sha512-m8475I6W5LTatTZuUz5JJNK42wFRgkJTB0I9tkruMwfqBF2UN2eomkYNVf9RbrsROelCRzSFmugqjKZBFaubsA== + dependencies: + "@wallet-standard/base" "^1.0.1" + JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1219,6 +1820,11 @@ acorn@^8.8.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + agentkeepalive@^4.3.0: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" @@ -1236,6 +1842,27 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +algo-msgpack-with-bigint@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz#38bb717220525b3ff42232eefdcd9efb9ad405d6" + integrity sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ== + +algosdk@^1.13.1: + version "1.24.1" + resolved "https://registry.yarnpkg.com/algosdk/-/algosdk-1.24.1.tgz#afc4102457ae0c38a32de6b84f4d713aedfc9e89" + integrity sha512-9moZxdqeJ6GdE4N6fA/GlUP4LrbLZMYcYkt141J4Ss68OfEgH9qW0wBuZ3ZOKEx/xjc5bg7mLP2Gjg7nwrkmww== + dependencies: + algo-msgpack-with-bigint "^2.1.1" + buffer "^6.0.2" + cross-fetch "^3.1.5" + hi-base32 "^0.5.1" + js-sha256 "^0.9.0" + js-sha3 "^0.8.0" + js-sha512 "^0.8.0" + json-bigint "^1.0.0" + tweetnacl "^1.0.3" + vlq "^2.0.4" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -1290,6 +1917,35 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +arbundles@^0.6.21: + version "0.6.22" + resolved "https://registry.yarnpkg.com/arbundles/-/arbundles-0.6.22.tgz#0fd58ec76514f1d6c2db7c5870a6232314f52de6" + integrity sha512-QlSavBHk59mNqgQ6ScxlqaBJlDbSmSrK/uTcF3HojLAZ/4aufTkVTBjl1hSfZ/ZN45oIPgJC05R8SmVARF+8VA== + dependencies: + "@noble/ed25519" "^1.6.1" + "@randlabs/myalgo-connect" "^1.1.2" + "@solana/wallet-adapter-base" "^0.9.2" + algosdk "^1.13.1" + arweave "^1.11.4" + arweave-stream-tx "^1.1.0" + avsc "https://github.com/Bundlr-Network/avsc#csp-fixes" + axios "^0.21.3" + base64url "^3.0.1" + bs58 "^4.0.1" + ethers "^5.5.1" + keccak "^3.0.2" + multistream "^4.1.0" + process "^0.11.10" + secp256k1 "^4.0.2" + tmp-promise "^3.0.2" + +arconnect@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/arconnect/-/arconnect-0.4.2.tgz#83de7638fb46183e82d7ec7efb5594c5f7cdc806" + integrity sha512-Jkpd4QL3TVqnd3U683gzXmZUVqBUy17DdJDuL/3D9rkysLgX6ymJ2e+sR+xyZF5Rh42CBqDXWNMmCjBXeP7Gbw== + dependencies: + arweave "^1.10.13" + arg@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" @@ -1327,17 +1983,55 @@ arrify@^1.0.0: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +arweave-stream-tx@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/arweave-stream-tx/-/arweave-stream-tx-1.2.2.tgz#2d5c66554301baacd02586a152fbb198b422112f" + integrity sha512-bNt9rj0hbAEzoUZEF2s6WJbIz8nasZlZpxIw03Xm8fzb9gRiiZlZGW3lxQLjfc9Z0VRUWDzwtqoYeEoB/JDToQ== + dependencies: + exponential-backoff "^3.1.0" + +arweave@^1.10.13, arweave@^1.11.4: + version "1.14.0" + resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.14.0.tgz#a4424455a4137b7708cdc627b5bda1881d6881b5" + integrity sha512-P2g9FjbJZQfk0Q3a5R2aCyPP3jen3ZN6Oxh6p6BlwEGHn5M5O0KvZSaiNV4X/PENgnZA4+afOf9MR3ySGcR3JQ== + dependencies: + arconnect "^0.4.2" + asn1.js "^5.4.1" + base64-js "^1.5.1" + bignumber.js "^9.0.2" + +asn1.js@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + 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-retry@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" + integrity sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw== + dependencies: + retry "0.13.1" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -axios@^0.21.1: +"avsc@https://github.com/Bundlr-Network/avsc#csp-fixes": + version "5.4.7" + resolved "https://github.com/Bundlr-Network/avsc#a730cc8018b79e114b6a3381bbb57760a24c6cef" + +axios@^0.21.1, axios@^0.21.3: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== @@ -1428,7 +2122,7 @@ base-x@^4.0.0: resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== -base64-js@^1.3.1: +base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -1438,6 +2132,16 @@ base64id@2.0.0, base64id@~2.0.0: resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== +base64url@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" + integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + bigint-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" @@ -1445,7 +2149,7 @@ bigint-buffer@^1.1.5: dependencies: bindings "^1.3.0" -bignumber.js@^9.0.1: +bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== @@ -1462,16 +2166,72 @@ bindings@^1.3.0: dependencies: file-uri-to-path "1.0.0" +bip39-light@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/bip39-light/-/bip39-light-1.0.7.tgz#06a72f251b89389a136d3f177f29b03342adc5ba" + integrity sha512-WDTmLRQUsiioBdTs9BmSEmkJza+8xfJmptsNJjxnoq3EydSa/ZBXT6rm66KoT3PJIRYMnhSKNR7S9YL1l7R40Q== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + +bip39@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.2.tgz#2baf42ff3071fc9ddd5103de92e8f80d9257ee32" + integrity sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ== + dependencies: + "@types/node" "11.11.6" + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + 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.1.0, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== + +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== + +bn.js@^4.0.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +borsh@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.6.0.tgz#a7c9eeca6a31ca9e0607cb49f329cb659eb791e1" + integrity sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + borsh@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" @@ -1503,11 +2263,28 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + 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== +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + browserslist@^4.21.3: version "4.21.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" @@ -1539,6 +2316,15 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1561,6 +2347,16 @@ buffer-layout@^1.2.0: resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== +buffer-reverse@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" + integrity sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + buffer@6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" @@ -1569,7 +2365,7 @@ buffer@6.0.1: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: +buffer@6.0.3, buffer@^6.0.2, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1577,6 +2373,14 @@ buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bufferutil@^4.0.1: version "4.0.7" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" @@ -1612,6 +2416,11 @@ caniuse-lite@^1.0.30001400: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz#22d7cbdbbbb60cdc4ca1030ccd6dea9f5de4848b" integrity sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg== +capability@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/capability/-/capability-0.2.5.tgz#51ad87353f1936ffd77f2f21c74633a4dea88801" + integrity sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg== + chai@^4.3.4: version "4.3.7" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" @@ -1634,7 +2443,7 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1647,6 +2456,11 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" @@ -1677,11 +2491,36 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef" integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog== +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + cjs-module-lexer@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.5.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" + integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -1700,6 +2539,11 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1739,6 +2583,11 @@ commander@^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== +commander@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1767,6 +2616,29 @@ cors@~2.8.5: object-assign "^4" vary "^1" +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@1.1.7, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + cross-fetch@3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" @@ -1774,6 +2646,13 @@ cross-fetch@3.0.6: dependencies: node-fetch "2.6.1" +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + 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" @@ -1783,6 +2662,36 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crypto-js@^3.1.9-1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" + integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== + +csv-generate@^4.2.6: + version "4.2.6" + resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-4.2.6.tgz#7146b41313d7c91d19d99891ef400d7f0931e908" + integrity sha512-VtnYqhWLcsUocA346ewFOk+rrqcoT663j11vXzD2uelXq9WguQ3QzDeVD8ISso7hhVtkDSHcWl9psdemeiEHDA== + +csv-parse@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.4.0.tgz#6793210a4a49a9a74b3fde3f9d00f3f52044fd89" + integrity sha512-JiQosUWiOFgp4hQn0an+SBoV9IKdqzhROM0iiN4LB7UpfJBlsSJlWl9nq4zGgxgMAzHJ6V4t29VAVD+3+2NJAg== + +csv-stringify@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-6.4.0.tgz#6d006dca9194700e44f9fbc541bee8bbbd4f459c" + integrity sha512-HQsw0QXiN5fdlO+R8/JzCZnR3Fqp8E87YVnhHlaPtNGJjt6ffbV0LpOkieIb1x6V1+xt878IYq77SpXHWAqKkA== + +csv@^6.0.5: + version "6.3.1" + resolved "https://registry.yarnpkg.com/csv/-/csv-6.3.1.tgz#52fb5d676ea084b2659dacd2b324e420bdd68989" + integrity sha512-ZTcWLvr0Ux0IQDz/QzhCToBVIZtF5GDrStMt9I8mRSk0jPnfF9OeYKz0EZTspaAEOK6hf515ag97nKmwoyU8ZA== + dependencies: + csv-generate "^4.2.6" + csv-parse "^5.4.0" + csv-stringify "^6.4.0" + stream-transform "^3.2.6" + date-fns@^2.28.0: version "2.29.3" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" @@ -1862,6 +2771,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -1880,6 +2796,16 @@ delay@^5.0.0: resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== +depd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -1949,6 +2875,19 @@ electron-to-chromium@^1.4.251: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== +elliptic@6.5.4, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emittery@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" @@ -1998,6 +2937,15 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +error-polyfill@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/error-polyfill/-/error-polyfill-0.1.3.tgz#df848b61ad8834f7a5db69a70b9913df86721d15" + integrity sha512-XHJk60ufE+TG/ydwp4lilOog549iiQF2OAPhkk9DdiYWMrltz5yhDz/xnKuenNwP7gy3dsibssO5QpVhkrSzzg== + dependencies: + capability "^0.2.5" + o3 "^1.0.3" + u3 "^0.1.1" + es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.20.4" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" @@ -2216,6 +3164,89 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereumjs-util@^7.1.0: + version "7.1.5" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + rlp "^2.2.4" + +ethers@^5.5.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + event-stream@=3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" @@ -2234,6 +3265,14 @@ eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + execa@5.1.1, execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -2265,6 +3304,20 @@ expect@^29.0.0, expect@^29.3.1: jest-message-util "^29.3.1" jest-util "^29.3.1" +exponential-backoff@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" @@ -2320,6 +3373,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -2595,16 +3655,58 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + 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== +hi-base32@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/hi-base32/-/hi-base32-0.5.1.tgz#1279f2ddae2673219ea5870c2121d2a33132857e" + integrity sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-errors@^1.7.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" + integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.1" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -2617,7 +3719,14 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -ieee754@^1.2.1: +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -2656,11 +3765,32 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, 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== +inquirer@^8.2.0: + version "8.2.5" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.5.tgz#d8654a7542c35a9b9e069d27e2df4858784d54f8" + integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.1" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.21" + mute-stream "0.0.8" + ora "^5.4.1" + run-async "^2.4.0" + rxjs "^7.5.5" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + wrap-ansi "^7.0.0" + internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -2746,6 +3876,16 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" @@ -3416,11 +4556,16 @@ js-sha256@^0.9.0: resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== -js-sha3@^0.8.0: +js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== +js-sha512@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha512/-/js-sha512-0.8.0.tgz#dd22db8d02756faccf19f218e3ed61ec8249f7d4" + integrity sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3446,6 +4591,13 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== + dependencies: + bignumber.js "^9.0.0" + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -3488,6 +4640,15 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -3530,6 +4691,16 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -3545,7 +4716,7 @@ lodash@^4.17.20, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: +log-symbols@4.1.0, 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== @@ -3608,6 +4779,15 @@ marked@^4.0.19: resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.3.tgz#bd76a5eb510ff1d8421bc6c3b2f0b93488c15bea" integrity sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw== +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -3618,6 +4798,17 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +merkletreejs@^0.2.32: + version "0.2.32" + resolved "https://registry.yarnpkg.com/merkletreejs/-/merkletreejs-0.2.32.tgz#cf1c0760e2904e4a1cc269108d6009459fd06223" + integrity sha512-TostQBiwYRIwSE5++jGmacu3ODcKAgqb0Y/pnIohXS7sWxh1gCkSptbmF1a43faehRDpcHf7J/kv0Ml2D/zblQ== + dependencies: + bignumber.js "^9.0.1" + buffer-reverse "^1.0.1" + crypto-js "^3.1.9-1" + treeify "^1.1.0" + web3-utils "^1.3.4" + micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -3631,18 +4822,33 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@~2.1.34: +mime-types@^2.1.34, mime-types@~2.1.34: 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== dependencies: mime-db "1.52.0" +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + 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== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + minimatch@4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" @@ -3716,6 +4922,24 @@ ms@2.1.3, ms@^2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +multistream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" + integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== + dependencies: + once "^1.4.0" + readable-stream "^3.6.0" + +mustache@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + nanoid@3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" @@ -3731,6 +4955,42 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +near-api-js@^0.44.2: + version "0.44.2" + resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-0.44.2.tgz#e451f68f2c56bd885c7b918db5818a3e6e9423d0" + integrity sha512-eMnc4V+geggapEUa3nU2p8HSHn/njtloI4P2mceHQWO8vDE1NGpnAw8FuTBrLmXSgIv9m6oocgFc9t3VNf5zwg== + dependencies: + bn.js "5.2.0" + borsh "^0.6.0" + bs58 "^4.0.0" + depd "^2.0.0" + error-polyfill "^0.1.3" + http-errors "^1.7.2" + js-sha256 "^0.9.0" + mustache "^4.0.0" + node-fetch "^2.6.1" + text-encoding-utf-8 "^1.0.2" + tweetnacl "^1.0.1" + +near-hd-key@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/near-hd-key/-/near-hd-key-1.2.1.tgz#f508ff15436cf8a439b543220f3cc72188a46756" + integrity sha512-SIrthcL5Wc0sps+2e1xGj3zceEa68TgNZDLuCx0daxmfTP7sFTB3/mtE2pYhlFsCxWoMn+JfID5E1NlzvvbRJg== + dependencies: + bip39 "3.0.2" + create-hmac "1.1.7" + tweetnacl "1.0.3" + +near-seed-phrase@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/near-seed-phrase/-/near-seed-phrase-0.2.0.tgz#fb7cf89682112b1160ab68abb50dc821f49be18a" + integrity sha512-NpmrnejpY1AdlRpDZ0schJQJtfBaoUheRfiYtQpcq9TkwPgqKZCRULV5L3hHmLc0ep7KRtikbPQ9R2ztN/3cyQ== + dependencies: + bip39-light "^1.0.7" + bs58 "^4.0.1" + near-hd-key "^1.2.1" + tweetnacl "^1.0.2" + negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -3749,6 +5009,11 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + node-fetch@2: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -3761,13 +5026,18 @@ node-fetch@2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-fetch@^2.6.12: +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" +node-gyp-build@^4.2.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.1.tgz#24b6d075e5e391b8d5539d98c7fc5c210cac8a3e" + integrity sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ== + node-gyp-build@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" @@ -3795,11 +5065,26 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + numeral@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/numeral/-/numeral-2.0.6.tgz#4ad080936d443c2561aed9f2197efffe25f4e506" integrity sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA== +o3@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/o3/-/o3-1.0.3.tgz#192ce877a882dfa6751f0412a865fafb2da1dac0" + integrity sha512-f+4n+vC6s4ysy7YO7O2gslWZBUu8Qj2i2OUJOvjRxQva7jVjYjB29jrr9NCjmxZQR0gzrOcv1RnqoYOeMs5VRQ== + dependencies: + capability "^0.2.5" + object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3833,14 +5118,14 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -once@^1.3.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -3859,6 +5144,26 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -3946,6 +5251,17 @@ pause-stream@0.0.11: dependencies: through "~2.3" +pbkdf2@^3.0.17, pbkdf2@^3.0.9: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -4011,6 +5327,11 @@ pretty-format@^29.0.0, pretty-format@^29.3.1: ansi-styles "^5.0.0" react-is "^18.0.0" +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -4036,7 +5357,7 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.1.0: +randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -4053,6 +5374,15 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -4129,6 +5459,14 @@ resolve@^2.0.0-next.3: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + resumer@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" @@ -4136,18 +5474,38 @@ resumer@^0.0.0: dependencies: through "~2.3.4" +retry@0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + 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== -rimraf@^3.0.2: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.4: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + rpc-websockets@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" @@ -4174,6 +5532,11 @@ rpc-websockets@^7.5.1: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -4188,7 +5551,14 @@ rxjs@^7.1.0, rxjs@^7.5.4: dependencies: tslib "^2.1.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0: +rxjs@^7.5.5: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -4202,6 +5572,25 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scrypt-js@3.0.1, scrypt-js@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1, secp256k1@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + selective-whitespace@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/selective-whitespace/-/selective-whitespace-1.0.4.tgz#02d428b46b2c770398be9a538eb442b1e842fc5c" @@ -4228,6 +5617,24 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -4258,7 +5665,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -4377,6 +5784,11 @@ start-server-and-test@^1.14.0: ps-tree "1.2.0" wait-on "6.0.0" +"statuses@>= 1.5.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + stream-combiner@~0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" @@ -4384,6 +5796,11 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" +stream-transform@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-3.2.6.tgz#7caeaaf68d2bf94fc412a520f2deb3c49b3bc0ab" + integrity sha512-/pyOvaCQFqYTmrFhmMbnAEVo3SsTx1H39eUVPOtYeAgbEUc+rDo7GoP8LbHJgU83mKtzJe/7Nq/ipaAnUOHgJQ== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -4428,6 +5845,13 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.20.4" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -4450,6 +5874,13 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + strip-json-comments@3.1.1, strip-json-comments@^3.1.0, 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" @@ -4532,7 +5963,7 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -through@2, "through@>=2.2.7 <3", through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.4: +through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -4542,6 +5973,27 @@ timeago.js@^4.0.2: resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== +tmp-promise@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" + integrity sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ== + dependencies: + tmp "^0.2.0" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -4559,6 +6011,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + tokenize-whitespace@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tokenize-whitespace/-/tokenize-whitespace-0.0.1.tgz#3c207ab58948113225246285200563e3b4b5c6ff" @@ -4574,6 +6031,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +treeify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" + integrity sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A== + ts-essentials@^9.3.0: version "9.3.0" resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-9.3.0.tgz#7e639c1a76b1805c3c60d6e1b5178da2e70aea02" @@ -4650,7 +6112,7 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tweetnacl@^1.0.3: +tweetnacl@1.0.3, tweetnacl@^1.0.1, tweetnacl@^1.0.2, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== @@ -4697,6 +6159,11 @@ typescript@^4.3.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== +u3@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/u3/-/u3-0.1.1.tgz#5f52044f42ee76cd8de33148829e14528494b73b" + integrity sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -4729,6 +6196,16 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" +utf8@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -4748,6 +6225,11 @@ vary@^1: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== +vlq@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-2.0.4.tgz#6057b85729245b9829e3cc7755f95b228d4fe041" + integrity sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA== + vscode-oniguruma@^1.6.1: version "1.7.0" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" @@ -4787,6 +6269,26 @@ walker@^1.0.7, walker@^1.0.8: dependencies: makeerror "1.0.12" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +web3-utils@^1.3.4: + version "1.10.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.0.tgz#ca4c1b431a765c14ac7f773e92e0fd9377ccf578" + integrity sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg== + dependencies: + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -4872,6 +6374,11 @@ write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + ws@^7.4.5: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" diff --git a/clients/js/src/generated/errors/mplBubblegum.ts b/clients/js/src/generated/errors/mplBubblegum.ts index 60c6ea5e..e2198337 100644 --- a/clients/js/src/generated/errors/mplBubblegum.ts +++ b/clients/js/src/generated/errors/mplBubblegum.ts @@ -491,6 +491,116 @@ export class DecompressionDisabledError extends ProgramError { codeToErrorMap.set(0x1791, DecompressionDisabledError); nameToErrorMap.set('DecompressionDisabled', DecompressionDisabledError); +/** MetadataImmutable: Metadata not mutable */ +export class MetadataImmutableError extends ProgramError { + readonly name: string = 'MetadataImmutable'; + + readonly code: number = 0x1792; // 6034 + + constructor(program: Program, cause?: Error) { + super('Metadata not mutable', program, cause); + } +} +codeToErrorMap.set(0x1792, MetadataImmutableError); +nameToErrorMap.set('MetadataImmutable', MetadataImmutableError); + +/** CollectionMismatch: Collection mismatch */ +export class CollectionMismatchError extends ProgramError { + readonly name: string = 'CollectionMismatch'; + + readonly code: number = 0x1793; // 6035 + + constructor(program: Program, cause?: Error) { + super('Collection mismatch', program, cause); + } +} +codeToErrorMap.set(0x1793, CollectionMismatchError); +nameToErrorMap.set('CollectionMismatch', CollectionMismatchError); + +/** MetadataArgsAmbiguous: MetadataArgs ambiguous */ +export class MetadataArgsAmbiguousError extends ProgramError { + readonly name: string = 'MetadataArgsAmbiguous'; + + readonly code: number = 0x1794; // 6036 + + constructor(program: Program, cause?: Error) { + super('MetadataArgs ambiguous', program, cause); + } +} +codeToErrorMap.set(0x1794, MetadataArgsAmbiguousError); +nameToErrorMap.set('MetadataArgsAmbiguous', MetadataArgsAmbiguousError); + +/** MetadataArgsMissing: MetadataArgs missing */ +export class MetadataArgsMissingError extends ProgramError { + readonly name: string = 'MetadataArgsMissing'; + + readonly code: number = 0x1795; // 6037 + + constructor(program: Program, cause?: Error) { + super('MetadataArgs missing', program, cause); + } +} +codeToErrorMap.set(0x1795, MetadataArgsMissingError); +nameToErrorMap.set('MetadataArgsMissing', MetadataArgsMissingError); + +/** NFTLinkedToCollection: NFT linked to collection */ +export class NFTLinkedToCollectionError extends ProgramError { + readonly name: string = 'NFTLinkedToCollection'; + + readonly code: number = 0x1796; // 6038 + + constructor(program: Program, cause?: Error) { + super('NFT linked to collection', program, cause); + } +} +codeToErrorMap.set(0x1796, NFTLinkedToCollectionError); +nameToErrorMap.set('NFTLinkedToCollection', NFTLinkedToCollectionError); + +/** NFTNotLinkedToVerifiedCollection: NFT not linked to verified collection */ +export class NFTNotLinkedToVerifiedCollectionError extends ProgramError { + readonly name: string = 'NFTNotLinkedToVerifiedCollection'; + + readonly code: number = 0x1797; // 6039 + + constructor(program: Program, cause?: Error) { + super('NFT not linked to verified collection', program, cause); + } +} +codeToErrorMap.set(0x1797, NFTNotLinkedToVerifiedCollectionError); +nameToErrorMap.set( + 'NFTNotLinkedToVerifiedCollection', + NFTNotLinkedToVerifiedCollectionError +); + +/** PrimarySaleCanOnlyBeFlippedToTrue: Can only update primary sale to true */ +export class PrimarySaleCanOnlyBeFlippedToTrueError extends ProgramError { + readonly name: string = 'PrimarySaleCanOnlyBeFlippedToTrue'; + + readonly code: number = 0x1798; // 6040 + + constructor(program: Program, cause?: Error) { + super('Can only update primary sale to true', program, cause); + } +} +codeToErrorMap.set(0x1798, PrimarySaleCanOnlyBeFlippedToTrueError); +nameToErrorMap.set( + 'PrimarySaleCanOnlyBeFlippedToTrue', + PrimarySaleCanOnlyBeFlippedToTrueError +); + +/** CreatorDidNotUnverify: Creator did not unverify the metadata */ +export class CreatorDidNotUnverifyError extends ProgramError { + readonly name: string = 'CreatorDidNotUnverify'; + + readonly code: number = 0x1799; // 6041 + + constructor(program: Program, cause?: Error) { + super('Creator did not unverify the metadata', program, cause); + } +} +codeToErrorMap.set(0x1799, CreatorDidNotUnverifyError); +nameToErrorMap.set('CreatorDidNotUnverify', CreatorDidNotUnverifyError); + /** * Attempts to resolve a custom program error from the provided error code. * @category Errors diff --git a/clients/js/src/generated/instructions/index.ts b/clients/js/src/generated/instructions/index.ts index 30a20fe1..1495c764 100644 --- a/clients/js/src/generated/instructions/index.ts +++ b/clients/js/src/generated/instructions/index.ts @@ -20,6 +20,8 @@ export * from './setTreeDelegate'; export * from './transfer'; export * from './unverifyCollection'; export * from './unverifyCreator'; +export * from './updateMetadata'; +export * from './updateMetadataCollectionNft'; export * from './verifyCollection'; export * from './verifyCreator'; export * from './verifyLeaf'; diff --git a/clients/js/src/generated/instructions/updateMetadata.ts b/clients/js/src/generated/instructions/updateMetadata.ts new file mode 100644 index 00000000..4ae459bd --- /dev/null +++ b/clients/js/src/generated/instructions/updateMetadata.ts @@ -0,0 +1,255 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/metaplex-foundation/kinobi + */ + +import { + AccountMeta, + Context, + Option, + OptionOrNullable, + Pda, + PublicKey, + Signer, + TransactionBuilder, + publicKey, + transactionBuilder, +} from '@metaplex-foundation/umi'; +import { + Serializer, + array, + bytes, + mapSerializer, + option, + struct, + u32, + u64, + u8, +} from '@metaplex-foundation/umi/serializers'; +import { findTreeConfigPda } from '../accounts'; +import { addAccountMeta, addObjectProperty } from '../shared'; +import { + MetadataArgs, + MetadataArgsArgs, + UpdateArgs, + UpdateArgsArgs, + getMetadataArgsSerializer, + getUpdateArgsSerializer, +} from '../types'; + +// Accounts. +export type UpdateMetadataInstructionAccounts = { + metadataBuffer?: PublicKey | Pda; + treeConfig?: PublicKey | Pda; + treeCreatorOrDelegate?: Signer; + leafOwner: PublicKey | Pda; + leafDelegate?: PublicKey | Pda; + payer?: Signer; + merkleTree: PublicKey | Pda; + logWrapper?: PublicKey | Pda; + compressionProgram?: PublicKey | Pda; + tokenMetadataProgram?: PublicKey | Pda; + systemProgram?: PublicKey | Pda; +}; + +// Data. +export type UpdateMetadataInstructionData = { + discriminator: Array; + root: Uint8Array; + nonce: bigint; + index: number; + currentMetadata: Option; + updateArgs: UpdateArgs; +}; + +export type UpdateMetadataInstructionDataArgs = { + root: Uint8Array; + nonce: number | bigint; + index: number; + currentMetadata: OptionOrNullable; + updateArgs: UpdateArgsArgs; +}; + +/** @deprecated Use `getUpdateMetadataInstructionDataSerializer()` without any argument instead. */ +export function getUpdateMetadataInstructionDataSerializer( + _context: object +): Serializer; +export function getUpdateMetadataInstructionDataSerializer(): Serializer< + UpdateMetadataInstructionDataArgs, + UpdateMetadataInstructionData +>; +export function getUpdateMetadataInstructionDataSerializer( + _context: object = {} +): Serializer< + UpdateMetadataInstructionDataArgs, + UpdateMetadataInstructionData +> { + return mapSerializer< + UpdateMetadataInstructionDataArgs, + any, + UpdateMetadataInstructionData + >( + struct( + [ + ['discriminator', array(u8(), { size: 8 })], + ['root', bytes({ size: 32 })], + ['nonce', u64()], + ['index', u32()], + ['currentMetadata', option(getMetadataArgsSerializer())], + ['updateArgs', getUpdateArgsSerializer()], + ], + { description: 'UpdateMetadataInstructionData' } + ), + (value) => ({ + ...value, + discriminator: [170, 182, 43, 239, 97, 78, 225, 186], + }) + ) as Serializer< + UpdateMetadataInstructionDataArgs, + UpdateMetadataInstructionData + >; +} + +// Args. +export type UpdateMetadataInstructionArgs = UpdateMetadataInstructionDataArgs; + +// Instruction. +export function updateMetadata( + context: Pick, + input: UpdateMetadataInstructionAccounts & UpdateMetadataInstructionArgs +): TransactionBuilder { + const signers: Signer[] = []; + const keys: AccountMeta[] = []; + + // Program ID. + const programId = context.programs.getPublicKey( + 'mplBubblegum', + 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY' + ); + + // Resolved inputs. + const resolvedAccounts = { + leafOwner: [input.leafOwner, false] as const, + merkleTree: [input.merkleTree, true] as const, + }; + const resolvingArgs = {}; + addObjectProperty( + resolvedAccounts, + 'metadataBuffer', + input.metadataBuffer + ? ([input.metadataBuffer, false] as const) + : ([programId, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'treeConfig', + input.treeConfig + ? ([input.treeConfig, false] as const) + : ([ + findTreeConfigPda(context, { + merkleTree: publicKey(input.merkleTree, false), + }), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'treeCreatorOrDelegate', + input.treeCreatorOrDelegate + ? ([input.treeCreatorOrDelegate, false] as const) + : ([context.identity, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'leafDelegate', + input.leafDelegate + ? ([input.leafDelegate, false] as const) + : ([input.leafOwner, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'payer', + input.payer + ? ([input.payer, false] as const) + : ([context.payer, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'logWrapper', + input.logWrapper + ? ([input.logWrapper, false] as const) + : ([ + context.programs.getPublicKey( + 'splNoop', + 'noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'compressionProgram', + input.compressionProgram + ? ([input.compressionProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'splAccountCompression', + 'cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'tokenMetadataProgram', + input.tokenMetadataProgram + ? ([input.tokenMetadataProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'mplTokenMetadata', + 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'systemProgram', + input.systemProgram + ? ([input.systemProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'splSystem', + '11111111111111111111111111111111' + ), + false, + ] as const) + ); + const resolvedArgs = { ...input, ...resolvingArgs }; + + addAccountMeta(keys, signers, resolvedAccounts.metadataBuffer, false); + addAccountMeta(keys, signers, resolvedAccounts.treeConfig, false); + addAccountMeta(keys, signers, resolvedAccounts.treeCreatorOrDelegate, false); + addAccountMeta(keys, signers, resolvedAccounts.leafOwner, false); + addAccountMeta(keys, signers, resolvedAccounts.leafDelegate, false); + addAccountMeta(keys, signers, resolvedAccounts.payer, false); + addAccountMeta(keys, signers, resolvedAccounts.merkleTree, false); + addAccountMeta(keys, signers, resolvedAccounts.logWrapper, false); + addAccountMeta(keys, signers, resolvedAccounts.compressionProgram, false); + addAccountMeta(keys, signers, resolvedAccounts.tokenMetadataProgram, false); + addAccountMeta(keys, signers, resolvedAccounts.systemProgram, false); + + // Data. + const data = + getUpdateMetadataInstructionDataSerializer().serialize(resolvedArgs); + + // Bytes Created On Chain. + const bytesCreatedOnChain = 0; + + return transactionBuilder([ + { instruction: { keys, programId, data }, signers, bytesCreatedOnChain }, + ]); +} diff --git a/clients/js/src/generated/instructions/updateMetadataCollectionNft.ts b/clients/js/src/generated/instructions/updateMetadataCollectionNft.ts new file mode 100644 index 00000000..fdfc1770 --- /dev/null +++ b/clients/js/src/generated/instructions/updateMetadataCollectionNft.ts @@ -0,0 +1,303 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/metaplex-foundation/kinobi + */ + +import { findMetadataPda } from '@metaplex-foundation/mpl-token-metadata'; +import { + AccountMeta, + Context, + Option, + OptionOrNullable, + Pda, + PublicKey, + Signer, + TransactionBuilder, + publicKey, + transactionBuilder, +} from '@metaplex-foundation/umi'; +import { + Serializer, + array, + bytes, + mapSerializer, + option, + struct, + u32, + u64, + u8, +} from '@metaplex-foundation/umi/serializers'; +import { findTreeConfigPda } from '../accounts'; +import { addAccountMeta, addObjectProperty } from '../shared'; +import { + MetadataArgs, + MetadataArgsArgs, + UpdateArgs, + UpdateArgsArgs, + getMetadataArgsSerializer, + getUpdateArgsSerializer, +} from '../types'; + +// Accounts. +export type UpdateMetadataCollectionNftInstructionAccounts = { + metadataBuffer?: PublicKey | Pda; + treeConfig?: PublicKey | Pda; + treeCreatorOrDelegate?: Signer; + collectionAuthority?: Signer; + collectionMint: PublicKey | Pda; + collectionMetadata?: PublicKey | Pda; + collectionAuthorityRecordPda?: PublicKey | Pda; + leafOwner: PublicKey | Pda; + leafDelegate?: PublicKey | Pda; + payer?: Signer; + merkleTree: PublicKey | Pda; + logWrapper?: PublicKey | Pda; + compressionProgram?: PublicKey | Pda; + tokenMetadataProgram?: PublicKey | Pda; + systemProgram?: PublicKey | Pda; +}; + +// Data. +export type UpdateMetadataCollectionNftInstructionData = { + discriminator: Array; + root: Uint8Array; + nonce: bigint; + index: number; + currentMetadata: Option; + updateArgs: UpdateArgs; +}; + +export type UpdateMetadataCollectionNftInstructionDataArgs = { + root: Uint8Array; + nonce: number | bigint; + index: number; + currentMetadata: OptionOrNullable; + updateArgs: UpdateArgsArgs; +}; + +/** @deprecated Use `getUpdateMetadataCollectionNftInstructionDataSerializer()` without any argument instead. */ +export function getUpdateMetadataCollectionNftInstructionDataSerializer( + _context: object +): Serializer< + UpdateMetadataCollectionNftInstructionDataArgs, + UpdateMetadataCollectionNftInstructionData +>; +export function getUpdateMetadataCollectionNftInstructionDataSerializer(): Serializer< + UpdateMetadataCollectionNftInstructionDataArgs, + UpdateMetadataCollectionNftInstructionData +>; +export function getUpdateMetadataCollectionNftInstructionDataSerializer( + _context: object = {} +): Serializer< + UpdateMetadataCollectionNftInstructionDataArgs, + UpdateMetadataCollectionNftInstructionData +> { + return mapSerializer< + UpdateMetadataCollectionNftInstructionDataArgs, + any, + UpdateMetadataCollectionNftInstructionData + >( + struct( + [ + ['discriminator', array(u8(), { size: 8 })], + ['root', bytes({ size: 32 })], + ['nonce', u64()], + ['index', u32()], + ['currentMetadata', option(getMetadataArgsSerializer())], + ['updateArgs', getUpdateArgsSerializer()], + ], + { description: 'UpdateMetadataCollectionNftInstructionData' } + ), + (value) => ({ + ...value, + discriminator: [244, 12, 175, 194, 227, 28, 102, 215], + }) + ) as Serializer< + UpdateMetadataCollectionNftInstructionDataArgs, + UpdateMetadataCollectionNftInstructionData + >; +} + +// Args. +export type UpdateMetadataCollectionNftInstructionArgs = + UpdateMetadataCollectionNftInstructionDataArgs; + +// Instruction. +export function updateMetadataCollectionNft( + context: Pick, + input: UpdateMetadataCollectionNftInstructionAccounts & + UpdateMetadataCollectionNftInstructionArgs +): TransactionBuilder { + const signers: Signer[] = []; + const keys: AccountMeta[] = []; + + // Program ID. + const programId = context.programs.getPublicKey( + 'mplBubblegum', + 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY' + ); + + // Resolved inputs. + const resolvedAccounts = { + collectionMint: [input.collectionMint, false] as const, + leafOwner: [input.leafOwner, false] as const, + merkleTree: [input.merkleTree, true] as const, + }; + const resolvingArgs = {}; + addObjectProperty( + resolvedAccounts, + 'metadataBuffer', + input.metadataBuffer + ? ([input.metadataBuffer, false] as const) + : ([programId, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'treeConfig', + input.treeConfig + ? ([input.treeConfig, false] as const) + : ([ + findTreeConfigPda(context, { + merkleTree: publicKey(input.merkleTree, false), + }), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'treeCreatorOrDelegate', + input.treeCreatorOrDelegate + ? ([input.treeCreatorOrDelegate, false] as const) + : ([context.identity, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'collectionAuthority', + input.collectionAuthority + ? ([input.collectionAuthority, false] as const) + : ([context.identity, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'collectionMetadata', + input.collectionMetadata + ? ([input.collectionMetadata, false] as const) + : ([ + findMetadataPda(context, { + mint: publicKey(input.collectionMint, false), + }), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'collectionAuthorityRecordPda', + input.collectionAuthorityRecordPda + ? ([input.collectionAuthorityRecordPda, false] as const) + : ([programId, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'leafDelegate', + input.leafDelegate + ? ([input.leafDelegate, false] as const) + : ([input.leafOwner, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'payer', + input.payer + ? ([input.payer, false] as const) + : ([context.payer, false] as const) + ); + addObjectProperty( + resolvedAccounts, + 'logWrapper', + input.logWrapper + ? ([input.logWrapper, false] as const) + : ([ + context.programs.getPublicKey( + 'splNoop', + 'noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'compressionProgram', + input.compressionProgram + ? ([input.compressionProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'splAccountCompression', + 'cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'tokenMetadataProgram', + input.tokenMetadataProgram + ? ([input.tokenMetadataProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'mplTokenMetadata', + 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s' + ), + false, + ] as const) + ); + addObjectProperty( + resolvedAccounts, + 'systemProgram', + input.systemProgram + ? ([input.systemProgram, false] as const) + : ([ + context.programs.getPublicKey( + 'splSystem', + '11111111111111111111111111111111' + ), + false, + ] as const) + ); + const resolvedArgs = { ...input, ...resolvingArgs }; + + addAccountMeta(keys, signers, resolvedAccounts.metadataBuffer, false); + addAccountMeta(keys, signers, resolvedAccounts.treeConfig, false); + addAccountMeta(keys, signers, resolvedAccounts.treeCreatorOrDelegate, false); + addAccountMeta(keys, signers, resolvedAccounts.collectionAuthority, false); + addAccountMeta(keys, signers, resolvedAccounts.collectionMint, false); + addAccountMeta(keys, signers, resolvedAccounts.collectionMetadata, false); + addAccountMeta( + keys, + signers, + resolvedAccounts.collectionAuthorityRecordPda, + false + ); + addAccountMeta(keys, signers, resolvedAccounts.leafOwner, false); + addAccountMeta(keys, signers, resolvedAccounts.leafDelegate, false); + addAccountMeta(keys, signers, resolvedAccounts.payer, false); + addAccountMeta(keys, signers, resolvedAccounts.merkleTree, false); + addAccountMeta(keys, signers, resolvedAccounts.logWrapper, false); + addAccountMeta(keys, signers, resolvedAccounts.compressionProgram, false); + addAccountMeta(keys, signers, resolvedAccounts.tokenMetadataProgram, false); + addAccountMeta(keys, signers, resolvedAccounts.systemProgram, false); + + // Data. + const data = + getUpdateMetadataCollectionNftInstructionDataSerializer().serialize( + resolvedArgs + ); + + // Bytes Created On Chain. + const bytesCreatedOnChain = 0; + + return transactionBuilder([ + { instruction: { keys, programId, data }, signers, bytesCreatedOnChain }, + ]); +} diff --git a/clients/js/src/generated/types/index.ts b/clients/js/src/generated/types/index.ts index c1dfbb76..8dc739ff 100644 --- a/clients/js/src/generated/types/index.ts +++ b/clients/js/src/generated/types/index.ts @@ -18,6 +18,7 @@ export * from './leafSchema'; export * from './metadataArgs'; export * from './tokenProgramVersion'; export * from './tokenStandard'; +export * from './updateArgs'; export * from './useMethod'; export * from './uses'; export * from './version'; diff --git a/clients/js/src/generated/types/instructionName.ts b/clients/js/src/generated/types/instructionName.ts index 0d698ee1..b55047bb 100644 --- a/clients/js/src/generated/types/instructionName.ts +++ b/clients/js/src/generated/types/instructionName.ts @@ -26,6 +26,8 @@ export enum InstructionName { SetAndVerifyCollection, MintToCollectionV1, SetDecompressableState, + UpdateMetadata, + UpdateMetadataCollectionNft, } export type InstructionNameArgs = InstructionName; diff --git a/clients/js/src/generated/types/updateArgs.ts b/clients/js/src/generated/types/updateArgs.ts new file mode 100644 index 00000000..f8dcc67a --- /dev/null +++ b/clients/js/src/generated/types/updateArgs.ts @@ -0,0 +1,64 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/metaplex-foundation/kinobi + */ + +import { Option, OptionOrNullable } from '@metaplex-foundation/umi'; +import { + Serializer, + array, + bool, + option, + string, + struct, + u16, +} from '@metaplex-foundation/umi/serializers'; +import { Creator, CreatorArgs, getCreatorSerializer } from '.'; + +export type UpdateArgs = { + name: Option; + symbol: Option; + uri: Option; + creators: Option>; + sellerFeeBasisPoints: Option; + primarySaleHappened: Option; + isMutable: Option; +}; + +export type UpdateArgsArgs = { + name: OptionOrNullable; + symbol: OptionOrNullable; + uri: OptionOrNullable; + creators: OptionOrNullable>; + sellerFeeBasisPoints: OptionOrNullable; + primarySaleHappened: OptionOrNullable; + isMutable: OptionOrNullable; +}; + +/** @deprecated Use `getUpdateArgsSerializer()` without any argument instead. */ +export function getUpdateArgsSerializer( + _context: object +): Serializer; +export function getUpdateArgsSerializer(): Serializer< + UpdateArgsArgs, + UpdateArgs +>; +export function getUpdateArgsSerializer( + _context: object = {} +): Serializer { + return struct( + [ + ['name', option(string())], + ['symbol', option(string())], + ['uri', option(string())], + ['creators', option(array(getCreatorSerializer()))], + ['sellerFeeBasisPoints', option(u16())], + ['primarySaleHappened', option(bool())], + ['isMutable', option(bool())], + ], + { description: 'UpdateArgs' } + ) as Serializer; +} diff --git a/idls/bubblegum.json b/idls/bubblegum.json index dc1aab15..a283b5a9 100644 --- a/idls/bubblegum.json +++ b/idls/bubblegum.json @@ -1083,6 +1083,215 @@ } ] }, + { + "name": "updateMetadata", + "accounts": [ + { + "name": "metadataBuffer", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "treeDelegate", + "isMut": false, + "isSigner": true + }, + { + "name": "leafOwner", + "isMut": false, + "isSigner": false + }, + { + "name": "leafDelegate", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "merkleTree", + "isMut": true, + "isSigner": false + }, + { + "name": "logWrapper", + "isMut": false, + "isSigner": false + }, + { + "name": "compressionProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "currentMetadata", + "type": { + "option": { + "defined": "MetadataArgs" + } + } + }, + { + "name": "updateArgs", + "type": { + "defined": "UpdateArgs" + } + } + ] + }, + { + "name": "updateMetadataCollectionNft", + "accounts": [ + { + "name": "metadataBuffer", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "treeDelegate", + "isMut": false, + "isSigner": true + }, + { + "name": "collectionAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false + }, + { + "name": "collectionMetadata", + "isMut": false, + "isSigner": false + }, + { + "name": "collectionAuthorityRecordPda", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "leafOwner", + "isMut": false, + "isSigner": false + }, + { + "name": "leafDelegate", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "merkleTree", + "isMut": true, + "isSigner": false + }, + { + "name": "logWrapper", + "isMut": false, + "isSigner": false + }, + { + "name": "compressionProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "currentMetadata", + "type": { + "option": { + "defined": "MetadataArgs" + } + } + }, + { + "name": "updateArgs", + "type": { + "defined": "UpdateArgs" + } + } + ] + }, { "name": "redeem", "accounts": [ @@ -1611,6 +1820,60 @@ ] } }, + { + "name": "UpdateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "option": "string" + } + }, + { + "name": "symbol", + "type": { + "option": "string" + } + }, + { + "name": "uri", + "type": { + "option": "string" + } + }, + { + "name": "creators", + "type": { + "option": { + "vec": { + "defined": "Creator" + } + } + } + }, + { + "name": "sellerFeeBasisPoints", + "type": { + "option": "u16" + } + }, + { + "name": "primarySaleHappened", + "type": { + "option": "bool" + } + }, + { + "name": "isMutable", + "type": { + "option": "bool" + } + } + ] + } + }, { "name": "Version", "type": { @@ -1803,6 +2066,12 @@ }, { "name": "SetDecompressableState" + }, + { + "name": "UpdateMetadata" + }, + { + "name": "UpdateMetadataCollectionNft" } ] } @@ -1978,6 +2247,46 @@ "code": 6033, "name": "DecompressionDisabled", "msg": "Decompression is disabled for this tree." + }, + { + "code": 6034, + "name": "MetadataImmutable", + "msg": "Metadata not mutable" + }, + { + "code": 6035, + "name": "CollectionMismatch", + "msg": "Collection mismatch" + }, + { + "code": 6036, + "name": "MetadataArgsAmbiguous", + "msg": "MetadataArgs ambiguous" + }, + { + "code": 6037, + "name": "MetadataArgsMissing", + "msg": "MetadataArgs missing" + }, + { + "code": 6038, + "name": "NFTLinkedToCollection", + "msg": "NFT linked to collection" + }, + { + "code": 6039, + "name": "NFTNotLinkedToVerifiedCollection", + "msg": "NFT not linked to verified collection" + }, + { + "code": 6040, + "name": "PrimarySaleCanOnlyBeFlippedToTrue", + "msg": "Can only update primary sale to true" + }, + { + "code": 6041, + "name": "CreatorDidNotUnverify", + "msg": "Creator did not unverify the metadata" } ], "metadata": { diff --git a/programs/bubblegum/program/src/error.rs b/programs/bubblegum/program/src/error.rs index 416e1e21..011b1019 100644 --- a/programs/bubblegum/program/src/error.rs +++ b/programs/bubblegum/program/src/error.rs @@ -72,6 +72,22 @@ pub enum BubblegumError { UnknownExternalError, #[msg("Decompression is disabled for this tree.")] DecompressionDisabled, + #[msg("Metadata not mutable")] + MetadataImmutable, + #[msg("Collection mismatch")] + CollectionMismatch, + #[msg("MetadataArgs ambiguous")] + MetadataArgsAmbiguous, + #[msg("MetadataArgs missing")] + MetadataArgsMissing, + #[msg("NFT linked to collection")] + NFTLinkedToCollection, + #[msg("NFT not linked to verified collection")] + NFTNotLinkedToVerifiedCollection, + #[msg("Can only update primary sale to true")] + PrimarySaleCanOnlyBeFlippedToTrue, + #[msg("Creator did not unverify the metadata")] + CreatorDidNotUnverify, } // Converts certain Token Metadata errors into Bubblegum equivalents diff --git a/programs/bubblegum/program/src/lib.rs b/programs/bubblegum/program/src/lib.rs index 66a1a857..4bd5852c 100644 --- a/programs/bubblegum/program/src/lib.rs +++ b/programs/bubblegum/program/src/lib.rs @@ -5,7 +5,9 @@ use crate::{ error::{metadata_error_into_bubblegum, BubblegumError}, state::{ leaf_schema::LeafSchema, - metaplex_adapter::{self, Creator, MetadataArgs, TokenProgramVersion}, + metaplex_adapter::{ + self, Collection, Creator, MetadataArgs, TokenProgramVersion, UpdateArgs, + }, metaplex_anchor::{MasterEdition, MplTokenMetadata, TokenMetadata}, DecompressableState, TreeConfig, Voucher, ASSET_PREFIX, COLLECTION_CPI_PREFIX, TREE_AUTHORITY_SIZE, VOUCHER_PREFIX, VOUCHER_SIZE, @@ -218,7 +220,7 @@ pub struct Transfer<'info> { pub tree_authority: Account<'info, TreeConfig>, /// CHECK: This account is checked in the instruction pub leaf_owner: UncheckedAccount<'info>, - /// CHECK: This account is chekced in the instruction + /// CHECK: This account is checked in the instruction pub leaf_delegate: UncheckedAccount<'info>, /// CHECK: This account is neither written to nor read from. pub new_leaf_owner: UncheckedAccount<'info>, @@ -251,6 +253,64 @@ pub struct Delegate<'info> { pub system_program: Program<'info, System>, } +#[derive(Accounts)] +pub struct UpdateMetadata<'info> { + /// CHECK: Can optionally specify the old metadata of the leaf through an account to save transaction space + /// CHECK: This account is checked in the instruction + pub metadata_buffer: Option>, + #[account( + seeds = [merkle_tree.key().as_ref()], + bump, + )] + /// CHECK: This account is neither written to nor read from. + pub tree_authority: Account<'info, TreeConfig>, + pub tree_delegate: Signer<'info>, + /// CHECK: This account is checked in the instruction + pub leaf_owner: UncheckedAccount<'info>, + /// CHECK: This account is checked in the instruction + pub leaf_delegate: UncheckedAccount<'info>, + pub payer: Signer<'info>, + #[account(mut)] + /// CHECK: This account is modified in the downstream program + pub merkle_tree: UncheckedAccount<'info>, + pub log_wrapper: Program<'info, Noop>, + pub compression_program: Program<'info, SplAccountCompression>, + pub token_metadata_program: Program<'info, MplTokenMetadata>, + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +pub struct UpdateMetadataCollectionNFT<'info> { + /// CHECK: Can optionally specify the old metadata of the leaf through an account to save transaction space + /// CHECK: This account is checked in the instruction + pub metadata_buffer: Option>, + #[account( + seeds = [merkle_tree.key().as_ref()], + bump, + )] + /// CHECK: This account is neither written to nor read from. + pub tree_authority: Account<'info, TreeConfig>, + pub tree_delegate: Signer<'info>, + pub collection_authority: Signer<'info>, + /// CHECK: This account is checked in the instruction + pub collection_mint: UncheckedAccount<'info>, + pub collection_metadata: Box>, + /// CHECK: This account is checked in the instruction + pub collection_authority_record_pda: Option>, + /// CHECK: This account is checked in the instruction + pub leaf_owner: UncheckedAccount<'info>, + /// CHECK: This account is checked in the instruction + pub leaf_delegate: UncheckedAccount<'info>, + pub payer: Signer<'info>, + #[account(mut)] + /// CHECK: This account is modified in the downstream program + pub merkle_tree: UncheckedAccount<'info>, + pub log_wrapper: Program<'info, Noop>, + pub compression_program: Program<'info, SplAccountCompression>, + pub token_metadata_program: Program<'info, MplTokenMetadata>, + pub system_program: Program<'info, System>, +} + #[derive(Accounts)] #[instruction( _root: [u8; 32], @@ -268,7 +328,7 @@ pub struct Redeem<'info> { pub tree_authority: Account<'info, TreeConfig>, #[account(mut)] pub leaf_owner: Signer<'info>, - /// CHECK: This account is chekced in the instruction + /// CHECK: This account is checked in the instruction pub leaf_delegate: UncheckedAccount<'info>, #[account(mut)] /// CHECK: checked in cpi @@ -380,7 +440,7 @@ pub struct Compress<'info> { pub tree_authority: UncheckedAccount<'info>, /// CHECK: This account is checked in the instruction pub leaf_owner: Signer<'info>, - /// CHECK: This account is chekced in the instruction + /// CHECK: This account is checked in the instruction pub leaf_delegate: UncheckedAccount<'info>, /// CHECK: This account is not read pub merkle_tree: UncheckedAccount<'info>, @@ -475,6 +535,8 @@ pub enum InstructionName { SetAndVerifyCollection, MintToCollectionV1, SetDecompressableState, + UpdateMetadata, + UpdateMetadataCollectionNft, } pub fn get_instruction_type(full_bytes: &[u8]) -> InstructionName { @@ -500,7 +562,8 @@ pub fn get_instruction_type(full_bytes: &[u8]) -> InstructionName { [250, 251, 42, 106, 41, 137, 186, 168] => InstructionName::UnverifyCollection, [235, 242, 121, 216, 158, 234, 180, 234] => InstructionName::SetAndVerifyCollection, [37, 232, 198, 199, 64, 102, 128, 49] => InstructionName::SetDecompressableState, - + [170, 182, 43, 239, 97, 78, 225, 186] => InstructionName::UpdateMetadata, + [244, 12, 175, 194, 227, 28, 102, 215] => InstructionName::UpdateMetadataCollectionNft, _ => InstructionName::Unknown, } } @@ -888,6 +951,214 @@ fn process_collection_verification<'info>( ) } +fn assert_signed_by_tree_delegate( + tree_config: &TreeConfig, + incoming_signer: &Signer, +) -> Result<()> { + require!( + incoming_signer.key() == tree_config.tree_creator + || incoming_signer.key() == tree_config.tree_delegate, + BubblegumError::TreeAuthorityIncorrect, + ); + Ok(()) +} + +fn fetch_current_metadata( + current_metadata_args: Option, + metadata_buffer: &Option, +) -> Result { + let current_metadata = match current_metadata_args { + Some(metadata) => { + require!( + metadata_buffer.is_none(), + BubblegumError::MetadataArgsAmbiguous + ); + metadata + } + None => { + let metadata_account = metadata_buffer + .as_ref() + .ok_or(BubblegumError::MetadataArgsMissing)?; + let metadata_data = metadata_account.try_borrow_data()?; + MetadataArgs::deserialize(&mut metadata_data.as_ref())? + } + }; + Ok(current_metadata) +} + +fn assert_authority_matches_collection<'info>( + collection: &Collection, + collection_authority: &AccountInfo<'info>, + collection_authority_record_pda: &Option>, + collection_mint: &AccountInfo<'info>, + collection_metadata_account_info: &AccountInfo, + collection_metadata: &TokenMetadata, + token_metadata_program: &Program<'info, MplTokenMetadata>, +) -> Result<()> { + // Mint account must match Collection mint + require!( + collection_mint.key() == collection.key, + BubblegumError::CollectionMismatch + ); + // Metadata mint must match Collection mint + require!( + collection_metadata.mint == collection.key, + BubblegumError::CollectionMismatch + ); + // Verify correct account ownerships. + require!( + *collection_metadata_account_info.owner == token_metadata_program.key(), + BubblegumError::IncorrectOwner + ); + // Collection mint must be owned by SPL token + require!( + *collection_mint.owner == spl_token::id(), + BubblegumError::IncorrectOwner + ); + + let collection_authority_record = collection_authority_record_pda + .as_ref() + .map(|authority_record_pda| authority_record_pda.to_account_info()); + + // Assert that the correct Collection Authority was provided using token-metadata + assert_has_collection_authority( + collection_metadata, + collection_mint.key, + collection_authority.key, + collection_authority_record.as_ref(), + )?; + + Ok(()) +} + +fn all_verified_creators_in_a_are_in_b(a: &[Creator], b: &[Creator], exception: Pubkey) -> bool { + a.iter() + .filter(|creator_a| creator_a.verified) + .all(|creator_a| { + creator_a.address == exception + || b.iter() + .any(|creator_b| creator_a.address == creator_b.address && creator_b.verified) + }) +} + +fn process_update_metadata<'info>( + merkle_tree: &AccountInfo<'info>, + tree_delegate: &AccountInfo<'info>, + owner: &AccountInfo<'info>, + delegate: &AccountInfo<'info>, + compression_program: &AccountInfo<'info>, + tree_authority: &AccountInfo<'info>, + tree_authority_bump: u8, + log_wrapper: &Program<'info, Noop>, + remaining_accounts: &[AccountInfo<'info>], + root: [u8; 32], + current_metadata: MetadataArgs, + update_args: UpdateArgs, + nonce: u64, + index: u32, +) -> Result<()> { + // Old metadata must be mutable to allow metadata update + require!( + current_metadata.is_mutable, + BubblegumError::MetadataImmutable + ); + + let current_data_hash = hash_metadata(¤t_metadata)?; + let current_creator_hash = hash_creators(¤t_metadata.creators)?; + + // Update metadata + let mut updated_metadata = current_metadata; + if let Some(name) = update_args.name { + updated_metadata.name = name; + }; + if let Some(symbol) = update_args.symbol { + updated_metadata.symbol = symbol; + }; + if let Some(uri) = update_args.uri { + updated_metadata.uri = uri; + }; + if let Some(updated_creators) = update_args.creators { + let current_creators = updated_metadata.creators; + + // Make sure no new creator is verified (unless it is the tree delegate). + let no_new_creators_verified = all_verified_creators_in_a_are_in_b( + &updated_creators, + ¤t_creators, + tree_delegate.key(), + ); + require!( + no_new_creators_verified, + BubblegumError::CreatorDidNotVerify + ); + + // Make sure no current verified creator is unverified or removed (unless it is the tree + // delegate). + let no_current_creators_unverified = all_verified_creators_in_a_are_in_b( + ¤t_creators, + &updated_creators, + tree_delegate.key(), + ); + require!( + no_current_creators_unverified, + BubblegumError::CreatorDidNotUnverify + ); + + updated_metadata.creators = updated_creators; + } + if let Some(seller_fee_basis_points) = update_args.seller_fee_basis_points { + updated_metadata.seller_fee_basis_points = seller_fee_basis_points + }; + if let Some(primary_sale_happened) = update_args.primary_sale_happened { + // a new value of primary_sale_happened should only be specified if primary_sale_happened was false in the original metadata + require!( + !updated_metadata.primary_sale_happened, + BubblegumError::PrimarySaleCanOnlyBeFlippedToTrue + ); + updated_metadata.primary_sale_happened = primary_sale_happened; + }; + if let Some(is_mutable) = update_args.is_mutable { + updated_metadata.is_mutable = is_mutable; + }; + + assert_metadata_is_mpl_compatible(&updated_metadata)?; + let updated_data_hash = hash_metadata(&updated_metadata)?; + let updated_creator_hash = hash_creators(&updated_metadata.creators)?; + + let asset_id = get_asset_id(&merkle_tree.key(), nonce); + let previous_leaf = LeafSchema::new_v0( + asset_id, + owner.key(), + delegate.key(), + nonce, + current_data_hash, + current_creator_hash, + ); + let new_leaf = LeafSchema::new_v0( + asset_id, + owner.key(), + delegate.key(), + nonce, + updated_data_hash, + updated_creator_hash, + ); + + wrap_application_data_v1(new_leaf.to_event().try_to_vec()?, log_wrapper)?; + + replace_leaf( + &merkle_tree.key(), + tree_authority_bump, + compression_program, + tree_authority, + merkle_tree, + &log_wrapper.to_account_info(), + remaining_accounts, + root, + previous_leaf.to_node(), + new_leaf.to_node(), + index, + ) +} + #[program] pub mod bubblegum { use state::DecompressableState; @@ -1348,6 +1619,94 @@ pub mod bubblegum { ) } + pub fn update_metadata<'info>( + ctx: Context<'_, '_, '_, 'info, UpdateMetadata<'info>>, + root: [u8; 32], + nonce: u64, + index: u32, + current_metadata: Option, + update_args: UpdateArgs, + ) -> Result<()> { + assert_signed_by_tree_delegate(&ctx.accounts.tree_authority, &ctx.accounts.tree_delegate)?; + + // Determine how the user opted to pass in the old MetadataArgs + let current_metadata = + fetch_current_metadata(current_metadata, &ctx.accounts.metadata_buffer)?; + + // NFTs which are linked to verified collections cannot be updated through this instruction + require!( + current_metadata.collection.is_none() + || !current_metadata.collection.as_ref().unwrap().verified, + BubblegumError::NFTLinkedToCollection + ); + + process_update_metadata( + &ctx.accounts.merkle_tree.to_account_info(), + &ctx.accounts.tree_delegate, + &ctx.accounts.leaf_owner, + &ctx.accounts.leaf_delegate, + &ctx.accounts.compression_program.to_account_info(), + &ctx.accounts.tree_authority.to_account_info(), + *ctx.bumps.get("tree_authority").unwrap(), + &ctx.accounts.log_wrapper, + ctx.remaining_accounts, + root, + current_metadata, + update_args, + nonce, + index, + ) + } + + pub fn update_metadata_collection_nft<'info>( + ctx: Context<'_, '_, '_, 'info, UpdateMetadataCollectionNFT<'info>>, + root: [u8; 32], + nonce: u64, + index: u32, + current_metadata: Option, + update_args: UpdateArgs, + ) -> Result<()> { + assert_signed_by_tree_delegate(&ctx.accounts.tree_authority, &ctx.accounts.tree_delegate)?; + + // Determine how the user opted to pass in the old MetadataArgs + let current_metadata = + fetch_current_metadata(current_metadata, &ctx.accounts.metadata_buffer)?; + + // NFTs updated through this instruction must be linked to a collection, + // so a collection authority for that collection must sign + let collection = current_metadata + .collection + .as_ref() + .ok_or(BubblegumError::NFTNotLinkedToVerifiedCollection)?; + + assert_authority_matches_collection( + collection, + &ctx.accounts.collection_authority.to_account_info(), + &ctx.accounts.collection_authority_record_pda, + &ctx.accounts.collection_mint, + &ctx.accounts.collection_metadata.to_account_info(), + &ctx.accounts.collection_metadata, + &ctx.accounts.token_metadata_program, + )?; + + process_update_metadata( + &ctx.accounts.merkle_tree.to_account_info(), + &ctx.accounts.tree_delegate, + &ctx.accounts.leaf_owner, + &ctx.accounts.leaf_delegate, + &ctx.accounts.compression_program.to_account_info(), + &ctx.accounts.tree_authority.to_account_info(), + *ctx.bumps.get("tree_authority").unwrap(), + &ctx.accounts.log_wrapper, + ctx.remaining_accounts, + root, + current_metadata, + update_args, + nonce, + index, + ) + } + pub fn redeem<'info>( ctx: Context<'_, '_, '_, 'info, Redeem<'info>>, root: [u8; 32], diff --git a/programs/bubblegum/program/src/state/metaplex_adapter.rs b/programs/bubblegum/program/src/state/metaplex_adapter.rs index 6023f435..6524ad20 100644 --- a/programs/bubblegum/program/src/state/metaplex_adapter.rs +++ b/programs/bubblegum/program/src/state/metaplex_adapter.rs @@ -102,3 +102,14 @@ pub struct MetadataArgs { pub token_program_version: TokenProgramVersion, pub creators: Vec, } + +#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Debug, Clone, Default)] +pub struct UpdateArgs { + pub name: Option, + pub symbol: Option, + pub uri: Option, + pub creators: Option>, + pub seller_fee_basis_points: Option, + pub primary_sale_happened: Option, + pub is_mutable: Option, +}