We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf75ed5 commit c926647Copy full SHA for c926647
1 file changed
packages/rln/src/zerokit.ts
@@ -97,8 +97,12 @@ export class Zerokit {
97
epoch = epochIntToBytes(dateToEpoch(epoch));
98
}
99
100
- if (epoch.length !== 32) throw new Error("invalid epoch");
101
- if (idSecretHash.length !== 32) throw new Error("invalid id secret hash");
+ if (epoch.length !== 32)
+ throw new Error(`Epoch must be 32 bytes, got ${epoch.length}`);
102
+ if (idSecretHash.length !== 32)
103
+ throw new Error(
104
+ `ID secret hash must be 32 bytes, got ${idSecretHash.length}`
105
+ );
106
if (index < 0) throw new Error("index must be >= 0");
107
if (
108
rateLimit < RATE_LIMIT_PARAMS.MIN_RATE ||
0 commit comments