Type Alias Halo2Loader

Source
pub type Halo2Loader<'chip> = Halo2Loader<G1Affine, BaseFieldEccChip<'chip>>;

Aliased Type§

struct Halo2Loader<'chip> { /* private fields */ }

Implementations

Source§

impl<C, EccChip> Halo2Loader<C, EccChip>
where C: CurveAffine, EccChip: EccInstructions<C>,

Source

pub fn new( ecc_chip: EccChip, ctx: <EccChip as EccInstructions<C>>::Context, ) -> Rc<Halo2Loader<C, EccChip>>

Source

pub fn into_ctx(self) -> <EccChip as EccInstructions<C>>::Context

Source

pub fn take_ctx(&self) -> <EccChip as EccInstructions<C>>::Context

Takes EccInstructions::Context from the RefCell, leaving with Default value

Source

pub fn ecc_chip(&self) -> Ref<'_, EccChip>

Returns reference of EccInstructions.

Source

pub fn scalar_chip( &self, ) -> Ref<'_, <EccChip as EccInstructions<C>>::ScalarChip>

Returns reference of EccInstructions::ScalarChip.

Source

pub fn ctx(&self) -> Ref<'_, <EccChip as EccInstructions<C>>::Context>

Returns reference of EccInstructions::Context.

Source

pub fn ctx_mut(&self) -> RefMut<'_, <EccChip as EccInstructions<C>>::Context>

Returns mutable reference of EccInstructions::Context.

Source

pub fn assign_scalar( self: &Rc<Halo2Loader<C, EccChip>>, scalar: <C as PrimeCurveAffine>::Scalar, ) -> Scalar<C, EccChip>

Assign a field element witness.

Source

pub fn scalar_from_assigned( self: &Rc<Halo2Loader<C, EccChip>>, assigned: <EccChip as EccInstructions<C>>::AssignedScalar, ) -> Scalar<C, EccChip>

Returns Scalar with assigned field element.

Source

pub fn assign_ec_point( self: &Rc<Halo2Loader<C, EccChip>>, ec_point: C, ) -> EcPoint<C, EccChip>

Assign an elliptic curve point witness.

Source

pub fn ec_point_from_assigned( self: &Rc<Halo2Loader<C, EccChip>>, assigned: <EccChip as EccInstructions<C>>::AssignedEcPoint, ) -> EcPoint<C, EccChip>

Returns EcPoint with assigned elliptic curve point.

Trait Implementations

Source§

impl<C, EccChip> Debug for Halo2Loader<C, EccChip>
where C: Debug + CurveAffine, EccChip: Debug + EccInstructions<C>, <EccChip as EccInstructions<C>>::Context: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more