Skip to main content

ProvingRequest

Overview

Represents a proving request to a prover service. The ProvingRequest class encapsulates the authorization for a function execution along with an optional fee authorization, and can be used to request proof generation from a remote proving service.

Methods

constructor

Creates a new ProvingRequest from a function Authorization and an optional fee Authorization

new ProvingRequest(authorization, fee_authorization, broadcast)ProvingRequest
ParamTypeDescription
authorizationAuthorizationAn Authorization for a function
fee_authorizationAuthorizationThe authorization for the credits.aleo/fee_public or credits.aleo/fee_private function that pays the fee for the execution
broadcastbooleanFlag that indicates whether the remote proving service should attempt to submit the transaction on the caller's behalf
returnProvingRequestProvingRequest object

fromString

Creates a ProvingRequest from a string representation

fromString(request)ProvingRequest
ParamTypeDescription
requeststringString representation of the ProvingRequest
returnProvingRequestProvingRequest object

toString

Creates a string representation of the ProvingRequest

toString() ► string
ParamType
returnstring

fromBytesLe

Creates a ProvingRequest from a left-endian byte representation

fromBytesLe(bytes)ProvingRequest
ParamTypeDescription
bytesUint8ArrayLeft-endian bytes representing the proving request
returnProvingRequestProvingRequest object

toBytesLe

Creates a left-endian byte representation of the ProvingRequest

toBytesLe()Uint8Array
ParamType
returnUint8Array

authorization

Get the Authorization of the main function in the ProvingRequest

authorization()Authorization
ParamType
returnAuthorization

feeAuthorization

Get the fee Authorization in the ProvingRequest

feeAuthorization()Authorization | undefined
ParamType
returnAuthorization

broadcast

Get the broadcast flag set in the ProvingRequest

broadcast() ► boolean
ParamType
returnboolean

equals

Check if a ProvingRequest is the same as another ProvingRequest

equals(other) ► boolean
ParamTypeDescription
otherProvingRequestThe other ProvingRequest to compare
returnbooleanTrue if the ProvingRequests are equal