PallasFp.fromU128 constructor

PallasFp.fromU128(
  1. BigInt v
)

Implementation

factory PallasFp.fromU128(BigInt v) {
  final lower = v.toU64;
  final upper = (v >> 64).toU64;
  PallasFp tmp = PallasFp.from(upper);
  for (int i = 0; i < 64; i++) {
    tmp = tmp.double();
  }
  return tmp + PallasFp.from(lower);
}