Pseudorandom Number Generator
Field
Description
Methods
Method
Type
Requirement
//Create the transaction with range set
TransactionResponse transaction = new PrngTransaction()
//Set the range
.setRange(250)
.execute(client);
//Get the record
TransactionRecord transactionRecord = transaction.getRecord(client);
//Get the number
int prngNumber = transactionRecord.prngNumber;
System.out.println(prngNumber);
//SDK version 2.17.0//Create the transaction with range set
const transaction = await new PrngTransaction()
//Set the range
.setRange(250)
.execute(client);
//Get the record
const transactionRecord = await transaction.getRecord(client);
//Get the number
const prngNumber = transactionRecord.prngNumber;
console.log(prngNumber);
//SDK version 2.17.0Last updated