UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

55 lines 3.86 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 ReadonlyAccount, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const INITIALIZE_ACCOUNT2_DISCRIMINATOR = 16; export declare function getInitializeAccount2DiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type InitializeAccount2Instruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountAccount extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountRent extends string | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111', TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountAccount extends string ? WritableAccount<TAccountAccount> : TAccountAccount, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent, ...TRemainingAccounts ]>; export type InitializeAccount2InstructionData = { discriminator: number; /** The new account's owner/multisignature. */ owner: Address; }; export type InitializeAccount2InstructionDataArgs = { /** The new account's owner/multisignature. */ owner: Address; }; export declare function getInitializeAccount2InstructionDataEncoder(): Encoder<InitializeAccount2InstructionDataArgs>; export declare function getInitializeAccount2InstructionDataDecoder(): Decoder<InitializeAccount2InstructionData>; export declare function getInitializeAccount2InstructionDataCodec(): Codec<InitializeAccount2InstructionDataArgs, InitializeAccount2InstructionData>; export type InitializeAccount2Input<TAccountAccount extends string = string, TAccountMint extends string = string, TAccountRent extends string = string> = { /** The account to initialize. */ account: Address<TAccountAccount>; /** The mint this account will be associated with. */ mint: Address<TAccountMint>; /** Rent sysvar. */ rent?: Address<TAccountRent>; owner: InitializeAccount2InstructionDataArgs['owner']; }; export declare function getInitializeAccount2Instruction<TAccountAccount extends string, TAccountMint extends string, TAccountRent extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeAccount2Input<TAccountAccount, TAccountMint, TAccountRent>, config?: { programAddress?: TProgramAddress; }): InitializeAccount2Instruction<TProgramAddress, TAccountAccount, TAccountMint, TAccountRent>; export type ParsedInitializeAccount2Instruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The account to initialize. */ account: TAccountMetas[0]; /** The mint this account will be associated with. */ mint: TAccountMetas[1]; /** Rent sysvar. */ rent: TAccountMetas[2]; }; data: InitializeAccount2InstructionData; }; export declare function parseInitializeAccount2Instruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeAccount2Instruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializeAccount2.d.ts.map