UNPKG

@algofi/js-sdk

Version:

The official Algofi JavaScript SDK

33 lines (32 loc) 998 B
import { Algodv2 } from "algosdk"; import GovernanceClient from "./governanceClient"; export default class Proposal { governanceClient: GovernanceClient; algod: Algodv2; appId: number; address: string; votesFor: number; votesAgainst: number; voteCloseTime: number; executionTime: number; executed: number; canceledByEmergencyDao: number; title: string; link: string; summary: string; categoryId: number; adminAppId: number; /** * Constructor for the proposal class. * * @param governanceClient - a governance client * @param proposalAppId - the app id of the proposal */ constructor(governanceClient: GovernanceClient, proposalAppId: number); /** * Function that will update the data on the proposal object with the global * and local data of the proposal contract on chain. */ loadState(): Promise<void>; getData(topicId: any): Promise<void>; }