Need private packages and team management tools?Check out npm Teams »

@poanet/tokenbridge-bw-exchange

1.0.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

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:

exchange-wetc

Install

npm i @poanet/tokenbridge-bw-exchange

DownloadsWeekly Downloads

4

Version

1.0.0

License

GPL-3.0

Unpacked Size

62.5 kB

Total Files

68

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar