Package com.syntifi.near.api.rpc.service
Class TransactionService
- java.lang.Object
-
- com.syntifi.near.api.rpc.service.TransactionService
-
public class TransactionService extends java.lang.Object
Base service provides methods to sign transactions- Since:
- 0.2.0
- 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 java.lang.String
prepareTransactionForActionList(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList)
Prepares the transaction to send and automatically queries for the next noncestatic java.lang.String
prepareTransactionForActionList(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList, java.lang.Long nonce)
Prepares the transaction to send with a given nonce
-
-
-
Method Detail
-
prepareTransactionForActionList
public static java.lang.String prepareTransactionForActionList(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList, java.lang.Long nonce) throws java.security.GeneralSecurityException
Prepares the transaction to send with a given nonce- Parameters:
nearClient
- the near service instance to usesignerId
- the signer idreceiverId
- the receiver idsignerPublicKey
- signer public keysignerPrivateKey
- signer private keyactionList
- list ofAction
to sendnonce
- nonce to add in the transaction- Returns:
- the base64 encoded signed transaction string
- Throws:
java.security.GeneralSecurityException
- thrown if failed to sign the transaction
-
prepareTransactionForActionList
public static java.lang.String prepareTransactionForActionList(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList) throws java.security.GeneralSecurityException
Prepares the transaction to send and automatically queries for the next nonce- Parameters:
nearClient
- the near service instance to usesignerId
- the signer idreceiverId
- the receiver idsignerPublicKey
- signer public keysignerPrivateKey
- signer private keyactionList
- list ofAction
to send- Returns:
- the base64 encoded signed transaction string
- Throws:
java.security.GeneralSecurityException
- thrown if failed to sign the transaction
-
-