using System; using System.Collections.Generic; using Newtonsoft.Json; using Cysharp.Threading.Tasks; using MoralisUnity.Web3Api.Models; namespace MoralisUnity.Web3Api.Interfaces { /// /// Represents a collection of functions to interact with the API endpoints /// public interface IAccountApi { /// /// Gets native transactions in descending order based on block number /// /// address /// The chain to query /// The subdomain of the moralis server to use (Only use when selecting local devchain as chain) /// The minimum block number from where to get the transactions /// * Provide the param 'from_block' or 'from_date' /// * If 'from_date' and 'from_block' are provided, 'from_block' will be used. /// /// The maximum block number from where to get the transactions. /// * Provide the param 'to_block' or 'to_date' /// * If 'to_date' and 'to_block' are provided, 'to_block' will be used. /// /// The date from where to get the transactions (any format that is accepted by momentjs) /// * Provide the param 'from_block' or 'from_date' /// * If 'from_date' and 'from_block' are provided, 'from_block' will be used. /// /// Get the transactions to this date (any format that is accepted by momentjs) /// * Provide the param 'to_block' or 'to_date' /// * If 'to_date' and 'to_block' are provided, 'to_block' will be used. /// /// offset /// limit /// Returns a collection of native transactions. UniTaskGetTransactions (string address, ChainList chain, string cursor="", string subdomain=null, int? fromBlock=null, int? toBlock=null, string fromDate=null, string toDate=null, int? limit=null); /// /// Gets native balance for a specific address /// /// The address for which the native balance will be checked /// The chain to query /// web3 provider url to user when using local dev chain /// The block number on which the balances should be checked /// Returns native balance for a specific address UniTask GetNativeBalance (string address, ChainList chain, string providerUrl=null, decimal? toBlock=null); /// /// Gets token balances for a specific address /// /// The address for which token balances will be checked /// The chain to query /// The subdomain of the moralis server to use (Only use when selecting local devchain as chain) /// The block number on which the balances should be checked /// Returns token balances for a specific address UniTask> GetTokenBalances (string address, ChainList chain, string subdomain=null, decimal? toBlock=null); /// /// Gets ERC20 token transactions in descending order based on block number /// /// address /// The chain to query /// The subdomain of the moralis server to use (Only use when selecting local devchain as chain) /// The minimum block number from where to get the transactions /// * Provide the param 'from_block' or 'from_date' /// * If 'from_date' and 'from_block' are provided, 'from_block' will be used. /// /// The maximum block number from where to get the transactions. /// * Provide the param 'to_block' or 'to_date' /// * If 'to_date' and 'to_block' are provided, 'to_block' will be used. /// /// The date from where to get the transactions (any format that is accepted by momentjs) /// * Provide the param 'from_block' or 'from_date' /// * If 'from_date' and 'from_block' are provided, 'from_block' will be used. /// /// Get the transactions to this date (any format that is accepted by momentjs) /// * Provide the param 'to_block' or 'to_date' /// * If 'to_date' and 'to_block' are provided, 'to_block' will be used. /// /// offset /// limit /// Returns a collection of token transactions. UniTask GetTokenTransfers (string address, ChainList chain, string cursor="", string subdomain=null, int? fromBlock=null, int? toBlock=null, string fromDate=null, string toDate=null, int? limit=null); /// /// Gets NFTs owned by the given address /// * The response will include status [SYNCED/SYNCING] based on the contracts being indexed. /// * Use the token_address param to get results for a specific contract only /// * Note results will include all indexed NFTs /// * Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested /// /// /// The owner of a given token /// The chain to query /// The format of the token id /// offset /// limit /// Returns a collection of nft owners UniTask GetNFTs (string address, ChainList chain, string cursor="", string format=null, int? limit=null); /// /// Gets the transfers of the tokens matching the given parameters /// /// The sender or recepient of the transfer /// The chain to query /// The format of the token id /// The transfer direction /// offset /// limit /// Returns a collection of NFT transfer UniTask GetNFTTransfers (string address, ChainList chain, string cursor="", string format=null, string direction=null, int? limit=null); /// /// Gets NFTs owned by the given address /// * Use the token_address param to get results for a specific contract only /// * Note results will include all indexed NFTs /// * Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested /// /// /// The owner of a given token /// Address of the contract /// The chain to query /// The format of the token id /// offset /// limit /// Returns a collection of nft owners UniTask GetNFTsForContract (string address, string tokenAddress, ChainList chain, string cursor="", string format=null, int? limit=null); } }