Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@burner-factory/token-exchange-pairs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burner-factory/token-exchange-pairs

Exchange pairs for the Exchange plugin (`@burner-wallet/exchange`). Allows backed tokens created by the Burner Factory to be exchanged to and from the native asset.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Token Exchange Pairs (@burner-factory/token-exchange-pairs)

Exchange pairs for the Exchange plugin (@burner-wallet/exchange). Allows backed tokens created by the Burner Factory to be exchanged to and from the native asset.

Example

import React from 'react';
import ReactDOM from 'react-dom';
import { xdai, ERC777Asset } from '@burner-wallet/assets';
import BurnerCore from '@burner-wallet/core';
import { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers';
import { XDaiGateway } from '@burner-wallet/core/gateways';
import ModernUI from '@burner-wallet/modern-ui';
import Exchange from '@burner-wallet/exchange';
import { BackedTokenPair } from '@burner-factory/token-exchange-pairs';

const token = new ERC777Asset({
  id: 'vend',
  name: 'Test Vendable',
  network: '100',
  address: '0xCcDc8B0A05edB13170706A5621Cb60cC8c4C363D',
});

const core = new BurnerCore({
  signers: [new InjectedSigner(), new LocalSigner()],
  gateways: [new XDaiGateway()],
  assets: [xdai, token],
});

const exchange = new Exchange({
  pairs: [new BackedTokenPair('vend', 'xdai')],
});

const BurnerWallet = () =>
  <ModernUI core={core} plugins={[exchange]} />

ReactDOM.render(<BurnerWallet />, document.getElementById('root'));

FAQs

Package last updated on 28 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc