-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update plugin npm parameters and README
- Loading branch information
Showing
3 changed files
with
61 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 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 | ||
|
||
```javascript | ||
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](https://user-images.githubusercontent.com/4614574/80991095-e40d0900-8e0d-11ea-9915-1b4e4a052694.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters