Move.

Post

Share your knowledge.

Caplec.
Mar 21, 2025
Expert Q&A

Fetching shared objects by type using TypeScript SDK?

I was trying to fetch all shared objects of a specific type using the TypeScript SDK, but I'm not sure how to do this. Is there an existing method to achieve this, or do I need to look into other options?

  • Move CLI
1
1
Share
Comments
.

Answers

1
BlueEyedCrypto.
Mar 21 2025, 17:49

There isn't a direct way to get all shared objects of a specific type from the TypeScript SDK currently. However, you can use GraphQL to accomplish this. Try using a filter like in this example: https://github.com/MystenLabs/sui/blob/main/crates/sui-graphql-rpc/examples/object_connection/filter_on_type.graphql.

0
Comments
.

Do you know the answer?

Please log in and share it.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignMay
We use cookies to ensure you get the best experience on our website.
More info