@solana-program/token-2022
Version:
JavaScript client for the Token 2022 program
55 lines • 3.55 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 Option, type OptionOrNullable, type WritableAccount } from '@solana/kit';
import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs';
export declare const INITIALIZE_MINT2_DISCRIMINATOR = 20;
export declare function getInitializeMint2DiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export type InitializeMint2Instruction<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 InitializeMint2InstructionData = {
discriminator: number;
/** Number of base 10 digits to the right of the decimal place. */
decimals: number;
/** The authority/multisignature to mint tokens. */
mintAuthority: Address;
/** The optional freeze authority/multisignature of the mint. */
freezeAuthority: Option<Address>;
};
export type InitializeMint2InstructionDataArgs = {
/** Number of base 10 digits to the right of the decimal place. */
decimals: number;
/** The authority/multisignature to mint tokens. */
mintAuthority: Address;
/** The optional freeze authority/multisignature of the mint. */
freezeAuthority?: OptionOrNullable<Address>;
};
export declare function getInitializeMint2InstructionDataEncoder(): Encoder<InitializeMint2InstructionDataArgs>;
export declare function getInitializeMint2InstructionDataDecoder(): Decoder<InitializeMint2InstructionData>;
export declare function getInitializeMint2InstructionDataCodec(): Codec<InitializeMint2InstructionDataArgs, InitializeMint2InstructionData>;
export type InitializeMint2Input<TAccountMint extends string = string> = {
/** The mint to initialize. */
mint: Address<TAccountMint>;
decimals: InitializeMint2InstructionDataArgs['decimals'];
mintAuthority: InitializeMint2InstructionDataArgs['mintAuthority'];
freezeAuthority?: InitializeMint2InstructionDataArgs['freezeAuthority'];
};
export declare function getInitializeMint2Instruction<TAccountMint extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeMint2Input<TAccountMint>, config?: {
programAddress?: TProgramAddress;
}): InitializeMint2Instruction<TProgramAddress, TAccountMint>;
export type ParsedInitializeMint2Instruction<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: InitializeMint2InstructionData;
};
export declare function parseInitializeMint2Instruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeMint2Instruction<TProgram, TAccountMetas>;
//# sourceMappingURL=initializeMint2.d.ts.map