Skip to content

MovePackageService.ListPackageVersions ​

List package versions through sui.rpc.v2.MovePackageService/ListPackageVersions on Inodra's Sui gRPC endpoint.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.MovePackageService/ListPackageVersions. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: ListPackageVersionsRequest ​

FieldTypeDescription
package_idstringRequired. The storage_id of any version of the package.
page_sizeuint32The 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_tokenbytesA 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: ListPackageVersionsResponse ​

FieldTypeDescription
versionsrepeated PackageVersionList of all package versions, ordered by version.
next_page_tokenbytesA token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

PackageVersion ​

A simplified representation of a package version

FieldTypeDescription
package_idstringThe storage ID of this package version
versionuint64The version number

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "package_id": "0x2",
  "page_size": 20
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.MovePackageService/ListPackageVersions

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { response } = await client.movePackageService.listPackageVersions({
  packageId: '0x2',
  pageSize: 20
})
console.log(response.versions)

@mysten/sui v2 has no typed method for this RPC, so the sample calls the generated client.movePackageService service client. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per item actually returned; an empty page bills the 1-credit minimum. See credits and billing for the full table.

The full-stack Sui data layer.