-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional Node HTTP Endpoints #142
Comments
This ports the node RPC getnameinfo to the HTTP endpoint GET /info/name/:name and includes a simple test. See RPC implementation here: https://github.com/handshake-org/hsd/blob/b32c27bbb05e69b86c0e80aea3ecc394c5589186/lib/node/rpc.js#L2313 Issue can be found here: handshake-org#142
Quick Question! This guy: Top level resource being "name" feels right to me. However, the other calls have a different shape!
Would you be opposed to something more rest-ish? Like:
|
@wi-ski Thanks for your suggestions. What do you think of the edits made to the original post? The API is being structured this way to keep it similar to the rest of the codebase. See this endpoint: https://github.com/handshake-org/hsd/blob/master/lib/node/http.js#L159
Since a coin is synonymous with a UTXO, the resource being fetched is the top level resource and then how its being fetched is the next level resource. We would like to try to maintain consistency within the codebase. |
Yesss - gotcha. Makes sense, ill make those changes to #168 |
Note: |
Overview
edited 5/30/19
A high priority TODO is migrating the RPCs to HTTP to allow for more flexibility. This should be fairly straight forward to accomplish since most of the code has already been written and just needs to be adapted to using the HTTP resources instead of the RPC resources.
Proposal
Additional Endpoints to be added:
getnameinfo
GET /name/:name
getnamebyhash
GET /name/hash/:hash
getnameresource
GET /resource/name/:name
getnameresourcebyhash
GET /resource/hash/:hash
getnameproof
GET /proof/name/:name
gtetnameproofbyhash
GET /proof/hash/:hash
grindname
GET /grind?size=int
sendrawclaim
already is implemented asPOST /claim
This work has been started here:
Previous Issues mentioning this include #12, #126
The text was updated successfully, but these errors were encountered: