poseidon.d.ts 916 B

123456789101112131415161718192021222324252627282930
  1. /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
  2. import { IField } from './modular.js';
  3. export type PoseidonOpts = {
  4. Fp: IField<bigint>;
  5. t: number;
  6. roundsFull: number;
  7. roundsPartial: number;
  8. sboxPower?: number;
  9. reversePartialPowIdx?: boolean;
  10. mds: bigint[][];
  11. roundConstants: bigint[][];
  12. };
  13. export declare function validateOpts(opts: PoseidonOpts): Readonly<{
  14. rounds: number;
  15. sboxFn: (n: bigint) => bigint;
  16. roundConstants: bigint[][];
  17. mds: bigint[][];
  18. Fp: IField<bigint>;
  19. t: number;
  20. roundsFull: number;
  21. roundsPartial: number;
  22. sboxPower?: number;
  23. reversePartialPowIdx?: boolean;
  24. }>;
  25. export declare function splitConstants(rc: bigint[], t: number): bigint[][];
  26. export declare function poseidon(opts: PoseidonOpts): {
  27. (values: bigint[]): bigint[];
  28. roundConstants: bigint[][];
  29. };
  30. //# sourceMappingURL=poseidon.d.ts.map