import Collections from './Collections'; import { ethers } from 'ethers'; import { CollectionInterface } from './interfaces/Collection'; /** * Documentation for SDK * */ declare class kanjiSDK extends Collections { static instance: kanjiSDK; private constructor(); /** * Get instance of static object kanjiSDK * @returns {kanjiSDK} instance of kanjiSDK */ static getInstance(): kanjiSDK; /** * connect to blockchain with WEB3ONBOARD * @returns {kanjiSDK} instance of kanjiSDK */ static connectWeb3(): Promise; /** * Disconnect web3 * @returns {kanjiSDK} instance of kanjiSDK */ static disconnectWeb3(): Promise; /** * Create an instance of contract with them you want interact * @param {string} walletAddress * @returns {ethers.Contract} contract instance */ marketplaceInstance(walletAddress: string): Promise; /** * End list only if is an auction and time passed * @param {number} listId Id of listing where is token you want to buy * @param {number} tokenId the id of token, must be correspond to element of key array * @param {number} tokenNumber The key of array container of token id * @param {number} transact only transfer tokens or money * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ endAuction(listId: number, tokenId: number, tokenNumber: number, transact: number, adressMarket: string): Promise; /** * Call marketplace.sol for get one current list * @param {number} listId Id of listing where is token you want to buy * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ getList(listId: number, adressMarket: string): Promise; /** * gets all tokens contained in List * @param {number} listId Id of listing where is token you want to buy * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ getTokensInList(listId: number, adressMarket: string): Promise; /** * Call Kanji server for get all lists * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ getLists(adressMarket: string): Promise; /** * bid for a list only if is an auction, bid must be bigger than previous bidding and minimal bid, the previous bidder is immediately refund * @param {number} listId Id of listing where is token you want to buy * @param {number} tokenId the id of token, must be correspond to element of key array * @param {number} tokenNumber The key of array container of token id * @param {string} value the value of eth you want to send for bid * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ bidding(listId: number, tokenId: number, tokenNumber: number, value: string, adressMarket: string): Promise; /** * Buy a token only if list is not an auction, value send is bigger than minimum price * @param {number} listId Id of listing where is token you want to buy * @param {number} tokenNumber The key of array container of token id * @param {number} tokenId the id of token, must be correspond to element of key array * @param {string} value the value you want to buy the token, must be up que minimum price of token * @param {string} adressMarket address of marketplace contract * @returns * @category MARKETPLACE */ buy(listId: number, tokenId: number, tokenNumber: number, value: string, adressMarket: string): Promise; /** * Claim a quantity of token lazy minted and listed in claimCondition * @param {CollectionInterface} collection Interface Collection with which you can interact * @param {number} quantity Quantity of token you want to claim * @param {number} tokenId Token Id ERC1155 linked to claimCondition * @returns {CollectionInterface} Return result of collection after update * @category KANJIDROPERC721A */ claim(collection: CollectionInterface, quantity: number, tokenId?: number): Promise<{ errorFunction: any; decoded: undefined; lastError: undefined; } | { hash: any; nextTokenIdToClaim: any; }>; /** * getNextTokenIdToMint * @param {CollectionInterface} collection * @returns {string} * @category KanjiSDK */ getNextTokenIdToMint(collection: CollectionInterface): Promise; /** * Return uri of a specific token into blockchain for ERC1155/ERC721A/DROPERC721A/DROPERC721R/DROPERC1155/PHOENIX * @param {CollectionInterface} collection Interface Collection with which you can interact * @param {number} tokenId Token id you can to return * @returns {string} Return Current URI (hide or real) of one token, contain the metadata of this token * @category KanjiSDK */ tokenURI(collection: CollectionInterface, tokenId: number): Promise; /** * * @param {CollectionInterface} collection collection you want to interact * @returns {ClaimCondition} return active or next claim condition * @category KANJIDROPERC721A */ getActiveClaimCondition(collection: CollectionInterface): Promise; processClaimCondition(claimCondition: any): Promise<{ maxClaimableSupply: string; merkleRoot: any; pricePerToken: string; quantityLimitPerTransaction: string; startTimestamp: string; supplyClaimed: string; waitTimeInSecondsBetweenClaims: string; }>; } export default kanjiSDK;