@blockchaincommons/rand - v1.0.0-beta.3
    Preparing search index...

    Module @blockchaincommons/rand

    @blockchaincommons/rand - random number primitives for the Blockchain Commons stack.

    • RandomNumberGenerator: the contract (nextU32, nextU64, fillBytes).
    • SecureRng / secureRng: Web Crypto backed.
    • SeededRng: deterministic xoshiro256**, identical to the Rust and Swift implementations for the same seed; SeededRng.forTesting() is the shared cross-platform fixture seed; state and clone() persist and fork it.
    • randomBytes, fillRandomBytes, randomBool: helpers taking { rng } and defaulting to the secure generator.
    • RandError: the one error type, with a code for every failure.
    • Bounded and ranged integer samplers live in @blockchaincommons/rand/samplers.
    RandError
    SecureRng
    SeededRng
    RandBounds
    RandomNumberGenerator
    RngOptions
    RandErrorCode
    RandParameter
    RandSeedParameter
    RandGeneratorMethod
    RandErrorDetails
    Seed
    TEST_SEED
    randomBytes
    fillRandomBytes
    randomBool
    testRandomBytes
    secureRng