Skip to main content

Random

Namespace: IotaSdk

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

public class Random : IRandom, System.IDisposable

Inheritance ObjectRandom
Implements IRandom, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

Random(UInt64)

public Random(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

Id()

The object's ID.

public ObjectId Id()

Returns

ObjectId

TryFromBcs(Byte[])

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

public static Random TryFromBcs(Byte[] bytes)

Parameters

bytes Byte[]

Returns

Random

Exceptions

SdkFfiException

TryFromObject(Object)

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

public static Random TryFromObject(Object object)

Parameters

object Object

Returns

Random

Exceptions

SdkFfiException