UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

55 lines 4.43 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 IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; import { type AccountState, type AccountStateArgs } from '../types'; export declare const UPDATE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR = 28; export declare function getUpdateDefaultAccountStateDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const UPDATE_DEFAULT_ACCOUNT_STATE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR = 1; export declare function getUpdateDefaultAccountStateDefaultAccountStateDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type UpdateDefaultAccountStateInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMint extends string | IAccountMeta<string> = string, TAccountFreezeAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint, TAccountFreezeAuthority extends string ? ReadonlyAccount<TAccountFreezeAuthority> : TAccountFreezeAuthority, ...TRemainingAccounts ]>; export type UpdateDefaultAccountStateInstructionData = { discriminator: number; defaultAccountStateDiscriminator: number; /** The state each new token account should start with. */ state: AccountState; }; export type UpdateDefaultAccountStateInstructionDataArgs = { /** The state each new token account should start with. */ state: AccountStateArgs; }; export declare function getUpdateDefaultAccountStateInstructionDataEncoder(): Encoder<UpdateDefaultAccountStateInstructionDataArgs>; export declare function getUpdateDefaultAccountStateInstructionDataDecoder(): Decoder<UpdateDefaultAccountStateInstructionData>; export declare function getUpdateDefaultAccountStateInstructionDataCodec(): Codec<UpdateDefaultAccountStateInstructionDataArgs, UpdateDefaultAccountStateInstructionData>; export type UpdateDefaultAccountStateInput<TAccountMint extends string = string, TAccountFreezeAuthority extends string = string> = { /** The mint. */ mint: Address<TAccountMint>; /** The mint freeze authority or its multisignature account. */ freezeAuthority: Address<TAccountFreezeAuthority> | TransactionSigner<TAccountFreezeAuthority>; state: UpdateDefaultAccountStateInstructionDataArgs['state']; multiSigners?: Array<TransactionSigner>; }; export declare function getUpdateDefaultAccountStateInstruction<TAccountMint extends string, TAccountFreezeAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: UpdateDefaultAccountStateInput<TAccountMint, TAccountFreezeAuthority>, config?: { programAddress?: TProgramAddress; }): UpdateDefaultAccountStateInstruction<TProgramAddress, TAccountMint, (typeof input)['freezeAuthority'] extends TransactionSigner<TAccountFreezeAuthority> ? ReadonlySignerAccount<TAccountFreezeAuthority> & IAccountSignerMeta<TAccountFreezeAuthority> : TAccountFreezeAuthority>; export type ParsedUpdateDefaultAccountStateInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The mint. */ mint: TAccountMetas[0]; /** The mint freeze authority or its multisignature account. */ freezeAuthority: TAccountMetas[1]; }; data: UpdateDefaultAccountStateInstructionData; }; export declare function parseUpdateDefaultAccountStateInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedUpdateDefaultAccountStateInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=updateDefaultAccountState.d.ts.map