Skip to main content

Random

Random Objects

class Random(RandomProtocol)

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

try_from_bcs

@classmethod
def try_from_bcs(cls, bytes: bytes) -> Random

Decode from BCS bytes, without validating the on-chain type tag.

try_from_object

@classmethod
def try_from_object(cls, object: Object) -> Random

Decode from an on-chain object, validating its Move type tag.

id

def id() -> ObjectId

The object's ID.