import { BlockTag, ethers } from "ethers"; import { BaseContractAPI } from "./contracts/base-contract-api"; export interface WorldInfo { weight: ethers.BigNumberish; owner: string; deposit: ethers.BigNumberish; rentalPerDay: ethers.BigNumberish; minRentDays: ethers.BigNumberish; rentableUntil: ethers.BigNumberish; } export interface WorldStakeEvent { tokenId: ethers.BigNumberish; owner: string; blockNumber: ethers.BigNumberish; blockHash: string; transactionHash: string; removed: boolean; } /** * World Escrow wrapper API for interacting with the World Escrow contract via ethers.js * @param contract WorldEscrow contract instance */ export declare class WorldEscrowAPI extends BaseContractAPI { /** * Get the World Info for the given token ID * @param tokenId NFT token ID * @returns WorldInfo representing the given token ID */ getWorldInfo(tokenId: number): Promise; /** * Get the $TOPIA rewards for the given address * @param user address of the user * @returns $TOPIA rewards that are claimable for given address */ checkUserRewards(user: string): Promise; /** * Get all the staked tokens for the given user * @param user address of the user * @returns Array of staked tokens for the given user */ getUserStakedTokens(user: string): Promise; /** * Get all staked tokens events with the given block range reconciling them against unstaked events. * * NOTE: Uses the events to determine the staked tokens which uses the least API calls. * In order to ensure that all staked tokens are current then you need to start from the first block of the contract to latest. * * @param fromBlock starting block number. Default is genesis block * @param toBlock ending block number. Default is latest block * @returns Array of WorldStakeEvent representing all staked tokens */ getAllStakedTokensByEvents(fromBlock?: BlockTag, toBlock?: BlockTag): Promise; /** * Get the stake events within the given block range * @param fromBlock starting block number. Default is genesis block * @param toBlock ending block number. Default is latest block * @returns World Stake Events within the given block range */ getStakedEvents(fromBlock?: BlockTag, toBlock?: BlockTag): Promise; /** * Get the unstake events within the given block range * @param fromBlock starting block number. Default is genesis block * @param toBlock ending block number. Default is latest block * @returns World Stake Events within the given block range */ getUnstakedEvents(fromBlock?: BlockTag, toBlock?: BlockTag): Promise; private getWorldStakeEvent; } //# sourceMappingURL=world-escrow.d.ts.map