/**
* This code was GENERATED using the solita package.
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
*
* See: https://github.com/metaplex-foundation/solita
*/
///
import * as web3 from '@solana/web3.js';
import * as beet from '@metaplex-foundation/beet';
import * as beetSolana from '@metaplex-foundation/beet-solana';
/**
* Arguments used to create {@link VoteWithdrawal}
* @category Accounts
* @category generated
*/
export type VoteWithdrawalArgs = {
approvalThreshold: number;
allowed1: number;
allowed2: number;
allowed3: number;
allowed4: number;
allowed5: number;
wallet1: web3.PublicKey;
wallet2: web3.PublicKey;
wallet3: web3.PublicKey;
wallet4: web3.PublicKey;
wallet5: web3.PublicKey;
newWithdrawalWallet: web3.PublicKey;
lastApprovedTime: beet.bignum;
bump: number;
};
export declare const voteWithdrawalDiscriminator: number[];
/**
* Holds the data for the {@link VoteWithdrawal} Account and provides de/serialization
* functionality for that data
*
* @category Accounts
* @category generated
*/
export declare class VoteWithdrawal implements VoteWithdrawalArgs {
readonly approvalThreshold: number;
readonly allowed1: number;
readonly allowed2: number;
readonly allowed3: number;
readonly allowed4: number;
readonly allowed5: number;
readonly wallet1: web3.PublicKey;
readonly wallet2: web3.PublicKey;
readonly wallet3: web3.PublicKey;
readonly wallet4: web3.PublicKey;
readonly wallet5: web3.PublicKey;
readonly newWithdrawalWallet: web3.PublicKey;
readonly lastApprovedTime: beet.bignum;
readonly bump: number;
private constructor();
/**
* Creates a {@link VoteWithdrawal} instance from the provided args.
*/
static fromArgs(args: VoteWithdrawalArgs): VoteWithdrawal;
/**
* Deserializes the {@link VoteWithdrawal} from the data of the provided {@link web3.AccountInfo}.
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
*/
static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [VoteWithdrawal, number];
/**
* Retrieves the account info from the provided address and deserializes
* the {@link VoteWithdrawal} from its data.
*
* @throws Error if no account info is found at the address or if deserialization fails
*/
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise;
/**
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
* to fetch accounts matching filters that can be specified via that builder.
*
* @param programId - the program that owns the accounts we are filtering
*/
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
accountDiscriminator: any;
bump: any;
approvalThreshold: any;
allowed1: any;
allowed2: any;
allowed3: any;
allowed4: any;
allowed5: any;
wallet1: any;
wallet2: any;
wallet3: any;
wallet4: any;
wallet5: any;
newWithdrawalWallet: any;
lastApprovedTime: any;
}>;
/**
* Deserializes the {@link VoteWithdrawal} from the provided data Buffer.
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
*/
static deserialize(buf: Buffer, offset?: number): [VoteWithdrawal, number];
/**
* Serializes the {@link VoteWithdrawal} into a Buffer.
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
*/
serialize(): [Buffer, number];
/**
* Returns the byteSize of a {@link Buffer} holding the serialized data of
* {@link VoteWithdrawal}
*/
static get byteSize(): number;
/**
* Fetches the minimum balance needed to exempt an account holding
* {@link VoteWithdrawal} data from rent
*
* @param connection used to retrieve the rent exemption information
*/
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise;
/**
* Determines if the provided {@link Buffer} has the correct byte size to
* hold {@link VoteWithdrawal} data.
*/
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
/**
* Returns a readable version of {@link VoteWithdrawal} properties
* and can be used to convert to JSON and/or logging
*/
pretty(): {
approvalThreshold: number;
allowed1: number;
allowed2: number;
allowed3: number;
allowed4: number;
allowed5: number;
wallet1: string;
wallet2: string;
wallet3: string;
wallet4: string;
wallet5: string;
newWithdrawalWallet: string;
lastApprovedTime: number | {
toNumber: () => number;
};
bump: number;
};
}
/**
* @category Accounts
* @category generated
*/
export declare const voteWithdrawalBeet: beet.BeetStruct;