@leda-mint-io/candymachine-client-sdk
Version:
Metaplex Candy Machine Client SDK
32 lines (31 loc) • 1.55 kB
TypeScript
import { web3 } from "@j0nnyboi/anchor";
import { Transaction } from "@safecoin/web3.js";
import { SetupState, CandyMachineAccount } from "../interfaces";
/**
* Get the collection PDA from a Candy Machine Account.
* @param candyMachineAddress The address of the candy machine.
* @returns The collection PDA from a candy Machine
*/
export declare const getCollectionPDA: (candyMachineAddress: web3.PublicKey) => Promise<[web3.PublicKey, number]>;
/**
* Create the associated token account for a mint.
* @param candyMachine The candy machine to get the mint of.
* @param payer The payer to pay for the transaction.
* @returns The associated token account for a mint.
*/
export declare const createAccountsForMint: (candyMachine: CandyMachineAccount | undefined, payer: web3.PublicKey) => Promise<SetupState | undefined>;
declare type MintResult = {
mintTxId: string;
metadataKey: web3.PublicKey;
};
/**
* Attempt to mint one nft.
* @param candyMachine The candy machine to mint to.
* @param payer The payer to pay for the transaction.
* @param beforeTransactions The transactions to run before minting.
* @param afterTransactions The transactions to run after minting.
* @param setupState The setup state to use.
* @returns The mint result.
*/
export declare const mintOneNft: (candyMachine: CandyMachineAccount | undefined, payer: web3.PublicKey, beforeTransactions?: Transaction[], afterTransactions?: Transaction[], setupState?: SetupState) => Promise<MintResult | null>;
export {};