Add Uncommitted^Sapling.
This commit is contained in:
parent
c1784f0fdf
commit
2c69abe268
|
@ -1,4 +1,5 @@
|
||||||
use pairing::{
|
use pairing::{
|
||||||
|
Field,
|
||||||
PrimeField,
|
PrimeField,
|
||||||
PrimeFieldRepr
|
PrimeFieldRepr
|
||||||
};
|
};
|
||||||
|
@ -165,6 +166,15 @@ pub struct Note<E: JubjubEngine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<E: JubjubEngine> Note<E> {
|
impl<E: JubjubEngine> Note<E> {
|
||||||
|
pub fn uncommitted() -> E::Fr {
|
||||||
|
// The smallest u-coordinate that is not on the curve
|
||||||
|
// is one.
|
||||||
|
// TODO: This should be relocated to JubjubEngine as
|
||||||
|
// it's specific to the curve we're using, not all
|
||||||
|
// twisted edwards curves.
|
||||||
|
E::Fr::one()
|
||||||
|
}
|
||||||
|
|
||||||
/// Computes the note commitment, returning the full point.
|
/// Computes the note commitment, returning the full point.
|
||||||
fn cm_full_point(&self, params: &E::Params) -> edwards::Point<E, PrimeOrder>
|
fn cm_full_point(&self, params: &E::Params) -> edwards::Point<E, PrimeOrder>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue