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

Implements

Constructors

Properties

authority: PublicKey
multisigCreationFee: bignum
reserved: number[]
treasury: PublicKey

Accessors

Methods

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

    Returns {
        authority: string;
        multisigCreationFee: number | {
            toNumber: (() => number);
        };
        reserved: number[];
        treasury: string;
    }

    • authority: string
    • multisigCreationFee: number | {
          toNumber: (() => number);
      }
    • reserved: number[]
    • treasury: string
  • Retrieves the account info from the provided address and deserializes the ProgramConfig from its data.

    Parameters

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

    Returns Promise<ProgramConfig>

    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 ProgramConfig data from rent

    Parameters

    • 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<{
        accountDiscriminator: any;
        authority: any;
        multisigCreationFee: any;
        reserved: any;
        treasury: any;
    }>

Generated using TypeDoc