Comment on page
random
// yarn add @tatumio/tatum
import { TatumSDK, Xrp, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<Xrp>({network: Network.XRP})
const res = await tatum.rpc.random()
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
The
random
method is an RPC method provided by the Ripple (XRP) blockchain. This command returns a random number that can be used as a source of entropy for random number generation by clients. It's particularly useful in scenarios where a high-entropy random number is required, such as cryptographic operations or unique identifier generation.The
random
method accepts no parameters.The
random
method returns an object with the following fields:random
: A Random 256-bit hex value.status
: The status of the request, typically "success".
{
"method": "random",
"params": [
{}
]
}
{
"result": {
"random": "4E57146AA47BC6E88FDFE8BAA235B900126C916B6CC521550996F590487B837A",
"status": "success"
}
}
This response includes a random 256-bit hex value generated by the XRP node.
Last modified 18d ago