Page: [root]/code/messenger | faq | css
  1. The Messenger
    1. High level
    2. Technical
      1. Correspondent and devices
      2. RPC
      3. Messages
    3. RPC details
      1. Useful types
      2. Sharing a device
      3. New message notification
      4. Requesting a message

The Messenger

High level

The messenger provides ability to message other users one-on-one, providing guarantees of confidentiality, authenticity, order and delivery of messages. Messenger will provide exhaustive information on what is going on in the network and ability to recover from partial leaking of user identity. Messenger will automatically syncronize message history over multiple devices with shared identity and provide seamless messaging experience.

Technical

Correspondent and devices

Correspondent, an identity with which one can talk, is assigned a handle by user, and has a number of devices, individual nodes identified by their I2P address.

RPC

Network participants communicate by RPC serialized by MessagePack over reliable serial channel provided by I2P.

Messages

Both correspondents can add messages to shared history. Messages are numbered incrementally. First message is empty and its ID is 0. If this message is referenced, client must detect this and do not request the message. Messages cannot be empty otherwise. Messages must contain valid UTF-8.

RPC details

Useful types

MessageID { id: u64 } // message ID, increments by 1 with every new message. Can overflow.

Sharing a device

A device can introduce other device to its correspondent, attempting to establish the new device as a part of the present device identity.

// Message
Introduce {
	address: I2PAddr,
}
// Response
()

New message notification

A device can notify a correspondent that a new message is waiting for them. This can be called on any number of correspondent's devices.

// Message
NewMessage {
	message_number: MessageID,
	hash: blake3::hash, // Hash of the Message struct
}
// Response
()

Requesting a message

A device may request a previously sent message, either for sync or receiving a new one. This can be called both on correspondent and own devices.

GetMessage {
	hash: blake3::hash,
}
// Response
Message {
	number: MessageID,
	text: String,
}

Other files here:


Powered by bitcheese wiki engine