@solana/web3.js
    Preparing search index...

    Class VoteProgram

    Factory class for transactions to interact with the Vote program

    Index
    programId: PublicKey = VOTE_PROGRAM_ID

    Public key that identifies the Vote program

    space: number = 3762

    Max Space for newly created vote accounts using the current Agave vote-state layout targeted by this client.

    Vote Program v3.1.13 (https://docs.rs/solana-vote-program/3.1.13/solana_vote_program/) reports:

    • VoteStateV4::size_of() == 3762
    • VoteStateV3::size_of() == 3762
    • VoteState1_14_11::size_of() == 3731

    The smaller legacy VoteState1_14_11 size does not change this constant: existing historical vote accounts may still use that older layout, but new accounts should allocate enough space for the current V3/V4 layout.

    Keep this in sync with Agave vote-program sizing in https://github.com/anza-xyz/agave/blob/3134055b562e95902233be308453fffa1c4a8902/programs/vote/src/vote_state/mod.rs.

    • Generate a transaction to withdraw safely from a Vote account.

      This function was created as a safeguard for vote accounts running validators, safeWithdraw checks that the withdraw amount will not exceed the specified balance while leaving enough left to cover rent. If you wish to close the vote account by withdrawing the full amount, call the withdraw method directly.

      Parameters

      Returns Transaction