ListPackageVersions - Sui
ListPackageVersions. Lists all versions of a Move package.
ListPackageVersions - sui [Value: 20CU]
Lists all versions of a Move package across upgrades, ordered by version.
gRPC: sui.rpc.v2.MovePackageService/ListPackageVersions
Use cases
- Track package upgrades
- Find latest package version
- Audit upgrade history
Constraints
- Package id is required
- Default 1000, maximum 10000
- Same params when paginating
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
grpcurl \
-H "x-drpc-key: {API-KEY}" \
-H "x-drpc-chain: sui" \
-d '{
"package_id": "0x2"
}' \
grpc.drpc.live:443 \
sui.rpc.v2.MovePackageService/ListPackageVersionsResponse
200
{
"versions": [
{
"package_id": "0x0000000000000000000000000000000000000000000000000000000000000002",
"version": "1"
},
{
"package_id": "0x0000000000000000000000000000000000000000000000000000000000000002",
"version": "2"
}
]
}Request params
object
package_idstring
Required. Storage id of any version of the package.
page_sizeinteger
Optional. Maximum number of entries to return. Defaults to 1000, maximum 10000.
page_tokenstring
Optional. Page token (bytes, base64) from a previous call's `next_page_token`. Other parameters must match that call.
Response
200
Lists all versions of a Move package across upgrades, ordered by version.Response params
object
versionsarray_of_objects
Package versions, ordered by version.
object
package_idstring
Storage id of this package version.
versionstring
Version number.
next_page_tokenstring
Token (bytes, base64) for the next page. Omitted when there are no more pages.