Trait snarkvm_console_network::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Environment for CanaryV0

source§

const EDWARDS_A: Self::Field = Console::EDWARDS_A

source§

const EDWARDS_D: Self::Field = Console::EDWARDS_D

source§

const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A

source§

const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B

source§

type Affine = <Console as Environment>::Affine

source§

type BigInteger = <Console as Environment>::BigInteger

source§

type Field = <Console as Environment>::Field

source§

type PairingCurve = <Console as Environment>::PairingCurve

source§

type Projective = <Console as Environment>::Projective

source§

type Scalar = <Console as Environment>::Scalar

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

source§

impl Environment for MainnetV0

source§

const EDWARDS_A: Self::Field = Console::EDWARDS_A

source§

const EDWARDS_D: Self::Field = Console::EDWARDS_D

source§

const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A

source§

const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B

source§

type Affine = <Console as Environment>::Affine

source§

type BigInteger = <Console as Environment>::BigInteger

source§

type Field = <Console as Environment>::Field

source§

type PairingCurve = <Console as Environment>::PairingCurve

source§

type Projective = <Console as Environment>::Projective

source§

type Scalar = <Console as Environment>::Scalar

source§

impl Environment for TestnetV0

source§

const EDWARDS_A: Self::Field = Console::EDWARDS_A

source§

const EDWARDS_D: Self::Field = Console::EDWARDS_D

source§

const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A

source§

const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B

source§

type Affine = <Console as Environment>::Affine

source§

type BigInteger = <Console as Environment>::BigInteger

source§

type Field = <Console as Environment>::Field

source§

type PairingCurve = <Console as Environment>::PairingCurve

source§

type Projective = <Console as Environment>::Projective

source§

type Scalar = <Console as Environment>::Scalar