# ListPackageVersions - Query Sui Package Upgrade History

List every published version in a Sui Move package upgrade lineage with cursor-based pagination over Dwellir gRPC.

## Method Signature

- **Service:** `sui.rpc.v2.MovePackageService`
- **Method:** `ListPackageVersions`
- **Type:** Unary RPC

## Request Parameters

- `package_id` (`string, required`): Storage ID of any package version in the upgrade lineage.
- `page_size` (`uint32, optional`): Maximum items per page. The service may return fewer items.
- `page_token` (`bytes, optional`): Base64 page token from the previous response. Keep other request parameters unchanged.

## Request Example

```bash
grpcurl \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "package_id": "0x2",
  "page_size": 2
}' \
  api-sui-mainnet-full.n.dwellir.com:443 \
  sui.rpc.v2.MovePackageService/ListPackageVersions
```

## Response Fields

- `versions` (`PackageVersion[], optional`): Package storage IDs and version numbers in version order.
- `next_page_token` (`bytes, optional`): Base64 continuation token. Absent when no further page exists.

## Successful Response

```protobuf
message ListPackageVersionsResponse {
  repeated PackageVersion versions = 1;
  optional bytes next_page_token = 2;
}
```

## Usage notes

Pass `next_page_token` back as `page_token` without changing the package ID or page size.

## Related resources

- [Sui gRPC overview](https://www.dwellir.com/docs/sui/grpc-overview)
- [grpcurl setup](https://www.dwellir.com/docs/sui/grpc-setup-grpcurl)
