@ren-project/ren
v0.0.0
Published
Official Ren JavaScript client
Downloads
7
Readme
Official Ren SDK
The official Javascript SDK for interacting with Ren.
Links
Installation
Add the RenSDK using Yarn/npm:
yarn add @renproject/ren
or
npm install --save @renproject/ren
Importing the SDK
Importing using the require syntax
var { RenSDK } = require("@renproject/ren");
Importing using the ES6 syntax
import { RenSDK } from "@renproject/ren";
Usage
const web3 = window.web3;
var sdk = new RenSDK(web3);
Dev
Building
yarn run watch
# or
yarn run build:dev
Tests
You'll need to create a .env
file which contains the following exported variables:
export MNEMONIC="some mnemonic here"
export ETHEREUM_NODE="ethereum node url (e.g. Infura)"
Then just run the following command to execute the tests. Make sure there is sufficient Kovan ETH in the linked account before running tests.
yarn run test
Update Typescript bindings
In order to update the bindings in src/contracts/bindings
, you need to clone darknode-sol
and run:
yarn run bindings:ts