Quick Start
Obyte is cryptocurrency platform, which is written with NodeJS. This site is for developers and should help developers to get started using Obyte platform in their projects.
"dependencies": {
"headless-obyte": "git+https://github.com/byteball/headless-obyte.git",
"ocore": "git+https://github.com/byteball/ocore.git"
}exports.bLight = true;
exports.hub = process.env.testnet ? 'obyte.org/bb-test' : 'obyte.org/bb';testnet=1Sending / receiving txs:
var headlessWallet = require('headless-obyte');
var eventBus = require('ocore/event_bus.js');
function onReady() {
let amount = 1; //in bytes
let user_address = "62SU7724ME5MWB7VEP64VURYZHDRSDWN"; // account address
let user_device_address = null; // device address
headlessWallet.issueChangeAddressAndSendPayment(
null /*asset, null for bytes*/,
amount,
user_address,
user_device_address,
(err, unit) => {
if (err){
return console.error(err);
}
// handle successful payment
});
// received new payment
eventBus.on('new_my_transactions', (arrUnits) => {
// handle new unconfirmed units here
// at this stage, payment is not yet confirmed
});
// payment is confirmed
eventBus.on('my_transactions_became_stable', (arrUnits) => {
// handle payments becoming confirmed
});
};
eventBus.once('headless_wallet_ready', onReady);Simple chat bot
Receiving chat messages
Sending chat messages
Predefined chat commands
Command suggestion
Next step
Last updated
Was this helpful?

