Post
Share your knowledge.
Caplec50
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
1elfDani82
Feb 13 2025, 11:08Hey, 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.
Move is an executable bytecode language used to implement custom transactions and smart contracts.
98Posts158Answers
Trending posts