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

Implements

Constructors

  • Parameters

    • multisig: PublicKey
    • creator: PublicKey
    • index: bignum
    • bump: number
    • vaultIndex: number
    • vaultBump: number
    • size: number
    • executedTransactionIndex: number

    Returns Batch

Properties

bump: number
creator: PublicKey
executedTransactionIndex: number
index: bignum
multisig: PublicKey
size: number
vaultBump: number
vaultIndex: number

Accessors

Methods

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

    Returns {
        bump: number;
        creator: string;
        executedTransactionIndex: number;
        index: number | {
            toNumber: (() => number);
        };
        multisig: string;
        size: number;
        vaultBump: number;
        vaultIndex: number;
    }

    • bump: number
    • creator: string
    • executedTransactionIndex: number
    • index: number | {
          toNumber: (() => number);
      }
    • multisig: string
    • size: number
    • vaultBump: number
    • vaultIndex: number
  • Retrieves the account info from the provided address and deserializes the Batch from its data.

    Parameters

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

    Returns Promise<Batch>

    Throws

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

  • Deserializes the Batch from the data of the provided web3.AccountInfo.

    Parameters

    • accountInfo: AccountInfo<Buffer>
    • offset: number = 0

    Returns [Batch, number]

    a tuple of the account data and the offset up to which the buffer was read to obtain it.

  • Fetches the minimum balance needed to exempt an account holding Batch 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;
        bump: any;
        creator: any;
        executedTransactionIndex: any;
        index: any;
        multisig: any;
        size: any;
        vaultBump: any;
        vaultIndex: any;
    }>

Generated using TypeDoc