Holds the data for the Proposal Account and provides de/serialization functionality for that data

Implements

Constructors

Properties

approved: PublicKey[]
bump: number
cancelled: PublicKey[]
multisig: PublicKey
rejected: PublicKey[]
transactionIndex: bignum

Methods

  • Returns a readable version of Proposal properties and can be used to convert to JSON and/or logging

    Returns {
        approved: PublicKey[];
        bump: number;
        cancelled: PublicKey[];
        multisig: string;
        rejected: PublicKey[];
        status: "Draft" | "Active" | "Rejected" | "Approved" | "Executing" | "Executed" | "Cancelled";
        transactionIndex: number | {
            toNumber: (() => number);
        };
    }

    • approved: PublicKey[]
    • bump: number
    • cancelled: PublicKey[]
    • multisig: string
    • rejected: PublicKey[]
    • status: "Draft" | "Active" | "Rejected" | "Approved" | "Executing" | "Executed" | "Cancelled"
    • transactionIndex: number | {
          toNumber: (() => number);
      }
  • Retrieves the account info from the provided address and deserializes the Proposal from its data.

    Parameters

    • connection: Connection
    • address: PublicKey
    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

    Returns Promise<Proposal>

    Throws

    Error if no account info is found at the address or if deserialization fails

  • Fetches the minimum balance needed to exempt an account holding Proposal data from rent

    Parameters

    • args: ProposalArgs

      need to be provided since the byte size for this account depends on them

    • connection: Connection

      used to retrieve the rent exemption information

    • Optional commitment: Commitment

    Returns Promise<number>

  • Provides a web3.Connection.getProgramAccounts config builder, to fetch accounts matching filters that can be specified via that builder.

    Parameters

    • programId: PublicKey = ...

      the program that owns the accounts we are filtering

    Returns GpaBuilder<ProposalArgs & {
        accountDiscriminator: number[];
    }>

Generated using TypeDoc