pub enum Request {
MultiMillerLoop {
a: Vec<u8>,
b: Vec<u8>,
},
FinalExponentiation {
f: Vec<u8>,
},
MultiScalarMultiplicationG1 {
bases: Vec<u8>,
scalars: Vec<u8>,
},
MultiScalarMultiplicationG2 {
bases: Vec<u8>,
scalars: Vec<u8>,
},
ProjectiveMultiplicationG1 {
base: Vec<u8>,
scalar: Vec<u8>,
},
ProjectiveMultiplicationG2 {
base: Vec<u8>,
scalar: Vec<u8>,
},
AggregateG1 {
points: Vec<u8>,
},
MapToG2Affine {
message: Vec<u8>,
},
}
Expand description
Type that should be used to create a message to the bls12_381 builtin actor. Use the following crates to construct a request:
ark-scale
: https://docs.rs/ark-scale/;ark-bls12-381
: https://docs.rs/ark-bls12-381/.
Variants§
MultiMillerLoop
Request to pairing multi Miller loop for BLS12-381.
Encoded:
a
: [ArkScale<Vec<G1Affine>>
].b
: [ArkScale<Vec<G2Affine>>
].
FinalExponentiation
Request to pairing final exponentiation for BLS12-381.
Encoded: [ArkScale<<Bls12_381::TargetField>
].
MultiScalarMultiplicationG1
Request to multi scalar multiplication on G1 for BLS12-381
Encoded:
bases
: [ArkScale<Vec<G1Affine>>
].scalars
: [ArkScale<Vec<G1Config::ScalarField>>
].
MultiScalarMultiplicationG2
Request to multi scalar multiplication on G2 for BLS12-381
Encoded:
bases
: [ArkScale<Vec<G2Affine>>
].scalars
: [ArkScale<Vec<G2Config::ScalarField>>
].
ProjectiveMultiplicationG1
Request to projective multiplication on G1 for BLS12-381.
Encoded:
base
: [ArkScaleProjective<G1Projective>
].scalar
: [ArkScale<Vec<u64>>
].
ProjectiveMultiplicationG2
Request to projective multiplication on G2 for BLS12-381.
Encoded:
base
: [ArkScaleProjective<G2Projective>
].scalar
: [ArkScale<Vec<u64>>
].
AggregateG1
Request to aggregate G1 points for BLS12-381.
Encoded: [ArkScale<Vec<G1Projective>>
].
MapToG2Affine
Request to map an arbitrary message to G2Affine point for BLS12-381.
Raw message bytes to map.
Trait Implementations§
Source§impl Decode for Request
impl Decode for Request
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Encode for Request
impl Encode for Request
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl EncodeLike for Request
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more