Skip to main content

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

FieldTypeDescription
accountPrefixstringAccount RS prefix (e.g. SHAMWARI)
genesisBlockIdstringGenesis block ID
epochBeginningnumberEpoch beginning timestamp
maxBetaBlockPayloadLengthnumberMaximum beta block payload length
maxNumberOfFxtTransactionsnumberMaximum number of FXT transactions per block
maxNumberOfBetaTransactionnumberMaximum number of beta (childchain) transactions per block
maxArbitraryMessageLengthnumberMaximum arbitrary message length
maxEncryptedMessageLengthnumberMaximum encrypted message length
maxPrunableMessageLengthnumberMaximum prunable message length
maxPrunableEncryptedMessageLengthnumberMaximum prunable encrypted message length
lastKnownBlockobjectLast known block ID and height
leasingDelaynumberLeasing delay in blocks
transactionTypesobjectTransaction types organized by type and subtype
transactionSubTypesobjectTransaction subtypes with properties (canHaveRecipient, mustHaveRecipient, isPhasingSafe, isPhasable, etc.)
currencyTypesobjectCurrency type codes
votingModelsobjectVoting model codes
maxContractFileDataLengthnumberMaximum contract file data length
minBalanceModelsobjectMinimum balance model codes
hashAlgorithmsobjectHash algorithm codes
phasingHashAlgorithmsobjectHash algorithms accepted for phasing
maxPhasingDurationnumberMaximum phasing duration in blocks
mintingHashAlgorithmsobjectHash algorithms accepted for currency minting
totemTypesobjectTotem type codes
taxRateTypesobjectTax rate type metadata
peerStatesobjectPeer state ordinal values
requestTypesobjectAll API request types and their handler properties
disabledAPIsarrayList of disabled API request names
disabledAPITagsarrayList of disabled API tags
proxyNotForwardedRequestsarrayAPI requests not forwarded by proxy
chainsobjectChain names and IDs
chainPropertiesobjectPer-chain properties (currency, admin accounts, tax rates, etc.)
initialBaseTargetstringInitial base target as unsigned integer string
secretPhraseWordsarrayBIP32 secret phrase word counts
bip32PathPrefixarrayBIP32 path prefix components
requestProcessingTimenumberAPI request processing time in milliseconds

Source

GetConstants.java

Tags

INFO