GETfind

From flud

Note: the most up-to-date documentation of the protocol is the source code itself, at http://flud.org/tryit.html

Contents

[edit] GET /nodes/[val]

Returns the node(s) with nodeID closest to val (primitive for kademlia's findnode op).

[edit] authentication

This operation does not require authentication.

[edit] required parameters:

  • Ku_e: integer value (not encoded). value of 'e' from public key.
  • Ku_n: integer value (not encoded). value of 'n' from public key.
  • nodeID: derivative of Ku.
  • port: integer value (not encoded). listen port.

[edit] possible responses

normal response:

  • code: 200 OK
  • data: {'id': val, 'k': [list of nodes closest to val, with each node a (ip, port, nodeID) tuple]}

response for malformed request:

  • code: 400 BAD REQUEST
  • data: error message
Personal tools