UNPKG

@algofi/js-sdk

Version:

The official Algofi JavaScript SDK

27 lines (26 loc) 877 B
import { Algodv2 } from "algosdk"; import UserStakingState from "./userStakingState"; import StakingClient from "./stakingClient"; export default class stakingUser { algod: Algodv2; address: string; stakingClient: StakingClient; optedInStakingContracts: number[]; userStakingStates: { [key: number]: UserStakingState; }; /** * Constructor for the staking user. * * @param stakingClient - staking client * @param address - address of the user */ constructor(stakingClient: StakingClient, address: string); /** * Function to take in the user's local states and update their state with the * staking contractsw on the staking user object. * * @param userLocalStates - a list of local states for the user */ loadState(userLocalStates: {}): Promise<void>; }