CNCJS
CNCJS the JavaScript API for CNC blockchain
Documentation
Here is full documentation: https://gitlab.com/beyondbitcoin/content_network/cncjs/-/tree/master/doc
Browser
<script src="./cncjs.min.js"></script>
<script>
cncjs.api.getAccounts(['fire', 'wood'], function(err, response){
console.log(err, response);
});
</script>
Server
Install
$ npm install @whaleshares/cncjs --save
WebSockets
wss://whaleshares.io/ws By Default
wss://beta.whaleshares.net/wss
Examples
Get Accounts
cncjs.api.getAccounts(['fire', 'wood'], function(err, result) {
console.log(err, result);
});
Get State
cncjs.api.getState('/trends/funny', function(err, result) {
console.log(err, result);
});
Contributions
Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list.
Issues
When you find issues, please report them!
License
MIT