Package nxt.http
Class CurrencyMint
java.lang.Object
nxt.http.APIServlet.APIRequestHandler
nxt.http.CreateTransaction
nxt.http.CurrencyMint
Generate new currency units
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
Parameters
- currency - currency id of the minted currency
- nonce - a unique nonce provided by the miner
- unitsQNT - 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
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.account.AccountLedger.LedgerEvent, nxt.account.AccountLedger.LedgerEventId, nxt.account.Account, nxt.ms.CurrencyMintingAttachment)-
Nested Class Summary
Nested classes/interfaces inherited from class nxt.http.CreateTransaction
CreateTransaction.CreateTransactionParameters -
Method Summary
Modifier and TypeMethodDescriptionprotected org.json.simple.JSONStreamAwareprocessRequest(javax.servlet.http.HttpServletRequest req) Methods inherited from class nxt.http.CreateTransaction
allowRequiredBlockParameters, createTransaction, getCommonFileParameters, getCommonParameters, getRecipientFileParameters, getRecipientParameters, isChainSpecific, requirePost, transactionParametersMethods inherited from class nxt.http.APIServlet.APIRequestHandler
canHaveRecipient, getAPITags, getCreateTransactionTypes, getFileParameters, getParameters, getSensitiveParameters, isIgnisOnly, isTextArea, processRequest, requireBlockchain, requiredBlockUpdateLock, requireFullClient, requirePassword, startDbTransaction
-
Method Details
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws NxtException - Specified by:
processRequestin classAPIServlet.APIRequestHandler- Throws:
NxtException
-