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
  • chains: Computed<BridgeChain[]>
  • isInitialized: Ref<boolean>
  • provider: Ref<IProvider>
  • approve:function
    • Proxy function of Bridger.approve

      Parameters

      • token: Token
      • operator: string

      Returns Promise<void | TransactionResponse>

  • approveIfNeeded:function
    • Proxy function of Bridger.approveIfNeeded

      Parameters

      • token: Token
      • operator: string
      • Optional amount: Amount

      Returns Promise<void | TransactionResponse>

  • execute:function
    • Parameters

      Returns Promise<TransactionResponse>

      Transaction Response

      Description

      Submits a transaction to the swap contract to swap, wrap, unwrap, bridge tokens

  • getChainById:function
  • getDestinationTx:function
    • Proxy function of Bridger.getDestinationTx

      Parameters

      Returns Promise<DestinationTransaction>

  • getSupportedChains:function
  • init:function
  • isApproveRequired:function
    • Proxy function of Bridger.isApproveRequired

      Parameters

      • token: Token
      • operator: string
      • Optional amount: Amount

      Returns Promise<boolean>

Generated using TypeDoc