gRPCGetPackage

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

Retrieves the Move package information for the specified package ID.

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 the requested package.

Responses
storage_idstring

Package ObjectId (storage ID).

original_idstring

ID of the first published version.

versioninteger

Version of the package.

modulesobject[]

Modules in the package.

namestring

Name of the module.

contentsstring

Serialized bytecode.

datatypesobject[]

Datatypes defined in the module.

type_namestring

Fully qualified type name.

defining_idstring

Package storage ID that defines the type.

modulestring

Module name.

namestring

Datatype name.

abilitiesstring[]

Abilities of the datatype.

type_parametersobject[]

Generic type parameters.

constraintsstring[]

Ability constraints on the parameter.

is_phantomboolean

Whether the parameter is phantom.

kindstring

Whether it is a struct or enum.

fieldsobject[]

Fields of the datatype.

namestring

Name of the field.

positioninteger

Position in definition order.

typeobject

Type of the field.

variantsobject[]

Variants if the datatype is an enum.

namestring

Name of the variant.

positioninteger

Position in definition order.

fieldsobject[]

Fields of the variant.

functionsobject[]

Functions defined in the module.

namestring

Name of the function.

visibilitystring

Visibility (public/private/public(friend)).

is_entryboolean

Whether the function is an entry function.

type_parametersobject[]

Generic type parameters.

constraintsstring[]

Ability constraints on the parameter.

is_phantomboolean

Whether the parameter is phantom.

parametersobject[]

Parameter types.

referenceobject

Reference kind, if the type is a reference.

bodyobject

The signature body.

returnsobject[]

Return types.

referenceobject

Reference kind, if the type is a reference.

bodyobject

The signature body.

type_originsobject[]

Type origins for the package's types.

module_namestring

Name of the defining module.

datatype_namestring

Name of the datatype.

package_idstring

Package ID where the type originated.

linkageobject[]

Transitive dependencies (linkage table).

original_idstring

Original package ID.

upgraded_idstring

Upgraded package ID.

upgraded_versioninteger

Upgraded package version.

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"
}' \
  sui-mainnet.nodit.io:443 sui.rpc.v2.MovePackageService/GetPackage
Response
Example · 200
{
  "package": {}
}