UNPKG

@xoxno/sdk-js

Version:

The SDK to interact with the XOXNO Protocol!

78 lines (77 loc) 2.76 kB
/** * LaunchpadModule provides methods to interact with the minter smart contract. * @class */ export declare class LaunchpadModule { private minter; private runner; /** * @constructor * @param {SmartContract} minterAbiXOXNO - The minter smart contract instance. */ private constructor(); /** * Initializes the LaunchpadModule with a minter smart contract instance. * @static * @param {string} minterSC - The minter smart contract address. * @returns {Promise<LaunchpadModule>} A new instance of LaunchpadModule. */ static init(minterSC: string): Promise<LaunchpadModule>; /** * Executes the provided interaction and returns the result. * @private * @param {Interaction} interaction - The smart contract interaction. * @returns {Promise<any>} The result of the interaction. */ private getResult; /** * Fetches all unique tags from the minter smart contract. * @public * @returns {Promise<string[]>} An array of unique tags. */ getAllUniqueTags: () => Promise<string[]>; /** * Fetches the global buy count for a user and tag. * @public * @param {string} user - The user's address. * @param {string} tag - The tag. * @returns {Promise<number>} The global buy count. */ getWalletGlobalBuyCount: (user: string, tag: string) => Promise<number>; /** * Fetches the stage buy count for a user, tag, and stage. * @public * @param {string} user - The user's address. * @param {string} tag - The tag. * @param {string} stage - The stage. * @returns {Promise<number>} The stage buy count. */ getWalletStageBuyCount: (user: string, tag: string, stage: string) => Promise<number>; /** * Fetches the local owner's address from the minter smart contract. * @public * @returns {Promise<string>} The local owner's address. */ getLocalOwner: () => Promise<string>; /** * Fetches the launchpad cut fee percentage from the minter smart contract. * @public * @returns {Promise<number>} The launchpad cut fee percentage. */ getLaunchpadCutFee: () => Promise<number>; /** * Fetches the stage whitelist of wallets for a tag and stage. * @public * @param {string} tag - The tag. * @param {string} stage - The stage. * @returns {Promise<string[]>} An array of whitelisted wallet addresses. */ getStageWhitelist: (tag: string, stage: string) => Promise<string[]>; /** * Fetches the list of stages for a tag. * @public * @param {string} tag - The tag. * @returns {Promise<string[]>} An array of stages. */ getStages: (tag: string) => Promise<string[]>; }