Class PseudoRandomNumberParams
Creates a Pseudo Random Number request from the Hedera Network.
Inherited Members
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 SourceMaxValue
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 SourceCancellationToken
Optional cancellation token to interrupt the random number generation submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Signatory
Additional private key, keys or signing callback method.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |