UNPKG

@algofi/v1

Version:

The official JavaScript SDK for the V2 Algofi Lending Market

38 lines (37 loc) 1.38 kB
import { Algodv2 } from "algosdk"; /** * Function to get global state of an application * * @param {Algodv2} algodClient * * @return {dict<string,any>} dictionary of global state */ export declare function getApplicationGlobalState(algodClient: Algodv2, applicationId: number): Promise<{}>; /** * Function to get local state for a given address and application * * @param {Algodv2} algodClient * @param {string} address * * @return {dict<number,dict{string:any}>} dictionary of user local states */ export declare function getLocalStates(algodClient: Algodv2, address: string, addressFields?: string[]): Promise<{}>; /** * Function to get balances for an account * * @param {Algodv2} algodClient * @param {string} address * * @return {dict<string,int>} dictionary of assets to amounts */ export declare function getAccountBalances(algodClient: Algodv2, address: string): Promise<{}>; /** * Function to get min balance for an account * * @param {Algodv2} algodClient * @param {string} address * * @return {number} min algo balance for an account */ export declare function getAccountMinBalance(algodClient: Algodv2, address: string): Promise<number>; export declare function getTransferDetails(txn: {}): [number, number];