Create a new backchannel client. Each instance represents a user opening the backchannel app on their device. There is one Mailbox per contact which is identified by the contact's discoveryKey.
The name of the db for indexeddb
User-defined settings
Returns a list of contacts.
An array of contacts
Open a websocket connection to the local-first relay service. This performs the SPAKE2 protocol using spake2-wasm
The password
The timeout before giving up, defaults to 1 minute
A hex represnetation of the resulting key, which is a 32 byte strong shared secret.
Create a new contact in the database
The key add to the database
id - The local id number for this contact
Start connecting to all known contacts. Danger: opens a websocket connection for each contact which could be an expensive operation.
Start connecting to the contact.
The contact to connect to
Start connecting to the contact.
The contact id
Delete a contact in the database
The local id number for this contact
Destroy this instance and delete the data. Disconnects from all websocket clients. Danger! Unrecoverable!
This updates the avatar for a given contact.
The contact id to edit
The new name for this contact
The new contact information
This updates the name for a given contact and saves the contact in the database.
The contact id to edit
The new name for this contact
The new contact information
Get messages with another contact.
The ID of the contact
Did the file message fail to send?
true if there are pending files, false if no pending files
Send a file to a contact
Send a message to a contact. Assumes that you've already
connected with the contact from listening to the contact.connected
event
Sends a tombstone message, which instructs other devices to unlink itself and self-destruct.
The device id
Update the settings.
New settings
Generated using TypeDoc
The backchannel class is a client that manages it's own database and relay connections between other backchannel clients.