UNPKG

@leda-mint-io/candymachine-client-sdk

Version:

Metaplex Candy Machine Client SDK

37 lines (36 loc) 1.7 kB
import * as anchor from '@j0nnyboi/anchor'; import { PublicKey } from '@safecoin/web3.js'; import { ICandyMachineData } from '../interfaces'; /** * Parse a date. * @param date The date to parse. * @returns The parsed date. */ export declare function parseDate(date: string): number; export declare function sleep(milliseconds: number): Promise<void>; export declare function uuidFromConfigPubkey(configAccount: PublicKey): string; /** * Create a candy machine v2. * @param anchorProgram The anchor program to use. * @param payerWallet The payer wallet to use. * @param treasuryWallet The treasury wallet to use. * @param candyData The candy machine data to use. * @returns The config account. */ export declare const createCandyMachineV2: (anchorProgram: anchor.Program, payerWallet: any, treasuryWallet: PublicKey, candyData: ICandyMachineData) => Promise<{ candyMachine: anchor.web3.PublicKey; uuid: string; txId: string; }>; /** * Create a candy machine v2 account. * @param anchorProgram The anchor program to use. * @param candyData The candy machine data to use. * @param payerWallet The payer wallet to use. * @param candyAccount The candy machine account to use. * @returns The instruction to create the candy machine account. */ export declare function createCandyMachineV2Account(anchorProgram: anchor.Program, candyData: ICandyMachineData, payerWallet: PublicKey, candyAccount: PublicKey): Promise<anchor.web3.TransactionInstruction>; export declare const getUnixTs: () => number; export declare const getFileName: (fileName: string) => string; export declare const getFileExtension: (fileName: string) => string;