1- import { TxStatus } from '@aztec/aztec.js/tx' ;
21import { deriveKeys } from '@aztec/stdlib/keys' ;
32import { PublicKeys } from '@aztec/aztec.js/keys' ;
43import { type AztecNode } from '@aztec/aztec.js/node' ;
54import { AztecAddress } from '@aztec/aztec.js/addresses' ;
65import { type EmbeddedWallet } from '@aztec/wallets/embedded' ;
76import { BlockNumber } from '@aztec/foundation/branded-types' ;
87import { ContractDeployer } from '@aztec/aztec.js/deployment' ;
9- import { Fr , Point } from '@aztec/aztec.js/fields' ;
8+ import { Fr } from '@aztec/aztec.js/fields' ;
109import { PublicKey } from '@aztec/stdlib/keys' ;
1110import {
1211 getContractInstanceFromInstantiationParams ,
@@ -48,8 +47,10 @@ type NoirWrappedPoint = {
4847 } ;
4948} ;
5049
51- const noirWrappedPointToPoint = ( wrapped : NoirWrappedPoint ) =>
52- new Point ( new Fr ( wrapped . inner . x ) , new Fr ( wrapped . inner . y ) , ! ! wrapped . inner . is_infinite ) ;
50+ // `PublicKey` is a Grumpkin curve point; its constructor derives `isInfinite` from `x`/`y`,
51+ // so the Noir `is_infinite` flag carries no extra information for a valid (non-infinity) key.
52+ const noirWrappedPointToPublicKey = ( wrapped : NoirWrappedPoint ) : PublicKey =>
53+ new PublicKey ( new Fr ( wrapped . inner . x ) , new Fr ( wrapped . inner . y ) ) ;
5354
5455// Builds a JS `PublicKeys` from the new v5 PublicKeys layout returned by the Noir circuit:
5556// `{ npk_m_hash, ivpk_m: { inner: { x, y, is_infinite } }, ovpk_m_hash, tpk_m_hash, mspk_m_hash, fbpk_m_hash }`.
@@ -63,7 +64,7 @@ const noirPublicKeysToPublicKeys = (publicKeys: {
6364} ) : PublicKeys =>
6465 new PublicKeys (
6566 new Fr ( publicKeys . npk_m_hash ) ,
66- noirWrappedPointToPoint ( publicKeys . ivpk_m ) as unknown as PublicKey ,
67+ noirWrappedPointToPublicKey ( publicKeys . ivpk_m ) ,
6768 new Fr ( publicKeys . ovpk_m_hash ) ,
6869 new Fr ( publicKeys . tpk_m_hash ) ,
6970 new Fr ( publicKeys . mspk_m_hash ) ,
0 commit comments