Getting started

This page will help you install kbyte. If you already have kbyte installed, you can skip ahead to the tutorial.

kbyte was designed to work both in the browser and in Node.js.

Node.js

npm install kbyte

Browser

<script src="https://cdn.rawgit.com/bonustrack/kbyte/master/dist/kbyte.min.js"></script>

Usage

var kbyte = require('kbyte');
// Init WebSocket client
var client = new kbyte.Client('wss://obyte.org/bb');
// Get peers
client.request('get_peers', null, function(err, result) {
console.log(err, result);
});