getObjectReference function

SuiObjectRef? getObjectReference(
  1. SuiObjectResponse resp
)

Implementation

SuiObjectRef? getObjectReference(SuiObjectResponse resp) {
  final objectExistsResponse = getSuiObjectData(resp);
  if (objectExistsResponse != null) {
    return SuiObjectRef(
      objectExistsResponse.digest,
      objectExistsResponse.objectId,
      objectExistsResponse.version,
    );
  } else {
    return getObjectDeletedResponse(resp);
  }
}