gRPCGetObject

sui-mainnet.nodit.io:443 sui.rpc.v2.LedgerService/GetObjectunary

Retrieves the information of the specified object.

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
object_idstringrequired

Required. The ObjectId of the requested object.

versioninteger

Request a specific version of the object. If no version is specified, and the object is live, the latest version is returned.

pathsstring[]

The set of field mask paths (e.g. "object_id", "version", "digest").

Responses
bcsobject

This Object serialized as BCS.

namestring

Name that identifies the type of the serialized value.

valuestring

Bytes of a BCS serialized value.

object_idstring

ObjectId of the object.

versioninteger

Version of the object.

digeststring

The digest of this Object.

ownerobject

Owner of the object.

kindstring

Kind of ownership.

addressstring

Address or ObjectId of the owner.

versioninteger

The initial_shared_version if kind is SHARED or start_version if kind is CONSENSUS_ADDRESS.

object_typestring

Type of the object.

has_public_transferboolean

DEPRECATED. Whether the object has public transfer.

contentsobject

BCS bytes of a Move struct value. Only set for Move structs.

namestring

Name that identifies the type of the serialized value.

valuestring

Bytes of a BCS serialized value.

packageobject

Package data if the object is a package.

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.

kindstring

Whether it is a struct or enum.

fieldsobject[]

Fields of the datatype.

variantsobject[]

Variants if the datatype is an enum.

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.

parametersobject[]

Parameter types.

returnsobject[]

Return types.

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.

previous_transactionstring

Digest of the transaction that created or last mutated this object.

storage_rebateinteger

Storage rebate for the object.

jsonobject

JSON rendering of the object.

balanceinteger

Current balance if this object is a 0x2::coin::Coin<T>.

displayobject

Template-based display rendering.

outputobject

Substituted display fields.

errorsobject

Fields that failed to render.

X-API-KEY
RequestCU20
grpcurl
grpcurl \
  -import-path . -proto sui/rpc/v2/ledger_service.proto \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d '{
  "object_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
  "read_mask": {
    "paths": []
  }
}' \
  sui-mainnet.nodit.io:443 sui.rpc.v2.LedgerService/GetObject
Response
Example · 200
{
  "object": {}
}