-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(poseidon): support from 1 to 16 posedion inputs
re #238
- Loading branch information
Showing
40 changed files
with
15,514 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { base64ToBigInt } from "@zk-kit/utils/conversions" | ||
import { Constants } from "./types" | ||
|
||
/** | ||
* Converts Poseidon base64 constants to bigints. | ||
* @param C Rounds constants. | ||
* @param M TxT matrix. | ||
* @returns An object with all bigint constants. | ||
*/ | ||
export default function getConstants(C: string[][], M: string[][]): Constants { | ||
return { | ||
C: C.map((l) => l.map(base64ToBigInt)), | ||
M: M.map((l) => l.map(base64ToBigInt)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
import poseidon1 from "./poseidon-1" | ||
import poseidon10 from "./poseidon-10" | ||
import poseidon11 from "./poseidon-11" | ||
import poseidon12 from "./poseidon-12" | ||
import poseidon13 from "./poseidon-13" | ||
import poseidon14 from "./poseidon-14" | ||
import poseidon15 from "./poseidon-15" | ||
import poseidon16 from "./poseidon-16" | ||
import poseidon2 from "./poseidon-2" | ||
import poseidon3 from "./poseidon-3" | ||
import poseidon4 from "./poseidon-4" | ||
import poseidon5 from "./poseidon-5" | ||
import poseidon6 from "./poseidon-6" | ||
import poseidon7 from "./poseidon-7" | ||
import poseidon8 from "./poseidon-8" | ||
import poseidon9 from "./poseidon-9" | ||
|
||
import poseidon from "./poseidon" | ||
|
||
export * from "./types" | ||
|
||
export { poseidon, poseidon1, poseidon2 } | ||
export { | ||
poseidon, | ||
poseidon1, | ||
poseidon10, | ||
poseidon11, | ||
poseidon12, | ||
poseidon13, | ||
poseidon14, | ||
poseidon15, | ||
poseidon16, | ||
poseidon2, | ||
poseidon3, | ||
poseidon4, | ||
poseidon5, | ||
poseidon6, | ||
poseidon7, | ||
poseidon8, | ||
poseidon9 | ||
} |
Oops, something went wrong.