@solana-program/token-2022
Version:
JavaScript client for the Token 2022 program
54 lines • 4.06 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 IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type WritableAccount } from '@solana/kit';
import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs';
export declare const INITIALIZE_ACCOUNT_DISCRIMINATOR = 1;
export declare function getInitializeAccountDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export type InitializeAccountInstruction<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, 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,
TAccountOwner extends string ? ReadonlyAccount<TAccountOwner> : TAccountOwner,
TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent,
...TRemainingAccounts
]>;
export type InitializeAccountInstructionData = {
discriminator: number;
};
export type InitializeAccountInstructionDataArgs = {};
export declare function getInitializeAccountInstructionDataEncoder(): Encoder<InitializeAccountInstructionDataArgs>;
export declare function getInitializeAccountInstructionDataDecoder(): Decoder<InitializeAccountInstructionData>;
export declare function getInitializeAccountInstructionDataCodec(): Codec<InitializeAccountInstructionDataArgs, InitializeAccountInstructionData>;
export type InitializeAccountInput<TAccountAccount extends string = string, TAccountMint extends string = string, TAccountOwner 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>;
/** The new account's owner/multisignature. */
owner: Address<TAccountOwner>;
/** Rent sysvar. */
rent?: Address<TAccountRent>;
};
export declare function getInitializeAccountInstruction<TAccountAccount extends string, TAccountMint extends string, TAccountOwner extends string, TAccountRent extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeAccountInput<TAccountAccount, TAccountMint, TAccountOwner, TAccountRent>, config?: {
programAddress?: TProgramAddress;
}): InitializeAccountInstruction<TProgramAddress, TAccountAccount, TAccountMint, TAccountOwner, TAccountRent>;
export type ParsedInitializeAccountInstruction<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];
/** The new account's owner/multisignature. */
owner: TAccountMetas[2];
/** Rent sysvar. */
rent: TAccountMetas[3];
};
data: InitializeAccountInstructionData;
};
export declare function parseInitializeAccountInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeAccountInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=initializeAccount.d.ts.map