nxt.http

## Class CurrencyMint

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

-     public final class CurrencyMint
      extends APIServlet.APIRequestHandler

  Generate new currency units

  Parameters

  - currency - currency id of the minted currency
  - nonce - a unique nonce provided by the miner
  - units - number of units minted per this transaction
  - counter - a sequential number counting the ordinal mint operation number per currency/account combination
    this ever increasing value ensures that the same mint transaction cannot execute more than once
  Each minting request triggers a hash calculation based on the submitted data and the currency hash algorithm
  The resulting hash code is compared to the target value derived from the current difficulty.
  If the hash code is smaller than the target the currency units are generated into the sender account.
  It is recommended to calculate the hash value offline before submitting the transaction.
  Use the `GetMintingTarget` transaction to retrieve the current hash target and then calculate the hash offline by following the procedure used in `CurrencyMint.mintCurrency(nxt.AccountLedger.LedgerEvent, long, nxt.Account, nxt.Attachment.MonetarySystemCurrencyMinting)`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()`
    `static java.util.List<java.lang.String>` | `getCommonParameters()`
    `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, 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 NxtException

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

    - #### requirePost

          protected final boolean requirePost()

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

    - #### allowRequiredBlockParameters

          protected final boolean allowRequiredBlockParameters()

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

    - #### getCommonParameters

          public static java.util.List<java.lang.String> getCommonParameters()