@algofi/js-sdk
Version:
The official Algofi JavaScript SDK
40 lines (39 loc) • 1.42 kB
TypeScript
import { Algodv2, Indexer } from "algosdk";
import { Network } from "./globals";
import AlgofiUser from "./algofiUser";
import AssetDataClient from "./assetData/assetDataClient";
import BaseLendingClient from "./lending/baseLendingClient";
import BaseStakingClient from "./staking/baseStakingClient";
import BaseGovernanceClient from "./governance/baseGovernanceClient";
import BaseAMMClient from "./amm/baseAMMClient";
import InterfaceClient from "./interfaces/interfaceClient";
export default class AlgofiClient {
algod: Algodv2;
indexer: Indexer;
network: Network;
lending: BaseLendingClient;
staking: BaseStakingClient;
governance: BaseGovernanceClient;
amm: BaseAMMClient;
assetData: AssetDataClient;
interfaces: InterfaceClient;
/**
* Constructor for the algofi client class
*
* @param algod - algod client
* @param indexer - indexer client
* @param network - chain network
*/
constructor(algod: Algodv2, indexer: Indexer, network: Network);
/**
* Function to load the state of all of the different types of clients.
*/
loadState(): Promise<void>;
/**
* Function to get an algofi user given an address.
*
* @param address - address of the user
* @returns an algofi user given the address passed in.
*/
getUser(address: string): Promise<AlgofiUser>;
}