Sui
sui.rpc.v2.StateService/GetBalance15 额度
Return the balance of one coin type of an address
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | string | Owner address. |
| coin_type | string | Fully qualified coin type, for example 0x2::sui::SUI. |
返回值
类型
GetBalanceResponse
balance: Balance with coin_type, balance (total), address_balance and coin_balance.
代码示例
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"owner": "0x5ac7c1d6b0a8b3a3e9f2c4d1e7b6a58f3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f",
"coin_type": "0x2::sui::SUI"
}' \
grpc-holy-burned-sky-sui-mainnet.rpcnode.dev:443 \
sui.rpc.v2.StateService/GetBalance