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>,
impl<C, EccChip> Halo2Loader<C, EccChip>where
C: CurveAffine,
EccChip: EccInstructions<C>,
Sourcepub fn new(
ecc_chip: EccChip,
ctx: <EccChip as EccInstructions<C>>::Context,
) -> Rc<Halo2Loader<C, EccChip>>
pub fn new( ecc_chip: EccChip, ctx: <EccChip as EccInstructions<C>>::Context, ) -> Rc<Halo2Loader<C, EccChip>>
Initialize a Halo2Loader
with given EccInstructions
and
EccInstructions::Context
.
Sourcepub fn into_ctx(self) -> <EccChip as EccInstructions<C>>::Context
pub fn into_ctx(self) -> <EccChip as EccInstructions<C>>::Context
Into EccInstructions::Context
.
Sourcepub fn take_ctx(&self) -> <EccChip as EccInstructions<C>>::Context
pub fn take_ctx(&self) -> <EccChip as EccInstructions<C>>::Context
Takes EccInstructions::Context
from the RefCell
, leaving with Default value
Sourcepub fn ecc_chip(&self) -> Ref<'_, EccChip>
pub fn ecc_chip(&self) -> Ref<'_, EccChip>
Returns reference of EccInstructions
.
Sourcepub fn scalar_chip(
&self,
) -> Ref<'_, <EccChip as EccInstructions<C>>::ScalarChip>
pub fn scalar_chip( &self, ) -> Ref<'_, <EccChip as EccInstructions<C>>::ScalarChip>
Returns reference of EccInstructions::ScalarChip
.
Sourcepub fn ctx(&self) -> Ref<'_, <EccChip as EccInstructions<C>>::Context>
pub fn ctx(&self) -> Ref<'_, <EccChip as EccInstructions<C>>::Context>
Returns reference of EccInstructions::Context
.
Sourcepub fn ctx_mut(&self) -> RefMut<'_, <EccChip as EccInstructions<C>>::Context>
pub fn ctx_mut(&self) -> RefMut<'_, <EccChip as EccInstructions<C>>::Context>
Returns mutable reference of EccInstructions::Context
.
Sourcepub fn assign_scalar(
self: &Rc<Halo2Loader<C, EccChip>>,
scalar: <C as PrimeCurveAffine>::Scalar,
) -> Scalar<C, EccChip>
pub fn assign_scalar( self: &Rc<Halo2Loader<C, EccChip>>, scalar: <C as PrimeCurveAffine>::Scalar, ) -> Scalar<C, EccChip>
Assign a field element witness.
Sourcepub fn scalar_from_assigned(
self: &Rc<Halo2Loader<C, EccChip>>,
assigned: <EccChip as EccInstructions<C>>::AssignedScalar,
) -> Scalar<C, EccChip>
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.
Sourcepub fn assign_ec_point(
self: &Rc<Halo2Loader<C, EccChip>>,
ec_point: C,
) -> EcPoint<C, EccChip>
pub fn assign_ec_point( self: &Rc<Halo2Loader<C, EccChip>>, ec_point: C, ) -> EcPoint<C, EccChip>
Assign an elliptic curve point witness.
Sourcepub fn ec_point_from_assigned(
self: &Rc<Halo2Loader<C, EccChip>>,
assigned: <EccChip as EccInstructions<C>>::AssignedEcPoint,
) -> EcPoint<C, EccChip>
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.