use of org.xel.Account in project elastic-core-maven by OrdinaryDude.
the class ParameterParser method getSenderAccount.
public static Account getSenderAccount(HttpServletRequest req) throws ParameterException {
byte[] publicKey = getPublicKey(req);
Account account = Account.getAccount(publicKey);
if (account == null) {
throw new ParameterException(UNKNOWN_ACCOUNT);
}
return account;
}
use of org.xel.Account in project elastic-core-maven by OrdinaryDude.
the class SendMessage method processRequest.
@Override
protected JSONStreamAware processRequest(HttpServletRequest req) throws NxtException {
long recipientId = ParameterParser.getAccountId(req, "recipient", false);
Account account = ParameterParser.getSenderAccount(req);
return createTransaction(req, account, recipientId, 0, Attachment.ARBITRARY_MESSAGE);
}
Aggregations