@nosana/kit
Version:
Nosana KIT
43 lines (42 loc) • 2.8 kB
TypeScript
/**
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
export declare const STAKE_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getStakeAccountDiscriminatorBytes(): ReadonlyUint8Array;
export type StakeAccount = {
discriminator: ReadonlyUint8Array;
amount: bigint;
authority: Address;
duration: bigint;
timeUnstake: bigint;
vault: Address;
vaultBump: number;
xnos: bigint;
};
export type StakeAccountArgs = {
amount: number | bigint;
authority: Address;
duration: number | bigint;
timeUnstake: number | bigint;
vault: Address;
vaultBump: number;
xnos: number | bigint;
};
/** Gets the encoder for {@link StakeAccountArgs} account data. */
export declare function getStakeAccountEncoder(): FixedSizeEncoder<StakeAccountArgs>;
/** Gets the decoder for {@link StakeAccount} account data. */
export declare function getStakeAccountDecoder(): FixedSizeDecoder<StakeAccount>;
/** Gets the codec for {@link StakeAccount} account data. */
export declare function getStakeAccountCodec(): FixedSizeCodec<StakeAccountArgs, StakeAccount>;
export declare function decodeStakeAccount<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<StakeAccount, TAddress>;
export declare function decodeStakeAccount<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<StakeAccount, TAddress>;
export declare function fetchStakeAccount<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<StakeAccount, TAddress>>;
export declare function fetchMaybeStakeAccount<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<StakeAccount, TAddress>>;
export declare function fetchAllStakeAccount(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<StakeAccount>[]>;
export declare function fetchAllMaybeStakeAccount(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<StakeAccount>[]>;
export declare function getStakeAccountSize(): number;