I want to initialize a PDA with a big number for seed, but findProgramAddress returns an error: Uncaught (in promise) TypeError: (intermediate value).toBuffer is not a function
import { BN } from "@project-serum/anchor";
async function getPDA(id) {
return await web3.PublicKey.findProgramAddress(
[Buffer.from("seed1"), new BN(id).toBuffer()],
PROGRAM_ID
);
}
How do I findProgramAddress with a big number as seed?
Thanks.