anchor.diff:  
   		    %% Send authorize
   		    { LocalIP, LocalPort} = rvi_common:node_address_tuple(),
  -		    connection:send(Pid, 
  -				    { authorize, 
  -				      1, LocalIP, LocalPort, rvi_binary,
  -				      get_certificates(CompSpec),
  -				      get_authorize_jwt(CompSpec)
  -				     }),
  +                    connection:send(
  +                      Pid,
  +                      term_to_json(
  +                        {struct, [ { ?DLINK_ARG_TRANSACTION_ID, 1 },
  +                                   { ?DLINK_ARG_CMD, ?DLINK_CMD_AUTHORIZE },
  +                                   { ?DLINK_ARG_ADDRESS, LocalIP },
  +                                   { ?DLINK_ARG_PORT, LocalPort },
  +                                   { ?DLINK_ARG_VERSION, ?DLINK_TCP_VERSION },
  +                                   { ?DLINK_ARG_CERTIFICATES,
  +                                     {array, get_certificates(CompSpec)} },
  +                                   { ?DLINK_ARG_SIGNATURE, get_authorize_jwt(CompSpec) }
  +                                 ]})),
   		    ok;
   		
   		{error, Err } -> 
  
positive.code:     
      [ ok, JWT ] = authorize_rpc:sign_message(
  		    CompSpec, availability_msg(Availability, [Service])),
      Res = connection:send(ConnPid, {service_announce, 3, JWT}),
  
      ?debug("dlink_tcp:announce_local_service(~p: ~p) -> ~p  Res: ~p", 
  	   [ Availability, Service, ConnPid, Res]),
  
negative.code:     ok;
  
  handle_socket(FromPid, PeerIP, PeerPort, data, Payload, [CompSpec]) ->
      {ok, {struct, Elems}} = exo_json:decode_string(binary_to_list(Payload)),
      ?debug("dlink_tcp:data(): Got ~p", [ Elems ]),
  
      case opt(?DLINK_ARG_CMD, Elems, undefined) of
          ?DLINK_CMD_AUTHORIZE ->
              [ TransactionID,
                RemoteAddress,
                RemotePort,
                ProtoVersion,
                Signature ] =
                  opts([?DLINK_ARG_TRANSACTION_ID,
                        ?DLINK_ARG_ADDRESS,
                        ?DLINK_ARG_PORT,
                        ?DLINK_ARG_VERSION,
                        ?DLINK_ARG_SIGNATURE],
                       Elems, undefined),
  
              process_authorize(FromPid, PeerIP, PeerPort,
                                TransactionID, RemoteAddress, RemotePort,
                                ProtoVersion, Signature, CompSpec);
  
          ?DLINK_CMD_SERVICE_ANNOUNCE ->
              [ TransactionID,
                ProtoVersion,
                Signature ] =
                  opts([?DLINK_ARG_TRANSACTION_ID,
                        ?DLINK_ARG_VERSION,
                        ?DLINK_ARG_SIGNATURE],
                       Elems, undefined),
  
              case authorize_rpc:validate_message(CompSpec, Signature, Conn) of
                  [ok, Msg] ->
                      process_announce(Msg, FromPid, PeerIP, PeerPort,
                                       TransactionID, ProtoVersion, CompSpec);
                  _ ->
                      ?debug("Couldn't validate availability msg from ~p", [Conn])
              end;
  
          ?DLINK_CMD_RECEIVE ->
              [ _TransactionID,
                ProtoMod,
                Data ] =
                  opts([?DLINK_ARG_TRANSACTION_ID,
                        ?DLINK_ARG_MODULE,
                        ?DLINK_ARG_DATA],
                       Elems, undefined),
              process_data(FromPid, PeerIP, PeerPort,
                           ProtoMod, Data, CompSpec);
  
          ?DLINK_CMD_PING ->
              ?info("dlink_tcp:ping(): Pinged from: ~p:~p", [ PeerIP, PeerPort ]),
              ok;
  
          undefined ->
              ?warning("dlink_tcp:data() cmd undefined, ~p", [ Elems ]),
              ok
      end.
  
  %% JSON-RPC entry point
  