Skip to content

Commit

Permalink
Adds schnorr/ecdsa calldata builder endpoints to api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
raugfer committed Feb 13, 2025
1 parent e82a58d commit ae7f62b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/npm/garaga_ts/src/node/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ export function mpcCalldataBuilder(curveId: CurveId, pairs: G1G2Pair[], nFixedG2
return mpc_calldata_builder(curveId, values1, nFixedG2, values2);
}

export function schnorrCalldataBuilder(rx: bigint, s: bigint, e: bigint, px: bigint, py: bigint, curveId: CurveId): bigint[] {
return schnorr_calldata_builder(rx, s, e, px, py, curveId);
}

export function ecdsaCalldataBuilder(r: bigint, s: bigint, v: number, px: bigint, py: bigint, z: bigint, curveId: CurveId): bigint[] {
return ecdsa_calldata_builder(r, s, v, px, py, z, curveId);
}

export function toWeirstrass(x_twisted: bigint, y_twisted: bigint): [bigint, bigint] {
const result = to_weirstrass(x_twisted, y_twisted);

Expand Down

0 comments on commit ae7f62b

Please sign in to comment.