example.js
var candy = new Candy(nodes).start(); 
 
candy.onready = function () { 
    candy.broadcastMessage(data, 'WriteCandyData', candy.recieverAddress, candy.recieverAddress); 
}; 
 
candy.onmessage = function (message) { 
    formatBlockInfo(message); 
};