blocto / solana-go-sdk

Solana Golang SDK
https://blocto.github.io/solana-go-sdk/
MIT License
349 stars 86 forks source link

Add verify collection instruction #167

Closed Trisato closed 2 months ago

Trisato commented 2 months ago

When we create a nft and add it to a collection , this instruction can verify the nft as the member of the collection.

yihau commented 2 months ago

thank you! do you mind add some tests for them and share the IDL that you're referring to?

Trisato commented 2 months ago

Alright, will do.

Trisato commented 2 months ago

@yihau The test case was added, pls review it. The instruction I added has been test in my app, it can work smoothly. This is the tx: https://solscan.io/tx/4SvvuBMxfcDo1hTYjxKy1ArJed5sEYQHydeLoZKVC7rqNUwjuFSYWgfWcuMKBdd17FVy1zLAnxG5dYWN3ypfkYFG?cluster=devnet

Trisato commented 2 months ago

About the IDL, I don't know what is the format standard i should share. I just read the code from mpl token ts code and the IDL definition is in this file: https://github.com/metaplex-foundation/mpl-token-metadata/blob/main/idls/token_metadata.json the Instruction is: "VerifyCollection" If there is any other requirement, pls feel free to let me know.

yihau commented 2 months ago

it looks like we lack an option account, collectionAuthorityRecord but I think we can have another PR to fix it. thank you for your contribution!