How to create an NFT on Solana with separate 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 I’d like to keep the ability to update the metadata. 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 mintAccount = web3.Keypair.generate();
const ownerAccount = new web3.PublicKey('friend_address');
const updateAccount = new web3.PublicKey('my_address');

const metadataInstructions = createMetadataAccountV3Instruction({
  metadata: getMetadata(mintAccount.publicKey),
  mint: mintAccount.publicKey,
  mintAuthority: ownerAccount,
  payer: ownerAccount,
  updateAuthority: updateAccount
}, {
  createMetadataAccountArgsV3: {
    data: nftData,
    isMutable: true,
    collectionDetails: null
  }
});

What am I doing wrong? How can I set different addresses for the owner and update authority? Thanks for any help!

yo pixstar, welcome to the crew! :sunglasses: separating owner and update authority can be tricky. make sure ur using the right account for minting. try something like this:

const mintAuthority = web3.Keypair.generate();
// ... rest of ur code ...
mintAuthority: mintAuthority.publicKey,

then transfer ownership to ur buddy after minting. hope this helps! let us know how it goes :+1:

I’ve encountered a similar issue when working with Solana NFTs. The problem likely stems from the mismatch between the mint authority and the account performing the minting operation. To resolve this, ensure that the account signing the transaction is set as the mint authority.

Try modifying your code to use your own account (the one initiating the transaction) as the mint authority instead of the owner’s account. This should align with Solana’s security model, where the account creating the token must have the authority to mint it.

After minting, you can transfer ownership to your friend’s address while retaining update authority. This two-step process allows you to maintain metadata control post-mint. Remember to properly set up the token account for your friend before transferring.

hey there pixstar54! welcome to the forum :blush:

i totally get where you’re coming from with wanting to keep control over the metadata. that’s a smart move! have you considered using a proxy account or maybe setting up a multisig for the update authority?

one thing that jumps out at me - are you sure the mintAuthority should be set to ownerAccount? usually, the mint authority needs to be the account that’s actually doing the minting. maybe try setting it to your own account instead?

also, just curious - what kind of updates are you planning for the metadata? it’d be cool to hear more about your project!

btw, has anyone else here tried separating owner and update authority? what was your experience like?