cm_createCollection

create a new collection into which you can mint NFTs with a randomly generated UUID; sets up a unique contract per collection.

Replace:

  • <QUICKNODE_URL>: Set to your own quicknode RPC URL
curl -i '<QUICKNODE_URL>' -X POST -H 'content-type: application/json' --data-binary '{
    "jsonrpc": "2.0",
    "method": "cm_createCollection",
    "params": [
        "solana",
        {
            "name": "Party Favors",
            "description":"NFTs I'm giving out as party favors",
            "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/5/50/Congrats_bqt.jpg"
        }
    ]                                                                                          
}'

Parameters

IndexNameTypeDescription
0chainstringchain - currently only "solana" supported through this RPC method
1metadataobjectAn object containing required fields "name", "description", and optionally "imageUrl"

Returns

{
    id: "<UUID>",
    metadata: {
        name: "my collection name",
        description: "my collection description",
        imageUrl: "https://www.crossmint.io/api/2022-06-09/media/defaultCollectionImage"
    },
    onChain: {
        chain: "solana",
        type: "metaplex-certified-collection",
    },
};