Skip to content
  • Daniel Martí's avatar
    all: refactor API request and response code · 36cfb4b7
    Daniel Martí authored and p4u's avatar p4u committed
    First, make the types use json.RawMessage for the signed payloads. This
    ensures we can actually sign and verify the same json []byte that is
    sent over the websocket connection.
    
    Second, thanks to the simplification above, we no longer need to use
    crypto functions which deal with JSON; we only use []byte now.
    
    Third, update all the server code (router and census) and client code,
    mainly under the client package.
    
    Fourth, deduplicate the client code; cmd/testclient and test/testcommon
    now both use the client package directly.
    36cfb4b7