Package org.starcoin.api
Class TokenContractRPCClient
- java.lang.Object
-
- org.starcoin.api.ContractRPCClient
-
- org.starcoin.api.TokenContractRPCClient
-
public class TokenContractRPCClient extends ContractRPCClient
Starcoin Token 相关json-rpc接口的封装。- Since:
- 1.1.6
- Author:
- fanngyuan
-
-
Field Summary
Fields Modifier and Type Field Description static StringAssociactionAddressstatic StringSTCTypeTagstatic StringTokenMarketCapTypeTagstatic StringTreasuryBalanceTypeTag
-
Constructor Summary
Constructors Constructor Description TokenContractRPCClient(URL baseUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigIntegergetSTCCurrentSupply()获取 STC 的实际供应量BigIntegergetSTCMarketCap()用于获取 STC 的市场容量BigIntegergetSTCTreasurBalance()用于获取 STC 在国库中的数量BigIntegergetTokenCurrentSupply(String tokenTypeTag)获取某个 token 的实际供应量BigIntegergetTokenMarketCap(String tokenTypeTag)获取某个 token 的市场容量BigIntegergetTreasuryBalance(String tokenTypeTag)用于获取某个 token 在国库中的数量-
Methods inherited from class org.starcoin.api.ContractRPCClient
call
-
-
-
-
Field Detail
-
STCTypeTag
public static final String STCTypeTag
- See Also:
- Constant Field Values
-
TreasuryBalanceTypeTag
public static final String TreasuryBalanceTypeTag
- See Also:
- Constant Field Values
-
TokenMarketCapTypeTag
public static final String TokenMarketCapTypeTag
- See Also:
- Constant Field Values
-
AssociactionAddress
public static final String AssociactionAddress
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TokenContractRPCClient
public TokenContractRPCClient(URL baseUrl)
-
-
Method Detail
-
getTokenMarketCap
public BigInteger getTokenMarketCap(String tokenTypeTag) throws JSONRPC2SessionException
获取某个 token 的市场容量- Throws:
JSONRPC2SessionException
-
getTreasuryBalance
public BigInteger getTreasuryBalance(String tokenTypeTag) throws JSONRPC2SessionException
用于获取某个 token 在国库中的数量- Throws:
JSONRPC2SessionException
-
getTokenCurrentSupply
public BigInteger getTokenCurrentSupply(String tokenTypeTag) throws JSONRPC2SessionException
获取某个 token 的实际供应量- Throws:
JSONRPC2SessionException
-
getSTCMarketCap
public BigInteger getSTCMarketCap() throws JSONRPC2SessionException
用于获取 STC 的市场容量- Throws:
JSONRPC2SessionException
-
getSTCTreasurBalance
public BigInteger getSTCTreasurBalance() throws JSONRPC2SessionException
用于获取 STC 在国库中的数量- Throws:
JSONRPC2SessionException
-
getSTCCurrentSupply
public BigInteger getSTCCurrentSupply() throws JSONRPC2SessionException
获取 STC 的实际供应量- Throws:
JSONRPC2SessionException
-
-