How to make an AtomicHub Collection Book

103-ct

How to make an AtomicHub Collection Book

This new addition to AtomicHub allows creators to organise their NFTs into sets, giving collectors an easy way to discover and purchase the NFTs they are missing. Here’s stuckatsixpm to show you how to make one!

NOVEMBER 9, 2021. TUTORIAL. WRITTEN BY STUCKATSIXPM.

Ahead of the forthcoming Collection Book Creator UI coming to AtomicHub, stuckatsixpm very kindly offered to write a guide for you guys on how to put one together right now!

Take it away, Stuck!

This is a tutorial for creating an AtomicHub collection book, a handy tool that lets collectors see what NFTs from your collection they have and which NFTs they are missing.

103-1

As you can see, collectors also have the opportunity to “quick-buy” from the secondary market to help complete their collections, and can also view how close they are to completing a set. This makes the books a fantastic tool for helping drive the “collectability” of your collection.

AtomicHub is working on making it easier to create Collection Books, but for now the process can be quite difficult to understand, so this tutorial aims to explain how you can make your own!

You can find the final JSON snippet and some examples at the bottom of this article.

A huge thanks to Fabian from AtomicHub for fielding my questions as I was writing this tutorial.

Background Information about the Books

This example uses a simplified book for the sixpm collection, containing 5 templates: 3 from the location cards project , 1 from the creator cards projects, and 1 promo. This selection of templates was chosen to show off the different features of books, and it looks like this:

Books are structured into 2 levels:

  • Series, which are the broadest type of category, and are subdivided into
  • Filter Categories, which are subcategories.

You can also add custom filters to Filter Categories to let users search for particular templates.

In the first screenshot, the Series is “Dynamic NFTs”, the Filter Category is “Location Cards”, and there is a rarity filter that lets users display only certain rarities.

Building the Book

Don’t be intimidated by the length of the JSON below. Throughout this tutorial are several snippets you can copy and edit to make your own collection book.

Creating a book is time-intensive work. AtomicHub is working on a UI to simplify the process. I personally wrote a script to auto-create the JSON file needed, but because every project is so different, it’s difficult to have a script that works for any collection.

To make a book, you need to upload JSON (JavaScript Object Notation) formatted text to AtomicHub. To do this, visit your collection’s book editor page, which can be found at:

The basic format for a collection book looks like this.

There are three top level fields:

  • name: the display name for the collection
  • data: information about the templates you want to include
  • series: how the templates should be presented in the book.

Let’s break down what to put in the data and series fields.

Data

This section is a list of all the categories you want to appear in your book. Generally, each template you want to be listed in your book needs to have its own “data block” to prevent it being grouped with other templates. The data structure contains a list of objects that look like this:

  • cardid: (Optional) an text snippet that doesn’t actually get used for anything. It’s mainly just to help you keep track of what template a “data block” refers to
  • group: (Optional, strongly recommended) custom grouping for sorting your NFTs into categories later. I want this template to be contained in the “dynamic” group.
  • schema_name: (Optional, strongly recommended) the Atomic Assets schema of the template.
  • data: immutable template data for the template(s) in "key": “value" pairs. In my example, I use "location": "Anchorage, United States" and "rarity": “First Edition" to identify this card. You can include multiple tag pairs in the data field, just put a comma the the end of each one except the last. These data fields are used to link the “Market” and “Inventory” buttons.
  • template_ids: a list of template IDs that you wish to be included in this category. If you wish for multiple templates to be treated as the same template, you can list multiple values here.
  • attributes: custom attributes you wish to appear in the book. For example, here I use the location name, but you can use the rarity of the NFT, or any other information you’d like to be displayed. If you don’t want any, just leave it as an empty list (“[]”)

Series

Series are how you present the various templates you listed in Data to the person viewing the book. As previously mentioned, there are two levels of structure:

  • Series: the broad category
  • Filter Categories: subcategories of the series
103-1

This screenshot shows how the both series (Dynamic NFTs and Promos) and both Filter Categories (Location Cards and Creator Cards) are displayed. You can see both in the JSON snippet below, which shows the series field for the example book.

Each series looks something like the preview code, which shows a series called Dynamic NFTs with two filter categories: “Location Cards” and “Creator Cards”.

  • name: the series (broad category) should be displayed with
  • filters: the filter categories (subcategories) to show within the series
  • links: (Optional) a link to display with the series
103-6

There are two other fields, “premint_account” and “bridged”, but these are more for internal AtomicHub use, so don’t worry about them.

Next, we can use the group, schema_name, and data values we assigned in the previous step to create filter categories. Each filter category is made up of the following parts:

  • name: the name the filter category should be displayed with
  • schema_name: Atomic Assets schema name
  • group: the group to select NFTs from
  • data: Which of the “immutable template data” tags we set up in the previous data section to filter for in this Filter Category. (So many “data” uses — It’s confusing I know). These match the tags from the last code snippet, where we were adding the templates.
  • custom: This section is where you can define custom ways to further filter the data. These fields need a “key” and a “default” value. The key is an attribute name from the template’s immutable data. The default value is what to show by default. For example, you might want to automatically filter to only show NFTs that have a “rarity” attribute of “common”. In that case, you would do:

“custom”: [
{
“key”:”rarity”,
“default”: “common”
}
]

If you want to have no custom filters, just use “[]”. If you want to have filters, but no automatic filter in place, use null as the default value. Note that null has no quotation marks.

Put it all together!

Here’s the full book JSON, substituting in our data and series fields:

Once you have your full file, you can upload it to the editor page on AtomicHub and preview it.

When you’re happy, hit submit and sign the transaction to push it to the WAX blockchain where it will then be displayed on the AtomicHub website at

Wrapping Up

I hope this helps simplify the complex process of creating a Collection Book — I know AtomicHub is working on a UI to make this simpler. Once again, creating a book is currently a tedious process that can quickly consume a lot of time. Hopefully more tools to create these books will be released soon.

After I get some breathing space for TAG, I’ll try to tidy up and upload my Book Generation scripts to GitHub.

Until next time!

~ stuckatsixpm

If you want to see the demo SixPM Book, you can view it here.

The corresponding JSON file can also be viewed online on GitHub.

If you found this tutorial helpful, consider helping fuel my caffeine addiction by buying me a coffee.

stuckatsixpm-logo2

stuckatsixpm
SixPM Software | Verified on AtomicHub – sixpm | Programmer. Scientist. Likes Cats | NFTs are cool and WAX is the way to make them.
sixpm.dev | Twitter | TAG | Honeycomb | Pikcell Project