Package nxt.http

Class CurrencyMint

  • public final class CurrencyMint
    extends APIServlet.APIRequestHandler
    Generate new currency units


    • 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)