• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

alephao/nftool: A suite of tools for NFT generative art.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

alephao/nftool

开源软件地址:

https://github.com/alephao/nftool

开源编程语言:

Go 97.5%

开源软件介绍:

nftool

Tests

A suite of tools for NFT generative art.

Features

  • Metadata
    • Generate ERC-721 and ERC-1155 compatible metadata
  • Traits/Attributes/Properties Generation
    • Configure custom rarity
    • Generate collection attributes configuration file
    • Merge collections
    • Shuffle collection
    • Find collisions between collections
  • Image Generation
    • Generate images from collection description
    • Generate images in parallel
    • Generate only missing images (if you delete a few images from the output folder)
  • Rarity
    • Generate traits rarity
    • Generate collection rarity
  • Provenance
    • Generate provenance
  • OpenSea
    • Update metadata of collection

Install

Homebrew on Macos

brew install alephao/formulae/nftool

Using Go

go install github.com/alephao/nftool@latest

Or clone the repository, change to the root folder and run go install.

Manually

Download the binary from the releases page and move it to your bin path like /usr/local/bin.

Getting Started

To get started, install nftool following the instructions above and cd to the examples folder in this repo.

You can always use nftool help [command] to see all the documentatio and all the options of a command.

First generate the configuration file from the layers folders.

mkdir -p out
nftool traits dump --layers ./layers --out ./out/config.yaml

You can open config.yaml and play around with the rarity weights, and optional configuration.

Then generate a collection from the config.yaml

nftool traits make --amount 10 --config ./out/config.yaml --out ./out/collection.json

Now we can use the collection.json to generate the images. Run the following commands:

mkdir -p ./out/images
nftool img gen --width 300 --height 300 --collection ./out/collection.json --config ./out/config.yaml --out ./out/images

We can also generate rarity reports for traits (which trait is more rare and how many times it shows up) and the collection rarity rank.

# Generate traits rarity report
nftool rarity traits --collection ./out/collection.json --out ./out/traits_rarity.json

# Generate collection rarity rank report
nftool rarity collection --collection ./out/collection.json --out ./out/collection_rarity.json

To generate the provenance for this collection it's easy:

nftool provenance --images ./out/images --out ./out/provenance.json --startingIndex 2

Note: the startingIndex should be a number smaller than the total amount of items in the collection and it's usually generated on-chain.

Now we need to generate the actual metadata that we'll upload to IPFS (or another storage service).

	mkdir -p ./out/metadata
	# Generate ERC-721 metadata
	nftool metadata --collection ./out/collection.json --config ./out/config.yaml --out ./out/metadata

Note: if you want to generate the metadata following the erc-1155 convention for the id/file-name, add the flag --erc1155

Check out the output in ./out/metadata/1. If you want to change anything, you can do so by editing the values in ./out/config.yaml.

Documentation

Link to the generated docs

Contributing

  • For requests and questions, please open an issue.
  • PRs accepted.

Releasing

To release a new version

git tag vx.x.x
git push origin vx.x.x
goreleaser release --rm-dist  

License

MIT © Aleph Retamal




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Dispersionjs/ipfs-disperse: An IPFS library.发布时间:2022-06-22
下一篇:
dignifiedquire/anno: Mirandor meets IPFS发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap