UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

39 lines 2.73 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 WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const SYNC_NATIVE_DISCRIMINATOR = 17; export declare function getSyncNativeDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type SyncNativeInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountAccount extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountAccount extends string ? WritableAccount<TAccountAccount> : TAccountAccount, ...TRemainingAccounts ]>; export type SyncNativeInstructionData = { discriminator: number; }; export type SyncNativeInstructionDataArgs = {}; export declare function getSyncNativeInstructionDataEncoder(): Encoder<SyncNativeInstructionDataArgs>; export declare function getSyncNativeInstructionDataDecoder(): Decoder<SyncNativeInstructionData>; export declare function getSyncNativeInstructionDataCodec(): Codec<SyncNativeInstructionDataArgs, SyncNativeInstructionData>; export type SyncNativeInput<TAccountAccount extends string = string> = { /** The native token account to sync with its underlying lamports. */ account: Address<TAccountAccount>; }; export declare function getSyncNativeInstruction<TAccountAccount extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: SyncNativeInput<TAccountAccount>, config?: { programAddress?: TProgramAddress; }): SyncNativeInstruction<TProgramAddress, TAccountAccount>; export type ParsedSyncNativeInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The native token account to sync with its underlying lamports. */ account: TAccountMetas[0]; }; data: SyncNativeInstructionData; }; export declare function parseSyncNativeInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedSyncNativeInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=syncNative.d.ts.map