Package io.nem.symbol.catapult.builders
Class VrfProofBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.VrfProofBuilder
-
- All Implemented Interfaces:
Serializer
public class VrfProofBuilder extends java.lang.Object implements Serializer
Verfiable random function proof
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVrfProofBuilder(ProofGammaDto gamma, ProofVerificationHashDto verificationHash, ProofScalarDto scalar)Constructor.protectedVrfProofBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VrfProofBuildercreate(ProofGammaDto gamma, ProofVerificationHashDto verificationHash, ProofScalarDto scalar)Creates an instance of VrfProofBuilder.ProofGammaDtogetGamma()Gets gamma.ProofScalarDtogetScalar()Gets scalar.intgetSize()Gets the size of the object.ProofVerificationHashDtogetVerificationHash()Gets verification hash.static VrfProofBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of VrfProofBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
VrfProofBuilder
protected VrfProofBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
VrfProofBuilder
protected VrfProofBuilder(ProofGammaDto gamma, ProofVerificationHashDto verificationHash, ProofScalarDto scalar)
Constructor.- Parameters:
gamma- Gamma.verificationHash- Verification hash.scalar- Scalar.
-
-
Method Detail
-
loadFromBinary
public static VrfProofBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of VrfProofBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of VrfProofBuilder.
-
create
public static VrfProofBuilder create(ProofGammaDto gamma, ProofVerificationHashDto verificationHash, ProofScalarDto scalar)
Creates an instance of VrfProofBuilder.- Parameters:
gamma- Gamma.verificationHash- Verification hash.scalar- Scalar.- Returns:
- Instance of VrfProofBuilder.
-
getGamma
public ProofGammaDto getGamma()
Gets gamma.- Returns:
- Gamma.
-
getVerificationHash
public ProofVerificationHashDto getVerificationHash()
Gets verification hash.- Returns:
- Verification hash.
-
getScalar
public ProofScalarDto getScalar()
Gets scalar.- Returns:
- Scalar.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Returns:
- Size in bytes.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
-