.. | ||
src | ||
test | ||
package.json | ||
README.md | ||
tsconfig.json | ||
tsconfig.testing.json |
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
It also provides some generic resources that can be used and extended:
- ERC677Asset - A representation of an Erc677 token
- NativeMediatorAsset - Represents a native token that interacts with a Mediator extension.
- Mediator Pair - Represents an Exchange Pair that interacts with mediators extensions.
- TokenBridgeGateway - A gateway to operate with ETC, POA Sokol and POA Core networks.
Install package
yarn add @poanet/tokenbridge-bw-exchange
Usage
import { Etc, Wetc, EtcGateway, WETCBridge } from '@poanet/tokenbridge-bw-exchange'
const core = new BurnerCore({
...
gateways: [new EtcGateway(), new InfuraGateway(process.env.REACT_APP_INFURA_KEY)],
assets: [Etc, Wetc]
})
const exchange = new Exchange({
pairs: [new WETCBridge()]
})
This is how the exchange plugin will look like: