UNPKG

@admin-jigsaw/jigsaw-sdk

Version:

Returns predefined data for Jigsaw platform and exposes functionality to retrieve the necessary data

36 lines (35 loc) 1.54 kB
import { Address } from "viem"; import { StrategyInfo } from "../types/types"; export declare class JigsawClient { private client; constructor(rpcUrl: string, chainId: number); /** * Fetches user strategies based on holding address and optional asset symbol. * @param holdingAddress The address of the user's holding contract. * @param assetSymbol Optional filter for asset symbol. * @returns A list of strategies. */ getUserStrategies(holdingAddress: Address, assetSymbol?: string): Promise<Address[]>; /** * Fetches liquidation call data for user strategies, optionally filtered by asset symbol. * @param holdingAddress User's holding contract address. * @param assetSymbol Optional filter for asset symbol. * @param pendleSlippage Optional slippage parameter for Pendle strategies. * @returns Object with arrays of strategy addresses and corresponding call data strings. */ getUserLiquidationInfo(holdingAddress: Address, assetSymbol?: string, pendleSlippage?: number): Promise<{ strategies: Address[]; strategiesData: string[]; }>; /** * Fetches the current gas fee in Ether. * @returns The gas price as a formatted string. */ getCurrentGasFee(): Promise<string>; /** * Retrieves information about a specific strategy. * @param strategyAddress Strategy contract address. * @returns StrategyInfo object or null. */ getStrategyInfo(strategyAddress: Address): Promise<StrategyInfo | null>; }