gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
841 stars 342 forks source link

[gnoland] Add `namespace` RPC endpoint #2383

Open leohhhn opened 1 week ago

leohhhn commented 1 week ago

Description

We should add a namespace endpoint to gnoland that will allow us to fetch packages & realms under a certain namespace. To prevent outputs that are too large, this endpoint should support pagination, and possibly alphabetical sorting and sorting by date added. The endpoint should also be capped to a certain number of results to prevent excessive stress on the node.

This RPC would be used to display available packages via gnoweb, such as for this link.

cc @moul

leohhhn commented 1 week ago

Related: https://github.com/gnolang/gno/issues/2189

From the issue:

Published Packages:

  • List {p,r}//** published packages.
  • Implement a new RPC call with pagination to fetch this information.
  • Ideally sorted by publication date.
leohhhn commented 1 week ago

@moul

A suggested approach for this from @zivkovicmilos's side was to create a new ABCI query for this. WDYT?