@metaplex-foundation/mpl-candy-machine-core
Version:
MPL Candy Machine Core JavaScript API. This MPL package is for the current generation of the Candy Machine Core (a.k.a. Candy Machine V3).
54 lines (53 loc) • 2.3 kB
TypeScript
/// <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 { AccountVersion } from '../types/AccountVersion';
import { CandyMachineData } from '../types/CandyMachineData';
export declare type CandyMachineArgs = {
version: AccountVersion;
tokenStandard: number;
features: number[];
authority: web3.PublicKey;
mintAuthority: web3.PublicKey;
collectionMint: web3.PublicKey;
itemsRedeemed: beet.bignum;
data: CandyMachineData;
};
export declare const candyMachineDiscriminator: number[];
export declare class CandyMachine implements CandyMachineArgs {
readonly version: AccountVersion;
readonly tokenStandard: number;
readonly features: number[];
readonly authority: web3.PublicKey;
readonly mintAuthority: web3.PublicKey;
readonly collectionMint: web3.PublicKey;
readonly itemsRedeemed: beet.bignum;
readonly data: CandyMachineData;
private constructor();
static fromArgs(args: CandyMachineArgs): CandyMachine;
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [CandyMachine, number];
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<CandyMachine>;
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<CandyMachineArgs & {
accountDiscriminator: number[];
}>;
static deserialize(buf: Buffer, offset?: number): [CandyMachine, number];
serialize(): [Buffer, number];
static byteSize(args: CandyMachineArgs): number;
static getMinimumBalanceForRentExemption(args: CandyMachineArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
pretty(): {
version: string;
tokenStandard: number;
features: number[];
authority: string;
mintAuthority: string;
collectionMint: string;
itemsRedeemed: number | {
toNumber: () => number;
};
data: CandyMachineData;
};
}
export declare const candyMachineBeet: beet.FixableBeetStruct<CandyMachine, CandyMachineArgs & {
accountDiscriminator: number[];
}>;