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
| Param | Type | Description |
|---|---|---|
| authorization | Authorization | An Authorization for a function |
| fee_authorization | Authorization | The authorization for the credits.aleo/fee_public or credits.aleo/fee_private function that pays the fee for the execution |
| broadcast | boolean | Flag that indicates whether the remote proving service should attempt to submit the transaction on the caller's behalf |
| return | ProvingRequest | ProvingRequest object |
fromString
Creates a ProvingRequest from a string representation
fromString(request) ► ProvingRequest
| Param | Type | Description |
|---|---|---|
| request | string | String representation of the ProvingRequest |
| return | ProvingRequest | ProvingRequest object |
toString
Creates a string representation of the ProvingRequest
toString() ► string
| Param | Type |
|---|---|
| return | string |
fromBytesLe
Creates a ProvingRequest from a left-endian byte representation
fromBytesLe(bytes) ► ProvingRequest
| Param | Type | Description |
|---|---|---|
| bytes | Uint8Array | Left-endian bytes representing the proving request |
| return | ProvingRequest | ProvingRequest object |
toBytesLe
Creates a left-endian byte representation of the ProvingRequest
toBytesLe() ► Uint8Array
| Param | Type |
|---|---|
| return | Uint8Array |
authorization
Get the Authorization of the main function in the ProvingRequest
authorization() ► Authorization
| Param | Type |
|---|---|
| return | Authorization |
feeAuthorization
Get the fee Authorization in the ProvingRequest
feeAuthorization() ► Authorization | undefined
| Param | Type |
|---|---|
| return | Authorization |
broadcast
Get the broadcast flag set in the ProvingRequest
broadcast() ► boolean
| Param | Type |
|---|---|
| return | boolean |
equals
Check if a ProvingRequest is the same as another ProvingRequest
equals(other) ► boolean
| Param | Type | Description |
|---|---|---|
| other | ProvingRequest | The other ProvingRequest to compare |
| return | boolean | True if the ProvingRequests are equal |