コード例 #1
0
ファイル: SendMoney.java プロジェクト: Rongmasihai/risecoin
 @Override
 JSONStreamAware processRequest(HttpServletRequest req) throws RiseException {
   long recipient = ParameterParser.getRecipientId(req);
   long amountNQT = ParameterParser.getAmountNQT(req);
   Account account = ParameterParser.getSenderAccount(req);
   return createTransaction(req, account, recipient, amountNQT);
 }
コード例 #2
0
ファイル: EncryptTo.java プロジェクト: BurstProject/burstcoin
  @Override
  JSONStreamAware processRequest(HttpServletRequest req) throws NxtException {

    long recipientId = ParameterParser.getRecipientId(req);
    Account recipientAccount = Account.getAccount(recipientId);
    if (recipientAccount == null || recipientAccount.getPublicKey() == null) {
      return INCORRECT_RECIPIENT;
    }

    EncryptedData encryptedData = ParameterParser.getEncryptedMessage(req, recipientAccount);
    return JSONData.encryptedData(encryptedData);
  }