@algofi/js-sdk
Version:
The official Algofi JavaScript SDK
36 lines (35 loc) • 1.39 kB
TypeScript
import { Algodv2 } from "algosdk";
import GovernanceClient from "./governanceClient";
import UserAdminState from "./userAdminState";
import UserRewardsManagerState from "./userRewardsManagerState";
import UserVotingEscrowState from "./userVotingEscrowState";
import UserAirdropState from "./userAirdropState";
export default class governanceUser {
governanceClient: GovernanceClient;
algod: Algodv2;
address: string;
optedInToGovernance: boolean;
userVotingEscrowState: UserVotingEscrowState;
userAdminState: UserAdminState;
userRewardsManagerState: UserRewardsManagerState;
userAirdropState: UserAirdropState;
/**
* Constructor for the governance user class.
*
* @param governanceClient - a governance client
* @param address - address of the user
*/
constructor(governanceClient: GovernanceClient, address: string);
/**
* A function which will load in all of the state for a governance user
* including their admin state, voting escrow state, and rewards manager
* state into the governance user object.
*
* @param userLocalStates - a list of all of the local states for the
* particular user with the admin, voting escrow, and rewards manager
* contracts.
*/
loadState(userLocalStates: {
[key: string]: {};
}): Promise<void>;
}