nxt.http

## Class BroadcastTransaction

- java.lang.Object
- - nxt.http.APIServlet.APIRequestHandler
  - - nxt.http.BroadcastTransaction

-     public final class BroadcastTransaction
      extends APIServlet.APIRequestHandler

  The purpose of broadcast transaction is to support client side signing of transactions. Clients first submit their transaction using `CreateTransaction` without providing the secret phrase.
  In response the client receives the unsigned transaction JSON and transaction bytes.

  The client then signs and submits the signed transaction using `BroadcastTransaction`

  The default wallet implements this procedure in nrs.server.js which you can use as reference.

  `BroadcastTransaction` 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.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()`
    `protected boolean` | `isChainSpecific()`
    `protected org.json.simple.JSONStreamAware` | `processRequest(javax.servlet.http.HttpServletRequest req)`
    `protected boolean` | `requirePost()`

    - ### Methods inherited from class nxt.http.APIServlet.APIRequestHandler

      `getAPITags, getFileParameter, getParameters, isIgnisOnly, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, startDbTransaction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### processRequest

          protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
                                                            throws ParameterException

      Specified by:
        `processRequest` in class `APIServlet.APIRequestHandler`
      Throws:
        `ParameterException`

    - #### requirePost

          protected boolean requirePost()

      Overrides:
        `requirePost` in class `APIServlet.APIRequestHandler`

    - #### allowRequiredBlockParameters

          protected final boolean allowRequiredBlockParameters()

      Overrides:
        `allowRequiredBlockParameters` in class `APIServlet.APIRequestHandler`

    - #### isChainSpecific

          protected boolean isChainSpecific()

      Overrides:
        `isChainSpecific` in class `APIServlet.APIRequestHandler`