target user at the end of the circuit
max number of users in the circuit
a string of user ids the message will route through
Wraps the message in layers. Each layer will be peeled back by a user in the route. Currently does not encrypt anything.
generated circuit of user ids
message to wrap in layers
A string representing a message wrapped in layers and ready to be sent
This observable is used to listen to messages sent to the current user.
An observable that emits messages
An observable used to listen to changes in the peer list. This will emit when someone joins the network, leaves the network or changes their name on the network
An observable that emits the list of peers when it changes.
An observable that can be used to determine when user data has finished loading. Attempting to access some functionality before user data has been loaded will result in some errors.
An observable that emits when the user data is loaded from storage.
Peels a single layer from the message and returns the contents. If the message is the last one and the current user is the target, then this function will return undefined and emit a new value to the messages subject.
the layered message string to peel a layer from.
the peeled message or undefined if there was an error or it's the last message.
Updates the current target user. The currently target user is the user messages will be sent to.
The user reference.
Sends a message to the currently targeted user via the ogre network. The message will be wrapped in layers and routed through different users. Each user will peel a layer and send it to the next user until it reaches the target.
message to send
Transfers a message from the current user to the target in the message.
the layered message to transfer
a promise indicating completion
Updates the user's alias. This will:
The new name. The number will stay the same.
A promise with the updated user.
Generated using TypeDoc
Creates the circuit that will determine what users the message will go through. Currently only uses users from the peer list.