@leda-mint-io/candymachine-client-sdk
Version:
Metaplex Candy Machine Client SDK
71 lines (70 loc) • 2.41 kB
TypeScript
import * as anchor from '@j0nnyboi/anchor';
import { PublicKey } from '@safecoin/web3.js';
import { StorageType } from '../enums';
import { ICandyMachineConfig } from '../interfaces';
/**
* Load the candy program v2..
* @param provider The anchor provider.
* @param customRpcUrl (Optional) The custom rpc url of the candy machine.
* @returns The IDL.
*
*/
export declare function loadCandyProgramV2(provider: anchor.Provider, customRpcUrl?: string): Promise<anchor.Program<anchor.Idl>>;
/**
* Get the candy machine settings.
* @param walletKeyPair The wallet key pair.
* @param configForm The config form.
* @param anchorProgram The anchor program.
* @returns The settings of the candy machine.
*/
export declare function getCandyMachineV2Config(walletKeyPair: PublicKey, configForm: ICandyMachineConfig, anchorProgram: anchor.Program<anchor.Idl>): Promise<{
storage: StorageType;
nftStorageKey: string | null;
ipfsInfuraProjectId: string | null;
number: number;
ipfsInfuraSecret: string | null;
pinataJwt: string | null;
pinataGateway: string | null;
awsS3Bucket: string | null;
retainAuthority: boolean;
mutable: boolean;
batchSize: number | null;
price: anchor.BN;
treasuryWallet: PublicKey;
splToken: PublicKey | null;
gatekeeper: null | {
expireOnUse: boolean;
gatekeeperNetwork: PublicKey;
};
endSettings: null | [number, anchor.BN];
whitelistMintSettings: null | {
mode: any;
mint: PublicKey;
presale: boolean;
discountPrice: null | anchor.BN;
};
hiddenSettings: null | {
name: string;
uri: string;
hash: Uint8Array;
};
goLiveDate: anchor.BN | null;
uuid: string | null;
arweaveJwk: string | null;
}>;
/**
* @typedef {Object} VerifiedAssets
* @property {File[]} supportedFiles how the person is called
* @property {number} elemCount how many years the person lived
*/
/**
*
* @param files : list of files to analuze (json+image)
* @param storage : Storage to use
* @param number :number of assets
* @returns {VerifiedAssets} returns an array of verified assets and the number of assets
*/
export declare function verifyAssets(files: File[], storage: StorageType, number: number): {
supportedFiles: File[];
elemCount: number;
};