Reputation: 3
I'm getting "Derived key invalid" error. i'm trying to create a transaction that would revoke collection authority. this is how i setup the instruction :
const metadataPda = findMetadataPda(mintPk); // findMetadataPda() - is imported from '@metaplex-foundation/js' library.
const revokeAccount = {
collectionAuthorityRecord: collectionPk, // this is the key that i can see in metadata object using explorer.solana - inside `collection.key`
delegateAuthority: authorityKey, // PublicKey of the wallet that created the NFT
metadata: metadataPda, // this variable is declared above.
revokeAuthority: authorityKey, // PublicKey of the wallet that created the NFT
mint: mintPk, // PublicKey of the NFT
}
transaction.add(
createRevokeCollectionAuthorityInstruction(revokeAccount)
);
Base on the comments that i added beside each of the revokeAccount attributes, am i using it correctly?
Here is the error that i got from the transaction Error
Upvotes: 0
Views: 292
Reputation: 407
As you as using createRevokeCollectionAuthorityInstruction I'm going to assume you are also using the @metaplex-foundation/mpl-token-metadata as this is where this instruction creation resides.
createRevokeCollectionAuthorityInstruction from the docs requires a set of accounts outlined here RevokeCollectionAuthorityInstructionAccounts
these include
collectionAuthorityRecord: web3.PublicKey
metadata: web3.PublicKey
mint: web3.PublicKey
updateAuthority: web3.PublicKey
Which differ from what you are currently supplying.
Upvotes: 0