Module random

Source
Expand description

The ‘random’ submodule provides functionality for initializing and retrieving random numbers for use on the Internet Computer (IC).

Constants§

RNG

Functions§

get_random_number
Retrieves a random number for use in the canister. Assumes init_ic_rand has been called previously.
init_ic_rand
Initializes the random number generator for the canister. This function should be called in the canister’s init hook and post-update hook.