getConstants
Retrieves network constants including blockchain parameters, transaction types, currency types, hash algorithms, peer states, chain configurations, and API tags.
Endpoint
GET /nxt?requestType=getConstants
Parameters
None
Request Example
curl "http://localhost:22024/nxt?requestType=getConstants"
Response
{
"accountPrefix": "SHAMWARI",
"genesisBlockId": "12345678901234567890",
"epochBeginning": 123456789,
"maxBetaBlockPayloadLength": 123456,
"maxNumberOfFxtTransactions": 123456,
"maxNumberOfBetaTransaction": 123456,
"maxArbitraryMessageLength": 160,
"maxEncryptedMessageLength": 160,
"maxPrunableMessageLength": 1280,
"maxPrunableEncryptedMessageLength": 1280,
"lastKnownBlock": {
"id": "12345678901234567890",
"height": 1000000
},
"leasingDelay": 1440,
"transactionTypes": {},
"transactionSubTypes": {},
"currencyTypes": {
"UNISSUABLE": 1,
"ISSUABLE": 2,
"EXCHANGABLE": 4,
"CLAIMABLE": 8,
"NON_TRADABLE": 16
},
"votingModels": {
"NONE": 0,
"TRANSACTION": 1,
"ACCOUNT": 2,
"CURRENCY": 3,
"EXCLUSIVE_TRANSACTION": 4,
"EXCLUSIVE_ACCOUNT": 5
},
"maxContractFileDataLength": 1024,
"minBalanceModels": {
"NONE": 0,
"NATURAL": 1,
"MIXED": 2
},
"hashAlgorithms": {
"RIPEMD160": 0,
"SHA256": 1,
"SHA3": 5,
"SKEIN256": 6,
"SKEIN512": 7,
"Keccak256": 8,
"Keccak512": 9,
"SHA3_3": 10,
"SHA3_4": 11,
"SHA3_5": 12,
"SHA3_6": 13,
"SHA3_7": 14,
"SHA3_8": 15
},
"phasingHashAlgorithms": {},
"maxPhasingDuration": 1440,
"mintingHashAlgorithms": {},
"totemTypes": {
"NONE": 0,
"BASIC": 1,
"PRTZ": 2,
"PRTS": 3
},
"taxRateTypes": {},
"peerStates": {
"RUNNING": 0,
"UPDATING": 1,
"DISCONNECTED": 2,
"UNWELL": 3,
"BANNED": 4
},
"requestTypes": {},
"disabledAPIs": [],
"disabledAPITags": [],
"proxyNotForwardedRequests": [],
"chains": {
"FXT": 1,
"BTC": 2
},
"chainProperties": {},
"initialBaseTarget": "12345678901234567890",
"secretPhraseWords": [2, 3, 4, 5],
"bip32PathPrefix": [],
"requestProcessingTime": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
accountPrefix | string | Account RS prefix (e.g. SHAMWARI) |
genesisBlockId | string | Genesis block ID |
epochBeginning | number | Epoch beginning timestamp |
maxBetaBlockPayloadLength | number | Maximum beta block payload length |
maxNumberOfFxtTransactions | number | Maximum number of FXT transactions per block |
maxNumberOfBetaTransaction | number | Maximum number of beta (childchain) transactions per block |
maxArbitraryMessageLength | number | Maximum arbitrary message length |
maxEncryptedMessageLength | number | Maximum encrypted message length |
maxPrunableMessageLength | number | Maximum prunable message length |
maxPrunableEncryptedMessageLength | number | Maximum prunable encrypted message length |
lastKnownBlock | object | Last known block ID and height |
leasingDelay | number | Leasing delay in blocks |
transactionTypes | object | Transaction types organized by type and subtype |
transactionSubTypes | object | Transaction subtypes with properties (canHaveRecipient, mustHaveRecipient, isPhasingSafe, isPhasable, etc.) |
currencyTypes | object | Currency type codes |
votingModels | object | Voting model codes |
maxContractFileDataLength | number | Maximum contract file data length |
minBalanceModels | object | Minimum balance model codes |
hashAlgorithms | object | Hash algorithm codes |
phasingHashAlgorithms | object | Hash algorithms accepted for phasing |
maxPhasingDuration | number | Maximum phasing duration in blocks |
mintingHashAlgorithms | object | Hash algorithms accepted for currency minting |
totemTypes | object | Totem type codes |
taxRateTypes | object | Tax rate type metadata |
peerStates | object | Peer state ordinal values |
requestTypes | object | All API request types and their handler properties |
disabledAPIs | array | List of disabled API request names |
disabledAPITags | array | List of disabled API tags |
proxyNotForwardedRequests | array | API requests not forwarded by proxy |
chains | object | Chain names and IDs |
chainProperties | object | Per-chain properties (currency, admin accounts, tax rates, etc.) |
initialBaseTarget | string | Initial base target as unsigned integer string |
secretPhraseWords | array | BIP32 secret phrase word counts |
bip32PathPrefix | array | BIP32 path prefix components |
requestProcessingTime | number | API request processing time in milliseconds |
Source
GetConstants.java
Tags
INFO