Create a collection

The following code shows how to use the HandCash Minter to inscribe a collection on-chain.

import dotenv from 'dotenv';
import { HandCashMinter, Environments, Types, HandCashConnect } from '@handcash/handcash-connect';


const handCashMinter = HandCashMinter.fromAppCredentials({
  appId: process.env.HANDCASH_APP_ID,
  authToken: process.env.HANDCASH_AUTH_TOKEN,
  appSecret: process.env.HANDCASH_APP_SECRET

(async () => {
  const creationOrder = await handCashMinter.createCollectionOrder({
      name: 'HandCash Team Caricatures',
      description: 'A unique collection of caricatures of the HandCash team',
      mediaDetails: {
        image: {
          url: '',
          contentType: 'image/png'
  console.log(`Items order created, items are being created asynchronously`);
  const items = await handCashMinter.getOrderItems(;
  console.log(`Collection Created, collectionId: ${items[0].id}`);