UNPKG

@firefly-exchange/library-sui

Version:

Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui

25 lines (24 loc) 1.09 kB
import { IPosition } from "../spot"; import { ID } from "../types"; import { Reserves } from "./types"; /** * Tries to find the provided position in the vector of positions and return it * @param positions Array containing positions * @param id The id of the position to be searched * @returns Position or undefined */ export declare function filterPositionByID(positions: Array<IPosition>, id: ID): IPosition | undefined; /** * Returns the positions matching the pool id provided * @param positions Array containing positions * @param id The id of the position to be searched * @returns Array of positions containing positions of provided pool */ export declare function filterPositionByPool(positions: Array<IPosition>, pool: ID): Array<IPosition>; /** * Filters provided list of reserves to find the coin reserves asked for * @param reserves Array of coin reserves * @param coinType The coin type of reserves to look for * @returns Reserves of provided coin */ export declare function filterReserves(reserves: Array<Reserves>, coinType: string): Reserves | undefined;