add function

List<int> add(
  1. List<int> scalar1,
  2. List<int> scalar2
)

Adds two scalar values represented as List

This method adds two scalar values, scalar1 and scalar2, and stores the result in the out List

Parameters:

  • scalar1: The first scalar value to add.
  • scalar2: The second scalar value to add.

Returns: A List

Implementation

List<int> add(List<int> scalar1, List<int> scalar2) {
  final out = List<int>.filled(32, 0);
  _mulAdd(out, scOne, scalar1, scalar2);
  return BytesUtils.toBytes(out);
}