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

bancor-conversion-widget

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bancor-conversion-widget

An open sourced widget that uses Bancor's smart contracts to allow a user to convert tokens or ethereum.

  • 2.2.2
  • dev
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Bancor Conversion Widget

An open sourced widget that uses Bancor's smart contracts to allow a user to convert tokens or ethereum.

Features

  • 🚴 Fast
  • 🔧 Customizable
  • 🙂 Simple usage

Installing and usage:

npm install bancor-conversion-widget --save
in vanilla
<script src="https://unpkg.com/bancor-conversion-widget@latest"></script>

<body onload="render()">
  <script>
    const render = () => {
      // render it
      new BancorConversionWidget({
        target: document.body,
        props: {},
      });
    };
  </script>
</body>
in react
npm install react-svelte --save
import SvelteComponent from "react-svelte";
import BancorConversionWidget from "bancor-conversion-widget";

// render it
<SvelteComponent this={BancorConversionWidget} />;
in svelte
<script>
  import BancorConversionWidget from "bancor-conversion-widget";
</script>

<!-- render it -->
<BancorConversionWidget />

Read a more in-depth integration guide here

Available properties:

NameDescriptionTypeDefault
tokenSendinitial "send" tokenstring"ETH"
tokenReceiveinitial "receive" tokenstring"BNT"
colorscustom colorsobjectsrc
showRelayTokensshow or hide relay tokensbooleanfalse
addressescustom registry addressesobjectsrc
affiliate.accountaffiliate ethereum addressstringundefined
affiliate.feeaffiliate fee percentage (max 3%)numberundefined
onChangeevent triggered on token changefunctionundefined

Live examples:

FAQs

Package last updated on 03 May 2020

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