new PublicRangeProof66563(originalNote, publicComparison, sender, isGreaterOrEqual, utilityNote, safeguard)
Constructs a public range proof that a note is greater than or equal to, or less than or equal to a public integer. Control of whether a > or < proof is constructed is determined by an input boolean 'isGreaterOrEqual'.
The balancing relation being satisfied is: originalNoteValue = publicComparison + utilityNoteValue
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
originalNote |
Object |
the note that a user is comparing against the publicComparison |
|
publicComparison |
Number |
publicly visible integer, which the note is being compared against |
|
sender |
string |
Ethereum address of the transaction sender |
|
isGreaterOrEqual |
bool |
modifier controlling whether this is a greater than, or less than proof. If true, it is a proof that originalNoteValue > publicComparison. If false, it is a proof that originalNoteValue < publicComparison |
|
utilityNote |
Note |
a helper note that is needed to satisfy a cryptographic balancing relation |
|
safeguard |
boolean | true |
Boolean flag to turn on a balancing check prior to construction of proof |
Methods
checkBalancingRelationShipSatisfied()
Check that notes have been supplied which satisfy the publicRange balancing relationship
Balancing relationship: originalNoteValue = publicComparison + utilityNoteValue
proofRelationChoice()
Control whether the proof is used for a greater than (originalNote > publicComparison) or less than (originalNote < publicComparison) proof.
If greater than, the input publicComparison value is unchanged.
If less than, the publicComparison value is negated; in order to satisfy the balancing relationship