Move.

Post

Share your knowledge.

Caplec.
Feb 13, 2025
Expert Q&A

How to get custom Sui token object ID for a specific account?

I'm trying to find out how to obtain a custom Sui token object ID for a specific account using the frontend. I'm planning to use the TypeScript SDK. Can anyone guide me on how to achieve this?

  • Move CLI
1
1
Share
Comments
.

Answers

1
elfDani.
Feb 13 2025, 11:08

Hey, since you're developing the frontend part using the TypeScript SDK, you can make use of the getOwnedObjects method. This method allows you to retrieve objects owned by a specific account and filter them based on the struct type you are looking for. You can do this by passing the StructType filter argument in your request, like so:

suiClient.getOwnedObjects({
  owner: "0xCAFE",
  filter: {
    StructType: "0xCAFE::module::struct"
  }
})

This should help you get the custom Sui token object ID you need for the specified account.

1
Comments
.

Do you know the answer?

Please log in and share it.

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