Show / Hide Table of Contents

Class PseudoRandomNumberParams

Creates a Pseudo Random Number request from the Hedera Network.

Inheritance
object
TransactionParams
TransactionParams<TransactionReceipt>
PseudoRandomNumberParams
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class PseudoRandomNumberParams : TransactionParams<TransactionReceipt>
Examples

Ask the network for a bounded integer (returned as RangedPseudoRandomNumberRecord in the mirror record); omit MaxValue to get 48 raw bytes (BytesPseudoRandomNumberRecord) instead:

// With MaxValue set, the network returns an int in [0, MaxValue).
// Mirror-node record type will be RangedPseudoRandomNumberRecord.
var receipt = await client.GeneratePseudoRandomNumberAsync(new PseudoRandomNumberParams
{
    MaxValue = 100
});
Console.WriteLine($"PRNG tx id: {receipt.TransactionId}");

Fields

| Edit this page View Source

MaxValue

If specified, the maximum value for the pseudo random number generated.

Declaration
public int? MaxValue
Field Value
Type Description
int?

Properties

| Edit this page View Source

CancellationToken

Optional cancellation token to interrupt the random number generation submission process.

Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
Type Description
CancellationToken?
| Edit this page View Source

Signatory

Additional private key, keys or signing callback method.

Declaration
public Signatory? Signatory { get; set; }
Property Value
Type Description
Signatory
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph