Implement initializeMint instruction #96
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds initializeMint instruction + some unit tests to ensure it's working as a low-level instruction. Note that I haven't tested it outside of serializing it in a transaction.
For some reference, I'm currently trying to support the equivalent of
createNFT.ts
inmetaplex-android
as I haven't seen it implemented.This is part 1 of 2 new instructions I want to add to SolanaKT, the other being
mintTo
.Implementation references
I translated
initializeMint.ts
, using theinitializeAccount.ts
TS and Android (this lib) implementations as references.Then I ran some local TS code to get some serialized Transaction values.
Serialized Transaction Values
Expected serialized transaction values come from some reference TS code. I just used the latest code from https://github.com/metaplex-foundation/js/ to generate them.
Code Style
This is my first contribution to SolanaKT and generally I tried to follow the existing style as much as I could, but took a bit of my own freedom in the unit test I added. Happy to adjust styles if needed!