CCC Docs
    Preparing search index...

    Function createSporeCluster

    • Create a new Cluster cell

      Parameters

      • params: {
            signer: Signer;
            data: ClusterDataV2View;
            to?: ScriptLike;
            tx?: TransactionLike;
            scriptInfo?: SporeScriptInfoLike;
            scriptInfoHash?: BytesLike;
        }
        • signer: Signer

          who takes the responsibility to balance and sign the transaction

        • data: ClusterDataV2View

          specific format of data required by Cluster protocol

        • Optionalto?: ScriptLike

          the owner of the Cluster cell, which will be replaced with signer if not provided

        • Optionaltx?: TransactionLike

          the transaction skeleton, if not provided, a new one will be created

        • OptionalscriptInfo?: SporeScriptInfoLike

          the script info of new cluster, default spore version if undefined

        • OptionalscriptInfoHash?: BytesLike

          the script info hash used in cobuild

      Returns Promise<{ tx: Transaction; id: `0x${string}` }>

      • tx: a new transaction that contains created Cluster cell
      • id: the id of the created Cluster cell