Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections
- Quick Start
- CLI Tool
- Installation
- Generate Artwork
- Upload to Pinata
- Resume Interrupted Session
- Deploy Smart Contract (TBC)
- Mint NFT (TBC)
- NPM Module
- Installation Module
- Generate Artwork
- Upload to Pinarta
- Resume Interrupted Session
- Deploy Smart Contract (TBC)
- Mint NFT (TBC)
- CLI Tool
- Contribute
- Support Us
Install eznft
as a global NPM package to use it in the command line.
$ npm i -g eznft
$ eznft
usage: eznft [-h] [-v] {deploy,d,dep,generate,g,gen,mint,m,upload,u,up} ...
...
Generate 10 unique pieces of artwork using the HashLips Art Engine.
Note: HashLips is the default generator if the --engine
flag is not specified.
$ eznft gen ~/my-nft-project/layers 10 --output ~/my-nft-project/output
...
DONE
Generate API keys for Pinata here then
add PINATA_API_KEY
and PINATA_SECRET_API_KEY
to your .env
file. See .env-example.
Note: Pinata is the default upload service if the --ipfs
flag is not specified.
$ eznft upload ~/my-nft-project/output --very-verbose
...
DONE
$ eznft resume
multiple sessions exist that were interrupted.
either specfiy a session below, or clean the workspace with "eznft clean"
0 - [5/9/2022, 4:06 PM]
eznft resume 1
5 out of 7 tasks completed
1 - [5/9/2022, 4:05 PM]
eznft up /Users/tmorgan/Desktop/nfts
3 out of 10 tasks completed
$ eznft resume 0
[ 5/7 - 71%] Uploaded JSON file for "Test #4" to ipfs://QmejjYUqofjvWX7WTg74sPxL6gwQymwiJru9BaSASNCjcR
npm i eznft
Generate 10 unique pieces of artwork using the HashLips Art Engine.
Note: HashLips is the default generator if the type
option is not specified.
import { GeneratorService } from "eznft";
const generatorService = GeneratorService.load({
// Number of unique NFTs to create.
size: 10,
// Folder should contain an 'images' and 'json' folder
layers: '~/my-nft-project/layers',
// Names folders in 'images', in order of bottom to top
layerOrder: ['Background', 'Fur', 'Eyes', 'Eyewear', 'Accessory'],
// Where to ouput. default is `${process.cwd()}/.eznft/${service-session}/build`.
outputDir: '~/my-nft-project/output',
// Prefix of each NFT generated in this collection.
prefix: 'Pomsky Punks',
// The collection description.
description: 'The cutest NFT collection ever!',
// Options per layer specific to HashLips
opt: {
Background: {
opacity: 0.5,
displayName: "Background Color",
},
Fur: {
displayName: "Fur Color",
},
Eyes: {
displayName: "Eye Color",
},
},
// Log everything to the console except DEBUG messages.
logLevel: "most", // VERBOSE = LOG | INFO | WARN | ERROR,
// Type of generator to use. Defaults to "hashlips"
type: "hashlips",
});
generatorService.generate();
Generate API keys for Pinata here then
add PINATA_API_KEY
and PINATA_SECRET_API_KEY
to your .env
file. See .env-example.
Note: Pinata is the default upload service if the type
option is not specified.
import { UploadService } from 'eznft';
const uploadService = UploadService.load({
apiKey: process.env.PINATA_API_KEY,
secretApiKey: process.env.PINATA_SECRET_API_KEY,
// Log everything to the console except DEBUG messages.
logLevel: "most", // VERBOSE = LOG | INFO | WARN | ERROR,
// Type of upload to use. Defaults to "hashlips"
type: "pinata",
});
uploadService.uploadAssets('~/my-nft-project/output', { uploadJsonAssets: true });
Feel free to make a pull request if you want to help me implement the rest of these features, or tweet me on Twitter at @nftofdeath
When developing (on UNIX kernel), you can use the bash script in the root git directory which points
to the CLI target in src/cli/eznft.ts
.
./eznft
For Windows you will need to run ts-node src/cli/eznft.ts
.
If you find this library useful for you, you can support it by donating any amount
ETH/MATIC: 0x9FE2e80A2fEFE9d38C4689daB25e37f413C68C43
BTC: 3HNXnygb1HowTBbvhQrQ4vxekfQ2UM83sd
SHIB: 0xBb8f7EbF3D7f54BAcadece3dada9ab2358C90635