Package org.starcoin.utils
Class StarcoinClient
java.lang.Object
org.starcoin.utils.StarcoinClient
public class StarcoinClient extends Object
-
Field Summary
Fields Modifier and Type Field Description static okhttp3.MediaTypeJSON_MEDIA_TYPE -
Constructor Summary
Constructors Constructor Description StarcoinClient(String url, int chainId)StarcoinClient(ChainInfo chainInfo) -
Method Summary
Modifier and Type Method Description Stringcall(String method, List<String> params)StringcallScriptFunction(AccountAddress sender, Ed25519PrivateKey privateKey, ScriptFunctionObj scriptFunctionObj)StringdeployContractPackage(AccountAddress sender, Ed25519PrivateKey privateKey, String filePath, ScriptFunctionObj initScriptObj)StringdryRunTransaction(AccountAddress sender, Ed25519PrivateKey privateKey, TransactionPayload payload)AccountResourcegetAccountSequence(AccountAddress sender)StringgetResource(AccountAddress sender, ResourceObj resourceObj)StringgetTransactionInfo(String txn)StringsubmitHexTransaction(Ed25519PrivateKey privateKey, RawUserTransaction rawUserTransaction)StringsubmitTransaction(AccountAddress sender, Ed25519PrivateKey privateKey, TransactionPayload payload)Stringtransfer(AccountAddress sender, Ed25519PrivateKey privateKey, AccountAddress to, TypeObj typeObj, BigInteger amount)
-
Field Details
-
JSON_MEDIA_TYPE
public static final okhttp3.MediaType JSON_MEDIA_TYPE
-
-
Constructor Details
-
StarcoinClient
-
StarcoinClient
-
-
Method Details
-
call
-
transfer
public String transfer(AccountAddress sender, Ed25519PrivateKey privateKey, AccountAddress to, TypeObj typeObj, BigInteger amount) -
submitHexTransaction
public String submitHexTransaction(Ed25519PrivateKey privateKey, RawUserTransaction rawUserTransaction) -
callScriptFunction
public String callScriptFunction(AccountAddress sender, Ed25519PrivateKey privateKey, ScriptFunctionObj scriptFunctionObj) -
getAccountSequence
-
dryRunTransaction
public String dryRunTransaction(AccountAddress sender, Ed25519PrivateKey privateKey, TransactionPayload payload) -
submitTransaction
public String submitTransaction(AccountAddress sender, Ed25519PrivateKey privateKey, TransactionPayload payload) -
deployContractPackage
public String deployContractPackage(AccountAddress sender, Ed25519PrivateKey privateKey, String filePath, ScriptFunctionObj initScriptObj) -
getTransactionInfo
-
getResource
-