@metaplex-foundation/mpl-bubblegum
Advanced tools
Comparing version 3.1.2 to 4.0.0
@@ -249,2 +249,8 @@ /** | ||
} | ||
/** InvalidTokenStandard: Only NonFungible standard is supported */ | ||
export declare class InvalidTokenStandardError extends ProgramError { | ||
readonly name: string; | ||
readonly code: number; | ||
constructor(program: Program, cause?: Error); | ||
} | ||
/** | ||
@@ -251,0 +257,0 @@ * Attempts to resolve a custom program error from the provided error code. |
@@ -10,3 +10,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMplBubblegumErrorFromName = exports.getMplBubblegumErrorFromCode = exports.CreatorDidNotUnverifyError = exports.PrimarySaleCanOnlyBeFlippedToTrueError = exports.MetadataImmutableError = exports.CollectionMismatchError = exports.MissingCollectionMetadataAccountError = exports.MissingCollectionMintAccountError = exports.DecompressionDisabledError = exports.UnknownExternalErrorError = exports.CollectionMustBeAUniqueMasterEditionError = exports.CollectionMasterEditionAccountInvalidError = exports.InvalidDelegateRecordError = exports.InvalidCollectionAuthorityError = exports.MetadataMintMismatchError = exports.CollectionMustBeSizedError = exports.LeafAuthorityMustSignError = exports.UpdateAuthorityIncorrectError = exports.AlreadyUnverifiedError = exports.AlreadyVerifiedError = exports.CollectionNotFoundError = exports.CollectionCannotBeVerifiedInThisInstructionError = exports.IncorrectOwnerError = exports.NumericalOverflowErrorError = exports.InsufficientMintCapacityError = exports.TreeAuthorityIncorrectError = exports.MetadataBasisPointsTooHighError = exports.MetadataUriTooLongError = exports.MetadataSymbolTooLongError = exports.MetadataNameTooLongError = exports.CreatorsTooLongError = exports.DataHashMismatchError = exports.CreatorHashMismatchError = exports.NoCreatorsPresentError = exports.CreatorNotFoundError = exports.CreatorDidNotVerifyError = exports.DuplicateCreatorAddressError = exports.CreatorShareTotalMustBe100Error = exports.UnsupportedSchemaVersionError = exports.HashingMismatchError = exports.PublicKeyMismatchError = exports.AssetOwnerMismatchError = void 0; | ||
exports.getMplBubblegumErrorFromName = exports.getMplBubblegumErrorFromCode = exports.InvalidTokenStandardError = exports.CreatorDidNotUnverifyError = exports.PrimarySaleCanOnlyBeFlippedToTrueError = exports.MetadataImmutableError = exports.CollectionMismatchError = exports.MissingCollectionMetadataAccountError = exports.MissingCollectionMintAccountError = exports.DecompressionDisabledError = exports.UnknownExternalErrorError = exports.CollectionMustBeAUniqueMasterEditionError = exports.CollectionMasterEditionAccountInvalidError = exports.InvalidDelegateRecordError = exports.InvalidCollectionAuthorityError = exports.MetadataMintMismatchError = exports.CollectionMustBeSizedError = exports.LeafAuthorityMustSignError = exports.UpdateAuthorityIncorrectError = exports.AlreadyUnverifiedError = exports.AlreadyVerifiedError = exports.CollectionNotFoundError = exports.CollectionCannotBeVerifiedInThisInstructionError = exports.IncorrectOwnerError = exports.NumericalOverflowErrorError = exports.InsufficientMintCapacityError = exports.TreeAuthorityIncorrectError = exports.MetadataBasisPointsTooHighError = exports.MetadataUriTooLongError = exports.MetadataSymbolTooLongError = exports.MetadataNameTooLongError = exports.CreatorsTooLongError = exports.DataHashMismatchError = exports.CreatorHashMismatchError = exports.NoCreatorsPresentError = exports.CreatorNotFoundError = exports.CreatorDidNotVerifyError = exports.DuplicateCreatorAddressError = exports.CreatorShareTotalMustBe100Error = exports.UnsupportedSchemaVersionError = exports.HashingMismatchError = exports.PublicKeyMismatchError = exports.AssetOwnerMismatchError = void 0; | ||
const umi_1 = require("@metaplex-foundation/umi"); | ||
@@ -455,2 +455,13 @@ const codeToErrorMap = new Map(); | ||
nameToErrorMap.set('CreatorDidNotUnverify', CreatorDidNotUnverifyError); | ||
/** InvalidTokenStandard: Only NonFungible standard is supported */ | ||
class InvalidTokenStandardError extends umi_1.ProgramError { | ||
constructor(program, cause) { | ||
super('Only NonFungible standard is supported', program, cause); | ||
this.name = 'InvalidTokenStandard'; | ||
this.code = 0x1798; // 6040 | ||
} | ||
} | ||
exports.InvalidTokenStandardError = InvalidTokenStandardError; | ||
codeToErrorMap.set(0x1798, InvalidTokenStandardError); | ||
nameToErrorMap.set('InvalidTokenStandard', InvalidTokenStandardError); | ||
/** | ||
@@ -457,0 +468,0 @@ * Attempts to resolve a custom program error from the provided error code. |
@@ -129,3 +129,3 @@ "use strict"; | ||
if (!resolvedAccounts.bubblegumSigner.value) { | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('4ewWZC5gT6TGpm5LZNDs9wVonfUT2q5PP5sc9kVbwMAK'); | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -141,4 +141,3 @@ if (!resolvedAccounts.logWrapper.value) { | ||
if (!resolvedAccounts.tokenMetadataProgram.value) { | ||
resolvedAccounts.tokenMetadataProgram.value = context.programs.getPublicKey('mplTokenMetadata', 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); | ||
resolvedAccounts.tokenMetadataProgram.isWritable = false; | ||
resolvedAccounts.tokenMetadataProgram.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -145,0 +144,0 @@ if (!resolvedAccounts.systemProgram.value) { |
@@ -140,3 +140,3 @@ "use strict"; | ||
if (!resolvedAccounts.bubblegumSigner.value) { | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('4ewWZC5gT6TGpm5LZNDs9wVonfUT2q5PP5sc9kVbwMAK'); | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -152,4 +152,3 @@ if (!resolvedAccounts.logWrapper.value) { | ||
if (!resolvedAccounts.tokenMetadataProgram.value) { | ||
resolvedAccounts.tokenMetadataProgram.value = context.programs.getPublicKey('mplTokenMetadata', 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); | ||
resolvedAccounts.tokenMetadataProgram.isWritable = false; | ||
resolvedAccounts.tokenMetadataProgram.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -156,0 +155,0 @@ if (!resolvedAccounts.systemProgram.value) { |
@@ -139,3 +139,3 @@ "use strict"; | ||
if (!resolvedAccounts.bubblegumSigner.value) { | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('4ewWZC5gT6TGpm5LZNDs9wVonfUT2q5PP5sc9kVbwMAK'); | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -151,4 +151,3 @@ if (!resolvedAccounts.logWrapper.value) { | ||
if (!resolvedAccounts.tokenMetadataProgram.value) { | ||
resolvedAccounts.tokenMetadataProgram.value = context.programs.getPublicKey('mplTokenMetadata', 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); | ||
resolvedAccounts.tokenMetadataProgram.isWritable = false; | ||
resolvedAccounts.tokenMetadataProgram.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -155,0 +154,0 @@ if (!resolvedAccounts.systemProgram.value) { |
@@ -120,4 +120,3 @@ "use strict"; | ||
if (!resolvedAccounts.tokenMetadataProgram.value) { | ||
resolvedAccounts.tokenMetadataProgram.value = context.programs.getPublicKey('mplTokenMetadata', 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); | ||
resolvedAccounts.tokenMetadataProgram.isWritable = false; | ||
resolvedAccounts.tokenMetadataProgram.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -124,0 +123,0 @@ if (!resolvedAccounts.systemProgram.value) { |
@@ -139,3 +139,3 @@ "use strict"; | ||
if (!resolvedAccounts.bubblegumSigner.value) { | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('4ewWZC5gT6TGpm5LZNDs9wVonfUT2q5PP5sc9kVbwMAK'); | ||
resolvedAccounts.bubblegumSigner.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -151,4 +151,3 @@ if (!resolvedAccounts.logWrapper.value) { | ||
if (!resolvedAccounts.tokenMetadataProgram.value) { | ||
resolvedAccounts.tokenMetadataProgram.value = context.programs.getPublicKey('mplTokenMetadata', 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); | ||
resolvedAccounts.tokenMetadataProgram.isWritable = false; | ||
resolvedAccounts.tokenMetadataProgram.value = (0, umi_1.publicKey)('BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'); | ||
} | ||
@@ -155,0 +154,0 @@ if (!resolvedAccounts.systemProgram.value) { |
@@ -29,3 +29,3 @@ "use strict"; | ||
if (innerInstructions) { | ||
const leaf = (0, generated_1.getLeafSchemaSerializer)().deserialize(innerInstructions[0].instructions[1].data.slice(8)); | ||
const leaf = (0, generated_1.getLeafSchemaSerializer)().deserialize(innerInstructions[0].instructions[0].data.slice(8)); | ||
return leaf[0]; | ||
@@ -32,0 +32,0 @@ } |
{ | ||
"name": "@metaplex-foundation/mpl-bubblegum", | ||
"version": "3.1.2", | ||
"version": "4.0.0", | ||
"description": "Create and interact with compressed Metaplex NFTs", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
404395
6199