Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
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.

dev
latest
npmnpm
Version
2.2.2
Version published
Maintainers
1
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