UNPKG

@yoroi/types

Version:
37 lines (35 loc) 1.09 kB
/** * Flowtype definitions for manager * Generated by Flowgen from a Typescript Definition * Flowgen v1.21.0 */ import { ChainSupportedNetworks } from "../chain/network"; import { PortfolioTokenInfo } from "../portfolio/info"; import { SwapAggregator } from "./aggregator"; import { SwapApi } from "./api"; import { SwapStorage } from "./storage"; export type SwapManagerSettings = { slippage: number, routingPreference: "auto" | Array<SwapAggregator>, ... }; export type SwapManager = $ReadOnly<{ clearStorage: $PropertyType<SwapStorage, "clear">, assignSettings(v: $Rest<SwapManagerSettings, { ... }>): SwapManagerSettings, settings: SwapManagerSettings, api: SwapApi, ... }>; export type SwapManagerMaker = ( args: $ReadOnly<{ address: string, addressHex: string, stakingKey: string, primaryTokenInfo: PortfolioTokenInfo, isPrimaryToken(token: string | null | void): boolean, network: ChainSupportedNetworks, storage: SwapStorage, partners?: $Rest<{ [key: SwapAggregator]: string, ... }, { ... }>, ... }> ) => SwapManager;