createCollection()
Create a new collection based on specifications
Parameters
export type CreateCollectionProps = {
collectionName: string; // a name for new collection (editable)
slotId: string; // the slot the new collection will be a part of
type: CollectionType; // 'Unique' or 'Identical'
maximum: number; // maximum number of assets in the collection
description?: string; // a description for the new collection (editable)
tags?: string[]; // up to 5 tags, used for search (editable)
royaltyRecipient?: string; // userId for the royalty recipient (editable)
collectionImage?: string; // b64 data of collection image (editable)
collectionBanner?: string; // b64 data of collection banner (editable)
properties?: BasicAnyObject; // JSON of collection properties (editable)
walletUserId?: string; // walletId if creator is an app-owned wallet
}
Examples
const collectionId = await assetlayer.collections.createCollection({
collectionName: 'collectionName',
slotId: 'slotId',
type: 'Identical',
maximum: 1000,
description: 'description',
tags: ['tag_1', 'tag_2'],
royaltyRecipient: 'royaltyRecipientUserId',
collectionImage: 'b64 data',
collectionBanner: 'b64 data',
properties: {},
walletUserId?: 'walletUserId',
});
Return Types
type ReturnType = string;
Last updated