@algofi/amm-v0
Version:
The official JavaScript SDK for the Algofi AMM
39 lines (38 loc) • 1.41 kB
TypeScript
import { Algodv2 } from "algosdk";
import { Network } from "./config";
/**
* Function to get global state of an application
*
* @param {Algodv2} algodClient
*
* @return {dict<string,int>} 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<string,int>} dictionary of user local state
*/
export declare function getApplicationLocalState(algodClient: Algodv2, address: string, applicationId: number): 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 pools created by a given user
*
* @param {Algodv2} algodClient
* @param {Network} network
* @param {string} address
*
* @return {int[]} list of application ids created by this account
*/
export declare function getAccountCreatedPools(algodClient: Algodv2, network: Network, address: string): Promise<{}>;