/** * 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 Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type Option, type OptionOrNullable } from '@solana/kit'; import { type AccountState, type AccountStateArgs, type Extension, type ExtensionArgs } from '../types'; export type Token = { /** The mint associated with this account. */ mint: Address; /** The owner of this account. */ owner: Address; /** The amount of tokens this account holds. */ amount: bigint; /** * If `delegate` is `Some` then `delegated_amount` represents * the amount authorized by the delegate. */ delegate: Option
; /** The account's state. */ state: AccountState; /** * If is_native.is_some, this is a native token, and the value logs the * rent-exempt reserve. An Account is required to be rent-exempt, so * the value is used by the Processor to ensure that wrapped SOL * accounts do not drop below this threshold. */ isNative: Option; /** The amount delegated. */ delegatedAmount: bigint; /** Optional authority to close the account. */ closeAuthority: Option
; /** The extensions activated on the token account. */ extensions: Option>; }; export type TokenArgs = { /** The mint associated with this account. */ mint: Address; /** The owner of this account. */ owner: Address; /** The amount of tokens this account holds. */ amount: number | bigint; /** * If `delegate` is `Some` then `delegated_amount` represents * the amount authorized by the delegate. */ delegate: OptionOrNullable
; /** The account's state. */ state: AccountStateArgs; /** * If is_native.is_some, this is a native token, and the value logs the * rent-exempt reserve. An Account is required to be rent-exempt, so * the value is used by the Processor to ensure that wrapped SOL * accounts do not drop below this threshold. */ isNative: OptionOrNullable; /** The amount delegated. */ delegatedAmount: number | bigint; /** Optional authority to close the account. */ closeAuthority: OptionOrNullable
; /** The extensions activated on the token account. */ extensions: OptionOrNullable>; }; /** Gets the encoder for {@link TokenArgs} account data. */ export declare function getTokenEncoder(): Encoder; /** Gets the decoder for {@link Token} account data. */ export declare function getTokenDecoder(): Decoder; /** Gets the codec for {@link Token} account data. */ export declare function getTokenCodec(): Codec; export declare function decodeToken(encodedAccount: EncodedAccount): Account; export declare function decodeToken(encodedAccount: MaybeEncodedAccount): MaybeAccount; export declare function fetchToken(rpc: Parameters[0], address: Address, config?: FetchAccountConfig): Promise>; export declare function fetchMaybeToken(rpc: Parameters[0], address: Address, config?: FetchAccountConfig): Promise>; export declare function fetchAllToken(rpc: Parameters[0], addresses: Array
, config?: FetchAccountsConfig): Promise[]>; export declare function fetchAllMaybeToken(rpc: Parameters[0], addresses: Array
, config?: FetchAccountsConfig): Promise[]>; //# sourceMappingURL=token.d.ts.map