public final class SendTransaction extends APIServlet.APIRequestHandler
BroadcastTransaction
, the purpose of SendTransaction
is to support client side
signing of transactions.
Unlike BroadcastTransaction
, does not validate the transaction and requires adminPassword parameter to avoid
abuses. Also does not re-broadcast the transaction and does not store it as unconfirmed transaction.
Clients first submit their transaction using CreateTransaction
without providing the secret phrase.
The client then signs and submits the signed transaction using SendTransaction
The default wallet implements this procedure in nrs.server.js which you can use as reference.
SendTransaction
accepts the following parameters:
transactionJSON - JSON representation of the signed transaction
transactionBytes - row bytes composing the signed transaction bytes excluding the prunable appendages
prunableAttachmentJSON - JSON representation of the prunable appendages
Clients can submit either the signed transactionJSON or the signed transactionBytes but not both.
In case the client submits transactionBytes for a transaction containing prunable appendages, the client also needs
to submit the prunableAttachmentJSON parameter which includes the attachment JSON for the prunable appendages.
Prunable appendages are classes implementing the Appendix.Prunable
interface.
DESCRIPTION_FIELD, MESSAGE_FIELD, NAME_FIELD
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowRequiredBlockParameters() |
protected org.json.simple.JSONStreamAware |
processRequest(javax.servlet.http.HttpServletRequest req) |
protected boolean |
requireBlockchain() |
protected boolean |
requirePassword() |
protected boolean |
requirePost() |
getAPITags, getFileParameter, getParameters, processRequest, requireFullClient, startDbTransaction
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws ParameterException
processRequest
in class APIServlet.APIRequestHandler
ParameterException
protected boolean requirePost()
requirePost
in class APIServlet.APIRequestHandler
protected boolean requirePassword()
requirePassword
in class APIServlet.APIRequestHandler
protected boolean requireBlockchain()
requireBlockchain
in class APIServlet.APIRequestHandler
protected final boolean allowRequiredBlockParameters()
allowRequiredBlockParameters
in class APIServlet.APIRequestHandler