getObject

open suspend override fun getObject(id: String, options: ObjectDataOptions): Result<GetObjectQuery.Data?, SuiError>

Fetches the details of a specific object by its ID.

Return

A Result which is either:

  • Ok: Containing a nullable GetObjectQuery.Data object with the object's details.

  • Err: Containing a SuiError object with a list of GraphQLErrors.

Parameters

id

The unique ID of the object to fetch.

options

The ObjectDataOptions specifying which fields to include in the response. This allows you to tailor the response to include data like content, owner, or BCS representation.