Cosmos-sdk: Making staking more REST-ful

Created on 15 Jun 2018  路  4Comments  路  Source: cosmos/cosmos-sdk

https://github.com/cosmos/cosmos-sdk/blob/0866494c3bb91c2e57f336c7f5de675ecc6d0901/x/stake/client/rest/query.go#L17

How about basing the url structure around entities to make queries more readable

get validators: GET /stake/validators
delegate: POST /stake/delegations
build delegation tx to be signed client side: GET /stake/delegations/build
get stake for a delegator: GET /stake/delegations?delegator={delegatorAddress}

proposal staking

Most helpful comment

Concept ACK - as long as PUT/POST cleanly map to single transactions.

Can we do this for the whole LCD API?

All 4 comments

Concept ACK - as long as PUT/POST cleanly map to single transactions.

Can we do this for the whole LCD API?

It is mostly the case already.

Closed by #1880

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  路  3Comments

mossid picture mossid  路  3Comments

fedekunze picture fedekunze  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

ValarDragon picture ValarDragon  路  3Comments