Solana NFT Minting: Setting Different Update Authority and Owner

Hey everyone! I’m new here and could use some help with Solana NFTs.

I want to mint an NFT for my buddy but keep the ability to update the metadata myself. I’m using my public key as the update authority in the CreateMetadataAccountV3InstructionAccounts, but I’m getting an error:

Program log: Mint authority provided does not match the authority on the mint

Here’s a simplified version of what I’m trying:

const mintKey = Keypair.generate();
const friendKey = new PublicKey('friend_address_here');
const myKey = new PublicKey('my_address_here');

const metadata = {
  mint: mintKey.publicKey,
  mintAuthority: friendKey,
  updateAuthority: myKey
};

createMetadataInstruction(metadata, nftData);

Any ideas why this isn’t working? Thanks in advance for your help!

hey there pixstar54! welcome to the forum :blush:

i’ve actually been experimenting with something similar recently. from what i understand, the error you’re getting is because the mint authority and update authority need to match when first creating the nft.

have you tried setting both to your key initially, then transferring ownership to your friend afterwards? something like:

const metadata = {
  mint: mintKey.publicKey,
  mintAuthority: myKey,
  updateAuthority: myKey
};

// create metadata...

// then transfer ownership to friend

just a thought! i’m curious tho - what kind of nft are you making for your buddy? sounds like a cool project! :art:

let me know if that helps or if you need any more info. good luck with your minting adventure!

I’ve encountered a similar situation with Solana NFTs. In my experience, the mint and update authorities must be the same account that signs the transaction at the time of minting. I recommend minting the NFT by setting both authorities to the same public key first. Once the NFT is created, you can use the setUpdateAuthority function to change the update authority to the desired address while keeping the ownership with your friend. Remember to verify that your SDK version handles this process correctly, as recent updates might affect how authorities are managed.