@metaplex-foundation/mpl-candy-machine
Advanced tools
Comparing version 4.4.1 to 4.5.0
@@ -24,4 +24,9 @@ /// <reference types="node" /> | ||
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey): Promise<CandyMachine>; | ||
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<CandyMachineArgs & { | ||
accountDiscriminator: number[]; | ||
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ | ||
data: any; | ||
authority: any; | ||
wallet: any; | ||
tokenMint: any; | ||
itemsRedeemed: any; | ||
accountDiscriminator: any; | ||
}>; | ||
@@ -28,0 +33,0 @@ static deserialize(buf: Buffer, offset?: number): [CandyMachine, number]; |
export * from './CandyMachine'; | ||
export * from './CollectionPDA'; | ||
export * from './FreezePDA'; | ||
import { CandyMachine } from './CandyMachine'; | ||
import { CollectionPDA } from './CollectionPDA'; | ||
import { FreezePDA } from './FreezePDA'; | ||
export declare const accountProviders: { | ||
CandyMachine: typeof CandyMachine; | ||
CollectionPDA: typeof CollectionPDA; | ||
FreezePDA: typeof FreezePDA; | ||
}; |
@@ -20,5 +20,7 @@ "use strict"; | ||
__exportStar(require("./CollectionPDA"), exports); | ||
__exportStar(require("./FreezePDA"), exports); | ||
const CandyMachine_1 = require("./CandyMachine"); | ||
const CollectionPDA_1 = require("./CollectionPDA"); | ||
exports.accountProviders = { CandyMachine: CandyMachine_1.CandyMachine, CollectionPDA: CollectionPDA_1.CollectionPDA }; | ||
const FreezePDA_1 = require("./FreezePDA"); | ||
exports.accountProviders = { CandyMachine: CandyMachine_1.CandyMachine, CollectionPDA: CollectionPDA_1.CollectionPDA, FreezePDA: FreezePDA_1.FreezePDA }; | ||
//# sourceMappingURL=index.js.map |
@@ -185,4 +185,74 @@ declare type ErrorWithCode = Error & { | ||
} | ||
export declare class NoChangingFreezeDuringMintError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoChangingAuthorityWithFreezeError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoChangingTokenWithFreezeError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class InvalidThawNftError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class IncorrectRemainingAccountsLenError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class MissingFreezeAtaError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class IncorrectFreezeAtaError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class FreezePDAMismatchError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class EnteredFreezeIsMoreThanMaxFreezeError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoWithdrawWithFreezeError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoWithdrawWithFrozenFundsError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class MissingRemoveFreezeTokenAccountsError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class InvalidFreezeWithdrawTokenAddressError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoUnlockWithNFTsStillFrozenError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare function errorFromCode(code: number): MaybeErrorWithCode; | ||
export declare function errorFromName(name: string): MaybeErrorWithCode; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.errorFromName = exports.errorFromCode = exports.GatewayProgramErrorError = exports.CandyCollectionRequiresRetainAuthorityError = exports.NoChangingCollectionDuringMintError = exports.MissingSetCollectionDuringMintError = exports.MetadataAccountMustBeEmptyError = exports.SlotHashesEmptyError = exports.MismatchedCollectionMintError = exports.MismatchedCollectionPDAError = exports.IncorrectCollectionAuthorityError = exports.IncorrectSlotHashesPubkeyError = exports.CannotSwitchToHiddenSettingsError = exports.SuspiciousTransactionError = exports.InvalidStringError = exports.CannotFindUsableConfigLineError = exports.NetworkExpireFeatureMissingError = exports.GatewayTokenExpireTimeInvalidError = exports.GatewayTokenMissingError = exports.GatewayAppMissingError = exports.TokenBurnFailedError = exports.NoWhitelistTokenError = exports.PublicKeyMismatchError = exports.DerivedKeyInvalidError = exports.CannotChangeNumberOfLinesError = exports.HiddenSettingsConfigsDoNotHaveConfigLinesError = exports.CandyMachineNotLiveError = exports.CandyMachineEmptyError = exports.TokenTransferFailedError = exports.NotEnoughSOLError = exports.NotEnoughTokensError = exports.UuidMustBeExactly6LengthError = exports.TooManyCreatorsError = exports.NumericalOverflowErrorError = exports.IndexGreaterThanLengthError = exports.MintMismatchError = exports.UninitializedError = exports.IncorrectOwnerError = void 0; | ||
exports.NoUnlockWithNFTsStillFrozenError = exports.InvalidFreezeWithdrawTokenAddressError = exports.MissingRemoveFreezeTokenAccountsError = exports.NoWithdrawWithFrozenFundsError = exports.NoWithdrawWithFreezeError = exports.EnteredFreezeIsMoreThanMaxFreezeError = exports.FreezePDAMismatchError = exports.IncorrectFreezeAtaError = exports.MissingFreezeAtaError = exports.IncorrectRemainingAccountsLenError = exports.InvalidThawNftError = exports.NoChangingTokenWithFreezeError = exports.NoChangingAuthorityWithFreezeError = exports.NoChangingFreezeDuringMintError = exports.GatewayProgramErrorError = exports.CandyCollectionRequiresRetainAuthorityError = exports.NoChangingCollectionDuringMintError = exports.MissingSetCollectionDuringMintError = exports.MetadataAccountMustBeEmptyError = exports.SlotHashesEmptyError = exports.MismatchedCollectionMintError = exports.MismatchedCollectionPDAError = exports.IncorrectCollectionAuthorityError = exports.IncorrectSlotHashesPubkeyError = exports.CannotSwitchToHiddenSettingsError = exports.SuspiciousTransactionError = exports.InvalidStringError = exports.CannotFindUsableConfigLineError = exports.NetworkExpireFeatureMissingError = exports.GatewayTokenExpireTimeInvalidError = exports.GatewayTokenMissingError = exports.GatewayAppMissingError = exports.TokenBurnFailedError = exports.NoWhitelistTokenError = exports.PublicKeyMismatchError = exports.DerivedKeyInvalidError = exports.CannotChangeNumberOfLinesError = exports.HiddenSettingsConfigsDoNotHaveConfigLinesError = exports.CandyMachineNotLiveError = exports.CandyMachineEmptyError = exports.TokenTransferFailedError = exports.NotEnoughSOLError = exports.NotEnoughTokensError = exports.UuidMustBeExactly6LengthError = exports.TooManyCreatorsError = exports.NumericalOverflowErrorError = exports.IndexGreaterThanLengthError = exports.MintMismatchError = exports.UninitializedError = exports.IncorrectOwnerError = void 0; | ||
exports.errorFromName = exports.errorFromCode = void 0; | ||
const createErrorFromCodeLookup = new Map(); | ||
@@ -474,2 +475,184 @@ const createErrorFromNameLookup = new Map(); | ||
createErrorFromNameLookup.set('GatewayProgramError', () => new GatewayProgramErrorError()); | ||
class NoChangingFreezeDuringMintError extends Error { | ||
constructor() { | ||
super("Can't change freeze settings after items have begun to be minted. You can only disable."); | ||
this.code = 0x1794; | ||
this.name = 'NoChangingFreezeDuringMint'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoChangingFreezeDuringMintError); | ||
} | ||
} | ||
} | ||
exports.NoChangingFreezeDuringMintError = NoChangingFreezeDuringMintError; | ||
createErrorFromCodeLookup.set(0x1794, () => new NoChangingFreezeDuringMintError()); | ||
createErrorFromNameLookup.set('NoChangingFreezeDuringMint', () => new NoChangingFreezeDuringMintError()); | ||
class NoChangingAuthorityWithFreezeError extends Error { | ||
constructor() { | ||
super("Can't change authority while freeze is enabled. Disable freeze first."); | ||
this.code = 0x1795; | ||
this.name = 'NoChangingAuthorityWithFreeze'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoChangingAuthorityWithFreezeError); | ||
} | ||
} | ||
} | ||
exports.NoChangingAuthorityWithFreezeError = NoChangingAuthorityWithFreezeError; | ||
createErrorFromCodeLookup.set(0x1795, () => new NoChangingAuthorityWithFreezeError()); | ||
createErrorFromNameLookup.set('NoChangingAuthorityWithFreeze', () => new NoChangingAuthorityWithFreezeError()); | ||
class NoChangingTokenWithFreezeError extends Error { | ||
constructor() { | ||
super("Can't change token while freeze is enabled. Disable freeze first."); | ||
this.code = 0x1796; | ||
this.name = 'NoChangingTokenWithFreeze'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoChangingTokenWithFreezeError); | ||
} | ||
} | ||
} | ||
exports.NoChangingTokenWithFreezeError = NoChangingTokenWithFreezeError; | ||
createErrorFromCodeLookup.set(0x1796, () => new NoChangingTokenWithFreezeError()); | ||
createErrorFromNameLookup.set('NoChangingTokenWithFreeze', () => new NoChangingTokenWithFreezeError()); | ||
class InvalidThawNftError extends Error { | ||
constructor() { | ||
super('Cannot thaw NFT unless all NFTs are minted or Candy Machine authority enables thawing'); | ||
this.code = 0x1797; | ||
this.name = 'InvalidThawNft'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, InvalidThawNftError); | ||
} | ||
} | ||
} | ||
exports.InvalidThawNftError = InvalidThawNftError; | ||
createErrorFromCodeLookup.set(0x1797, () => new InvalidThawNftError()); | ||
createErrorFromNameLookup.set('InvalidThawNft', () => new InvalidThawNftError()); | ||
class IncorrectRemainingAccountsLenError extends Error { | ||
constructor() { | ||
super("The number of remaining accounts passed in doesn't match the Candy Machine settings"); | ||
this.code = 0x1798; | ||
this.name = 'IncorrectRemainingAccountsLen'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, IncorrectRemainingAccountsLenError); | ||
} | ||
} | ||
} | ||
exports.IncorrectRemainingAccountsLenError = IncorrectRemainingAccountsLenError; | ||
createErrorFromCodeLookup.set(0x1798, () => new IncorrectRemainingAccountsLenError()); | ||
createErrorFromNameLookup.set('IncorrectRemainingAccountsLen', () => new IncorrectRemainingAccountsLenError()); | ||
class MissingFreezeAtaError extends Error { | ||
constructor() { | ||
super('FreezePDA ATA needs to be passed in if token mint is enabled.'); | ||
this.code = 0x1799; | ||
this.name = 'MissingFreezeAta'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, MissingFreezeAtaError); | ||
} | ||
} | ||
} | ||
exports.MissingFreezeAtaError = MissingFreezeAtaError; | ||
createErrorFromCodeLookup.set(0x1799, () => new MissingFreezeAtaError()); | ||
createErrorFromNameLookup.set('MissingFreezeAta', () => new MissingFreezeAtaError()); | ||
class IncorrectFreezeAtaError extends Error { | ||
constructor() { | ||
super('Incorrect freeze ATA address.'); | ||
this.code = 0x179a; | ||
this.name = 'IncorrectFreezeAta'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, IncorrectFreezeAtaError); | ||
} | ||
} | ||
} | ||
exports.IncorrectFreezeAtaError = IncorrectFreezeAtaError; | ||
createErrorFromCodeLookup.set(0x179a, () => new IncorrectFreezeAtaError()); | ||
createErrorFromNameLookup.set('IncorrectFreezeAta', () => new IncorrectFreezeAtaError()); | ||
class FreezePDAMismatchError extends Error { | ||
constructor() { | ||
super("FreezePDA doesn't belong to this Candy Machine."); | ||
this.code = 0x179b; | ||
this.name = 'FreezePDAMismatch'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, FreezePDAMismatchError); | ||
} | ||
} | ||
} | ||
exports.FreezePDAMismatchError = FreezePDAMismatchError; | ||
createErrorFromCodeLookup.set(0x179b, () => new FreezePDAMismatchError()); | ||
createErrorFromNameLookup.set('FreezePDAMismatch', () => new FreezePDAMismatchError()); | ||
class EnteredFreezeIsMoreThanMaxFreezeError extends Error { | ||
constructor() { | ||
super("Freeze time can't be longer than MAX_FREEZE_TIME."); | ||
this.code = 0x179c; | ||
this.name = 'EnteredFreezeIsMoreThanMaxFreeze'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, EnteredFreezeIsMoreThanMaxFreezeError); | ||
} | ||
} | ||
} | ||
exports.EnteredFreezeIsMoreThanMaxFreezeError = EnteredFreezeIsMoreThanMaxFreezeError; | ||
createErrorFromCodeLookup.set(0x179c, () => new EnteredFreezeIsMoreThanMaxFreezeError()); | ||
createErrorFromNameLookup.set('EnteredFreezeIsMoreThanMaxFreeze', () => new EnteredFreezeIsMoreThanMaxFreezeError()); | ||
class NoWithdrawWithFreezeError extends Error { | ||
constructor() { | ||
super("Can't withdraw Candy Machine while freeze is active. Disable freeze first."); | ||
this.code = 0x179d; | ||
this.name = 'NoWithdrawWithFreeze'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoWithdrawWithFreezeError); | ||
} | ||
} | ||
} | ||
exports.NoWithdrawWithFreezeError = NoWithdrawWithFreezeError; | ||
createErrorFromCodeLookup.set(0x179d, () => new NoWithdrawWithFreezeError()); | ||
createErrorFromNameLookup.set('NoWithdrawWithFreeze', () => new NoWithdrawWithFreezeError()); | ||
class NoWithdrawWithFrozenFundsError extends Error { | ||
constructor() { | ||
super("Can't withdraw Candy Machine while frozen funds need to be redeemed. Unlock funds first."); | ||
this.code = 0x179e; | ||
this.name = 'NoWithdrawWithFrozenFunds'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoWithdrawWithFrozenFundsError); | ||
} | ||
} | ||
} | ||
exports.NoWithdrawWithFrozenFundsError = NoWithdrawWithFrozenFundsError; | ||
createErrorFromCodeLookup.set(0x179e, () => new NoWithdrawWithFrozenFundsError()); | ||
createErrorFromNameLookup.set('NoWithdrawWithFrozenFunds', () => new NoWithdrawWithFrozenFundsError()); | ||
class MissingRemoveFreezeTokenAccountsError extends Error { | ||
constructor() { | ||
super('Missing required remaining accounts for remove_freeze with token mint.'); | ||
this.code = 0x179f; | ||
this.name = 'MissingRemoveFreezeTokenAccounts'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, MissingRemoveFreezeTokenAccountsError); | ||
} | ||
} | ||
} | ||
exports.MissingRemoveFreezeTokenAccountsError = MissingRemoveFreezeTokenAccountsError; | ||
createErrorFromCodeLookup.set(0x179f, () => new MissingRemoveFreezeTokenAccountsError()); | ||
createErrorFromNameLookup.set('MissingRemoveFreezeTokenAccounts', () => new MissingRemoveFreezeTokenAccountsError()); | ||
class InvalidFreezeWithdrawTokenAddressError extends Error { | ||
constructor() { | ||
super("Can't withdraw SPL Token from freeze PDA into itself"); | ||
this.code = 0x17a0; | ||
this.name = 'InvalidFreezeWithdrawTokenAddress'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, InvalidFreezeWithdrawTokenAddressError); | ||
} | ||
} | ||
} | ||
exports.InvalidFreezeWithdrawTokenAddressError = InvalidFreezeWithdrawTokenAddressError; | ||
createErrorFromCodeLookup.set(0x17a0, () => new InvalidFreezeWithdrawTokenAddressError()); | ||
createErrorFromNameLookup.set('InvalidFreezeWithdrawTokenAddress', () => new InvalidFreezeWithdrawTokenAddressError()); | ||
class NoUnlockWithNFTsStillFrozenError extends Error { | ||
constructor() { | ||
super("Can't unlock funds while NFTs are still frozen. Run thaw on all NFTs first."); | ||
this.code = 0x17a1; | ||
this.name = 'NoUnlockWithNFTsStillFrozen'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoUnlockWithNFTsStillFrozenError); | ||
} | ||
} | ||
} | ||
exports.NoUnlockWithNFTsStillFrozenError = NoUnlockWithNFTsStillFrozenError; | ||
createErrorFromCodeLookup.set(0x17a1, () => new NoUnlockWithNFTsStillFrozenError()); | ||
createErrorFromNameLookup.set('NoUnlockWithNFTsStillFrozen', () => new NoUnlockWithNFTsStillFrozenError()); | ||
function errorFromCode(code) { | ||
@@ -476,0 +659,0 @@ const createError = createErrorFromCodeLookup.get(code); |
@@ -5,6 +5,10 @@ export * from './addConfigLines'; | ||
export * from './removeCollection'; | ||
export * from './removeFreeze'; | ||
export * from './setCollection'; | ||
export * from './setCollectionDuringMint'; | ||
export * from './setFreeze'; | ||
export * from './thawNft'; | ||
export * from './unlockFunds'; | ||
export * from './updateAuthority'; | ||
export * from './updateCandyMachine'; | ||
export * from './withdrawFunds'; |
@@ -21,4 +21,8 @@ "use strict"; | ||
__exportStar(require("./removeCollection"), exports); | ||
__exportStar(require("./removeFreeze"), exports); | ||
__exportStar(require("./setCollection"), exports); | ||
__exportStar(require("./setCollectionDuringMint"), exports); | ||
__exportStar(require("./setFreeze"), exports); | ||
__exportStar(require("./thawNft"), exports); | ||
__exportStar(require("./unlockFunds"), exports); | ||
__exportStar(require("./updateAuthority"), exports); | ||
@@ -25,0 +29,0 @@ __exportStar(require("./updateCandyMachine"), exports); |
@@ -43,3 +43,3 @@ "use strict"; | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
isWritable: true, | ||
isSigner: true, | ||
@@ -46,0 +46,0 @@ }, |
{ | ||
"name": "@metaplex-foundation/mpl-candy-machine", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"programVersion": "4.0.2", | ||
@@ -12,3 +12,3 @@ "description": "MPL Candy Machine JavaScript API. This MPL package is for the current generation of candy machine which is 2.0.0", | ||
"postversion": "git add package.json && git commit -m \"chore: update $npm_package_name to v$npm_package_version\" && git tag $npm_package_name@$npm_package_version", | ||
"prepublish": "yarn check:publish-ready", | ||
"prepublishOnly": "yarn check:publish-ready", | ||
"postpublish": "git push origin && git push origin --tags", | ||
@@ -15,0 +15,0 @@ "build:docs": "typedoc", |
@@ -8,3 +8,3 @@ # mpl-candy-machine | ||
In order to update the generated SDK when the rust contract was updated please run: | ||
In order to update the generated lib when the rust contract was updated please run: | ||
@@ -11,0 +11,0 @@ ``` |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
204912
102
3238
0