Nascent Personality Manifestation

    @poanet/tokenbridge-bw-exchange
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    TokenBridge Burner Wallet 2 Plugin

    This plugin defines a Bridge trading pair to be used in the Exchange Plugin.

    Bridge trading pairs and assets supported:

    • ETC - WETC Bridge
    • MOON - xMOON Bridge
    • DAI - qDAI Bridge (For qDAI Bridge, it's necessary to use a custom DAI token from this repo instead of the DAI asset provided by burner-wallet)

    It also provides some generic resources that can be used and extended:

    • ERC677Asset - A representation of an Erc677 token.
    • BridgeableERC20Asset - A representation of Erc20 token with a possibility of bridging it via a call to relayTokens.
    • NativeMediatorAsset - Represents a native token that interacts with a Mediator extension.
    • Mediator Pair - Represents an Exchange Pair that interacts with mediators extensions.
    • MediatorErcToNative Pair - Represents a modified Mediator Pair that interacts with a tokenbridge erc-to-native mediators contracts.
    • TokenBridgeGateway - A gateway to operate with ETC, POA Sokol, POA Core and qDAI networks.

    Install package

    yarn add @poanet/tokenbridge-bw-exchange
    

    Usage

    import {
      Etc,
      Wetc,
      Dai,
      qDai,
      MOON,
      xMOON,
      TokenBridgeGateway,
      WETCBridge,
      QDAIBridge,
      MOONBridge
    } from '@poanet/tokenbridge-bw-exchange'
    
    const core = new BurnerCore({
      ...
      gateways: [new TokenBridgeGateway(), new InfuraGateway(process.env.REACT_APP_INFURA_KEY)],
      assets: [Wetc, Etc, Dai, qDai, MOON, xMOON]
    })
    
    const exchange = new Exchange({
      pairs: [new WETCBridge(), new QDAIBridge(), new MOONBridge()]
    })

    This is how the exchange plugin will look like:

    exchange-wetc

    Install

    npm i @poanet/tokenbridge-bw-exchange

    DownloadsWeekly Downloads

    5

    Version

    1.1.0

    License

    GPL-3.0

    Unpacked Size

    83.2 kB

    Total Files

    95

    Last publish

    Collaborators

    • akolotov
    • barrakuda
    • igorpoa
    • k1rill-fedoseev
    • patitonar