/** * ABI Instruction Encoding * * Binary encoding for Percolator program instructions. * * @module abi/instructions */ import { PublicKey } from "@solana/web3.js"; /** * Instruction tags */ export declare const IX_TAG: { readonly InitMarket: 0; readonly InitUser: 1; readonly InitLP: 2; readonly DepositCollateral: 3; readonly WithdrawCollateral: 4; readonly KeeperCrank: 5; readonly TradeNoCpi: 6; readonly LiquidateAtOracle: 7; readonly CloseAccount: 8; readonly TopUpInsurance: 9; readonly TradeCpi: 10; readonly CloseSlab: 13; readonly UpdateConfig: 14; readonly WithdrawInsuranceLimited: 23; readonly PushOraclePrice: 17; readonly SetOraclePriceCap: 18; readonly ResolveMarket: 19; readonly WithdrawInsurance: 20; readonly AdminForceCloseAccount: 21; readonly ReclaimEmptyAccount: 25; readonly SettleAccount: 26; readonly DepositFeeCredits: 27; readonly ConvertReleasedPnl: 28; readonly ResolvePermissionless: 29; readonly ForceCloseResolved: 30; readonly CatchupAccrue: 31; readonly UpdateAuthority: 32; }; /** * Authority kinds for UpdateAuthority (tag 32) */ export declare const AUTHORITY_KIND: { readonly ADMIN: 0; readonly HYPERP_MARK: 1; readonly INSURANCE: 2; readonly INSURANCE_OPERATOR: 4; readonly ORACLE: 1; readonly CLOSE: 0; }; export interface InitMarketArgs { admin: PublicKey | string; collateralMint: PublicKey | string; indexFeedId: string; maxStalenessSecs: number; confFilterBps: number; invert: 0 | 1; unitScale: number; initialMarkPriceE6: bigint | string; maintenanceFeePerSlot: bigint | string; minOraclePriceCapE2bps: bigint | string; hMin: bigint | string; maintenanceMarginBps: number; initialMarginBps: number; tradingFeeBps: number; maxAccounts: number; newAccountFee: bigint | string; hMax: bigint | string; maxCrankStalenessSlots: bigint | string; liquidationFeeBps: number; liquidationFeeCap: bigint | string; resolvePriceDeviationBps: number; minLiquidationAbs: bigint | string; minNonzeroMmReq: bigint | string; minNonzeroImReq: bigint | string; insuranceWithdrawMaxBps: number; insuranceWithdrawCooldownSlots: bigint | string; permissionlessResolveStaleSlots: bigint | string; fundingHorizonSlots: bigint | string; fundingKBps: number; fundingMaxPremiumBps: number; fundingMaxE9PerSlot: bigint | string; markMinFee: bigint | string; forceCloseDelaySlots: bigint | string; } export declare function encodeInitMarket(args: InitMarketArgs): Buffer; export interface InitUserArgs { feePayment: bigint | string; } export declare function encodeInitUser(args: InitUserArgs): Buffer; export interface InitLPArgs { matcherProgram: PublicKey | string; matcherContext: PublicKey | string; feePayment: bigint | string; } export declare function encodeInitLP(args: InitLPArgs): Buffer; export interface DepositCollateralArgs { userIdx: number; amount: bigint | string; } export declare function encodeDepositCollateral(args: DepositCollateralArgs): Buffer; export interface WithdrawCollateralArgs { userIdx: number; amount: bigint | string; } export declare function encodeWithdrawCollateral(args: WithdrawCollateralArgs): Buffer; export interface KeeperCrankArgs { callerIdx: number; candidates?: number[]; } export declare function encodeKeeperCrank(args: KeeperCrankArgs): Buffer; export interface TradeNoCpiArgs { lpIdx: number; userIdx: number; size: bigint | string; } export declare function encodeTradeNoCpi(args: TradeNoCpiArgs): Buffer; export interface TradeCpiArgs { lpIdx: number; userIdx: number; size: bigint | string; limitPriceE6?: bigint | string; } export declare function encodeTradeCpi(args: TradeCpiArgs): Buffer; export interface LiquidateAtOracleArgs { targetIdx: number; } export declare function encodeLiquidateAtOracle(args: LiquidateAtOracleArgs): Buffer; export interface CloseAccountArgs { userIdx: number; } export declare function encodeCloseAccount(args: CloseAccountArgs): Buffer; export interface TopUpInsuranceArgs { amount: bigint | string; } export declare function encodeTopUpInsurance(args: TopUpInsuranceArgs): Buffer; export declare function encodeWithdrawInsurance(): Buffer; export declare function encodeWithdrawInsuranceLimited(args: { amount: bigint | string; }): Buffer; export declare function encodeCloseSlab(): Buffer; export interface UpdateConfigArgs { fundingHorizonSlots: bigint | string; fundingKBps: bigint | string; fundingMaxPremiumBps: bigint | string; fundingMaxE9PerSlot: bigint | string; tvlInsuranceCapMult: number; } export declare function encodeUpdateConfig(args: UpdateConfigArgs): Buffer; export interface PushOraclePriceArgs { priceE6: bigint | string; timestamp: bigint | string; } export declare function encodePushOraclePrice(args: PushOraclePriceArgs): Buffer; export declare function encodeResolveMarket(): Buffer; export interface UpdateAuthorityArgs { kind: number; newPubkey: PublicKey | string; } export declare function encodeUpdateAuthority(args: UpdateAuthorityArgs): Buffer; export declare function encodeSetOracleAuthority(args: { newAuthority: PublicKey | string; }): Buffer; export declare function encodeUpdateAdmin(args: { newAdmin: PublicKey | string; }): Buffer; //# sourceMappingURL=instructions.d.ts.map