@solana-program/token-2022
Version:
JavaScript client for the Token 2022 program
50 lines • 3.84 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 { 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';
export declare const FREEZE_ACCOUNT_DISCRIMINATOR = 10;
export declare function getFreezeAccountDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export type FreezeAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountAccount extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountOwner extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
TAccountAccount extends string ? WritableAccount<TAccountAccount> : TAccountAccount,
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
TAccountOwner extends string ? ReadonlyAccount<TAccountOwner> : TAccountOwner,
...TRemainingAccounts
]>;
export type FreezeAccountInstructionData = {
discriminator: number;
};
export type FreezeAccountInstructionDataArgs = {};
export declare function getFreezeAccountInstructionDataEncoder(): Encoder<FreezeAccountInstructionDataArgs>;
export declare function getFreezeAccountInstructionDataDecoder(): Decoder<FreezeAccountInstructionData>;
export declare function getFreezeAccountInstructionDataCodec(): Codec<FreezeAccountInstructionDataArgs, FreezeAccountInstructionData>;
export type FreezeAccountInput<TAccountAccount extends string = string, TAccountMint extends string = string, TAccountOwner extends string = string> = {
/** The account to freeze. */
account: Address<TAccountAccount>;
/** The token mint. */
mint: Address<TAccountMint>;
/** The mint freeze authority or its multisignature account. */
owner: Address<TAccountOwner> | TransactionSigner<TAccountOwner>;
multiSigners?: Array<TransactionSigner>;
};
export declare function getFreezeAccountInstruction<TAccountAccount extends string, TAccountMint extends string, TAccountOwner extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: FreezeAccountInput<TAccountAccount, TAccountMint, TAccountOwner>, config?: {
programAddress?: TProgramAddress;
}): FreezeAccountInstruction<TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['owner'] extends TransactionSigner<TAccountOwner> ? ReadonlySignerAccount<TAccountOwner> & IAccountSignerMeta<TAccountOwner> : TAccountOwner>;
export type ParsedFreezeAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
/** The account to freeze. */
account: TAccountMetas[0];
/** The token mint. */
mint: TAccountMetas[1];
/** The mint freeze authority or its multisignature account. */
owner: TAccountMetas[2];
};
data: FreezeAccountInstructionData;
};
export declare function parseFreezeAccountInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedFreezeAccountInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=freezeAccount.d.ts.map