Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

Overview

eznft

npm npm


Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections


Table of Contents

Quick Start

CLI Tool

Installation (CLI)

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 Artwork (CLI)

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

Upload to Pinata (CLI)

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

Resume Interrupted Session (CLI)

$ 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 Module

Installation (Module)

npm i eznft

Generate Artwork (Module)

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();

Upload to Pinata (Module)

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.uploadAll('~/my-nft-project/output');

Contribute

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

Development

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.

Support Us

If you find this library useful for you, you can support it by donating any amount

ETH/MATIC: 0x9FE2e80A2fEFE9d38C4689daB25e37f413C68C43

BTC: 3HNXnygb1HowTBbvhQrQ4vxekfQ2UM83sd

SHIB: 0xBb8f7EbF3D7f54BAcadece3dada9ab2358C90635

You might also like...

Create your own custom NFT minting page using thirdweb's NFT Drop contract

Customizable NFT Drop Minting Page In this example, you can create your own NFT Drop minting page just by customising the template with your branding,

Dec 24, 2022

This is the main repository for NFT collection dao smart contracts.

Basic Sample Hardhat Project This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample s

Apr 11, 2022

🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few clicks.

🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few clicks.

👷‍♂️ NFTank 🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few click

Nov 8, 2022

⚡⚡NextJS Full NFT Marketplace Application Running with Alchemy SDK. Deploy In Minutes with Smart Contracts Attached

⚡⚡NextJS Full NFT Marketplace Application Running with Alchemy SDK. Deploy In Minutes with Smart Contracts Attached

+ Alchemy SDK Easy Polygon NFT Marketplace NextJS App Be sure to watch my Youtube video so you can learn and follow along! ** THE FILES ATTACHED TO TH

Nov 16, 2022

College project done for the CG Artwork lecture in 2022. Used HTML for the indexes and mainly JavaScript (using to THREE.js). Ended with the final A grade (17.3 in scale grade).

CG Artwork Project 2022 This project was done by a group of 3 in 2022 with an educational purpose for the CG Artwork lecture in Instituto Superior Téc

Sep 19, 2022

Dead simple program to upload NFT data to IPFS via nft.storage

Dead simple program to upload NFT data to IPFS via nft.storage

NFTP The simplest way to publish files and folders to IPFS, with one command. 100% FREE to upload as much files as you want, powered by nft.storage. N

Dec 11, 2022

Yet another eslint blame (might) with better adaptability

yet-another-eslint-blame Yet another eslint blame (might) with better adaptability. The input is eslint's output with json format (You can see it here

Mar 7, 2022

Yet another basic minter.

Mojito Yet another basic minter. Live demo: https://mojito-app.netlify.app/ Motivation The create-eth-app team recently added useDApp in their v1.8.0,

Apr 26, 2022

☁ Yet Another Cloud Notepad.

☁ Serverless Cloud Notepad English | 简体中文 Build for recording text or sharing between friends. Powerby Cloudflare Workers, easy to deploy privately. ✨

Oct 29, 2022
Releases(v0.0.12-0)
Owner
null
Using a Decentralized Application (DApp) to Sell artwork on the Ethereum blockchain with smart contracts written in Solidity.

Decentralized Applications For Selling Limited Time Artwork This repository houses the Solidity, JavaScript, and HTML code for a Decentralized Applica

Keyan Ahmadi 4 Mar 20, 2023
CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections.

@candypay/sdk CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections. Simulate minting transactions for mult

Candy Pay 33 Nov 16, 2022
The repos includes script for uploading bulk files in a directory to ipfs using nft.storage

Uploading Foloder to IPFS using nft.storage This repository includes script for uploading bulk files in a directory to ipfs using nft.storage Acknowle

Dapp Composer 22 Dec 17, 2022
a quick start boilerplate for developing web3 apps and deploying smart contracts.

create-web3 A boilerplate for starting a web3 project. This boilerplate quickly creates a mono repo with 2 environments, a Next JS environment for fro

Eric Roupe 83 Dec 16, 2022
the music metadata you love, with IPFS hosting on nft.storage :rainbow:

Music NFT IPFS Metadata Standard for musicians pioneered by Catalog & Mint Songs. Compatible with contracts created by: Catalog Sound.xyz Manifold - W

sweetman.eth 12 Oct 17, 2022
Evolve is an online investment portfolio management system where users can keep track of all the assets that they have invested in and how well their assets are performing.

Evolve is an online investment portfolio management system where users can keep track of all the assets that they have invested in and how well their assets are performing.

Indrajit 6 Oct 16, 2022
React Gatsby static web tool for generative artists working on token based NFT artwork (ex: Artblocks)

token-art-tools React Gatsby static web tool for generative artists working on token/hash based NFT artwork (ex: Artblocks) https://ctrlshiftmake.gith

Owen Moore 71 Dec 15, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023