Skip to main content

ListPackageVersions

gRPC
RPC Methodsui.rpc.v2.MovePackageService/ListPackageVersions

Retrieves the list of all versions of the specified package.

Proto files required

Running the examples below requires the official Sui proto files. Download the proto files, then set the example's -import-path relative to the proto root (the -proto path in the examples is relative to the proto root).

github.com/MystenLabs/sui-apis/tree/main/proto

Request Message
package_idstringrequired
Required. The storage_id of any version of the package.
page_sizeinteger
The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 1000 entries will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.
page_tokenstring
A page token, received from a previous ListPackageVersions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListPackageVersions must match the call that provided the page token.
Response Message
List of versions, ordered by version.
package_idstring
Storage ID of the package.
versioninteger
Version number.
next_page_tokenstring
A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
grpcurl
grpcurl \
-import-path . \
-proto sui/rpc/v2/move_package_service.proto \
-H 'X-API-KEY: nodit-demo' \
-d '{
"package_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
"page_size": 50
}' \
sui-mainnet.nodit.io:443 \
sui.rpc.v2.MovePackageService/ListPackageVersions