-
Notifications
You must be signed in to change notification settings - Fork 0
Home
darius1702 edited this page Apr 12, 2021
·
3 revisions
Register a new messenger on a running node
POST to /registerMessenger
{
// ...
"address":"[MessengerKey]", // the messenger's public key
// ...
}
Register a new neigbour for a node
POST to /registerNeighbour
(Only required for initial registration)
{
// ...
"address":"[NeighbourAddress]", // [ip:port] of the node to register as a neighbour
// ...
}
Send a message to a recipient on the same node
POST to /sendMessage
{
// ...
"content":"[content]", // the message in string form
"sender":"[SenderKey]", // the sender's public key
"receiver":"[ReceiverKey]", // the receiver's public key
"signing":"[signing]", // content signed with sender's private key
// ...
}
If the current node gets sent a message destined for a receiver not registered on this node, pass it on to neighbouring nodes
POST to /receiveMessage
{
// ...
"content":"[content]", // the message in string form
"sender":"[SenderKey]", // the sender's public key
"receiver":"[ReceiverKey]", // the receiver's public key
"signing":"[signing]", // content signed with sender's private key
// ...
}
TODO
/getMessageQueue
/getNeighbours