npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eznft

v0.0.13-0

Published

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

Downloads

25

Readme

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.uploadAssets('~/my-nft-project/output', { uploadJsonAssets: true });

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