👉TIF Protocol | SDK

Types

TIF JS SDK defines the following types:

Type
Use

ChainId

The type lists identifiers of supported blockchains.

ChainConfig

The type defines the network configuration to build cross-chain routes.

OmniPoolConfig

The type defines a liquidity pool consisting of a stablecoins and an sTokens.

AdvisorConfig and Config

The types define details of Microservice Advisor.

TokenConstructor

The type defines a set of parameters used to create an instance of Token class.

PendingRequestState and PendingRequest

The types are used for reverting stuck cross-chain operations.

ChainId type

ChainId type lists named constants with the integer identifiers of supported blockchains.

export enum ChainId {
    ETH_MAINNET = 1,
    ETH_RINKEBY = 4,
    ETH_GOERLI = 5,
    ETH_KOVAN = 42,
    BSC_MAINNET = 56,
    BSC_TESTNET = 97,
    MATIC_MAINNET = 137,
    MATIC_MUMBAI = 80001,
    AVAX_MAINNET = 43114,
    AVAX_TESTNET = 43113,
    HECO_MAINNET = 128,
    HECO_TESTNET = 256,
    OKEX_MAINNET = 66,
    OKEX_TESTNET = 65,
    BOBA_MAINNET = 288,
    BOBA_BNB = 56288,
    BOBA_AVALANCHE = 43288,
    BOBA_RINKEBY = 28,
    MILKOMEDA_MAINNET = 2001,
    MILKOMEDA_DEVNET = 200101,
    BTC_MAINNET = 5555,
    BTC_TESTNET = 55555,
    AURORA_MAINNET = 1313161554,
    AURORA_TESTNET = 1313161555,
    TELOS_MAINNET = 40,
    TELOS_TESTNET = 41,

ChainConfig type

ChainConfig type defines the network configuration used to build cross-chain routes.

export type ChainConfig = {
    id: ChainId
    rpc: string
    dexFee: number
    filterBlockOffset: number
    stables: TokenConstructor[]
    metaRouter: string
    metaRouterGateway: string
    multicallRouter: string
    router: string
    bridge: string
    synthesis: string
    portal: string
    fabric: string
    waitForBlocksCount: number
}

Last updated