Closed zkhalapyan closed 2 years ago
For now, can use the definition below:
import {
PROGRAM_ID,
} from "@metaplex-foundation/mpl-token-metadata";
async function getMetadataPDA(
mint: PublicKey
): Promise<PublicKey> {
const [publicKey] = await PublicKey.findProgramAddress(
[Buffer.from("metadata"),
PROGRAM_ID.toBuffer(),
mint.toBuffer()],
PROGRAM_ID
);
return publicKey;
}
this is a weakness of our new 2.0 code, we will soon be able to generate pda methods, @thlorenz for vis
Improving this is on the roadmap. We're tracking ideas on how to implement in this issue.
Please comment here if you have recommendations.
Which package is this bug report for?
token-metadata
Issue description
I need to get Metadata's PDA. Seems like someone deprecated the function which is not available publically. So how do I get Metadata's PDA?
Relevant log output
No response
Priority this issue should have
Medium (should be fixed soon)