We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb59b1d commit ffa85e4Copy full SHA for ffa85e4
1 file changed
yarn-project/stdlib/src/logs/tag.ts
@@ -1,5 +1,5 @@
1
import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
2
-import type { Fr } from '@aztec/foundation/curves/bn254';
+import { Fr } from '@aztec/foundation/curves/bn254';
3
import type { ZodFor } from '@aztec/foundation/schemas';
4
5
import { schemas } from '../schemas/schemas.js';
@@ -36,6 +36,10 @@ export class Tag {
36
return this.value.equals(other.value);
37
}
38
39
+ static random(): Tag {
40
+ return new Tag(Fr.random());
41
+ }
42
+
43
static get schema(): ZodFor<Tag> {
44
return schemas.Fr.transform((fr: Fr) => new Tag(fr));
45
0 commit comments