类 AccountService


  • public class AccountService
    extends Object
    • 方法详细资料

      • createAccount

        public Result<List<String>> createAccount​(int count,
                                                  String password)
        Create accounts 批量创建账户
        参数:
        count - The number of accounts you want to create
        password - The password of the account
        返回:
        result
      • createOffLineAccount

        public Result<List<AccountDto>> createOffLineAccount​(int count,
                                                             String password)
        Create encrypted off-line accounts 批量创建离线账户
        参数:
        count - The number of accounts you want to create
        password - The password of the account
        返回:
        result
      • getPriKeyOffline

        public Result getPriKeyOffline​(String address,
                                       String encryptedPriKey,
                                       String password)
        get unencrypted private-key 获取原始私钥
        参数:
        address - 账户地址
        encryptedPriKey - 账户加密后的私钥
        password - 密码
        返回:
        Result
      • validateAddress

        public Result validateAddress​(int chainId,
                                      String address)
      • resetPasswordOffline

        public Result resetPasswordOffline​(String address,
                                           String encryptedPriKey,
                                           String oldPassword,
                                           String newPassword)
        Change the off-line account password by encryptedPriKey and passowrd
        参数:
        address - The address of account
        encryptedPriKey - The encrypted Private Key
        oldPassword - The password to use when encrypting the private key
        newPassword - The new password
        返回:
        Result
      • sign

        public Result sign​(List<SignDto> signDtoList,
                           String txHex)
        sign the tx's digest
        参数:
        signDtoList - 签名请求参数
        返回:
        result
      • getAccountBalance

        public Result getAccountBalance​(String address,
                                        int chainId,
                                        int assetsId)
        获取账户余额
        参数:
        address - 地址
        返回:
        result
      • importPriKey

        public Result importPriKey​(String priKey,
                                   String password)
        导入私钥
        参数:
        priKey - 私钥
        password - 导入私钥后,给私钥设置的密码
        返回:
        result
      • createMultiSignAccount

        public Result createMultiSignAccount​(List<String> pubKeys,
                                             int minSigns)
      • getAddressByPriKey

        public Result getAddressByPriKey​(String priKey)
      • getAddress

        public static byte[] getAddress​(String addressString)