Skip to content

Conversation

WhiteR4bbitt
Copy link

What's happening.

Trying to generate a Cluster with CCC directly, calling

try {
  clusterData = ccc.spore.createSporeCluster({
    signer,
    data: {
      name,
      description,
    },
  })
} catch (error) {
  console.error('Error creating cluster!', error.message)
  // Error creating cluster! tx.setWitnessAt is not a function
}

Comparing

// Fails
console.log(typeof tx, tx instanceof ccc.Transaction) // object true
tx = await signer.prepareTransaction(tx);
console.log(typeof tx, tx instanceof ccc.Transaction) // object false
// Passes
console.log(typeof tx, tx instanceof ccc.Transaction) // object true
tx = ccc.Transaction.from(await signer.prepareTransaction(tx));
console.log(typeof tx, tx instanceof ccc.Transaction) // object true

Copy link

changeset-bot bot commented Jun 12, 2025

🦋 Changeset detected

Latest commit: 1c36e8d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@ckb-ccc/spore Patch
@ckb-ccc/shell Patch
@ckb-ccc/ccc Patch
ckb-ccc Patch
@ckb-ccc/connector Patch
@ckb-ccc/examples Patch
@ckb-ccc/ccc-playground Patch
@ckb-ccc/connector-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Hanssen0
Copy link
Member

Thank you for your contribution!

This seems like an issue from the Signer. Signer.prepareTransaction should return a Transaction by intent.

Could you please share what type of Signer you are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants