snarkvm_console_algorithms::environment

Trait Environment

Source
pub trait Environment:
    'static
    + Copy
    + Clone
    + Debug
    + PartialEq
    + Eq
    + Hash
    + Serialize
    + DeserializeOwned
    + Send
    + Sync {
    type Affine: AffineCurve<Projective = Self::Projective, BaseField = Self::Field, ScalarField = Self::Scalar, Coordinates = (Self::Field, Self::Field)>;
    type BigInteger: BigInteger;
    type Field: PrimeField<BigInteger = Self::BigInteger> + SquareRootField + Copy + Zeroize;
    type PairingCurve: PairingEngine<Fr = Self::Field>;
    type Projective: ProjectiveCurve<Affine = Self::Affine, BaseField = Self::Field, ScalarField = Self::Scalar>;
    type Scalar: PrimeField<BigInteger = Self::BigInteger> + Copy + Zeroize;

    const EDWARDS_A: Self::Field;
    const EDWARDS_D: Self::Field;
    const MONTGOMERY_A: Self::Field;
    const MONTGOMERY_B: Self::Field;
    const MAX_STRING_BYTES: u32 = 255u32;

    // Provided method
    fn halt<S, T>(message: S) -> T
       where S: Into<String> { ... }
}

Required Associated Constants§

Source

const EDWARDS_A: Self::Field

The coefficient A of the twisted Edwards curve.

Source

const EDWARDS_D: Self::Field

The coefficient D of the twisted Edwards curve.

Source

const MONTGOMERY_A: Self::Field

The coefficient A of the Montgomery curve.

Source

const MONTGOMERY_B: Self::Field

The coefficient B of the Montgomery curve.

Provided Associated Constants§

Source

const MAX_STRING_BYTES: u32 = 255u32

The maximum number of bytes allowed in a string.

Required Associated Types§

Source

type Affine: AffineCurve<Projective = Self::Projective, BaseField = Self::Field, ScalarField = Self::Scalar, Coordinates = (Self::Field, Self::Field)>

Source

type BigInteger: BigInteger

Source

type Field: PrimeField<BigInteger = Self::BigInteger> + SquareRootField + Copy + Zeroize

Source

type PairingCurve: PairingEngine<Fr = Self::Field>

Source

type Projective: ProjectiveCurve<Affine = Self::Affine, BaseField = Self::Field, ScalarField = Self::Scalar>

Source

type Scalar: PrimeField<BigInteger = Self::BigInteger> + Copy + Zeroize

Provided Methods§

Source

fn halt<S, T>(message: S) -> T
where S: Into<String>,

Halts the program from further synthesis, evaluation, and execution in the current environment.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Environment for Console

Source§

const EDWARDS_A: <Console as Environment>::Field = <EdwardsParameters as TwistedEdwardsParameters>::EDWARDS_A

Source§

const EDWARDS_D: <Console as Environment>::Field = <EdwardsParameters as TwistedEdwardsParameters>::EDWARDS_D

Source§

const MONTGOMERY_A: <Console as Environment>::Field = <EdwardsParameters as MontgomeryParameters>::MONTGOMERY_A

Source§

const MONTGOMERY_B: <Console as Environment>::Field = <EdwardsParameters as MontgomeryParameters>::MONTGOMERY_B

Source§

type Affine = Affine<EdwardsParameters>

Source§

type BigInteger = <<Console as Environment>::Field as PrimeField>::BigInteger

Source§

type Field = <<Console as Environment>::Affine as AffineCurve>::BaseField

Source§

type PairingCurve = Bls12<Bls12_377Parameters>

Source§

type Projective = <<Console as Environment>::Affine as AffineCurve>::Projective

Source§

type Scalar = <<Console as Environment>::Affine as AffineCurve>::ScalarField