UNPKG

@xoxno/sdk-js

Version:

The SDK to interact with the XOXNO Protocol!

72 lines 3.38 kB
import type { FungibleAssetsMap, SuggestNFTsArgs, SuggestResults } from '../types/collection'; import { AssetCategory } from '../types/collection'; import type { AnalyticsGraphs, AshSwapPaymentData, StakingExplore, StatisticsSummary, TokenUSDPrices } from '../types/common'; export declare class CommonModule { private api; constructor(); /** Gets all tokens usd price * @returns {TokenUSDPrices} User's creator info * */ getTokensUsdPrice: () => Promise<TokenUSDPrices>; /** Gets all tokens usd price * @returns {TokenUSDPrices} User's creator info * */ getAshSwapAmount: ({ originalToken, originalTokenValue, paymentToken, }: { originalToken: string; originalTokenValue: string; paymentToken: string; }) => Promise<AshSwapPaymentData>; /** * @public * @async * @function getFungibleTokens * @param category - The ticker of the collection. * @returns {Promise<FungibleAssetsMap>} A promise that resolves a map of ESDT tokens and their info * This function fetches all branded fungible assets and their info */ getFungibleTokens: (categories?: AssetCategory[], identifiers?: string[]) => Promise<FungibleAssetsMap>; /** * @public * @async * @function getGlobalGraphData * @param category - The ticker of the collection. * @returns {Promise<AnalyticsGraphs>} A promise the required analytics data * This function gets the global graph data */ getGlobalGraphData: (startTime: string, endTime: string, bin: string) => Promise<AnalyticsGraphs>; /** * @public * @async * @function getAnalyticsOverview * @returns {Promise<StatisticsSummary>} A promise the required analytics data * This function gets the global graph data */ getAnalyticsOverview: () => Promise<StatisticsSummary>; /** * @public * @async * @function suggestResults * @param {SuggestNFTsArgs} args - An object containing the necessary parameters to fetch suggested NFT results. * @returns {Promise<SuggestResults>} A promise that resolves to the fetched NFT results. * * This function fetches suggested NFT results based on the provided arguments. It takes an object with the following properties: * - name (string): The name to search for (required). * - orderBy (SuggestOrderBy[], optional): An array of ordering preferences for the results. * - top (number, optional): The maximum number of results to return (default is 35, cannot be greater than 100). * - skip (number, optional): The number of results to skip (default is 0). * * The function first validates the input arguments and constructs a payload body with the provided parameters. * Then, it converts the payload body into a base64 string and fetches the suggested results using the API. * Finally, it returns a promise that resolves to the fetched NFT results. */ suggestResults: (args: SuggestNFTsArgs) => Promise<SuggestResults>; /** * @public * @async * @function getExploreStaking * @returns {Promise<StakingExplore[]>} A promise that resolves to the fetched staking explore data. * This function fetches the staking explore data. */ getExploreStaking: () => Promise<StakingExplore[]>; } //# sourceMappingURL=index.d.ts.map