@@ -6,8 +6,8 @@ import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
66import { ValueNotEqualContract } from "./artifacts/ValueNotEqual.js" ;
77import { EmbeddedWallet } from "@aztec/wallets/embedded" ;
88import { AztecAddress } from "@aztec/aztec.js/addresses" ;
9- import { rm } from "node:fs/promises" ;
109import assert from "node:assert" ;
10+ import { Fr } from "@aztec/aztec.js/fields" ;
1111// docs:end:imports
1212
1313// docs:start:sample_data
@@ -34,13 +34,8 @@ const sponsoredPaymentMethod = new SponsoredFeePaymentMethod(
3434// The wallet manages accounts and sends transactions through the PXE
3535export const setupWallet = async ( ) : Promise < EmbeddedWallet > => {
3636 try {
37- await rm ( "pxe" , { recursive : true , force : true } ) ;
38-
3937 // Create wallet with embedded PXE
40- const wallet = await EmbeddedWallet . create ( NODE_URL , {
41- dataDirectory : "pxe" ,
42- proverEnabled : true , // Enable proof generation
43- } ) ;
38+ const wallet = await EmbeddedWallet . create ( NODE_URL ) ;
4439
4540 // Register the sponsored FPC so the wallet knows about it
4641 await wallet . registerContract ( sponsoredFPC , SponsoredFPCContract . artifact ) ;
@@ -57,7 +52,7 @@ async function main() {
5752 // Step 1: Setup wallet and create account
5853 // Accounts in Aztec are smart contracts (account abstraction)
5954 const wallet = await setupWallet ( ) ;
60- const account = await wallet . createAccount ( ) ;
55+ const account = await wallet . createSchnorrAccount ( Fr . random ( ) , Fr . random ( ) ) ;
6156 const manager = await account . getDeployMethod ( ) ;
6257
6358 // Deploy the account contract
0 commit comments