@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); }
@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); }