tryGetPastObject

open suspend override fun tryGetPastObject(id: String, version: Int?, options: ObjectDataOptions): Result<TryGetPastObjectQuery.Data?, SuiError>

Fetches a historical version of a specific object.

This allows querying for an object's state at a specific point in its history. The query may fail if the requested version has been pruned from the node.

Return

A Result which is either:

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

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

Parameters

id

The unique ID of the object.

version

The version number of the object to retrieve.

options

The ObjectDataOptions specifying which fields of the past object to include in the response.