Skip to main content

Random

open class Random : Disposable, AutoCloseable, RandomInterface

A typed view of the on-chain 0x2::random::Random object (the 0x8 singleton holding the global randomness state).

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
idopen override fun id(): ObjectId
The object's ID.
toStringopen override fun toString(): String

Companion object functions

NameSummary
tryFromBcsfun tryFromBcs(bytes: ByteArray): Random
Decode from BCS bytes, without validating the on-chain type tag.
tryFromObjectfun tryFromObject(object: Object): Random
Decode from an on-chain object, validating its Move type tag.