I have a process to purchase compressed nft but go through our contract first.

in the process I'm making now. I made an api on the backend, when the user presses the buy button, the backend will mint compressed nft using the wallet authority, then delegate to our contract program.

Only then did I give the mint results to the user side to be able to buy through our program contract delegation bridge earlier.

enter image description here

what I want to ask, is there a more efficient way than the method I above? Is there a way that my 2 instructions can be combined into one instruction? with my signer user and wallet authority?

because with the method above, I have to make 2 instructions in the program namely "mint_by_authority" and the function "buy_nft"

because when the mint compressed nft process I use verified creators, which means there must be signer creators.

Therefore, my method above separates the mint process from being done on the backend side, then the mint results are delegated to the program so that users can buy them.

if anyone gives suggestions the most effective way I'm open, thanks

1 Answer 1


what I did here https://github.com/solana-developers/one-milion-nfts/blob/main/next/pages/api/mint.ts is send a request to the backend, partial sign it, base64 encode it, send it back to client, deserialize and and then sign in the frontend as well. Like this you can get both signers and you could also add a payment for the NFT.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.