import { CandyShop as CandyShopResponse, ListBase, Nft, Order, OrdersEditionFilterQuery, OrdersFilterQuery, ShopStats, SingleBase, Trade, TradeQuery, WhitelistNft } from '@liqnft/candy-shop-types'; import { Idl, Program, web3 } from '@project-serum/anchor'; import { AnchorWallet } from '@solana/wallet-adapter-react'; import { CandyShopCommitNftParams, CandyShopMintPrintParams, CandyShopUpdateEditionVaultParams } from './CandyShopModel'; import { CandyShopBidAuctionParams, CandyShopBuyNowParams, CandyShopBuyParams, CandyShopCancelAuctionParams, CandyShopCancelParams, CandyShopCreateAuctionParams, CandyShopRedeemParams, CandyShopSellParams, CandyShopSettleAndDistributeParams, CandyShopUpdateParams, CandyShopWithdrawAuctionBidParams } from './CandyShopModel'; import { BaseShop, BaseShopConstructorParams, CandyShopAuctioneer, CandyShopEditionDropper } from '../base/BaseShop'; import { CandyShopVersion, ShopSettings } from '../base/BaseShopModel'; export interface SolShopConstructorParams extends BaseShopConstructorParams { isEnterprise?: boolean; accessToken?: string; } export interface SolShopInitParams extends Omit { settings: Partial; } /** * Parameters to CandyShop constructor * * @property {PublicKey} candyShopCreatorAddressCreator shop creator's wallet address * @property {PublicKey} treasuryMintTreasury currency to buy and sell with * @property {PublicKey} candyShopProgramId Candy Shop program id * @property {Blockchain} env the network setup for the shop to get the data for * @property {Partial} settings Optional, additional shop settings * @property {boolean} isEnterprise Indicates if this shop uses enterprise program functionality. Defaults to false */ export declare class CandyShop extends BaseShop implements CandyShopAuctioneer, CandyShopEditionDropper { private _candyShopAddress; private _isEnterprise; private _version; private _program; private _accessToken; static initSolCandyShop(params: SolShopInitParams): Promise; get candyShopAddress(): string; get connectedPublicKey(): web3.PublicKey | undefined; get isEnterprise(): boolean; get version(): CandyShopVersion; /** * Get JSON rpc connection */ get connection(): web3.Connection; /** * Instantiate a CandyShop object * * @constructor * @param {CandyShopConstructorParams} params */ private constructor(); verifyProgramId(programId: web3.PublicKey): void; /** * Gets anchor Program object for Candy Shop program * * @param {AnchorWallet | web3.Keypair} wallet Wallet or keypair of connected user */ getStaticProgram(wallet: AnchorWallet | web3.Keypair): Program; /** * Executes Candy Shop __UpdateCandyShop__ action * * @param {CandyShopUpdateParams} params required parameters for update action */ updateCandyShop(params: CandyShopUpdateParams): Promise; /** * Executes Candy Shop __Buy__ and __ExecuteSale__ actions * * @param {CandyShopBuyParams} params required parameters for buy action */ buy(params: CandyShopBuyParams): Promise; /** * Executes Candy Shop __Sell__ action * * @param {CandyShopSellParams} params required parameters for sell action */ sell(params: CandyShopSellParams): Promise; /** * Executes Candy Shop __Cancel__ action * * @param {CandyShopCancelParams} params required parameters for cancel action */ cancel(params: CandyShopCancelParams): Promise; /** * Executes Candy Shop __CreateAuction__ action * * @param {CandyShopCreateAuctionParams} params required parameters for create auction action */ createAuction(params: CandyShopCreateAuctionParams): Promise; /** * Executes Candy Shop __CancelAuction__ action * * @param {CandyShopCancelAuctionParams} params required parameters for cancel auction action */ cancelAuction(params: CandyShopCancelAuctionParams): Promise; /** * Executes Candy Shop __MakeBid__ action * * @param {BidAuctionParams} params required parameters for make bid action */ bidAuction(params: CandyShopBidAuctionParams): Promise; /** * Executes Candy Shop __WithdrawBid__ action * * @param {CandyShopWithdrawAuctionBidParams} params required parameters for withdraw bid action */ withdrawAuctionBid(params: CandyShopWithdrawAuctionBidParams): Promise; /** * Executes Candy Shop __BuyNow__ action * * @param {CandyShopBuyNowParams} params required parameters for buy now action */ buyNowAuction(params: CandyShopBuyNowParams): Promise; /** * Executes Candy Shop __SettleAuction__ and __DistributeProceeds__ actions * * @param {CandyShopSettleAndDistributeParams} params required parameters for settle auction and distribute proceed actions */ settleAndDistributeAuctionProceeds(params: CandyShopSettleAndDistributeParams): Promise; /** * Executes Edition Drop __ShopCommitNft__ or __EnterpriseCommitNft__ action * ref: https://docs.metaplex.com/terminology#master-edition * * @param {CandyShopCommitNftParams} params required parameters for commit nft action */ commitMasterNft(params: CandyShopCommitNftParams): Promise; /** * Executes Edition Drop __ShopMintPrint__ or __EnterpriseMintPrint__ action * * @param {CandyShopMintPrintParams} params required parameters for mint print action */ mintNewPrint(params: CandyShopMintPrintParams): Promise; /** * Executes Edition Drop __RedeemNft__ action * * @param {CandyShopRedeemParams} params required parameters for mint print action */ redeemDrop(params: CandyShopRedeemParams): Promise; /** * Executes Edition Drop __UpdateVault__ action * * @param {CandyShopUpdateEditionVaultParams} params required parameters for update vault action */ updateEditionVault(params: CandyShopUpdateEditionVaultParams): Promise; /** * Fetch stats associated with this Candy Shop */ stats(): Promise; /** * Fetch transactions made through this Candy Shop * * * @param {number[]} identifiers optional list of identifiers to apply to query string */ transactions(queryDto: TradeQuery): Promise>; /** * Fetch information on the specified nft * * @param {string} mint base 58 encoded mint key string */ nftInfo(mint: string): Promise; /** * Fetch orders matching specified filters * * @param {OrdersFilterQuery} ordersFilterQuery filters to apply to search */ orders(ordersFilterQuery: OrdersFilterQuery): Promise>; /** * Fetch child edition order associated with master edition * * @param {OrdersEditionFilterQuery} ordersEditionFilterQuery filters to apply to search * @param {string} masterMint base 58 encoded mint key string */ childEditionOrders(masterMint: string, ordersEditionFilterQuery: OrdersEditionFilterQuery): Promise>; /** * Fetch active orders created by specified wallet address * * @param {string} walletAddress base 58 encoded public key string */ activeOrdersByWalletAddress(walletAddress: string): Promise; /** * Fetch list of whitelisted NFTs for this Candy Shop */ shopWlNfts(): Promise>; /** * Fetch active orders associated with specified mint address * * @param {string} mintAddress base 58 encoded mint key string */ activeOrderByMintAddress(mintAddress: string): Promise>; /** * Fetch the data for Candy Shop with this Shop's public key */ fetchShopByShopId(): Promise>; }