Events list

Event bus provides a way to subscribe to events from any of the services running.

const eventBus = require('ocore/event_bus.js');

Wallet is ready (only headless wallet)

Headless wallet is needed for bots that hold private keys and can send transactions. This event is emitted when passphrase has been entered by bot admin and single wallet is loaded. Before that event, bot outputs device address, device pubkey and pairing key.

eventBus.on('headless_wallet_ready', () => {

});

Start database update

This event is emitted when bot executes series database queries to upgrade the database to new version.

eventBus.on('started_db_upgrade', () => {

});

End of database update

This event is emitted when bot finishes database upgrade.

eventBus.on('finished_db_upgrade', () => {

});

Connection to the hub via ws is established

Connection to the hub is established and an error is possible

The url parameter is protocol + domain + path (for example: wss://obyte.org/bb).

Connected to ws

Not a fatal error

Unit validation status

New joint

Main chain index has become stable

New unstable transactions

Stable transactions

Bad transactions

First history received

Changes with addresses leading to possible new transactions

New unstable unit

New private payment

Stable unit

Syncing is idle

Catching up done

Catching up started

Catchup next hash tree

New direct private chains

Unhandled private payments left

Version of the connected user

New wallet version available

This event is emitted when Hub sends message about new wallet version.

Received the project number for notifications on the phone

Client logged in

Message from the hub

Message for light client

Exchange rates are updated

This event is emitted when wallet updated rates that they got from Hub.

Message received by hub

Notifications are enabled

Notifications are disabled

Create new wallet

Wallet created and signed

Wallet was rejected by the other side

Wallet has been confirmed by the other party

Created new address

Created new address

Unit saved

Attempt to pair us with another correspondent

This event is emitted when there is a pairing attempt, this enables bot to decide with the code if the pairing code is valid or not. If you would like to accept any pairing code then there is easier solution.

Pairing was successful

This event is emitted on successful pairing (also when user removed and re-added the bot).

Pairing was successful using pairing secret

The paired device has been removed

History update started

History update finished

A new message string type message has been received

This event is emitted when text message is received by bot.

A new message object type message has been received

This event is emitted when object message is received by bot.

Change in permission to store message history

Created a new shared address

Signing request

Signed event

Refuse to sign

Confirmed on another device

All private payments are processed

All private payments are processed in a unit

Event for custom Request

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

Event for custom JustSaying

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

Database is read and ready to work (only Cordova)

Error sending message via ws

Last updated

Was this helpful?