edge-currency-plugins
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Edge Currency Plugin for UTXO-Based currencies

Plugins for edge-core-js, to support various cryptocurrencies such as bitcoin, bitcoin cash, and litecoin,

Installing

First, add this library to your project:

npm i -s edge-currency-plugins

Node.js

For Node.js, you should call addEdgeCorePlugins to register these plugins with edge-core-js:

const { addEdgeCorePlugins, lockEdgeCorePlugins } = require("edge-core-js");
const plugins = require("edge-currency-plugins");

addEdgeCorePlugins(plugins);

// Once you are done adding plugins, call this:
lockEdgeCorePlugins();

You can also add plugins individually if you want to be more picky:

addEdgeCorePlugins({
  bitcoin: plugins.bitcoin,
});

Browser

The bundle located in dist/edge-currency-plugins.js will automatically register itself with edge-core-js. Just serve the entire dist directory along with your app, and then load the script:

<script src='https://example.com/app/dist/edge-currency-plugins.js'>

If you want to debug this project, run yarn start to start a Webpack server, and then adjust your script URL to http://localhost:8081/edge-currency-plugins.js.

React Native

The edge-currency-plugins package will automatically install itself using React Native autolinking. To integrate the plugins with edge-core-js, add its URI to the context component:

import { pluginUri, makePluginIo } from "edge-currency-plugins";
<MakeEdgeContext
  nativeIo={{
    "edge-currency-plugins": makePluginIo(),
  }}
  pluginUris={[pluginUri]}
  // Plus other props as required...
/>;

To debug this project, run yarn start to start a Webpack server, and then use debugUri instead of pluginUri.

/edge-currency-plugins/

    Package Sidebar

    Install

    npm i edge-currency-plugins

    Homepage

    edge.app/

    Weekly Downloads

    85

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    2.96 MB

    Total Files

    257

    Last publish

    Collaborators

    • paullinator
    • edgyjontz
    • swansontec
    • thehobbit85
    • mattdpiche
    • samholmes