Trait vapcore_builtin::Implementation[][src]

pub trait Implementation: Send + Sync {
    fn execute(
        &self,
        input: &[u8],
        output: &mut BytesRef<'_>
    ) -> Result<(), &'static str>; }

Native implementation of a built-in contract.

Required methods

fn execute(
    &self,
    input: &[u8],
    output: &mut BytesRef<'_>
) -> Result<(), &'static str>
[src]

execute this built-in on the given input, writing to the given output.

Loading content...

Implementors

impl Implementation for Blake2F[src]

fn execute(
    &self,
    input: &[u8],
    output: &mut BytesRef<'_>
) -> Result<(), &'static str>
[src]

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]

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)

impl Implementation for EcRecover[src]

impl Implementation for Identity[src]

impl Implementation for Modexp[src]

impl Implementation for Ripemd160[src]

impl Implementation for Sha256[src]

Loading content...