pub fn alt_bn128_add(point_1: Point2D, point_2: Point2D) -> Point2D 
Expand description

Performs an elliptic curve additions with a given curve and 2 points.

Additional Information

The Fuel VM currently only supports the Alt BN128 curve.

Arguments

  • point_1: [Point2D] - The first point used to perform the addition.
  • point_2: [Point2D] - The second point used to perform the addition.

Returns

  • [Point2D] - The resulting computed point.

Examples

use std::{point2d::Point2D, scalar::Scalar, alt_bn128::alt_bn128_add};

fn foo(point_1: Point2D, point_2: Point2D) {
    let result = alt_bn128_add(point_1, point_2);
    assert(!result.is_zero());
}