https://github.com/celer-network/celer-web-sdk
JavaScript library to interact with a local Celer node
https://github.com/celer-network/celer-web-sdk
Last synced: 19 days ago
JSON representation
JavaScript library to interact with a local Celer node
- Host: GitHub
- URL: https://github.com/celer-network/celer-web-sdk
- Owner: celer-network
- License: mit
- Created: 2019-02-09T04:01:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T20:42:44.000Z (over 6 years ago)
- Last Synced: 2025-08-12T12:23:45.201Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 336 KB
- Stars: 25
- Watchers: 21
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Celer Web SDK
[](https://travis-ci.com/celer-network/Celer-Web-SDK)
JavaScript library to interact with a celer node
## Celer API interaction

## Building
```
npm install
npm run build
```
The built library will be at `browser/browser.js` for browsers and
`dist/index.js` for NodeJS.
## Usage
Check out a prebuilt [Celer Client](https://github.com/celer-network/celer-client) binary.
Run it with
```
./celer_client_mac -keystore -config
```
The easiest way to get `keystore` file is to take it from `geth`. You can find details [here](https://medium.com/@julien.maffre/what-is-an-ethereum-keystore-file-86c8c5917b97)
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:
```javascript
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`)*
## SDK API doc
Auto-generated SDK API docs are available [on GitHub pages](https://celer-network.github.io/Celer-Web-SDK/index.html).
You can find methods of `Client` object [here](https://celer-network.github.io/Celer-Web-SDK/classes/_client_.client.html)