Swapper: Raw<{ chainType: ChainTypes; chains: Computed<BridgeChain[]>; isInitialized: Ref<boolean>; provider: Ref<IProvider>; approve(token,
operator) => Promise<void | TransactionResponse>; approveIfNeeded(token,
operator,
amount?) => Promise<void | TransactionResponse>; execute(args,
multiplePaymentOpts?) => Promise<TransactionResponse>; getChainById(id) => void | BridgeChain; getDestinationTx(sourceChain,
sourceTxHash) => Promise<DestinationTransaction>; getSupportedChains() => Promise<BridgeChain[]>; init() => Promise<void>; isApproveRequired(token,
operator,
amount?) => Promise<boolean>; }>
Type declaration
-
chainType: ChainTypes
-
-
isInitialized: Ref<boolean>
-
provider: Ref<IProvider>
-
approve:function
- approve(token, operator): Promise<void | TransactionResponse>
-
Parameters
-
token: Token
-
operator: string
Returns Promise<void | TransactionResponse>
-
approveIfNeeded:function
- approveIfNeeded(token, operator, amount?): Promise<void | TransactionResponse>
-
Parameters
-
token: Token
-
operator: string
-
Optional
amount: Amount
Returns Promise<void | TransactionResponse>
-
execute:function
- execute(args, multiplePaymentOpts?): Promise<TransactionResponse>
-
Returns Promise<TransactionResponse>
Transaction Response
-
getChainById:function
-
getDestinationTx:function
- getDestinationTx(sourceChain, sourceTxHash): Promise<DestinationTransaction>
-
Returns Promise<DestinationTransaction>
-
getSupportedChains:function
-
init:function
- init(): Promise<void>
-
Returns Promise<void>
-
isApproveRequired:function
- isApproveRequired(token, operator, amount?): Promise<boolean>
-
Parameters
-
token: Token
-
operator: string
-
Optional
amount: Amount
Returns Promise<boolean>
Proxy function of Bridger.approve