UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

49 lines 3.59 kB
/** * 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 { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; import { type AccountState, type AccountStateArgs } from '../types'; export declare const INITIALIZE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR = 28; export declare function getInitializeDefaultAccountStateDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const INITIALIZE_DEFAULT_ACCOUNT_STATE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR = 0; export declare function getInitializeDefaultAccountStateDefaultAccountStateDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type InitializeDefaultAccountStateInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMint extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint, ...TRemainingAccounts ]>; export type InitializeDefaultAccountStateInstructionData = { discriminator: number; defaultAccountStateDiscriminator: number; /** The state each new token account should start with. */ state: AccountState; }; export type InitializeDefaultAccountStateInstructionDataArgs = { /** The state each new token account should start with. */ state: AccountStateArgs; }; export declare function getInitializeDefaultAccountStateInstructionDataEncoder(): Encoder<InitializeDefaultAccountStateInstructionDataArgs>; export declare function getInitializeDefaultAccountStateInstructionDataDecoder(): Decoder<InitializeDefaultAccountStateInstructionData>; export declare function getInitializeDefaultAccountStateInstructionDataCodec(): Codec<InitializeDefaultAccountStateInstructionDataArgs, InitializeDefaultAccountStateInstructionData>; export type InitializeDefaultAccountStateInput<TAccountMint extends string = string> = { /** The mint. */ mint: Address<TAccountMint>; state: InitializeDefaultAccountStateInstructionDataArgs['state']; }; export declare function getInitializeDefaultAccountStateInstruction<TAccountMint extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeDefaultAccountStateInput<TAccountMint>, config?: { programAddress?: TProgramAddress; }): InitializeDefaultAccountStateInstruction<TProgramAddress, TAccountMint>; export type ParsedInitializeDefaultAccountStateInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The mint. */ mint: TAccountMetas[0]; }; data: InitializeDefaultAccountStateInstructionData; }; export declare function parseInitializeDefaultAccountStateInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeDefaultAccountStateInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializeDefaultAccountState.d.ts.map