API to list packages deployed by given address?

Hi Friends!

In current version of RPC API there is a nice feature suix_getOwnedObjects. But is there a way to list in the same manner all packages (and versions!) published by given account?

The motivation is simple - this may allow me to omit configuring package IDs to call on my serverside - I can simply browse them, find necessary ones by module names and lastest version and that’s it!


While I see no direct method yet, I found a kind of suitable workaround:

Use suix_getOwnedObjects to find all UpgradeCap objects, which are created with every package publishing. They contain packageId of the latest version of the packages.

curl -Hcontent-type:application/json https://fullnode.testnet.sui.io \
  -d '{ "jsonrpc":"2.0", "method":"suix_getOwnedObjects","id":1,
           {"filter":{"StructType":"0x2::package::UpgradeCap"},"options":{"showContent":true}}]}' \
  | jq .