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 StringSTCTypeTagstatic StringTokenMarketCapTypeTagstatic StringTreasuryBalanceTypeTag -
Constructor Summary
Constructors Constructor Description TokenContractRPCClient(URL baseUrl) -
Method Summary
Modifier and Type Method Description BigIntegergetSTCCurrentSupply()获取 STC 的实际供应量BigIntegergetSTCMarketCap()用于获取 STC 的市场容量BigIntegergetSTCTreasurBalance()用于获取 STC 在国库中的数量BigIntegergetTokenCurrentSupply(String tokenTypeTag)获取某个 token 的实际供应量BigIntegergetTokenMarketCap(String tokenTypeTag)获取某个 token 的市场容量BigIntegergetTreasurBalance(String tokenTypeTag)用于获取某个 token 在国库中的数量Methods inherited from class org.starcoin.api.ContractRPCClient
call
-
Field Details
-
STCTypeTag
- See Also:
- Constant Field Values
-
TreasuryBalanceTypeTag
- See Also:
- Constant Field Values
-
TokenMarketCapTypeTag
- See Also:
- Constant Field Values
-
-
Constructor Details
-
TokenContractRPCClient
-
-
Method Details
-
getTokenMarketCap
public BigInteger getTokenMarketCap(String tokenTypeTag) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException获取某个 token 的市场容量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-
getTreasurBalance
public BigInteger getTreasurBalance(String tokenTypeTag) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException用于获取某个 token 在国库中的数量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-
getTokenCurrentSupply
public BigInteger getTokenCurrentSupply(String tokenTypeTag) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException获取某个 token 的实际供应量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-
getSTCMarketCap
public BigInteger getSTCMarketCap() throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException用于获取 STC 的市场容量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-
getSTCTreasurBalance
public BigInteger getSTCTreasurBalance() throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException用于获取 STC 在国库中的数量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-
getSTCCurrentSupply
public BigInteger getSTCCurrentSupply() throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException获取 STC 的实际供应量- Throws:
com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
-