Get package
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Returns a Move package.
Historical selectors resolve the requested system-package version instead of always returning the latest. version and atCheckpoint are mutually exclusive. On kv-rpc an unqualified read is bounded by the served height.
gRPC method: sui.rpc.v2.MovePackageService.GetPackage (unary).
This is a gRPC method (HTTP/2, Protocol Buffers), not a REST endpoint. The request and response bodies below are shown in the proto3 JSON form that tools such as grpcurl and Postman accept and print. Pass your NOWNodes API key as the api-key gRPC metadata header. Proto files: sui/rpc/v2/move_package_service.proto.
Example grpcurl request:
grpcurl \
-insecure \
-H 'api-key: YOUR_API_KEY' \
-emit-defaults \
-proto './sui-apis-grpc/proto/sui/rpc/v2/move_package_service.proto' \
-import-path './sui-apis-grpc/proto' \
-d '{"packageId": "0xPACKAGE_ID"}' \
'sui-grpc.nownodes.io' \
sui.rpc.v2.MovePackageService.GetPackageBody
Only one of version, atCheckpoint may be set.
packageIdstringRequired. The storage_id of any version of the requested package.
When no selector is set, the package stored at exactly this id is
returned. When a selector is set, package_id only identifies the
package's upgrade lineage (via its original id), and the selected
version within that lineage is returned.
versionstring<uint64>Exact version in the package upgrade lineage, including historical system-package versions.
atCheckpointstring<uint64>Latest version of the package lineage at the end of this checkpoint.
Response
Successful response.
gRPC error. The status code (e.g. UNAUTHENTICATED, INVALID_ARGUMENT, NOT_FOUND) is returned in the grpc-status trailer, details in grpc-message. A node that does not support the requested operation returns UNIMPLEMENTED (NOT_SERVED_HERE); a node not ready to serve it returns UNAVAILABLE (NOT_READY). Historical data outside the retained range can return OUT_OF_RANGE (BELOW_EARLIEST_AVAILABLE); requests beyond the indexed tip can return OUT_OF_RANGE (ABOVE_LATEST_AVAILABLE) where applicable. Older system-package versions on compactor nodes can return OUT_OF_RANGE (VERSION_NOT_RETAINED).