Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olegfomenko/solana-nft-minter
Library for creating NFTs on Solana
https://github.com/olegfomenko/solana-nft-minter
nft solana
Last synced: about 5 hours ago
JSON representation
Library for creating NFTs on Solana
- Host: GitHub
- URL: https://github.com/olegfomenko/solana-nft-minter
- Owner: olegfomenko
- License: mit
- Created: 2022-02-28T17:35:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T12:15:23.000Z (8 months ago)
- Last Synced: 2024-11-16T16:44:23.986Z (about 19 hours ago)
- Topics: nft, solana
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solana NFT Minter
[![olegfomenko](https://circleci.com/gh/olegfomenko/solana-nft-minter.svg?style=shield)](https://circleci.com/gh/olegfomenko/solana-nft-minter)
[![Go Report Card](https://goreportcard.com/badge/github.com/olegfomenko/solana-nft-minter)](https://goreportcard.com/report/github.com/olegfomenko/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](./main_test.go)
Infura part
```go
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
```go
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,
})
```