How to distinguish objects that only contain sui, but not other objects?

I use this rpc: JSON RPC Docs | Sui Docs to get all Objeect Of address, but how to distinguish objects that only contain sui, but not other objects? is therer any rpc can do it ?

2 Likes

There are a number of RPC API that will only return ‘coins’:
suix_getAllBalances
suix_getAllCoins
suix_getBalance
suix_getCoinMetadata
suix_getCoins

1 Like

what you probably want is this

curl --location --request POST 'https://sui-testnet-kr-1.cosmostation.io//' \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "suix_getCoins",
  "params": [
    "0x4f92db7b8ef26a9b1a6f36b255070d780d71f12a814588748e8030b4eae020b1",
    "0x2::sui::SUI"
  ]
}'
1 Like