JustSaying

This is a message type, which doesn't require response back.

Example:

const network = require('ocore/network.js');
const eventBus = require('ocore/event_bus.js');
const ws = network.getInboundDeviceWebSocket(device_address);

// function parameters: websocket, subject, body
network.sendJustsaying(ws, 'custom', 'some data');

eventBus.on('custom_justsaying', function(ws, content) {
    console.log(content);
};

Following is a list of justsaying type JSON messages that are sent over the network:

Send version information

{
    type: 'justsaying',
    content: {
        subject: 'version', 
        body: {
            protocol_version: protocol_version, 
            alt: alt, 
            library: name, 
            library_version: version, 
            program: program, 
            program_version: program_version
        }
    }
}

Send free joints

Send a private transaction

Share your node WebSocket URL to accept incoming connections

Ask to verify your WebSocket URL

Verify your WebSocket URL with echo message

Log in to Hub

Get new messages

Remove handled message

Send pairing message

Send message to device

Ask more messages

Light wallet transaction update

Light wallet sequence became bad

Add light wallet to monitor address

Send bug report

Push project number (only accepted from hub)

New version is available (only accepted from hub)

Exchange rates (only accepted from hub)

Ask to update (only accepted from hub)

Watch system variables

This will subscribe you to updates of the currently active system variables and votes for them.

Immediately after this request, you'll get the current state of all system variables and their past values with the MCIs when they were voted in:

Similar data will be pushed to you whenever any system variable changes as a result of vote count.

Also, user votes will be pushed to you as soon as they are sent by users (first, with is_stable=0, then with is_stable=1 as soon as the voting transaction becomes final):

Custom JustSaying

You can add your own communication protocol on top of the Obyte one. See event there.

Last updated

Was this helpful?