/blockrewards returns a []wallet.BlockReward directly, unlike other endpoints which return a list of IDs. I'm not sure why. This "correct" API should be:
GET /blockrewards?max=n -> []types.BlockID
GET /blockrewards/id -> wallet.BlockReward
along with a corresponding batch query:
POST /batchquery/blockrewards [id1, id2, id3] -> []wallet.BlockReward
Arguably, /limbo should be like this as well. I think in the case of limbo, I figured that a) the response is unlikely to ever grow super large, and b) the client rarely wants to examine just a single limbo transaction -- you almost always want to work with the full limbo set. So I'll probably leave /limbo as-is, unless someone can provide a compelling reason not to.
EDIT: just realized /filecontracts is also like this 😬
/blockrewards
returns a[]wallet.BlockReward
directly, unlike other endpoints which return a list of IDs. I'm not sure why. This "correct" API should be:along with a corresponding batch query:
Arguably,
/limbo
should be like this as well. I think in the case oflimbo
, I figured that a) the response is unlikely to ever grow super large, and b) the client rarely wants to examine just a single limbo transaction -- you almost always want to work with the full limbo set. So I'll probably leave/limbo
as-is, unless someone can provide a compelling reason not to.EDIT: just realized
/filecontracts
is also like this 😬