Create NFT Collection
An NFT, or non-fungible token, is a type of cryptocurrency that represents a unique item or asset. Unlike regular cryptocurrencies such as Bitcoin or Ether, NFTs aren't interchangeable with other tokens of the same type but stand as unique tokens with their own specific value. They leverage blockchain technology to establish provenance and ownership.
An NFT collection is a group of NFTs, typically bound together by a common theme or brand. Each individual NFT within the collection is unique, but they are all part of the broader collection. Think of it like a collection of paintings from the same artist or a series of collectible toys.
- 1.Art: Artists can mint their artworks as NFTs and sell them directly to collectors. Each NFT represents a unique piece of art or a limited edition series.
- 2.Collectibles: Virtual collectibles, such as CryptoPunks or NBA Top Shots, are often grouped into collections. Each unique item in the collection is an NFT.
- 3.Virtual Real Estate and Goods: Platforms like Decentraland allow users to own and trade virtual land and assets as NFTs.
- 4.Music and Entertainment: Musicians can mint their albums or songs as NFTs, providing a new way to monetize their work and connect with fans. Movies or show clips can also be tokenized as collectible NFTs.
- 5.Identity and Certification: NFTs can be used to represent ownership or the achievement of something, such as completing a course or owning a specific domain name.
By creating an NFT collection using the Tatum SDK, you can easily mint, manage, and distribute NFTs on the blockchain. Whether you're an artist launching a new series of artwork, a game developer creating unique in-game items, or a brand creating digital collectibles, the ability to create an NFT collection offers exciting new possibilities for digital ownership and commerce.
Use the TatumSDK (
@tatumio/tatum
) to create the NFT collection.TypeScript
JavaScript
curl
1
// yarn add @tatumio/tatum
2
import {TatumSDK, Network, Ethereum, ResponseDto} from '@tatumio/tatum'
3
4
const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})
5
6
const tx: ResponseDto<{txId: string}> = await tatum.nft.createNftCollection({
7
name: 'My NFT Collection',
8
symbol: 'MyNFT',
9
owner: '0x727ea45b2eb6abb2badd3dc7106d146e0dc0450d', // replace with your address
10
})
11
12
console.log(tx.data.txId)
13
// 0x8e564406701caab6258501c794f5c1eece380f673be99b561d626c3d8d81b202
14
15
// you can get created collection address using this RPC call
16
const collectionAddress = await tatum.rpc.getContractAddress(tx.data.txId)
17
console.log(collectionAddress)
18
// 0x876977006988ce590e219f576077459a49c7318a
1
// Install with: npm install @tatumio/tatum
2
const { TatumSDK, Network } = require("@tatumio/tatum");
3
4
(async () => {
5
try {
6
const tatum = await TatumSDK.init({ network: Network.ETHEREUM });
7
const txs = await tatum.nft.createNftCollection({
8
name: 'My NFT Collection,
9
symbol: 'MyNFT'
10
owner: '0x727ea45b2eb6abb2badd3dc7106d146e0dc0450d', // replace with your address
11
});
12
console.log(txs.data.txId);
13
// 0x8e564406701caab6258501c794f5c1eece380f673be99b561d626c3d8d81b202
14
15
const collectionAddress = await tatum.rpc.getContractAddress(tx.data.txId);
16
console.log(collectionAddress);
17
// 0x876977006988ce590e219f576077459a49c7318a
18
} catch (error) {
19
console.error("Error creating NFT collection:", error);
20
}
21
})();
1
curl --location --request POST 'https://api.tatum.io/v4/contract/deploy' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"contractType": "nft",
5
"chain": "ethereum-sepolia",
6
"name": "My NFT Collection",
7
"symbol": "MyNFT",
8
"owner": "0x727ea45b2eb6abb2badd3dc7106d146e0dc0450d"
9
}'
1
export interface CreateNftCollection {
2
/**
3
* Name of the NFT collection, e.g. Bored Ape Yacht Club
4
*/
5
name: string
6
/**
7
* Symbol of the NFT collection, e.g. BAYC
8
*/
9
symbol: string
10
/**
11
* Address of the NFT collection owner
12
*/
13
owner: string
14
/**
15
* Address of the NFT collection minter, this is optional and defaults to the owner address
16
*/
17
minter?: string
18
/**
19
* Optional base URI, which will be prepended to the token URI. If not specified, the token should be minted with the URI
20
*/
21
baseURI?: string
22
}
1
interface ResponseDto<{txId: string}> {
2
/**
3
* Actual payload of the response
4
*/
5
data: {txId: string}
6
/**
7
* Status of the response
8
*/
9
status: Status
10
/**
11
* In case of ERROR status, this field contains the error message and detailed description
12
*/
13
error?: ErrorWithMessage
14
}
Network | Support |
---|---|
Ethereum / Ethereum Sepolia / Ethereum Goerli
BNB Smart Chain / BNB Smart Chain Testnet
Celo / Celo Alfajores
Polygon / Polygon Mumbai | NFTs (BAYC,...)
ERC-1155 Tokens |
Last modified 1mo ago