revault/revault_net

JSON wrapper with a message name field

Closed this issue · 4 comments

Version 0 for now, just as a simple way to debug future upgrades of the protocol.

Hmm actually i wonder if it's necessary. The handshake's message seems to be enough.

At the very least we should have a name field for the message being serialized.

Regarding the version key in this wrapper: is there a scenario in which we would bump the JSON version but not the handshake one ? I can't think of one.

Regarding the structure, i believe something like (basically stealing from JSONRPC)

{
  "method": "method_name_from_PR",
  "params": { /* Params from PR (what we only have for now) */ }
}

But we'll need ids, too.