pull down to refresh

The docs are very sparse right now, I'm working on improving the docs.

The high level summary of the protocol is:

When you open a connection to another node:

  • send "msg_subscribe" containing the list of addresses that you are following (plus block range that you are interested in)

When a node saves a new squeak:

  • forward a "msg_inv" containing that squeak hash to all connected peers that have indicated that they are interested in following squeaks signed by that author.

When a node receives a "msg_inv" from another node:

  • check if that hash already exists in the local database, and send a "msg_getdata" message back to the other node to get the data if needed.

When a node receives a "msg_getdata" (containing MSG_SQUEAK) from another node:

  • send a "msg_squeak" containing the full squeak (encrypted, without the decryption) back to the other node.

When a node receives a "msg_squeak" from another node:

  • save the received squeak in the database if it is valid (and in the following list). Send a "msg_getdata" request to get the decryption key for this squeak from all connected peers.

When a node receives a "msg_getdata" (containing MSG_SECRET_KEY) from another node:

  • send a "msg_offer" containing a Lightning invoice that will provide the preimage to get the decryption key after being paid.

When a node receives a "msg_offer" from another node:

  • save it in the local database (after validation). Now the user has the option to pay the invoice the invoice to get the decryption key and unlock the squeak.