Skip to main content

VerifyingKey

Overview

Represents a verifying key for a function within an Aleo program. The VerifyingKey class provides methods for loading, serializing, and inspecting verifying keys which are used to verify zero-knowledge proofs generated by program executions.

Methods

checksum

Get the checksum of the verifying key

checksum() ► string
ParamType
returnstring

copy

Create a copy of the verifying key

copy()VerifyingKey
ParamType
returnVerifyingKey

fromBytes

Construct a new verifying key from a byte array

fromBytes(bytes)VerifyingKey
ParamTypeDescription
bytesUint8ArrayByte representation of a verifying key
returnVerifyingKeyVerifying key object

fromString

Create a verifying key from string

fromString(string)VerifyingKey
ParamTypeDescription
stringstringString representation of a verifying key
returnVerifyingKeyVerifying key object

toBytes

Create a byte array from a verifying key

toBytes()Uint8Array
ParamType
returnUint8Array

toString

Get a string representation of the verifying key

toString() ► string
ParamType
returnstring

numConstraints

Get the number of constraints associated with the circuit

numConstraints() ► number
ParamType
returnnumber