Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Oct 5, 2024
1 parent c691d7d commit c60ab51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/abstract/bls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ export type SignatureCoder<Fp> = {
toHex(point: ProjPointType<Fp>): string;
};

export type PostPrecomputePointAddFn = (Rx: Fp2, Ry: Fp2, Rz: Fp2, Qx: Fp2, Qy: Fp2) => { Rx: Fp2; Ry: Fp2; Rz: Fp2 };
export type PostPrecomputePointAddFn = (
Rx: Fp2,
Ry: Fp2,
Rz: Fp2,
Qx: Fp2,
Qy: Fp2
) => { Rx: Fp2; Ry: Fp2; Rz: Fp2 };
export type PostPrecomputeFn = (
Rx: Fp2,
Ry: Fp2,
Expand Down
11 changes: 9 additions & 2 deletions src/bn254.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,19 @@ const htfDefaults = Object.freeze({
hash: sha256,
} as const);

export const _postPrecompute: PostPrecomputeFn = (Rx: Fp2, Ry: Fp2, Rz: Fp2, Qx: Fp2, Qy: Fp2, pointAdd: PostPrecomputePointAddFn) => {
export const _postPrecompute: PostPrecomputeFn = (
Rx: Fp2,
Ry: Fp2,
Rz: Fp2,
Qx: Fp2,
Qy: Fp2,
pointAdd: PostPrecomputePointAddFn
) => {
const q = psi(Qx, Qy);
({ Rx, Ry, Rz } = pointAdd(Rx, Ry, Rz, q[0], q[1]));
const q2 = psi(q[0], q[1]);
pointAdd(Rx, Ry, Rz, q2[0], Fp2.neg(q2[1]));
}
};

/**
* bn254 (a.k.a. alt_bn128) pairing-friendly curve.
Expand Down

0 comments on commit c60ab51

Please sign in to comment.