XRP Ledger Apex is back in Amsterdam

Register Now
Last updated
Edit

random

[Source]

The random command provides a random number to be used as a source of entropy for random number generation by clients.

Request Format

An example of the request format:

  1. WebSocket
  2. JSON-RPC
  3. Commandline
{
    "id": 1,
    "command": "random"
}

The request includes no parameters.

Response Format

An example of a successful response:

  1. WebSocket
  2. JSON-RPC
  3. Commandline
{
    "id": 1,
    "result": {
        "random": "8ED765AEBBD6767603C2C9375B2679AEC76E6A8133EF59F04F9FC1AAA70E41AF"
    },
    "status": "success",
    "type": "response"
}

The response follows the standard format, with a successful result containing the following field:

FieldTypeDescription
randomStringRandom 256-bit hex value.

Possible Errors

  • Any of the universal error types.
  • internal - Some internal error occurred, possibly relating to the random number generator.