gRPCListPackageVersions

sui-mainnet.nodit.io:443 sui.rpc.v2.MovePackageService/ListPackageVersionsunary

Retrieves the list of all versions of the specified package.

TransportgRPC

Request and response messages are identical for both transports. Only the wire protocol, headers, and client library differ.

Protocol
Native gRPC over HTTP/2 with TLS. Suited to server-side clients and grpcurl.
Content-Type
application/grpc
Headers
x-api-key
Streaming
Server, client, and bidirectional streaming are all supported.
Errors
grpc-status and grpc-message are delivered as HTTP/2 trailers.
Request Body
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.

Responses
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.

X-API-KEY
RequestCU50
grpcurl
grpcurl \
  -import-path . -proto sui/rpc/v2/move_package_service.proto \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d '{
  "package_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
  "page_size": 50,
  "page_token": ""
}' \
  sui-mainnet.nodit.io:443 sui.rpc.v2.MovePackageService/ListPackageVersions
Response
Example · 200
{
  "versions": [],
  "next_page_token": ""
}