Skip to content

Commit 20fe7ef

Browse files
authored
Merge pull request #204 from dimitrov-d/main
Add docs for unique NFT example
2 parents 2a5db04 + b189ce8 commit 20fe7ef

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

build/5-apillon-sdk.md

+34
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ let collection = await nft.create({
272272
dropPrice: 0.05,
273273
dropReserve: 100,
274274
});
275+
275276
// or create a substrate collection
276277
const substrateCollection = await nft.createSubstrate({
277278
collectionType: CollectionType.GENERIC,
@@ -281,6 +282,39 @@ const substrateCollection = await nft.createSubstrate({
281282
...
282283
});
283284

285+
// or create a unique collection
286+
const uniqueCollection = await nft.createUnique({
287+
collectionType: CollectionType.GENERIC,
288+
chain: SubstrateChain.UNIQUE,
289+
name: 'UniqueArtworks',
290+
symbol: 'UA',
291+
description: 'A collection of one-of-a-kind digital artworks.',
292+
isRevokable: false,
293+
isSoulbound: false,
294+
metadata: {
295+
'1': {
296+
name: 'Unique NFT 1',
297+
description: 'Description for Unique NFT 1',
298+
image: 'https://example.com/nft1.png',
299+
attributes: {
300+
trait_type: 'color',
301+
value: 'red',
302+
display_type: 'string',
303+
},
304+
},
305+
'2': {
306+
name: 'Unique NFT 2',
307+
description: 'Description for Unique NFT 2',
308+
image: 'https://example.com/nft2.png',
309+
attributes: {
310+
trait_type: 'color',
311+
value: 'blue',
312+
display_type: 'string',
313+
},
314+
},
315+
},
316+
});
317+
284318
// check if collection is deployed - available on chain
285319
if (collection.collectionStatus == CollectionStatus.DEPLOYED) {
286320
console.log('Collection deployed: ', collection.transactionHash);

0 commit comments

Comments
 (0)