UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

45 lines 2.96 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 } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR = 24; export declare function getUiAmountToAmountDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type UiAmountToAmountInstruction<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 ? ReadonlyAccount<TAccountMint> : TAccountMint, ...TRemainingAccounts ]>; export type UiAmountToAmountInstructionData = { discriminator: number; /** The ui_amount of tokens to reformat. */ uiAmount: string; }; export type UiAmountToAmountInstructionDataArgs = { /** The ui_amount of tokens to reformat. */ uiAmount: string; }; export declare function getUiAmountToAmountInstructionDataEncoder(): Encoder<UiAmountToAmountInstructionDataArgs>; export declare function getUiAmountToAmountInstructionDataDecoder(): Decoder<UiAmountToAmountInstructionData>; export declare function getUiAmountToAmountInstructionDataCodec(): Codec<UiAmountToAmountInstructionDataArgs, UiAmountToAmountInstructionData>; export type UiAmountToAmountInput<TAccountMint extends string = string> = { /** The mint to calculate for. */ mint: Address<TAccountMint>; uiAmount: UiAmountToAmountInstructionDataArgs['uiAmount']; }; export declare function getUiAmountToAmountInstruction<TAccountMint extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: UiAmountToAmountInput<TAccountMint>, config?: { programAddress?: TProgramAddress; }): UiAmountToAmountInstruction<TProgramAddress, TAccountMint>; export type ParsedUiAmountToAmountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The mint to calculate for. */ mint: TAccountMetas[0]; }; data: UiAmountToAmountInstructionData; }; export declare function parseUiAmountToAmountInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedUiAmountToAmountInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=uiAmountToAmount.d.ts.map