Package com.syntifi.near.api.rpc.service
Class TransactionService
- java.lang.Object
-
- com.syntifi.near.api.rpc.service.BaseService
-
- com.syntifi.near.api.rpc.service.TransactionService
-
public class TransactionService extends BaseService
Transaction service provides methods to easily work with transactions- Since:
- 0.0.1
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Constructor Summary
Constructors Constructor Description TransactionService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EncodedHashsendTransactionAsync(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList)Sends a list ofActiontransaction waiting for result usingNearService.sendTransactionAsync(String)static TransactionAwaitsendTransactionAwait(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList)Sends a list ofActiontransaction waiting for result usingNearService.sendTransactionAwait(String)static EncodedHashsendTransferActionAsync(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount)Sends aTransferActiontransaction async usingNearService.sendTransactionAsync(String)static TransactionAwaitsendTransferActionAwait(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount)Sends aTransferActiontransaction waiting for result usingNearService.sendTransactionAwait(String)-
Methods inherited from class com.syntifi.near.api.rpc.service.BaseService
prepareTransactionForActionList, prepareTransactionForActionList
-
-
-
-
Method Detail
-
sendTransferActionAwait
public static TransactionAwait sendTransferActionAwait(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount) throws java.security.GeneralSecurityException
Sends aTransferActiontransaction waiting for result usingNearService.sendTransactionAwait(String)- Parameters:
nearService- the near service instance to usesignerId- the signer idreceiverId- the receiver idsignerPublicKey- signer public keysignerPrivateKey- signer private keyamount- the amount to transfer- Returns:
TransactionAwaitobject with the result- Throws:
java.security.GeneralSecurityException- thrown if failed to sign the transaction
-
sendTransferActionAsync
public static EncodedHash sendTransferActionAsync(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount) throws java.security.GeneralSecurityException
Sends aTransferActiontransaction async usingNearService.sendTransactionAsync(String)- Parameters:
nearService- the near service instance to usesignerId- the signer idreceiverId- the receiver idsignerPublicKey- signer public keysignerPrivateKey- signer private keyamount- the amount to transfer- Returns:
- transaction Hash
- Throws:
java.security.GeneralSecurityException- thrown if failed to sign the transaction
-
sendTransactionAwait
public static TransactionAwait sendTransactionAwait(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList) throws java.security.GeneralSecurityException
Sends a list ofActiontransaction waiting for result usingNearService.sendTransactionAwait(String)- Parameters:
nearService- the near service instance to usesignerId- the signer idreceiverId- the receiver idsignerPublicKey- signer public keysignerPrivateKey- signer private keyactionList- list ofActionto send- Returns:
TransactionAwaitobject with the result- Throws:
java.security.GeneralSecurityException- thrown if failed to sign the transaction
-
sendTransactionAsync
public static EncodedHash sendTransactionAsync(NearService nearService, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList) throws java.security.GeneralSecurityException
Sends a list ofActiontransaction waiting for result usingNearService.sendTransactionAsync(String)- Parameters:
nearService- the near service instance to usesignerId- the signer idreceiverId- the receiver idsignerPublicKey- signer public keysignerPrivateKey- signer private keyactionList- list ofActionto send- Returns:
TransactionAwaitobject with the result- Throws:
java.security.GeneralSecurityException- thrown if failed to sign the transaction
-
-