const { signMessage } = require('obyte/lib/utils');
const privateKey = window.atob('base64 of private key'); // convert to binary
const address_wif = 'wif string';
//const address_key = { privateKey, testnet: false }; // optional way
//const address_key = { wif: address_wif, testnet: false }; // optional way
const address_key = wallet_wif;
const message = 'Hello world';
const objSignedMessage = signMessage(message, address_key);
const signedMessageBase64 = window.btoa(JSON.stringify(objSignedMessage));
console.log(objSignedMessage, signedMessageBase64);