Comparing version 0.0.36 to 0.0.37
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.0.36", | ||
"version": "0.0.37", | ||
"description": "r1cs file format parser", | ||
@@ -11,0 +11,0 @@ "main": "./build/main.cjs", |
@@ -1,2 +0,2 @@ | ||
import {getCurveFromR} from "ffjavascript"; | ||
import {F1Field, getCurveFromR} from "ffjavascript"; | ||
import BigArray from "@iden3/bigarray"; | ||
@@ -35,3 +35,3 @@ import * as binFileUtils from "@iden3/binfileutils"; | ||
} else if (options.getFieldFromPrime) { | ||
res.F = await options.getCurveFromPrime(res.prime, options.singleThread); | ||
res.F = await options.getFieldFromPrime(res.prime, options.singleThread); | ||
} else if (options.getCurveFromPrime) { | ||
@@ -41,4 +41,8 @@ res.curve = await options.getCurveFromPrime(res.prime, options.singleThread); | ||
} else { | ||
res.curve = await getCurveFromR(res.prime, options.singleThread); | ||
res.F = res.curve.Fr; | ||
try { | ||
res.curve = await getCurveFromR(res.prime, options.singleThread); | ||
res.F = res.curve.Fr; | ||
} catch (err) { | ||
res.F = new F1Field(res.prime); | ||
} | ||
} | ||
@@ -197,4 +201,4 @@ | ||
if (res.useCustomGates) { | ||
res.customGates = await readCustomGatesListSection(fd, sections); | ||
res.customGatesUses = await readCustomGatesUsesSection(fd, sections); | ||
res.customGates = await readCustomGatesListSection(fd, sections, options); | ||
res.customGatesUses = await readCustomGatesUsesSection(fd, sections, options); | ||
} else { | ||
@@ -201,0 +205,0 @@ res.customGates = []; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147566
771