/** * 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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const APPROVE_DISCRIMINATOR = 4; export declare function getApproveDiscriminatorBytes(): ReadonlyUint8Array; export type ApproveInstruction = string, TAccountDelegate extends string | AccountMeta = string, TAccountOwner extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountSource extends string ? WritableAccount : TAccountSource, TAccountDelegate extends string ? ReadonlyAccount : TAccountDelegate, TAccountOwner extends string ? ReadonlyAccount : TAccountOwner, ...TRemainingAccounts ]>; export type ApproveInstructionData = { discriminator: number; /** The amount of tokens the delegate is approved for. */ amount: bigint; }; export type ApproveInstructionDataArgs = { /** The amount of tokens the delegate is approved for. */ amount: number | bigint; }; export declare function getApproveInstructionDataEncoder(): FixedSizeEncoder; export declare function getApproveInstructionDataDecoder(): FixedSizeDecoder; export declare function getApproveInstructionDataCodec(): FixedSizeCodec; export type ApproveInput = { /** The source account. */ source: Address; /** The delegate. */ delegate: Address; /** The source account owner or its multisignature account. */ owner: Address | TransactionSigner; amount: ApproveInstructionDataArgs['amount']; multiSigners?: Array; }; export declare function getApproveInstruction(input: ApproveInput, config?: { programAddress?: TProgramAddress; }): ApproveInstruction ? ReadonlySignerAccount & AccountSignerMeta : TAccountOwner>; export type ParsedApproveInstruction = { programAddress: Address; accounts: { /** The source account. */ source: TAccountMetas[0]; /** The delegate. */ delegate: TAccountMetas[1]; /** The source account owner or its multisignature account. */ owner: TAccountMetas[2]; }; data: ApproveInstructionData; }; export declare function parseApproveInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedApproveInstruction; //# sourceMappingURL=approve.d.ts.map