diff --git a/.changeset/shiny-paws-wave.md b/.changeset/shiny-paws-wave.md new file mode 100644 index 0000000000000..f9e25cfac8700 --- /dev/null +++ b/.changeset/shiny-paws-wave.md @@ -0,0 +1,5 @@ +--- +"@mysten/sui.js": patch +--- + +Make getOwnedObjects backward compatible from 0.29 to 0.30. diff --git a/sdk/typescript/src/types/objects.ts b/sdk/typescript/src/types/objects.ts index 63ac8a05a7105..4b4e2637d0018 100644 --- a/sdk/typescript/src/types/objects.ts +++ b/sdk/typescript/src/types/objects.ts @@ -425,7 +425,8 @@ export type CheckpointedObjectId = Infer; export const PaginatedObjectsResponse = object({ data: array(SuiObjectResponse), - nextCursor: nullable(ObjectId), + // TODO: remove union after 0.30.0 is released + nextCursor: union([nullable(ObjectId), nullable(CheckpointedObjectId)]), hasNextPage: boolean(), }); export type PaginatedObjectsResponse = Infer;