Class BaseService

  • Direct Known Subclasses:
    TransactionService

    public class BaseService
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseService()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String prepareTransactionForActionList​(NearService nearService, 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 nonce
      static java.lang.String prepareTransactionForActionList​(NearService nearService, 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseService

        public BaseService()
    • Method Detail

      • prepareTransactionForActionList

        public static java.lang.String prepareTransactionForActionList​(NearService nearService,
                                                                       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:
        nearService - the near service instance to use
        signerId - the signer id
        receiverId - the receiver id
        signerPublicKey - signer public key
        signerPrivateKey - signer private key
        actionList - list of Action to send
        nonce - 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​(NearService nearService,
                                                                       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:
        nearService - the near service instance to use
        signerId - the signer id
        receiverId - the receiver id
        signerPublicKey - signer public key
        signerPrivateKey - signer private key
        actionList - list of Action to send
        Returns:
        the base64 encoded signed transaction string
        Throws:
        java.security.GeneralSecurityException - thrown if failed to sign the transaction