Skip to main content

Full Hash To Id

Converts a full hash (hex string) to a numeric long ID. This is useful for extracting the ID portion from a transaction or block full hash.

Request

GET /nxt?requestType=fullHashToId&fullHash=<hex>

Parameters

NameTypeRequiredDescription
fullHashstringYesFull hash as a hex-encoded string.

Response

{
"longId": "1234567890123456789",
"stringId": "1234567890123456789"
}

Response Fields

FieldTypeDescription
longIdstringSigned long ID (or negative if unsigned exceeds Long.MAX_VALUE).
stringIdstringUnsigned string ID.

Error Responses

ConditionResponse
Invalid hex stringJSONResponses.OVERFLOW (if parsing fails)

Notes

  • This endpoint does not require the blockchain to be running (requireBlockchain = false).
  • Not chain-specific.
  • Does not require admin password authentication (requirePassword = false).

Source: FullHashToId.java.

Example

curl "http://localhost:22024/nxt?requestType=fullHashToId&fullHash=abc123..."