Trait vapcore_builtin::Implementation [−][src]
Native implementation of a built-in contract.
Required methods
fn execute(
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
[src]
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
execute this built-in on the given input, writing to the given output.
Implementors
impl Implementation for Blake2F
[src]
fn execute(
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
[src]
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
Format of input
:
[4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0][8 bytes for t_1][1 byte for f]
impl Implementation for Bn128Add
[src]
impl Implementation for Bn128Mul
[src]
impl Implementation for Bn128Pairing
[src]
fn execute(
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
[src]
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
Can fail if: - input length is not a multiple of 192 - any of odd points does not belong to bn128 curve - any of even points does not belong to the twisted bn128 curve over the field F_p^2 = F_p[i] / (i^2 + 1)