Solana NFT Minter
Description
Library for minting NFTs from specified image on receiver or admin account. NFT data (image and metadata json) can be
stored on the IPFS Infura service.
Using Example
Explore Test Module file
Infura part
inf := infura.NewDefaultInfura("https://ipfs.infura.io:5001", "project-id", "project-secret")
// Saving image in Infura
cid, err := inf.AddInfuraImage("./test_image.jpeg")
imageUrl := inf.GetLinkIPFS(cid)
metadata := solana.Metadata{
// Set fields here
}
// Saving metadata in Infura
cid, err = inf.AddInfuraJSON(metadata)
Solana part
var admin types.Account{}
sol := solana.Solana{client.NewClient("https://api.devnet.solana.com")}
// Also you can use MintTokenUntilSuccess
hash, err := sol.MintToken(metadata, solana.MintConfig{
Receiver: admin.PublicKey,
Admin: admin,
Creators: []types.Account{admin},
Metadata: inf.GetLinkIPFS(cid),
PrimarySaleHappened: true,
})