I'm currently trying to initialize a selling resource and can't get past the masterEdition attribute.
Whenever I try to fetch the masterEdition PDA using the referenced seeds [“metadata”, tokenMetadataProgramID, resource_mint, “edition”] I get following error: TypeError: Max seed length exceeded
This is a snippet of the code I'm using:
const [masterEdition] = await PublicKey.findProgramAddress(
[
Buffer.from('metadata'),
Buffer.from('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'),
Buffer.from('5JdQ2GsY5dKeGtAw941bb8Kp5UKi3yZV2PkMfjyHX35a'),
Buffer.from('edition')
],
toPublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s')
)
I'm assuming the error it's because the seed is to long but how can I do if that's the required seed? Any help is appreciated, thanks in advance.