Skip to content
kermit4 edited this page May 21, 2026 · 11 revisions

post new message types or fields here

general purpose building blocks (potentially common lingo across applications)

peer discovery

{"PleaseSendPeers":{}}
{"Peers":{
"peers":[
"148.71.89.128:43344",
"148.71.89.128:50352"] } }
{"WhereAreThey":{"ed25519h": "hex of ed25519 sought, if found returns a MyPublicKey wrapped in a Forwarded, so you know where it came from"}}
{"PleaseListSupportedMessages":{}}
{"SupportedMessages":{}}

ping -- participants might use this to prioritize which peers to keep track of and which to keep in touch with more. Send

it back and forget it, as it is probably a timestamp.

{"PleaseReturnThisMessage":["cookie","String"]
{"ReturnedMessage":
["cookie","String"]

for larger than message sized data

{"PleaseSendContent":{
"id":"8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4",
"length":4096,
"offset":0 }}
{ "Content": {
"id":"8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4",
"base64": "aGk=",
"eof": 2,
"offset":0 } }
{"MaybeTheyHaveSome":{
"id":"foo",
"peers":[ "148.71.89.128:43344", "148.71.89.128:50352"] } }

https://github.com/kermit4/LCDP/wiki/test-files-for-PleaseSendContent-and-Conent

cryptography related

{ "EncryptedMessages": {
"base64": "base64 of encrypted array of externally tagged JSON messagess, i.e. this protocol, encrypted",
"noise_params": "Noise_IK_25519_AESGCM_SHA256"
} }
{ "MyPublicKey": {
"ed25519h": "hex (no 0x in front)",
"ed25519_eth_signed": "optionally, a eth wallet signed message of: my ed25519 public key is 12345678abcdef"
} }
{"Forwarded":{"src":"1,2.3.4:45678","from_ed25519":"only if verified","maybe_ed25519":"if not verified for this message, but from a source that claims to be this key" ,"messages":"a string that is this protocol"}}
{"SignedMessage":{"ed25519":"hex of sender's public key","signature":"base64 ed25519 signature of payload","payload":"base64 of a JSON messages array (this protocol)"}}

SignedMessage wraps any array of messages with an ed25519 signature so receivers can verify authorship. Latest (see below) must be delivered inside a SignedMessage.

updateable named content

Ask for the latest known signed hash of a named file published by an ed25519 key. The response is a SignedMessage wrapping a Latest.

{"GetLatest":{"ed25519":"hex of publisher's public key","name":"filename (no path separators)"}}
{"Latest":{"ed25519":"hex of publisher's public key","name":"filename","sha256":"hex sha256 of current content","seq":1234567890}}

seq is typically the file's modification time as Unix seconds. Latest is only valid inside a SignedMessage whose ed25519 matches; nodes drop it otherwise.

for the Ethereum folks

{"GetPubByEth":{ "eth_addr": "hex of eth address you want to find the ed25519 for, if found it will return a MyPublicKey wrapped in a Forwarded so you know where it really came from"}}

websocket client helper

Ask the node to forward messages to a peer identified by ed25519 public key, encrypting with EncryptedMessages. The only known implementation will currently ignore these arriving from the network.

{"Forward":{"to_ed25519":"hex of destination public key","messages":[...]}}

application specific

{"ChatMessage":{ "message":"hi", "length":12345} }
{"GroupChatMessaage":{ "group_name":"main","text":"text","timestamp":1779402521000}
{"SawMessage":{ "hash": "sha256 hash of last received chat message that has been viewed (not just received, actual window focus)"
{"YouShouldSeeThis":{ "id":"sha256", "length":12345 } }
{"IJustSawThis":{ "id":"sha256" } }
{"PleaseListContent":{}}
{"ContentList":{ "results": [ [ "hash", "size":123 ]
] }
{"AudioFrame":{ "sampleRate": 48000, "channels": 1, "format": "'f32' or 'opus' have been seen so far", "data": "some base64" }
{"VideoFrame":{ "codec":"vp8", "keyframe": false, "seq": 123, "w": 640, "h": "480", "data": "base64.." }}

implementations

http://127.0.0.1:24255/latest/0xe13a614dff88de239a986bea20ca129c3dc77bb727fac18f2f092eed27cfb3fb/video.html http://127.0.0.1:24255/latest/0xe13a614dff88de239a986bea20ca129c3dc77bb727fac18f2f092eed27cfb3fb/chat.html http://127.0.0.1:24255/latest/0xe13a614dff88de239a986bea20ca129c3dc77bb727fac18f2f092eed27cfb3fb/broadcast.html

Pong - real time game

{"PongMove":{"ball_x":400,"ball_y":250,"move_number":1,"vx":4.7022678911042926,"vy":-1.6996107437556365}}
{"PongPaddle":{"paddle_y":320.6106870229008}}

optional latency metrics to show user

{"PongPing":{"seq":123,"t":2345678}}
{"PongPingPong":{"seq":123,"t":2345678}}

implementations

http://127.0.0.1:24255/latest/0xe13a614dff88de239a986bea20ca129c3dc77bb727fac18f2f092eed27cfb3fb/pong.html

deprecated

no longer in use that I'm aware of (but you should not re-use them in any incompatible way)

SignedPub GetPub OnePlusOneMemberships TransferStatus TheseArePeers SearchResult Search PromotedContent ListResult List LastViewed HereIsContent EmptyMessage ContentPeers ContentPeerSuggestions YouSouldSeeThis