For the complete documentation index, see llms.txt. This page is also available as Markdown.

random

Provides a random number to be used as a source of entropy for random number generation by clients.

This method will use 20 Compute Units.


Reference: Here

Parameters

None

Returns

  • random (string) Random 256-bit hex value.

// Result
{
  "result": {
    "random": "31961697CC7874B85BCA6F0F731F0C2449122BFCB9E74A8493F6C91343B6D81D",
    "status": "success"
  }
}
curl https://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"method":"random","params":[{}]}'

Over WebSocket, send {"id":1,"command":"random"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.

Last updated

Was this helpful?