Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Oct 23, 2024
1 parent cf2a770 commit 0196a80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yarn-project/foundation/src/fields/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ export class Fq extends BaseField {
return new Fq((high.toBigInt() << Fq.HIGH_SHIFT) + low.toBigInt());
}

add(rhs: Fq) {
return new Fq((this.toBigInt() + rhs.toBigInt()) % Fq.MODULUS);
}

toJSON() {
return {
type: 'Fq',
Expand Down

0 comments on commit 0196a80

Please sign in to comment.