UNPKG

@tristeroresearch/mach-sdk

Version:

A TypeScript SDK for integrating with Mach's API.

23 lines 1.33 kB
/** * @fileOverview This file contains functions that interact with the Mach Exchange API to retrieve token balances for a wallet. * @function getTokenBalance - Returns the balance of a specific token a wallet holds across all aggregated chains. * @function getTokenBalances - Returns the balances for a list of tokens a wallet holds across all aggregated chains. */ import { type Asset } from '../@types/asset'; /** * Returns the balances of a specific token a wallet holds across all aggregated chains. * @param walletAddress - A wallet address. * @param token - A Token object. * @returns An object containing the token and the amounts on different chains. * @throws {BaseError} Throws a ValidationError if parameters are invalid. */ export declare const getTokenBalance: (walletAddress: string, token: Asset) => Promise<string | null>; /** * Returns the balances for a list tokens a wallet holds across all aggregated chains. * @param walletAddress - A wallet address. * @param tokens - A list of Token objects. * @returns A list of objects containing the tokens and the amounts on different chains. * @throws {BaseError} Throws a ValidationError if parameters are invalid. */ export declare const getTokenBalances: (walletAddress: string) => Promise<any>; //# sourceMappingURL=getTokenBalances.api.d.ts.map