/** * 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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit"; import { PERPETUALS_PROGRAM_ADDRESS } from "../programs"; export declare const INIT_DISCRIMINATOR: Uint8Array; export declare function getInitDiscriminatorBytes(): ReadonlyUint8Array; export type InitInstruction = string, TAccountAdmin extends string | AccountMeta = string, TAccountTransferAuthority extends string | AccountMeta = string, TAccountPerpetuals extends string | AccountMeta = string, TAccountPerpetualsProgram extends string | AccountMeta = string, TAccountPerpetualsProgramData extends string | AccountMeta = string, TAccountSystemProgram extends string | AccountMeta = "11111111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountUpgradeAuthority extends string ? WritableSignerAccount & AccountSignerMeta : TAccountUpgradeAuthority, TAccountAdmin extends string ? ReadonlyAccount : TAccountAdmin, TAccountTransferAuthority extends string ? WritableAccount : TAccountTransferAuthority, TAccountPerpetuals extends string ? WritableAccount : TAccountPerpetuals, TAccountPerpetualsProgram extends string ? ReadonlyAccount : TAccountPerpetualsProgram, TAccountPerpetualsProgramData extends string ? ReadonlyAccount : TAccountPerpetualsProgramData, TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountTokenProgram extends string ? ReadonlyAccount : TAccountTokenProgram, ...TRemainingAccounts ]>; export type InitInstructionData = { discriminator: ReadonlyUint8Array; allowSwap: boolean; allowAddLiquidity: boolean; allowRemoveLiquidity: boolean; allowIncreasePosition: boolean; allowDecreasePosition: boolean; allowCollateralWithdrawal: boolean; allowLiquidatePosition: boolean; }; export type InitInstructionDataArgs = { allowSwap: boolean; allowAddLiquidity: boolean; allowRemoveLiquidity: boolean; allowIncreasePosition: boolean; allowDecreasePosition: boolean; allowCollateralWithdrawal: boolean; allowLiquidatePosition: boolean; }; export declare function getInitInstructionDataEncoder(): FixedSizeEncoder; export declare function getInitInstructionDataDecoder(): FixedSizeDecoder; export declare function getInitInstructionDataCodec(): FixedSizeCodec; export type InitInput = { upgradeAuthority: TransactionSigner; admin: Address; transferAuthority: Address; perpetuals: Address; perpetualsProgram: Address; perpetualsProgramData: Address; systemProgram?: Address; tokenProgram?: Address; allowSwap: InitInstructionDataArgs["allowSwap"]; allowAddLiquidity: InitInstructionDataArgs["allowAddLiquidity"]; allowRemoveLiquidity: InitInstructionDataArgs["allowRemoveLiquidity"]; allowIncreasePosition: InitInstructionDataArgs["allowIncreasePosition"]; allowDecreasePosition: InitInstructionDataArgs["allowDecreasePosition"]; allowCollateralWithdrawal: InitInstructionDataArgs["allowCollateralWithdrawal"]; allowLiquidatePosition: InitInstructionDataArgs["allowLiquidatePosition"]; }; export declare function getInitInstruction(input: InitInput, config?: { programAddress?: TProgramAddress; }): InitInstruction; export type ParsedInitInstruction = { programAddress: Address; accounts: { upgradeAuthority: TAccountMetas[0]; admin: TAccountMetas[1]; transferAuthority: TAccountMetas[2]; perpetuals: TAccountMetas[3]; perpetualsProgram: TAccountMetas[4]; perpetualsProgramData: TAccountMetas[5]; systemProgram: TAccountMetas[6]; tokenProgram: TAccountMetas[7]; }; data: InitInstructionData; }; export declare function parseInitInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedInitInstruction; //# sourceMappingURL=init.d.ts.map