Package com.syntifi.near.api.rpc.service
Class TransferService
- java.lang.Object
-
- com.syntifi.near.api.rpc.service.TransferService
-
public class TransferService extends java.lang.Object
Transaction service provides methods to easily work with transactions- Since:
- 0.0.1
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Constructor Summary
Constructors Constructor Description TransferService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EncodedHash
sendTransactionAsync(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList)
Sends a list ofAction
transaction waiting for result usingNearClient.sendTransactionAsync(String)
static TransactionAwait
sendTransactionAwait(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList)
Sends a list ofAction
transaction waiting for result usingNearClient.sendTransactionAwait(String)
static EncodedHash
sendTransferActionAsync(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount)
Sends aTransferAction
transaction async usingNearClient.sendTransactionAsync(String)
static TransactionAwait
sendTransferActionAwait(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount)
Sends aTransferAction
transaction waiting for result usingNearClient.sendTransactionAwait(String)
-
-
-
Method Detail
-
sendTransferActionAwait
public static TransactionAwait sendTransferActionAwait(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount) throws java.security.GeneralSecurityException
Sends aTransferAction
transaction waiting for result usingNearClient.sendTransactionAwait(String)
- Parameters:
nearClient
- the near service instance to usesignerId
- the signer idreceiverId
- the receiver idsignerPublicKey
- signer public keysignerPrivateKey
- signer private keyamount
- the amount to transfer- Returns:
TransactionAwait
object with the result- Throws:
java.security.GeneralSecurityException
- thrown if failed to sign the transaction
-
sendTransferActionAsync
public static EncodedHash sendTransferActionAsync(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.math.BigInteger amount) throws java.security.GeneralSecurityException
Sends aTransferAction
transaction async usingNearClient.sendTransactionAsync(String)
- Parameters:
nearClient
- 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(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList) throws java.security.GeneralSecurityException
Sends a list ofAction
transaction waiting for result usingNearClient.sendTransactionAwait(String)
- 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:
TransactionAwait
object with the result- Throws:
java.security.GeneralSecurityException
- thrown if failed to sign the transaction
-
sendTransactionAsync
public static EncodedHash sendTransactionAsync(NearClient nearClient, java.lang.String signerId, java.lang.String receiverId, PublicKey signerPublicKey, PrivateKey signerPrivateKey, java.util.List<Action> actionList) throws java.security.GeneralSecurityException
Sends a list ofAction
transaction waiting for result usingNearClient.sendTransactionAsync(String)
- 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:
TransactionAwait
object with the result- Throws:
java.security.GeneralSecurityException
- thrown if failed to sign the transaction
-
-