Options
All
  • Public
  • Public/Protected
  • All
Menu

rubic-sdk

Index

References

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

References

Renames and re-exports SDK

Type Aliases

BasicTransactionOptions: { gas?: string; gasPrice?: string; onTransactionHash?: any }

Type declaration

  • Optional gas?: string

    Transaction gas limit.

  • Optional gasPrice?: string

    Transaction gas price.

  • onTransactionHash?:function
    • onTransactionHash(hash: string): void
BlockchainName: typeof BLOCKCHAIN_NAME[keyof typeof BLOCKCHAIN_NAME]
BridgeType: typeof BRIDGE_TYPE[keyof typeof BRIDGE_TYPE]
ConditionalResult<T>: { notSave: boolean; value: T }

Used for Cache decorator. User notSave field to define whether to cache calculated result.

Type Parameters

  • T

Type declaration

  • notSave: boolean
  • value: T
CrossChainTradeType: keyof typeof CROSS_CHAIN_TRADE_TYPE
ErrorCall: { error: unknown; success: false }

Type declaration

  • error: unknown
  • success: false
SuccessfulCall<T>: { success: true; value: T }

Type Parameters

  • T

Type declaration

  • success: true
  • value: T
TradeType: keyof typeof TRADE_TYPE

Instant trade type.

TransactionOptions: { data?: string; gas?: BigNumber | string | number; gasPrice?: BigNumber | string | number; value?: BigNumber | string; onTransactionHash?: any }

Type declaration

  • Optional data?: string

    Encoded data, which will be executed in transaction.

  • Optional gas?: BigNumber | string | number

    Gas limit.

  • Optional gasPrice?: BigNumber | string | number
  • Optional value?: BigNumber | string

    Native token amount in wei.

  • onTransactionHash?:function
    • onTransactionHash(hash: string): void
TypedTradeProviders: Readonly<Record<BlockchainName, Partial<Record<TradeType, InstantTradeProvider>>>>

Record of instant trade types and their corresponding instant trade providers.

Variables

BLOCKCHAIN_NAME: { ARBITRUM: "ARBITRUM"; ASTAR: "ASTAR"; AURORA: "AURORA"; AVALANCHE: "AVALANCHE"; BINANCE_SMART_CHAIN: "BSC"; BITCOIN: "BITCOIN"; BOBA: "BOBA"; CELO: "CELO"; CRONOS: "CRONOS"; ETHEREUM: "ETH"; ETHEREUM_POW: "ETHW"; FANTOM: "FANTOM"; FUSE: "FUSE"; GNOSIS: "GNOSIS"; HARMONY: "HARMONY"; MOONBEAM: "MOONBEAM"; MOONRIVER: "MOONRIVER"; NEAR: "NEAR"; OKE_X_CHAIN: "OKX"; OPTIMISM: "OPTIMISM"; POLYGON: "POLYGON"; SOLANA: "SOLANA"; TELOS: "TELOS" } = ...

Type declaration

  • ARBITRUM: "ARBITRUM"
  • ASTAR: "ASTAR"
  • AURORA: "AURORA"
  • AVALANCHE: "AVALANCHE"
  • BINANCE_SMART_CHAIN: "BSC"
  • BITCOIN: "BITCOIN"
  • BOBA: "BOBA"
  • CELO: "CELO"
  • CRONOS: "CRONOS"
  • ETHEREUM: "ETH"
  • ETHEREUM_POW: "ETHW"
  • FANTOM: "FANTOM"
  • FUSE: "FUSE"
  • GNOSIS: "GNOSIS"
  • HARMONY: "HARMONY"
  • MOONBEAM: "MOONBEAM"
  • MOONRIVER: "MOONRIVER"
  • NEAR: "NEAR"
  • OKE_X_CHAIN: "OKX"
  • OPTIMISM: "OPTIMISM"
  • POLYGON: "POLYGON"
  • SOLANA: "SOLANA"
  • TELOS: "TELOS"
BRIDGE_TYPE: { ACROSS: "across"; ANY_SWAP: "anyswap"; ARBITRUM_BRIDGE: "arbitrum"; AVALANCHE_BRIDGE: "avalanche"; CELER_BRIDGE: "cbridge"; CONNEXT: "connext"; DE_BRIDGE: "debridge"; HOP: "hop"; HYPHEN: "hyphen"; MAKERS_WORMHOLE: "maker"; MULTICHAIN: "multichain"; OPEN_OCEAN: "openocean"; OPTIMISM_GATEWAY: "optimism"; OSMOSIS_BRIDGE: "osmosis"; POLYGON: "polygon"; REFUEL: "refuel"; SATELLITE: "satellite"; STARGATE: "stargate"; SYMBIOSIS: "symbiosis"; SYNAPSE: "synapse"; THORCHAIN: "thorchain"; WORMHOLE: "wormhole"; YPOOL: "ypool" } = ...

Type declaration

  • ACROSS: "across"
  • ANY_SWAP: "anyswap"
  • ARBITRUM_BRIDGE: "arbitrum"
  • AVALANCHE_BRIDGE: "avalanche"
  • CELER_BRIDGE: "cbridge"
  • CONNEXT: "connext"
  • DE_BRIDGE: "debridge"
  • HOP: "hop"
  • HYPHEN: "hyphen"
  • MAKERS_WORMHOLE: "maker"
  • MULTICHAIN: "multichain"
  • OPEN_OCEAN: "openocean"
  • OPTIMISM_GATEWAY: "optimism"
  • OSMOSIS_BRIDGE: "osmosis"
  • POLYGON: "polygon"
  • REFUEL: "refuel"
  • SATELLITE: "satellite"
  • STARGATE: "stargate"
  • SYMBIOSIS: "symbiosis"
  • SYNAPSE: "synapse"
  • THORCHAIN: "thorchain"
  • WORMHOLE: "wormhole"
  • YPOOL: "ypool"
CROSS_CHAIN_TRADE_TYPE: { CELER: "CELER"; DEBRIDGE: "DEBRIDGE"; LIFI: "LIFI"; RANGO: "RANGO"; RUBIC: "RUBIC"; SYMBIOSIS: "SYMBIOSIS"; VIA: "VIA" } = ...

Type declaration

  • CELER: "CELER"
  • DEBRIDGE: "DEBRIDGE"
  • LIFI: "LIFI"
  • RANGO: "RANGO"
  • RUBIC: "RUBIC"
  • SYMBIOSIS: "SYMBIOSIS"
  • VIA: "VIA"
TRADE_TYPE: { ACRYPTOS: "ACRYPTOS"; ALDRIN_EXCHANGE: "ALDRIN_EXCHANGE"; ALGEBRA: "ALGEBRA"; ANNEX: "ANNEX"; APE_SWAP: "APE_SWAP"; ARTH_SWAP: "ARTH_SWAP"; AURORA_SWAP: "AURORA_SWAP"; BABY_SWAP: "BABY_SWAP"; BALANCER: "BALANCER"; BEAM_SWAP: "BEAM_SWAP"; BI_SWAP: "BI_SWAP"; CREMA_FINANCE: "CREMA_FINANCE"; CRONA_SWAP: "CRONA_SWAP"; CROPPER_FINANCE: "CROPPER_FINANCE"; CROW_FI: "CROW_FI"; CRO_DEX: "CRO_DEX"; CURVE: "CURVE"; DEFI_PLAZA: "DEFI_PLAZA"; DEFI_SWAP: "DEFI_SWAP"; DFYN: "DFYN"; DODO: "DODO"; DYSTOPIA: "DYSTOPIA"; HONEY_SWAP: "HONEY_SWAP"; JET_SWAP: "JET_SWAP"; JOE: "JOE"; JUPITER: "JUPITER"; J_SWAP: "J_SWAP"; KYBER_SWAP: "KYBER_SWAP"; LUA_SWAP: "LUA_SWAP"; MAVERICK: "MAVERICK"; MDEX: "MDEX"; MESH_SWAP: "MESH_SWAP"; MM_FINANCE: "MM_FINANCE"; MOJITO_SWAP: "MOJITO_SWAP"; ONE_INCH: "ONE_INCH"; ONE_MOON: "ONE_MOON"; ONE_SOL: "ONE_SOL"; OOLONG_SWAP: "OOLONG_SWAP"; OPEN_OCEAN: "OPEN_OCEAN"; ORCA_SWAP: "ORCA_SWAP"; OSMOSIS_SWAP: "OSMOSIS_SWAP"; PANCAKE_SWAP: "PANCAKE_SWAP"; PANGOLIN: "PANGOLIN"; PARA_SWAP: "PARA_SWAP"; POLYDEX: "POLYDEX"; QUICK_SWAP: "QUICK_SWAP"; RAYDIUM: "RAYDIUM"; REF_FINANCE: "REF_FINANCE"; REN_BTC: "REN_BTC"; SABER_STABLE_SWAP: "SABER_STABLE_SWAP"; SAROS_SWAP: "SAROS_SWAP"; SERUM: "SERUM"; SHIBA_SWAP: "SHIBA_SWAP"; SMOOTHY: "SMOOTHY"; SOLAR_BEAM: "SOLAR_BEAM"; SPIRIT_SWAP: "SPIRIT_SWAP"; SPL_TOKEN_SWAP: "SPL_TOKEN_SWAP"; SPOOKY_SWAP: "SPOOKY_SWAP"; STELLA_SWAP: "STELLA_SWAP"; SUSHI_SWAP: "SUSHI_SWAP"; TRISOLARIS: "TRISOLARIS"; UBE_SWAP: "UBE_SWAP"; UNISWAP_V2: "UNISWAP_V2"; UNI_SWAP_V3: "UNI_SWAP_V3"; VIPER_SWAP: "VIPER_SWAP"; VOLTAGE_SWAP: "VOLTAGE_SWAP"; VVS_FINANCE: "VVS_FINANCE"; WANNA_SWAP: "WANNA_SWAP"; WAULT_SWAP: "WAULT_SWAP"; WOO_FI: "WOO_FI"; WRAPPED: "WRAPPED"; ZAPPY: "ZAPPY"; ZIP_SWAP: "ZIP_SWAP"; ZRX: "ZRX" } = ...

List of instant trade types.

Type declaration

  • ACRYPTOS: "ACRYPTOS"
  • ALDRIN_EXCHANGE: "ALDRIN_EXCHANGE"
  • ALGEBRA: "ALGEBRA"
  • ANNEX: "ANNEX"
  • APE_SWAP: "APE_SWAP"
  • ARTH_SWAP: "ARTH_SWAP"
  • AURORA_SWAP: "AURORA_SWAP"
  • BABY_SWAP: "BABY_SWAP"
  • BALANCER: "BALANCER"
  • BEAM_SWAP: "BEAM_SWAP"
  • BI_SWAP: "BI_SWAP"
  • CREMA_FINANCE: "CREMA_FINANCE"
  • CRONA_SWAP: "CRONA_SWAP"
  • CROPPER_FINANCE: "CROPPER_FINANCE"
  • CROW_FI: "CROW_FI"
  • CRO_DEX: "CRO_DEX"
  • CURVE: "CURVE"
  • DEFI_PLAZA: "DEFI_PLAZA"
  • DEFI_SWAP: "DEFI_SWAP"
  • DFYN: "DFYN"
  • DODO: "DODO"
  • DYSTOPIA: "DYSTOPIA"
  • HONEY_SWAP: "HONEY_SWAP"
  • JET_SWAP: "JET_SWAP"
  • JOE: "JOE"
  • JUPITER: "JUPITER"
  • J_SWAP: "J_SWAP"
  • KYBER_SWAP: "KYBER_SWAP"
  • LUA_SWAP: "LUA_SWAP"
  • MAVERICK: "MAVERICK"
  • MDEX: "MDEX"
  • MESH_SWAP: "MESH_SWAP"
  • MM_FINANCE: "MM_FINANCE"
  • MOJITO_SWAP: "MOJITO_SWAP"
  • ONE_INCH: "ONE_INCH"
  • ONE_MOON: "ONE_MOON"
  • ONE_SOL: "ONE_SOL"
  • OOLONG_SWAP: "OOLONG_SWAP"
  • OPEN_OCEAN: "OPEN_OCEAN"
  • ORCA_SWAP: "ORCA_SWAP"
  • OSMOSIS_SWAP: "OSMOSIS_SWAP"
  • PANCAKE_SWAP: "PANCAKE_SWAP"
  • PANGOLIN: "PANGOLIN"
  • PARA_SWAP: "PARA_SWAP"
  • POLYDEX: "POLYDEX"
  • QUICK_SWAP: "QUICK_SWAP"
  • RAYDIUM: "RAYDIUM"
  • REF_FINANCE: "REF_FINANCE"
  • REN_BTC: "REN_BTC"
  • SABER_STABLE_SWAP: "SABER_STABLE_SWAP"
  • SAROS_SWAP: "SAROS_SWAP"
  • SERUM: "SERUM"
  • SHIBA_SWAP: "SHIBA_SWAP"
  • SMOOTHY: "SMOOTHY"
  • SOLAR_BEAM: "SOLAR_BEAM"
  • SPIRIT_SWAP: "SPIRIT_SWAP"
  • SPL_TOKEN_SWAP: "SPL_TOKEN_SWAP"
  • SPOOKY_SWAP: "SPOOKY_SWAP"
  • STELLA_SWAP: "STELLA_SWAP"
  • SUSHI_SWAP: "SUSHI_SWAP"
  • TRISOLARIS: "TRISOLARIS"
  • UBE_SWAP: "UBE_SWAP"
  • UNISWAP_V2: "UNISWAP_V2"
  • UNI_SWAP_V3: "UNI_SWAP_V3"
  • VIPER_SWAP: "VIPER_SWAP"
  • VOLTAGE_SWAP: "VOLTAGE_SWAP"
  • VVS_FINANCE: "VVS_FINANCE"
  • WANNA_SWAP: "WANNA_SWAP"
  • WAULT_SWAP: "WAULT_SWAP"
  • WOO_FI: "WOO_FI"
  • WRAPPED: "WRAPPED"
  • ZAPPY: "ZAPPY"
  • ZIP_SWAP: "ZIP_SWAP"
  • ZRX: "ZRX"

Functions

  • Cache(cacheConfigOrTarget: CacheConfig): DecoratorSignature
  • Cache<T>(cacheConfigOrTarget: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void
  • cloneObject<T>(obj: T): T
  • compareAddresses(address0: string, address1: string): boolean
  • notNull<T>(obj: null | T): obj is T

Generated using TypeDoc