Skip to main content
This guide shows how to create an NFT collection using JavaScript with the Coinbase CDP SDK and viem.

Try it Out

V0 Prototype

You can try out a working prototype of the Coinbase Smart Wallet at: Coinbase Wallet V0 Prototype

Deploy Your Own

Deploy your own version of the prototype with one click: Deploy with Vercel

Prerequisites

  • Coinbase API credentials (API Key ID and Secret)
  • A wallet secret for authentication
  • Node.js environment

Installation

Creating a Collection

The following example demonstrates how to create a new NFT collection using the Coinbase CDP SDK and viem:

Environment Variables

Make sure to set the following environment variables:

Next Steps

After creating your collection, you can:
  • Mint NFTs within your collection
  • Set up sales configurations
  • Update collection metadata
  • Add collection to marketplaces