程序包 org.starcoin.api
类 StateRPCClient
java.lang.Object
org.starcoin.api.StateRPCClient
Starcoin State 相关json-rpc接口的封装。
- 从以下版本开始:
- 1.1.6
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明longgetAddressAmount(String address, String token)已过时。getAddressAmountValue(String address, String token)用于获取某个地址下的token 数量getAllResourcesByAddress(String address)通过 address 查询当前账户下的所有资源集合getAllResourcesByResourceTypes(String address, List<String> resourceTypes)通过 address 和 resourceTypes 查询当前账户下的所有资源集合getAllResourcesByTypeTags(String address, List<String> typeTags)通过 address 和 TypeTags 查询当前账户下的所有资源集合getResourceListByPage(String address, int startIndex, int maxSize)通过 address 分页查询当前账户下的所有资源集合用于某个地址的状态用于某个地址的状态getTokenInfo(String address, String tokenCode)
-
构造器详细资料
-
StateRPCClient
-
-
方法详细资料
-
getState
用于某个地址的状态 -
getState
public ListResource getState(String address, boolean isDecode, String state_root) throws JSONRPC2SessionException用于某个地址的状态 -
getTokenInfo
public TokenInfo getTokenInfo(String address, String tokenCode) throws JSONRPC2SessionException, com.fasterxml.jackson.core.JsonProcessingException- 抛出:
JSONRPC2SessionExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
getAddressAmount
已过时。用于获取某个地址下的token 数量 由于amount的数量可能超过long的最大值,所以这个方法已经在某些token下会溢出,建议使用getAddressAmountValue方法 -
getAddressAmountValue
用于获取某个地址下的token 数量 -
getAllResourcesByAddress
通过 address 查询当前账户下的所有资源集合- 参数:
address- 地址- 返回:
- 抛出:
JSONRPC2SessionException
-
getAllResourcesByResourceTypes
public ListResource getAllResourcesByResourceTypes(String address, List<String> resourceTypes) throws JSONRPC2SessionException通过 address 和 resourceTypes 查询当前账户下的所有资源集合- 参数:
address- 地址resourceTypes- 资源类型集合- 返回:
- 抛出:
JSONRPC2SessionException
-
getAllResourcesByTypeTags
public ListResource getAllResourcesByTypeTags(String address, List<String> typeTags) throws JSONRPC2SessionException通过 address 和 TypeTags 查询当前账户下的所有资源集合- 参数:
address-typeTags-- 返回:
- 抛出:
JSONRPC2SessionException
-
getResourceListByPage
public ListResource getResourceListByPage(String address, int startIndex, int maxSize) throws JSONRPC2SessionException通过 address 分页查询当前账户下的所有资源集合- 参数:
address-startIndex-maxSize-- 返回:
- 抛出:
JSONRPC2SessionException
-