I want to sign some view transactions in frontend using a random keypair instead of wallet provider like phantom or solflare to avoid Approve popup
I tried to create wallet like this:
import { Wallet } from '@project-serum/anchor'
import { Keypair } from '@solana/web3.js'
const wallet1 = new Wallet(Keypair.generate())
But I got this error:
TypeError: _project_serum_anchor__WEBPACK_IMPORTED_MODULE_7__.Wallet is not a constructor