예제 #1
0
 @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
  @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);
  }