JavaScript library to interact with a celer node
npm install
npm run build
The built library will be at browser/browser.js
for browsers and
dist/index.js
for NodeJS.
Check out a prebuilt Celer Client binary.
Run it with
./celer_client_mac -keystore <path-to-keystore-json> -config <path-to-profile-json>
The easiest way to get keystore
file is to take it from geth
. You can find details here
The web API server will be started at http://localhost:29979
.
For the browser target, the built SDK library exports a global celer
namespace. All APIs are exposed on a Celer client object created by
new celer.Client(endpoint)
.
Alternatively, you can import the library as a CommonJS module like:
const celer = require('celer-web-sdk');
A demo can be run with
npm run demo
and going to http://localhost:1234
in the browser.
NOTE: You should have enough test ether to open channel, in demo/demo.js
it's equal to 100 Wei. Ensure that you have it on account defined keystore
on corresponding network default is Ropsten
(defined in profile.json
)
Auto-generated SDK API docs are available on GitHub pages.
You can find methods of Client
object here