/** * 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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit"; import { PERPETUALS_PROGRAM_ADDRESS } from "../programs"; import { type RequestType, type RequestTypeArgs } from "../types"; export declare const CREATE_DECREASE_POSITION_REQUEST_DISCRIMINATOR: Uint8Array; export declare function getCreateDecreasePositionRequestDiscriminatorBytes(): ReadonlyUint8Array; export type CreateDecreasePositionRequestInstruction = string, TAccountReceivingAccount extends string | AccountMeta = string, TAccountPerpetuals extends string | AccountMeta = string, TAccountPool extends string | AccountMeta = string, TAccountPosition extends string | AccountMeta = string, TAccountPositionRequest extends string | AccountMeta = string, TAccountPositionRequestAta extends string | AccountMeta = string, TAccountCustody extends string | AccountMeta = string, TAccountCustodyOracleAccount extends string | AccountMeta = string, TAccountCollateralCustody extends string | AccountMeta = string, TAccountDesiredMint extends string | AccountMeta = string, TAccountReferral extends string | AccountMeta = string, TAccountTokenProgram extends string | AccountMeta = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountAssociatedTokenProgram extends string | AccountMeta = string, TAccountSystemProgram extends string | AccountMeta = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta = string, TAccountProgram extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountOwner extends string ? WritableSignerAccount & AccountSignerMeta : TAccountOwner, TAccountReceivingAccount extends string ? WritableAccount : TAccountReceivingAccount, TAccountPerpetuals extends string ? ReadonlyAccount : TAccountPerpetuals, TAccountPool extends string ? WritableAccount : TAccountPool, TAccountPosition extends string ? ReadonlyAccount : TAccountPosition, TAccountPositionRequest extends string ? WritableAccount : TAccountPositionRequest, TAccountPositionRequestAta extends string ? WritableAccount : TAccountPositionRequestAta, TAccountCustody extends string ? ReadonlyAccount : TAccountCustody, TAccountCustodyOracleAccount extends string ? ReadonlyAccount : TAccountCustodyOracleAccount, TAccountCollateralCustody extends string ? ReadonlyAccount : TAccountCollateralCustody, TAccountDesiredMint extends string ? ReadonlyAccount : TAccountDesiredMint, TAccountReferral extends string ? ReadonlyAccount : TAccountReferral, TAccountTokenProgram extends string ? ReadonlyAccount : TAccountTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount : TAccountProgram, ...TRemainingAccounts ]>; export type CreateDecreasePositionRequestInstructionData = { discriminator: ReadonlyUint8Array; collateralUsdDelta: bigint; sizeUsdDelta: bigint; requestType: RequestType; priceSlippage: Option; jupiterMinimumOut: Option; triggerPrice: Option; triggerAboveThreshold: Option; entirePosition: Option; counter: bigint; }; export type CreateDecreasePositionRequestInstructionDataArgs = { collateralUsdDelta: number | bigint; sizeUsdDelta: number | bigint; requestType: RequestTypeArgs; priceSlippage: OptionOrNullable; jupiterMinimumOut: OptionOrNullable; triggerPrice: OptionOrNullable; triggerAboveThreshold: OptionOrNullable; entirePosition: OptionOrNullable; counter: number | bigint; }; export declare function getCreateDecreasePositionRequestInstructionDataEncoder(): Encoder; export declare function getCreateDecreasePositionRequestInstructionDataDecoder(): Decoder; export declare function getCreateDecreasePositionRequestInstructionDataCodec(): Codec; export type CreateDecreasePositionRequestInput = { owner: TransactionSigner; receivingAccount: Address; perpetuals: Address; pool: Address; position: Address; positionRequest: Address; positionRequestAta: Address; custody: Address; custodyOracleAccount: Address; collateralCustody: Address; desiredMint: Address; referral?: Address; tokenProgram?: Address; associatedTokenProgram: Address; systemProgram?: Address; eventAuthority: Address; program: Address; collateralUsdDelta: CreateDecreasePositionRequestInstructionDataArgs["collateralUsdDelta"]; sizeUsdDelta: CreateDecreasePositionRequestInstructionDataArgs["sizeUsdDelta"]; requestType: CreateDecreasePositionRequestInstructionDataArgs["requestType"]; priceSlippage: CreateDecreasePositionRequestInstructionDataArgs["priceSlippage"]; jupiterMinimumOut: CreateDecreasePositionRequestInstructionDataArgs["jupiterMinimumOut"]; triggerPrice: CreateDecreasePositionRequestInstructionDataArgs["triggerPrice"]; triggerAboveThreshold: CreateDecreasePositionRequestInstructionDataArgs["triggerAboveThreshold"]; entirePosition: CreateDecreasePositionRequestInstructionDataArgs["entirePosition"]; counter: CreateDecreasePositionRequestInstructionDataArgs["counter"]; }; export declare function getCreateDecreasePositionRequestInstruction(input: CreateDecreasePositionRequestInput, config?: { programAddress?: TProgramAddress; }): CreateDecreasePositionRequestInstruction; export type ParsedCreateDecreasePositionRequestInstruction = { programAddress: Address; accounts: { owner: TAccountMetas[0]; receivingAccount: TAccountMetas[1]; perpetuals: TAccountMetas[2]; pool: TAccountMetas[3]; position: TAccountMetas[4]; positionRequest: TAccountMetas[5]; positionRequestAta: TAccountMetas[6]; custody: TAccountMetas[7]; custodyOracleAccount: TAccountMetas[8]; collateralCustody: TAccountMetas[9]; desiredMint: TAccountMetas[10]; referral?: TAccountMetas[11] | undefined; tokenProgram: TAccountMetas[12]; associatedTokenProgram: TAccountMetas[13]; systemProgram: TAccountMetas[14]; eventAuthority: TAccountMetas[15]; program: TAccountMetas[16]; }; data: CreateDecreasePositionRequestInstructionData; }; export declare function parseCreateDecreasePositionRequestInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedCreateDecreasePositionRequestInstruction; //# sourceMappingURL=createDecreasePositionRequest.d.ts.map