Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion yarn-project/stdlib/src/logs/tag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
import type { Fr } from '@aztec/foundation/curves/bn254';
import { Fr } from '@aztec/foundation/curves/bn254';
import type { ZodFor } from '@aztec/foundation/schemas';

import { schemas } from '../schemas/schemas.js';
Expand Down Expand Up @@ -36,6 +36,10 @@ export class Tag {
return this.value.equals(other.value);
}

static random(): Tag {
return new Tag(Fr.random());
}

static get schema(): ZodFor<Tag> {
return schemas.Fr.transform((fr: Fr) => new Tag(fr));
}
Expand Down
Loading