diff --git a/yarn-project/circuit-types/src/tx/tx_hash.ts b/yarn-project/circuit-types/src/tx/tx_hash.ts index 98a3c6ed8d2..bba7395a741 100644 --- a/yarn-project/circuit-types/src/tx/tx_hash.ts +++ b/yarn-project/circuit-types/src/tx/tx_hash.ts @@ -2,6 +2,8 @@ import { Fr } from '@aztec/circuits.js'; import { schemas } from '@aztec/foundation/schemas'; import { BufferReader } from '@aztec/foundation/serialize'; +import { z } from 'zod'; + /** * A class representing hash of Aztec transaction. */ @@ -49,7 +51,11 @@ export class TxHash { } static get schema() { - return schemas.Fr.transform(value => new TxHash(value)); + return z + .object({ + hash: schemas.Fr, + }) + .transform(({ hash }) => new TxHash(hash)); } static zero() {