@metaplex-foundation/mpl-candy-machine
Advanced tools
Comparing version 4.2.0 to 4.3.0
/// <reference types="@solana/web3.js" /> | ||
/// <reference types="@metaplex-foundation/beet-solana/node_modules/@solana/web3.js" /> | ||
import { Program } from '@metaplex-foundation/mpl-core'; | ||
@@ -3,0 +4,0 @@ import * as errors from './generated/errors'; |
/// <reference types="node" /> | ||
import * as web3 from '@solana/web3.js'; | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as beetSolana from '@metaplex-foundation/beet-solana'; | ||
import { CandyMachineData } from '../types/CandyMachineData'; | ||
@@ -12,2 +13,3 @@ export declare type CandyMachineArgs = { | ||
}; | ||
export declare const candyMachineDiscriminator: number[]; | ||
export declare class CandyMachine implements CandyMachineArgs { | ||
@@ -23,2 +25,10 @@ readonly authority: web3.PublicKey; | ||
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey): Promise<CandyMachine>; | ||
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ | ||
data: any; | ||
authority: any; | ||
wallet: any; | ||
tokenMint: any; | ||
itemsRedeemed: any; | ||
accountDiscriminator: any; | ||
}>; | ||
static deserialize(buf: Buffer, offset?: number): [CandyMachine, number]; | ||
@@ -32,3 +42,5 @@ serialize(): [Buffer, number]; | ||
tokenMint: beet.COption<web3.PublicKey>; | ||
itemsRedeemed: beet.bignum; | ||
itemsRedeemed: number | { | ||
toNumber: () => number; | ||
}; | ||
data: CandyMachineData; | ||
@@ -35,0 +47,0 @@ }; |
@@ -26,7 +26,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.candyMachineBeet = exports.CandyMachine = void 0; | ||
exports.candyMachineBeet = exports.CandyMachine = exports.candyMachineDiscriminator = void 0; | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); | ||
const CandyMachineData_1 = require("../types/CandyMachineData"); | ||
const candyMachineDiscriminator = [51, 173, 177, 113, 25, 241, 109, 189]; | ||
exports.candyMachineDiscriminator = [51, 173, 177, 113, 25, 241, 109, 189]; | ||
class CandyMachine { | ||
@@ -53,2 +54,5 @@ constructor(authority, wallet, tokenMint, itemsRedeemed, data) { | ||
} | ||
static gpaBuilder(programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
return beetSolana.GpaBuilder.fromStruct(programId, exports.candyMachineBeet); | ||
} | ||
static deserialize(buf, offset = 0) { | ||
@@ -59,3 +63,3 @@ return exports.candyMachineBeet.deserialize(buf, offset); | ||
return exports.candyMachineBeet.serialize({ | ||
accountDiscriminator: candyMachineDiscriminator, | ||
accountDiscriminator: exports.candyMachineDiscriminator, | ||
...this, | ||
@@ -67,3 +71,3 @@ }); | ||
return exports.candyMachineBeet.toFixedFromValue({ | ||
accountDiscriminator: candyMachineDiscriminator, | ||
accountDiscriminator: exports.candyMachineDiscriminator, | ||
...instance, | ||
@@ -80,3 +84,14 @@ }).byteSize; | ||
tokenMint: this.tokenMint, | ||
itemsRedeemed: this.itemsRedeemed, | ||
itemsRedeemed: (() => { | ||
const x = this.itemsRedeemed; | ||
if (typeof x.toNumber === 'function') { | ||
try { | ||
return x.toNumber(); | ||
} | ||
catch (_) { | ||
return x; | ||
} | ||
} | ||
return x; | ||
})(), | ||
data: this.data, | ||
@@ -83,0 +98,0 @@ }; |
/// <reference types="node" /> | ||
import * as web3 from '@solana/web3.js'; | ||
import * as beetSolana from '@metaplex-foundation/beet-solana'; | ||
import * as beet from '@metaplex-foundation/beet'; | ||
@@ -8,2 +9,3 @@ export declare type CollectionPDAArgs = { | ||
}; | ||
export declare const collectionPDADiscriminator: number[]; | ||
export declare class CollectionPDA implements CollectionPDAArgs { | ||
@@ -16,2 +18,7 @@ readonly mint: web3.PublicKey; | ||
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey): Promise<CollectionPDA>; | ||
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ | ||
mint: any; | ||
accountDiscriminator: any; | ||
candyMachine: any; | ||
}>; | ||
static deserialize(buf: Buffer, offset?: number): [CollectionPDA, number]; | ||
@@ -18,0 +25,0 @@ serialize(): [Buffer, number]; |
@@ -26,6 +26,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.collectionPDABeet = exports.CollectionPDA = void 0; | ||
exports.collectionPDABeet = exports.CollectionPDA = exports.collectionPDADiscriminator = void 0; | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const collectionPDADiscriminator = [203, 128, 119, 125, 234, 89, 232, 157]; | ||
exports.collectionPDADiscriminator = [203, 128, 119, 125, 234, 89, 232, 157]; | ||
class CollectionPDA { | ||
@@ -49,2 +50,5 @@ constructor(mint, candyMachine) { | ||
} | ||
static gpaBuilder(programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
return beetSolana.GpaBuilder.fromStruct(programId, exports.collectionPDABeet); | ||
} | ||
static deserialize(buf, offset = 0) { | ||
@@ -55,3 +59,3 @@ return exports.collectionPDABeet.deserialize(buf, offset); | ||
return exports.collectionPDABeet.serialize({ | ||
accountDiscriminator: collectionPDADiscriminator, | ||
accountDiscriminator: exports.collectionPDADiscriminator, | ||
...this, | ||
@@ -58,0 +62,0 @@ }); |
@@ -155,4 +155,34 @@ declare type ErrorWithCode = Error & { | ||
} | ||
export declare class SlotHashesEmptyError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class MetadataAccountMustBeEmptyError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class MissingSetCollectionDuringMintError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class NoChangingCollectionDuringMintError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class CandyCollectionRequiresRetainAuthorityError extends Error { | ||
readonly code: number; | ||
readonly name: string; | ||
constructor(); | ||
} | ||
export declare class GatewayProgramErrorError 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.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 = 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; | ||
const createErrorFromCodeLookup = new Map(); | ||
@@ -396,2 +396,80 @@ const createErrorFromNameLookup = new Map(); | ||
createErrorFromNameLookup.set('MismatchedCollectionMint', () => new MismatchedCollectionMintError()); | ||
class SlotHashesEmptyError extends Error { | ||
constructor() { | ||
super('Slot hashes Sysvar is empty'); | ||
this.code = 0x178e; | ||
this.name = 'SlotHashesEmpty'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, SlotHashesEmptyError); | ||
} | ||
} | ||
} | ||
exports.SlotHashesEmptyError = SlotHashesEmptyError; | ||
createErrorFromCodeLookup.set(0x178e, () => new SlotHashesEmptyError()); | ||
createErrorFromNameLookup.set('SlotHashesEmpty', () => new SlotHashesEmptyError()); | ||
class MetadataAccountMustBeEmptyError extends Error { | ||
constructor() { | ||
super('The metadata account has data in it, and this must be empty to mint a new NFT'); | ||
this.code = 0x178f; | ||
this.name = 'MetadataAccountMustBeEmpty'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, MetadataAccountMustBeEmptyError); | ||
} | ||
} | ||
} | ||
exports.MetadataAccountMustBeEmptyError = MetadataAccountMustBeEmptyError; | ||
createErrorFromCodeLookup.set(0x178f, () => new MetadataAccountMustBeEmptyError()); | ||
createErrorFromNameLookup.set('MetadataAccountMustBeEmpty', () => new MetadataAccountMustBeEmptyError()); | ||
class MissingSetCollectionDuringMintError extends Error { | ||
constructor() { | ||
super('Missing set collection during mint IX for Candy Machine with collection set'); | ||
this.code = 0x1790; | ||
this.name = 'MissingSetCollectionDuringMint'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, MissingSetCollectionDuringMintError); | ||
} | ||
} | ||
} | ||
exports.MissingSetCollectionDuringMintError = MissingSetCollectionDuringMintError; | ||
createErrorFromCodeLookup.set(0x1790, () => new MissingSetCollectionDuringMintError()); | ||
createErrorFromNameLookup.set('MissingSetCollectionDuringMint', () => new MissingSetCollectionDuringMintError()); | ||
class NoChangingCollectionDuringMintError extends Error { | ||
constructor() { | ||
super("Can't change collection settings after items have begun to be minted"); | ||
this.code = 0x1791; | ||
this.name = 'NoChangingCollectionDuringMint'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, NoChangingCollectionDuringMintError); | ||
} | ||
} | ||
} | ||
exports.NoChangingCollectionDuringMintError = NoChangingCollectionDuringMintError; | ||
createErrorFromCodeLookup.set(0x1791, () => new NoChangingCollectionDuringMintError()); | ||
createErrorFromNameLookup.set('NoChangingCollectionDuringMint', () => new NoChangingCollectionDuringMintError()); | ||
class CandyCollectionRequiresRetainAuthorityError extends Error { | ||
constructor() { | ||
super('Retain authority must be true for Candy Machines with a collection set'); | ||
this.code = 0x1792; | ||
this.name = 'CandyCollectionRequiresRetainAuthority'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, CandyCollectionRequiresRetainAuthorityError); | ||
} | ||
} | ||
} | ||
exports.CandyCollectionRequiresRetainAuthorityError = CandyCollectionRequiresRetainAuthorityError; | ||
createErrorFromCodeLookup.set(0x1792, () => new CandyCollectionRequiresRetainAuthorityError()); | ||
createErrorFromNameLookup.set('CandyCollectionRequiresRetainAuthority', () => new CandyCollectionRequiresRetainAuthorityError()); | ||
class GatewayProgramErrorError extends Error { | ||
constructor() { | ||
super('Error within Gateway program'); | ||
this.code = 0x1793; | ||
this.name = 'GatewayProgramError'; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(this, GatewayProgramErrorError); | ||
} | ||
} | ||
} | ||
exports.GatewayProgramErrorError = GatewayProgramErrorError; | ||
createErrorFromCodeLookup.set(0x1793, () => new GatewayProgramErrorError()); | ||
createErrorFromNameLookup.set('GatewayProgramError', () => new GatewayProgramErrorError()); | ||
function errorFromCode(code) { | ||
@@ -398,0 +476,0 @@ const createError = createErrorFromCodeLookup.get(code); |
@@ -0,1 +1,2 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
@@ -7,2 +8,5 @@ import { ConfigLine } from '../types/ConfigLine'; | ||
}; | ||
export declare const addConfigLinesStruct: beet.FixableBeetArgsStruct<AddConfigLinesInstructionArgs & { | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type AddConfigLinesInstructionAccounts = { | ||
@@ -12,2 +16,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createAddConfigLinesInstruction(accounts: AddConfigLinesInstructionAccounts, args: AddConfigLinesInstructionArgs): web3.TransactionInstruction; | ||
export declare const addConfigLinesInstructionDiscriminator: number[]; | ||
export declare function createAddConfigLinesInstruction(accounts: AddConfigLinesInstructionAccounts, args: AddConfigLinesInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,7 +26,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createAddConfigLinesInstruction = void 0; | ||
exports.createAddConfigLinesInstruction = exports.addConfigLinesInstructionDiscriminator = exports.addConfigLinesStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const ConfigLine_1 = require("../types/ConfigLine"); | ||
const addConfigLinesStruct = new beet.FixableBeetArgsStruct([ | ||
exports.addConfigLinesStruct = new beet.FixableBeetArgsStruct([ | ||
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], | ||
@@ -36,7 +36,6 @@ ['index', beet.u32], | ||
], 'AddConfigLinesInstructionArgs'); | ||
const addConfigLinesInstructionDiscriminator = [223, 50, 224, 227, 151, 8, 115, 106]; | ||
function createAddConfigLinesInstruction(accounts, args) { | ||
const { candyMachine, authority } = accounts; | ||
const [data] = addConfigLinesStruct.serialize({ | ||
instructionDiscriminator: addConfigLinesInstructionDiscriminator, | ||
exports.addConfigLinesInstructionDiscriminator = [223, 50, 224, 227, 151, 8, 115, 106]; | ||
function createAddConfigLinesInstruction(accounts, args, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.addConfigLinesStruct.serialize({ | ||
instructionDiscriminator: exports.addConfigLinesInstructionDiscriminator, | ||
...args, | ||
@@ -46,3 +45,3 @@ }); | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -52,3 +51,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -59,3 +58,3 @@ isSigner: true, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -62,0 +61,0 @@ data, |
@@ -0,1 +1,2 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
@@ -6,2 +7,5 @@ import { CandyMachineData } from '../types/CandyMachineData'; | ||
}; | ||
export declare const initializeCandyMachineStruct: beet.FixableBeetArgsStruct<InitializeCandyMachineInstructionArgs & { | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type InitializeCandyMachineInstructionAccounts = { | ||
@@ -12,3 +16,6 @@ candyMachine: web3.PublicKey; | ||
payer: web3.PublicKey; | ||
systemProgram?: web3.PublicKey; | ||
rent?: web3.PublicKey; | ||
}; | ||
export declare function createInitializeCandyMachineInstruction(accounts: InitializeCandyMachineInstructionAccounts, args: InitializeCandyMachineInstructionArgs): web3.TransactionInstruction; | ||
export declare const initializeCandyMachineInstructionDiscriminator: number[]; | ||
export declare function createInitializeCandyMachineInstruction(accounts: InitializeCandyMachineInstructionAccounts, args: InitializeCandyMachineInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createInitializeCandyMachineInstruction = void 0; | ||
exports.createInitializeCandyMachineInstruction = exports.initializeCandyMachineInstructionDiscriminator = exports.initializeCandyMachineStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const CandyMachineData_1 = require("../types/CandyMachineData"); | ||
const initializeCandyMachineStruct = new beet.FixableBeetArgsStruct([ | ||
exports.initializeCandyMachineStruct = new beet.FixableBeetArgsStruct([ | ||
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], | ||
['data', CandyMachineData_1.candyMachineDataBeet], | ||
], 'InitializeCandyMachineInstructionArgs'); | ||
const initializeCandyMachineInstructionDiscriminator = [142, 137, 167, 107, 47, 39, 240, 124]; | ||
function createInitializeCandyMachineInstruction(accounts, args) { | ||
const { candyMachine, wallet, authority, payer } = accounts; | ||
const [data] = initializeCandyMachineStruct.serialize({ | ||
instructionDiscriminator: initializeCandyMachineInstructionDiscriminator, | ||
exports.initializeCandyMachineInstructionDiscriminator = [ | ||
142, 137, 167, 107, 47, 39, 240, 124, | ||
]; | ||
function createInitializeCandyMachineInstruction(accounts, args, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
var _a, _b; | ||
const [data] = exports.initializeCandyMachineStruct.serialize({ | ||
instructionDiscriminator: exports.initializeCandyMachineInstructionDiscriminator, | ||
...args, | ||
@@ -44,3 +46,3 @@ }); | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -50,3 +52,3 @@ isSigner: false, | ||
{ | ||
pubkey: wallet, | ||
pubkey: accounts.wallet, | ||
isWritable: false, | ||
@@ -56,3 +58,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -62,3 +64,3 @@ isSigner: false, | ||
{ | ||
pubkey: payer, | ||
pubkey: accounts.payer, | ||
isWritable: false, | ||
@@ -68,3 +70,3 @@ isSigner: true, | ||
{ | ||
pubkey: web3.SystemProgram.programId, | ||
pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, | ||
isWritable: false, | ||
@@ -74,3 +76,3 @@ isSigner: false, | ||
{ | ||
pubkey: web3.SYSVAR_RENT_PUBKEY, | ||
pubkey: (_b = accounts.rent) !== null && _b !== void 0 ? _b : web3.SYSVAR_RENT_PUBKEY, | ||
isWritable: false, | ||
@@ -81,3 +83,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -84,0 +86,0 @@ data, |
@@ -0,1 +1,2 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
@@ -5,2 +6,5 @@ export declare type MintNftInstructionArgs = { | ||
}; | ||
export declare const mintNftStruct: beet.BeetArgsStruct<MintNftInstructionArgs & { | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type MintNftInstructionAccounts = { | ||
@@ -17,2 +21,5 @@ candyMachine: web3.PublicKey; | ||
tokenMetadataProgram: web3.PublicKey; | ||
tokenProgram?: web3.PublicKey; | ||
systemProgram?: web3.PublicKey; | ||
rent?: web3.PublicKey; | ||
clock: web3.PublicKey; | ||
@@ -22,2 +29,3 @@ recentBlockhashes: web3.PublicKey; | ||
}; | ||
export declare function createMintNftInstruction(accounts: MintNftInstructionAccounts, args: MintNftInstructionArgs): web3.TransactionInstruction; | ||
export declare const mintNftInstructionDiscriminator: number[]; | ||
export declare function createMintNftInstruction(accounts: MintNftInstructionAccounts, args: MintNftInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,15 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createMintNftInstruction = void 0; | ||
exports.createMintNftInstruction = exports.mintNftInstructionDiscriminator = exports.mintNftStruct = void 0; | ||
const splToken = __importStar(require("@solana/spl-token")); | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const mintNftStruct = new beet.BeetArgsStruct([ | ||
exports.mintNftStruct = new beet.BeetArgsStruct([ | ||
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], | ||
['creatorBump', beet.u8], | ||
], 'MintNftInstructionArgs'); | ||
const mintNftInstructionDiscriminator = [211, 57, 6, 167, 15, 219, 35, 251]; | ||
function createMintNftInstruction(accounts, args) { | ||
const { candyMachine, candyMachineCreator, payer, wallet, metadata, mint, mintAuthority, updateAuthority, masterEdition, tokenMetadataProgram, clock, recentBlockhashes, instructionSysvarAccount, } = accounts; | ||
const [data] = mintNftStruct.serialize({ | ||
instructionDiscriminator: mintNftInstructionDiscriminator, | ||
exports.mintNftInstructionDiscriminator = [211, 57, 6, 167, 15, 219, 35, 251]; | ||
function createMintNftInstruction(accounts, args, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
var _a, _b, _c; | ||
const [data] = exports.mintNftStruct.serialize({ | ||
instructionDiscriminator: exports.mintNftInstructionDiscriminator, | ||
...args, | ||
@@ -44,3 +44,3 @@ }); | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -50,3 +50,3 @@ isSigner: false, | ||
{ | ||
pubkey: candyMachineCreator, | ||
pubkey: accounts.candyMachineCreator, | ||
isWritable: false, | ||
@@ -56,3 +56,3 @@ isSigner: false, | ||
{ | ||
pubkey: payer, | ||
pubkey: accounts.payer, | ||
isWritable: false, | ||
@@ -62,3 +62,3 @@ isSigner: true, | ||
{ | ||
pubkey: wallet, | ||
pubkey: accounts.wallet, | ||
isWritable: true, | ||
@@ -68,3 +68,3 @@ isSigner: false, | ||
{ | ||
pubkey: metadata, | ||
pubkey: accounts.metadata, | ||
isWritable: true, | ||
@@ -74,3 +74,3 @@ isSigner: false, | ||
{ | ||
pubkey: mint, | ||
pubkey: accounts.mint, | ||
isWritable: true, | ||
@@ -80,3 +80,3 @@ isSigner: false, | ||
{ | ||
pubkey: mintAuthority, | ||
pubkey: accounts.mintAuthority, | ||
isWritable: false, | ||
@@ -86,3 +86,3 @@ isSigner: true, | ||
{ | ||
pubkey: updateAuthority, | ||
pubkey: accounts.updateAuthority, | ||
isWritable: false, | ||
@@ -92,3 +92,3 @@ isSigner: true, | ||
{ | ||
pubkey: masterEdition, | ||
pubkey: accounts.masterEdition, | ||
isWritable: true, | ||
@@ -98,3 +98,3 @@ isSigner: false, | ||
{ | ||
pubkey: tokenMetadataProgram, | ||
pubkey: accounts.tokenMetadataProgram, | ||
isWritable: false, | ||
@@ -104,3 +104,3 @@ isSigner: false, | ||
{ | ||
pubkey: splToken.TOKEN_PROGRAM_ID, | ||
pubkey: (_a = accounts.tokenProgram) !== null && _a !== void 0 ? _a : splToken.TOKEN_PROGRAM_ID, | ||
isWritable: false, | ||
@@ -110,3 +110,3 @@ isSigner: false, | ||
{ | ||
pubkey: web3.SystemProgram.programId, | ||
pubkey: (_b = accounts.systemProgram) !== null && _b !== void 0 ? _b : web3.SystemProgram.programId, | ||
isWritable: false, | ||
@@ -116,3 +116,3 @@ isSigner: false, | ||
{ | ||
pubkey: web3.SYSVAR_RENT_PUBKEY, | ||
pubkey: (_c = accounts.rent) !== null && _c !== void 0 ? _c : web3.SYSVAR_RENT_PUBKEY, | ||
isWritable: false, | ||
@@ -122,3 +122,3 @@ isSigner: false, | ||
{ | ||
pubkey: clock, | ||
pubkey: accounts.clock, | ||
isWritable: false, | ||
@@ -128,3 +128,3 @@ isSigner: false, | ||
{ | ||
pubkey: recentBlockhashes, | ||
pubkey: accounts.recentBlockhashes, | ||
isWritable: false, | ||
@@ -134,3 +134,3 @@ isSigner: false, | ||
{ | ||
pubkey: instructionSysvarAccount, | ||
pubkey: accounts.instructionSysvarAccount, | ||
isWritable: false, | ||
@@ -141,3 +141,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -144,0 +144,0 @@ data, |
@@ -0,2 +1,6 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
export declare const removeCollectionStruct: beet.BeetArgsStruct<{ | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type RemoveCollectionInstructionAccounts = { | ||
@@ -11,2 +15,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createRemoveCollectionInstruction(accounts: RemoveCollectionInstructionAccounts): web3.TransactionInstruction; | ||
export declare const removeCollectionInstructionDiscriminator: number[]; | ||
export declare function createRemoveCollectionInstruction(accounts: RemoveCollectionInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,20 +26,19 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createRemoveCollectionInstruction = void 0; | ||
exports.createRemoveCollectionInstruction = exports.removeCollectionInstructionDiscriminator = exports.removeCollectionStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const removeCollectionStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'RemoveCollectionInstructionArgs'); | ||
const removeCollectionInstructionDiscriminator = [223, 52, 106, 217, 61, 220, 36, 160]; | ||
function createRemoveCollectionInstruction(accounts) { | ||
const { candyMachine, authority, collectionPda, metadata, mint, collectionAuthorityRecord, tokenMetadataProgram, } = accounts; | ||
const [data] = removeCollectionStruct.serialize({ | ||
instructionDiscriminator: removeCollectionInstructionDiscriminator, | ||
exports.removeCollectionStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'RemoveCollectionInstructionArgs'); | ||
exports.removeCollectionInstructionDiscriminator = [223, 52, 106, 217, 61, 220, 36, 160]; | ||
function createRemoveCollectionInstruction(accounts, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.removeCollectionStruct.serialize({ | ||
instructionDiscriminator: exports.removeCollectionInstructionDiscriminator, | ||
}); | ||
const keys = [ | ||
{ | ||
pubkey: candyMachine, | ||
isWritable: false, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
isSigner: false, | ||
}, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -49,3 +48,3 @@ isSigner: true, | ||
{ | ||
pubkey: collectionPda, | ||
pubkey: accounts.collectionPda, | ||
isWritable: true, | ||
@@ -55,3 +54,3 @@ isSigner: false, | ||
{ | ||
pubkey: metadata, | ||
pubkey: accounts.metadata, | ||
isWritable: false, | ||
@@ -61,3 +60,3 @@ isSigner: false, | ||
{ | ||
pubkey: mint, | ||
pubkey: accounts.mint, | ||
isWritable: false, | ||
@@ -67,3 +66,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionAuthorityRecord, | ||
pubkey: accounts.collectionAuthorityRecord, | ||
isWritable: true, | ||
@@ -73,3 +72,3 @@ isSigner: false, | ||
{ | ||
pubkey: tokenMetadataProgram, | ||
pubkey: accounts.tokenMetadataProgram, | ||
isWritable: false, | ||
@@ -80,3 +79,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -83,0 +82,0 @@ data, |
@@ -0,2 +1,6 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
export declare const setCollectionStruct: beet.BeetArgsStruct<{ | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type SetCollectionInstructionAccounts = { | ||
@@ -7,2 +11,4 @@ candyMachine: web3.PublicKey; | ||
payer: web3.PublicKey; | ||
systemProgram?: web3.PublicKey; | ||
rent?: web3.PublicKey; | ||
metadata: web3.PublicKey; | ||
@@ -14,2 +20,3 @@ mint: web3.PublicKey; | ||
}; | ||
export declare function createSetCollectionInstruction(accounts: SetCollectionInstructionAccounts): web3.TransactionInstruction; | ||
export declare const setCollectionInstructionDiscriminator: number[]; | ||
export declare function createSetCollectionInstruction(accounts: SetCollectionInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,20 +26,20 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSetCollectionInstruction = void 0; | ||
exports.createSetCollectionInstruction = exports.setCollectionInstructionDiscriminator = exports.setCollectionStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const setCollectionStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'SetCollectionInstructionArgs'); | ||
const setCollectionInstructionDiscriminator = [192, 254, 206, 76, 168, 182, 59, 223]; | ||
function createSetCollectionInstruction(accounts) { | ||
const { candyMachine, authority, collectionPda, payer, metadata, mint, edition, collectionAuthorityRecord, tokenMetadataProgram, } = accounts; | ||
const [data] = setCollectionStruct.serialize({ | ||
instructionDiscriminator: setCollectionInstructionDiscriminator, | ||
exports.setCollectionStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'SetCollectionInstructionArgs'); | ||
exports.setCollectionInstructionDiscriminator = [192, 254, 206, 76, 168, 182, 59, 223]; | ||
function createSetCollectionInstruction(accounts, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
var _a, _b; | ||
const [data] = exports.setCollectionStruct.serialize({ | ||
instructionDiscriminator: exports.setCollectionInstructionDiscriminator, | ||
}); | ||
const keys = [ | ||
{ | ||
pubkey: candyMachine, | ||
isWritable: false, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
isSigner: false, | ||
}, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -49,3 +49,3 @@ isSigner: true, | ||
{ | ||
pubkey: collectionPda, | ||
pubkey: accounts.collectionPda, | ||
isWritable: true, | ||
@@ -55,3 +55,3 @@ isSigner: false, | ||
{ | ||
pubkey: payer, | ||
pubkey: accounts.payer, | ||
isWritable: false, | ||
@@ -61,3 +61,3 @@ isSigner: true, | ||
{ | ||
pubkey: web3.SystemProgram.programId, | ||
pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, | ||
isWritable: false, | ||
@@ -67,3 +67,3 @@ isSigner: false, | ||
{ | ||
pubkey: web3.SYSVAR_RENT_PUBKEY, | ||
pubkey: (_b = accounts.rent) !== null && _b !== void 0 ? _b : web3.SYSVAR_RENT_PUBKEY, | ||
isWritable: false, | ||
@@ -73,3 +73,3 @@ isSigner: false, | ||
{ | ||
pubkey: metadata, | ||
pubkey: accounts.metadata, | ||
isWritable: false, | ||
@@ -79,3 +79,3 @@ isSigner: false, | ||
{ | ||
pubkey: mint, | ||
pubkey: accounts.mint, | ||
isWritable: false, | ||
@@ -85,3 +85,3 @@ isSigner: false, | ||
{ | ||
pubkey: edition, | ||
pubkey: accounts.edition, | ||
isWritable: false, | ||
@@ -91,3 +91,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionAuthorityRecord, | ||
pubkey: accounts.collectionAuthorityRecord, | ||
isWritable: true, | ||
@@ -97,3 +97,3 @@ isSigner: false, | ||
{ | ||
pubkey: tokenMetadataProgram, | ||
pubkey: accounts.tokenMetadataProgram, | ||
isWritable: false, | ||
@@ -104,3 +104,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -107,0 +107,0 @@ data, |
@@ -0,2 +1,6 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
export declare const setCollectionDuringMintStruct: beet.BeetArgsStruct<{ | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type SetCollectionDuringMintInstructionAccounts = { | ||
@@ -15,2 +19,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createSetCollectionDuringMintInstruction(accounts: SetCollectionDuringMintInstructionAccounts): web3.TransactionInstruction; | ||
export declare const setCollectionDuringMintInstructionDiscriminator: number[]; | ||
export declare function createSetCollectionDuringMintInstruction(accounts: SetCollectionDuringMintInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSetCollectionDuringMintInstruction = void 0; | ||
exports.createSetCollectionDuringMintInstruction = exports.setCollectionDuringMintInstructionDiscriminator = exports.setCollectionDuringMintStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const setCollectionDuringMintStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'SetCollectionDuringMintInstructionArgs'); | ||
const setCollectionDuringMintInstructionDiscriminator = [103, 17, 200, 25, 118, 95, 125, 61]; | ||
function createSetCollectionDuringMintInstruction(accounts) { | ||
const { candyMachine, metadata, payer, collectionPda, tokenMetadataProgram, instructions, collectionMint, collectionMetadata, collectionMasterEdition, authority, collectionAuthorityRecord, } = accounts; | ||
const [data] = setCollectionDuringMintStruct.serialize({ | ||
instructionDiscriminator: setCollectionDuringMintInstructionDiscriminator, | ||
exports.setCollectionDuringMintStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'SetCollectionDuringMintInstructionArgs'); | ||
exports.setCollectionDuringMintInstructionDiscriminator = [103, 17, 200, 25, 118, 95, 125, 61]; | ||
function createSetCollectionDuringMintInstruction(accounts, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.setCollectionDuringMintStruct.serialize({ | ||
instructionDiscriminator: exports.setCollectionDuringMintInstructionDiscriminator, | ||
}); | ||
const keys = [ | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: false, | ||
@@ -44,3 +43,3 @@ isSigner: false, | ||
{ | ||
pubkey: metadata, | ||
pubkey: accounts.metadata, | ||
isWritable: false, | ||
@@ -50,3 +49,3 @@ isSigner: false, | ||
{ | ||
pubkey: payer, | ||
pubkey: accounts.payer, | ||
isWritable: false, | ||
@@ -56,3 +55,3 @@ isSigner: true, | ||
{ | ||
pubkey: collectionPda, | ||
pubkey: accounts.collectionPda, | ||
isWritable: true, | ||
@@ -62,3 +61,3 @@ isSigner: false, | ||
{ | ||
pubkey: tokenMetadataProgram, | ||
pubkey: accounts.tokenMetadataProgram, | ||
isWritable: false, | ||
@@ -68,3 +67,3 @@ isSigner: false, | ||
{ | ||
pubkey: instructions, | ||
pubkey: accounts.instructions, | ||
isWritable: false, | ||
@@ -74,3 +73,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionMint, | ||
pubkey: accounts.collectionMint, | ||
isWritable: false, | ||
@@ -80,3 +79,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionMetadata, | ||
pubkey: accounts.collectionMetadata, | ||
isWritable: false, | ||
@@ -86,3 +85,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionMasterEdition, | ||
pubkey: accounts.collectionMasterEdition, | ||
isWritable: false, | ||
@@ -92,3 +91,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -98,3 +97,3 @@ isSigner: false, | ||
{ | ||
pubkey: collectionAuthorityRecord, | ||
pubkey: accounts.collectionAuthorityRecord, | ||
isWritable: false, | ||
@@ -105,3 +104,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -108,0 +107,0 @@ data, |
@@ -6,2 +6,5 @@ import * as web3 from '@solana/web3.js'; | ||
}; | ||
export declare const updateAuthorityStruct: beet.FixableBeetArgsStruct<UpdateAuthorityInstructionArgs & { | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type UpdateAuthorityInstructionAccounts = { | ||
@@ -12,2 +15,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createUpdateAuthorityInstruction(accounts: UpdateAuthorityInstructionAccounts, args: UpdateAuthorityInstructionArgs): web3.TransactionInstruction; | ||
export declare const updateAuthorityInstructionDiscriminator: number[]; | ||
export declare function createUpdateAuthorityInstruction(accounts: UpdateAuthorityInstructionAccounts, args: UpdateAuthorityInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createUpdateAuthorityInstruction = void 0; | ||
exports.createUpdateAuthorityInstruction = exports.updateAuthorityInstructionDiscriminator = exports.updateAuthorityStruct = void 0; | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); | ||
const updateAuthorityStruct = new beet.FixableBeetArgsStruct([ | ||
exports.updateAuthorityStruct = new beet.FixableBeetArgsStruct([ | ||
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], | ||
['newAuthority', beet.coption(beetSolana.publicKey)], | ||
], 'UpdateAuthorityInstructionArgs'); | ||
const updateAuthorityInstructionDiscriminator = [32, 46, 64, 28, 149, 75, 243, 88]; | ||
function createUpdateAuthorityInstruction(accounts, args) { | ||
const { candyMachine, authority, wallet } = accounts; | ||
const [data] = updateAuthorityStruct.serialize({ | ||
instructionDiscriminator: updateAuthorityInstructionDiscriminator, | ||
exports.updateAuthorityInstructionDiscriminator = [32, 46, 64, 28, 149, 75, 243, 88]; | ||
function createUpdateAuthorityInstruction(accounts, args, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.updateAuthorityStruct.serialize({ | ||
instructionDiscriminator: exports.updateAuthorityInstructionDiscriminator, | ||
...args, | ||
@@ -44,3 +43,3 @@ }); | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -50,3 +49,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -56,3 +55,3 @@ isSigner: true, | ||
{ | ||
pubkey: wallet, | ||
pubkey: accounts.wallet, | ||
isWritable: false, | ||
@@ -63,3 +62,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -66,0 +65,0 @@ data, |
@@ -0,1 +1,2 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
@@ -6,2 +7,5 @@ import { CandyMachineData } from '../types/CandyMachineData'; | ||
}; | ||
export declare const updateCandyMachineStruct: beet.FixableBeetArgsStruct<UpdateCandyMachineInstructionArgs & { | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type UpdateCandyMachineInstructionAccounts = { | ||
@@ -12,2 +16,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createUpdateCandyMachineInstruction(accounts: UpdateCandyMachineInstructionAccounts, args: UpdateCandyMachineInstructionArgs): web3.TransactionInstruction; | ||
export declare const updateCandyMachineInstructionDiscriminator: number[]; | ||
export declare function createUpdateCandyMachineInstruction(accounts: UpdateCandyMachineInstructionAccounts, args: UpdateCandyMachineInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createUpdateCandyMachineInstruction = void 0; | ||
exports.createUpdateCandyMachineInstruction = exports.updateCandyMachineInstructionDiscriminator = exports.updateCandyMachineStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const CandyMachineData_1 = require("../types/CandyMachineData"); | ||
const updateCandyMachineStruct = new beet.FixableBeetArgsStruct([ | ||
exports.updateCandyMachineStruct = new beet.FixableBeetArgsStruct([ | ||
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], | ||
['data', CandyMachineData_1.candyMachineDataBeet], | ||
], 'UpdateCandyMachineInstructionArgs'); | ||
const updateCandyMachineInstructionDiscriminator = [243, 251, 124, 156, 211, 211, 118, 239]; | ||
function createUpdateCandyMachineInstruction(accounts, args) { | ||
const { candyMachine, authority, wallet } = accounts; | ||
const [data] = updateCandyMachineStruct.serialize({ | ||
instructionDiscriminator: updateCandyMachineInstructionDiscriminator, | ||
exports.updateCandyMachineInstructionDiscriminator = [243, 251, 124, 156, 211, 211, 118, 239]; | ||
function createUpdateCandyMachineInstruction(accounts, args, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.updateCandyMachineStruct.serialize({ | ||
instructionDiscriminator: exports.updateCandyMachineInstructionDiscriminator, | ||
...args, | ||
@@ -44,3 +43,3 @@ }); | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -50,3 +49,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -56,3 +55,3 @@ isSigner: true, | ||
{ | ||
pubkey: wallet, | ||
pubkey: accounts.wallet, | ||
isWritable: false, | ||
@@ -63,3 +62,3 @@ isSigner: false, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -66,0 +65,0 @@ data, |
@@ -0,2 +1,6 @@ | ||
import * as beet from '@metaplex-foundation/beet'; | ||
import * as web3 from '@solana/web3.js'; | ||
export declare const withdrawFundsStruct: beet.BeetArgsStruct<{ | ||
instructionDiscriminator: number[]; | ||
}>; | ||
export declare type WithdrawFundsInstructionAccounts = { | ||
@@ -6,2 +10,3 @@ candyMachine: web3.PublicKey; | ||
}; | ||
export declare function createWithdrawFundsInstruction(accounts: WithdrawFundsInstructionAccounts): web3.TransactionInstruction; | ||
export declare const withdrawFundsInstructionDiscriminator: number[]; | ||
export declare function createWithdrawFundsInstruction(accounts: WithdrawFundsInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; |
@@ -26,15 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createWithdrawFundsInstruction = void 0; | ||
exports.createWithdrawFundsInstruction = exports.withdrawFundsInstructionDiscriminator = exports.withdrawFundsStruct = void 0; | ||
const beet = __importStar(require("@metaplex-foundation/beet")); | ||
const web3 = __importStar(require("@solana/web3.js")); | ||
const withdrawFundsStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'WithdrawFundsInstructionArgs'); | ||
const withdrawFundsInstructionDiscriminator = [241, 36, 29, 111, 208, 31, 104, 217]; | ||
function createWithdrawFundsInstruction(accounts) { | ||
const { candyMachine, authority } = accounts; | ||
const [data] = withdrawFundsStruct.serialize({ | ||
instructionDiscriminator: withdrawFundsInstructionDiscriminator, | ||
exports.withdrawFundsStruct = new beet.BeetArgsStruct([['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'WithdrawFundsInstructionArgs'); | ||
exports.withdrawFundsInstructionDiscriminator = [241, 36, 29, 111, 208, 31, 104, 217]; | ||
function createWithdrawFundsInstruction(accounts, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ')) { | ||
const [data] = exports.withdrawFundsStruct.serialize({ | ||
instructionDiscriminator: exports.withdrawFundsInstructionDiscriminator, | ||
}); | ||
const keys = [ | ||
{ | ||
pubkey: candyMachine, | ||
pubkey: accounts.candyMachine, | ||
isWritable: true, | ||
@@ -44,3 +43,3 @@ isSigner: false, | ||
{ | ||
pubkey: authority, | ||
pubkey: accounts.authority, | ||
isWritable: false, | ||
@@ -51,3 +50,3 @@ isSigner: true, | ||
const ix = new web3.TransactionInstruction({ | ||
programId: new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), | ||
programId, | ||
keys, | ||
@@ -54,0 +53,0 @@ data, |
@@ -6,3 +6,2 @@ export * from './CandyMachineData'; | ||
export * from './EndSettings'; | ||
export * from './ErrorCode'; | ||
export * from './GatekeeperConfig'; | ||
@@ -9,0 +8,0 @@ export * from './HiddenSettings'; |
@@ -22,3 +22,2 @@ "use strict"; | ||
__exportStar(require("./EndSettings"), exports); | ||
__exportStar(require("./ErrorCode"), exports); | ||
__exportStar(require("./GatekeeperConfig"), exports); | ||
@@ -25,0 +24,0 @@ __exportStar(require("./HiddenSettings"), exports); |
{ | ||
"name": "@metaplex-foundation/mpl-candy-machine", | ||
"version": "4.2.0", | ||
"programVersion": "3.1.3", | ||
"version": "4.3.0", | ||
"programVersion": "4.0.2", | ||
"description": "MPL Candy Machine JavaScript API. This MPL package is for the current generation of candy machine which is 2.0.0", | ||
@@ -17,3 +17,3 @@ "main": "dist/src/mpl-candy-machine.js", | ||
"test": "echo mpl-candy-machine tests coming up ...", | ||
"api:gen": "node scripts/api-gen-ts.js && prettier --write ./src/**/*.ts", | ||
"api:gen": "DEBUG='(solita|rustbin):(info|error)' solita", | ||
"lint": "eslint \"{src,test}/**/*.ts\" --format stylish", | ||
@@ -43,4 +43,4 @@ "fix:lint": "yarn lint --fix", | ||
"dependencies": { | ||
"@metaplex-foundation/beet": "^0.1.0", | ||
"@metaplex-foundation/beet-solana": "^0.1.1", | ||
"@metaplex-foundation/beet": "^0.4.0", | ||
"@metaplex-foundation/beet-solana": "^0.3.0", | ||
"@metaplex-foundation/cusper": "^0.0.2", | ||
@@ -51,2 +51,3 @@ "@metaplex-foundation/mpl-core": "^0.6.1", | ||
"devDependencies": { | ||
"@metaplex-foundation/solita": "^0.12.0", | ||
"eslint": "^8.3.0", | ||
@@ -53,0 +54,0 @@ "prettier": "^2.5.1", |
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
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
156524
2429
5
87
1
+ Added@metaplex-foundation/beet@0.4.0(transitive)
+ Added@metaplex-foundation/beet-solana@0.3.1(transitive)
+ Addedbase-x@4.0.0(transitive)
+ Addedbs58@5.0.0(transitive)
- Removed@metaplex-foundation/beet@0.1.4(transitive)
- Removed@metaplex-foundation/beet-solana@0.1.1(transitive)