import { List } from 'immutable' ; import { Observable , Subject } from 'rxjs' ; import { BLOCKCHAIN_NAME } from '@shared/models/blockchain/blockchain-name' ; import { TransactionReceipt } from 'web3-eth' ; import { BridgeTokenPair } from '@features/bridge/models/bridge-token-pair' ; import { BridgeTrade } from '@features/bridge/models/bridge-trade' ; import { BRIDGE_PROVIDER } from '@shared/models/bridge/bridge-provider' ; import BigNumber from 'bignumber.js' ; export abstract class BlockchainsBridgeProvider { protected _tokenPairs$ = new Subject < List < BridgeTokenPair > > ( ) ; /**
     * list of tokens that can be used in a bridge
     */ public get tokenPairs$ ( ) : Observable < List < BridgeTokenPair > > { return this . _tokenPairs$ . asObservable ( ) ; } /**
     * get type of provider
     */ public abstract getProviderType ? ( token ? ) ; param tokenPair param toBlockchain param amount return public abstract getFee ( tokenPair , toBlockchain , amount ? ) ; param bridgeTrade return public abstract createTrade ( bridgeTrade ) ; param bridgeTrade return public abstract needApprove ( bridgeTrade ) ; param bridgeTrade return public abstract approve ( bridgeTrade ) ; }