UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

53 lines 3.71 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 Option, type OptionOrNullable, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const INITIALIZE_TRANSFER_HOOK_DISCRIMINATOR = 36; export declare function getInitializeTransferHookDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const INITIALIZE_TRANSFER_HOOK_TRANSFER_HOOK_DISCRIMINATOR = 0; export declare function getInitializeTransferHookTransferHookDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type InitializeTransferHookInstruction<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 InitializeTransferHookInstructionData = { discriminator: number; transferHookDiscriminator: number; /** The public key for the account that can update the program id */ authority: Option<Address>; /** The program id that performs logic during transfers */ programId: Option<Address>; }; export type InitializeTransferHookInstructionDataArgs = { /** The public key for the account that can update the program id */ authority: OptionOrNullable<Address>; /** The program id that performs logic during transfers */ programId: OptionOrNullable<Address>; }; export declare function getInitializeTransferHookInstructionDataEncoder(): Encoder<InitializeTransferHookInstructionDataArgs>; export declare function getInitializeTransferHookInstructionDataDecoder(): Decoder<InitializeTransferHookInstructionData>; export declare function getInitializeTransferHookInstructionDataCodec(): Codec<InitializeTransferHookInstructionDataArgs, InitializeTransferHookInstructionData>; export type InitializeTransferHookInput<TAccountMint extends string = string> = { /** The mint to initialize. */ mint: Address<TAccountMint>; authority: InitializeTransferHookInstructionDataArgs['authority']; programId: InitializeTransferHookInstructionDataArgs['programId']; }; export declare function getInitializeTransferHookInstruction<TAccountMint extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeTransferHookInput<TAccountMint>, config?: { programAddress?: TProgramAddress; }): InitializeTransferHookInstruction<TProgramAddress, TAccountMint>; export type ParsedInitializeTransferHookInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The mint to initialize. */ mint: TAccountMetas[0]; }; data: InitializeTransferHookInstructionData; }; export declare function parseInitializeTransferHookInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeTransferHookInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializeTransferHook.d.ts.map