public final class IssueCurrency extends APIServlet.APIRequestHandlerIssue a currency on the NXT blockchain
A currency is the basic block of the NXT Monetary System it can be exchanged with NXT, transferred between accounts, minted using proof of work methods, reserved and claimed as a crowd funding tool.
Pass the following parameters in order to issue a currency
- name - unique identifier of the currency composed of between 3 to 10 latin alphabetic symbols and numbers, name must be no shorter than code. name and code are mutually unique.
- code - unique 3 to 5 letter currency trading symbol composed of upper case latin letters
- description - free text description of the currency limited to 1000 characters
- type - a numeric value representing a bit vector modeling the currency capabilities (see below)
- ruleset - for future use, always set to 0
- maxSupply - the total number of currency units which can be created
- initialSupply - the number of currency units created when the currency is issued (pre-mine)
- decimals - currency units are divisible to this number of decimals
- issuanceHeight - the blockchain height at which the currency would become active
- minReservePerUnitNQT - the minimum NXT value per unit to allow the currency to become active
- reserveSupply - the number of units that will be distributed to founders when currency becomes active (less initialSupply)
- minDifficulty - for mint-able currency, the exponent of the initial difficulty.
- maxDifficulty - for mint-able currency, the exponent of the final difficulty.
- algorithm - the hashing
algorithmused for minting. For
- A given currency can not be neither
CurrencyType.RESERVABLEcurrency becomes active once the blockchain height reaches the currency issuance height.
At this time, if the minReservePerUnitNQT has not been reached the currency issuance is cancelled and funds are returned to the founders.
Otherwise the currency becomes active and remains active until deleted, provided deletion is possible. When a
CurrencyType.RESERVABLEbecomes active, in case it is
CurrencyType.CLAIMABLEthe NXT used for reserving the currency are locked until they are claimed back. When a
CurrencyType.RESERVABLEbecomes active, in case it is non
CurrencyType.CLAIMABLEthe NXT used for reserving the currency are sent to the issuer account as crowd funding.
- When issuing a
CurrencyType.MINTABLEcurrency, the number of units per
CurrencyMintcannot exceed 0.01% of the total supply. Therefore make sure totalSupply > 10000 or otherwise the currency cannot be minted
- difficulty is calculated as follows
difficulty of minting the first unit is based on 2^minDifficulty
difficulty of minting the last unit is based on 2^maxDifficulty
difficulty increases linearly from min to max based on the ratio between the current number of units and the total supply
difficulty increases linearly with the number units minted per
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
Methods inherited from class nxt.http.APIServlet.APIRequestHandler
getAPITags, getFileParameter, getParameters, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, startDbTransaction
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws NxtException
protected final boolean requirePost()