Global

Methods

(async) registerAccount(optionsopt)

Source:
Create a new identity key and create or replace the signal account. Note that any existing devices asssociated with your account will be purged as a result of this action. This should only be used for new accounts or when you need to start over.
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Description
name string <optional>
The public name to store in the signal server.
atlasClient AtlasClient <optional>

(async) registerDevice(optionsopt) → {RegisterDeviceResult}

Source:
Register an additional device with an existing signal account.
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
name string <optional>
The public name to store in the signal server.
atlasClient AtlasClient <optional>
autoProvision boolean <optional>
true Attempt to use Forsta auto-provisioning. Requires existing online devices.
onProvisionReady function <optional>
Callback executed when a peer has an provisioning response. Can be called more than once.
Returns:
Type
RegisterDeviceResult

Type Definitions

Action

Source:
Properties:
Name Type Attributes Description
title string Text to be displayed in the recipients client.
action string The identifier included in responses.
color string <optional>
Type:
  • Object

ActionOptions

Source:
Since:
  • 5.2.1
Properties:
Name Type Default Description
allowMultiple boolean false Enable to prevent the action buttons from disabling after use.
Type:
  • Object

AuthenticationRequestChallenge

Source:
Properties:
Name Type Description
type string The authentication type. E.g. "password", "totp", etc..
authenticate function Handler function to be called with challenge response.
Response from an authentication request indicating the type of auth challenge required to complete.
Type:
  • Object

EncodedUserAddress

Source:
String encoding of a fully qualified user address. The value should be of the form UUID[.DEVICE_ID], where the UUID is the hex formatted UUID for a given user and the DEVICE_ID is the integer number representing the device of that user.
Type:
  • string
Example
be1cfd18-d7e9-4689-8870-e9d2773e364d.1000

KeyPair

Source:
Properties:
Name Type Description
pubKey Buffer
privKey Buffer
Type:
  • Object

RegisterDeviceResult

Source:
Properties:
Name Type Description
done Promise Resolves when the registration process has completed.
waiting boolean True while no auto-provisioning response has been received.
cancel function Cancel the provision process (async).
Returned by registerDevice.
Type:
  • Object

ResolvedTagExpression

Source:
Properties:
Name Type Description
userids Array.<string> Array of UUIDs belonging to this tag expression.
universal string The universal (stable) representation of this tag expression This value should be used when managing Thread.expression values.
pretty string A human readable version of the tag expression. Still valid syntax but should only be used for viewing.
warnings Array Any warnings associated with the input expression.
includedTagids Array.<string> A list of tag UUIDs which are positively mentioned and as such have affected the final membership.
excludedTagids Array.<string> A list of tag UUIDs which are negatively mentioned and as such are NOT in the final membership.
A resolved tag expression is the computed set of data for a given TagExpression. It represents a snapshot of the current state of membership for a tag expression. The values can be cached for short periods but should avoid being stored permanently as membership changes can occur behind the scenes.
Type:
  • Object

SendOptions

Source:
Properties:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
to TagExpression Required unless distribution or {@addrs} are set.
distribution ResolvedTagExpression This argument is required if to and {@ addrs} are omitted.
addrs Array.<string> This argument is required if to and {@distribution} are omitted.
text string Text to send as message body.
html string <optional>
HTML to send as message body.
data Object <optional>
Misc data properties. (ADVANCED)
threadId string <optional>
uuid4() UUID of this thread
threadType string <optional>
conversation
messageType string <optional>
content E.g. content, control, etc..
messageId string <optional>
uuid4()
messageRef string <optional>
UUID of message this message will be referencing (reply-to).
expiration string <optional>
Offset for when message should expire.
attachments Array.<Attachment> <optional>
flags number <optional>
Low level flags. (ADVANCED)
userAgent string <optional>
librelay
noSync boolean <optional>
false When true a sync message will not be sent to your other devices. (ADVANCED)
actionOptions ActionOptions <optional>
actions Array.<Action> <optional>
Type:
  • Object

Tag

Source:
A tag is of the form, "@label:org". They can be used for describing users or groups.
Type:
  • string

TagExpression

Source:
Tag expression are informal arrangement of Tags using set operators like "-" (minus) "+" (plus). Paranthesis can be used to create logical groups too. For example "@joe + @brunchgroup" would respresent all users in the @brunchgroup as well as @joe (assuming he was not already in @brunchgroup). You can exclude specific users with "-", ie. "@brunchgroup - @cindy" or even, "@brunchgroup - (@joe + @cindy)".
Type:
  • string