How to derive CBOR from Transaction

I’m messing around with the serialization library, and building transactions programmatically with it. Once I’ve built the tx, I want to submit it to a rosetta /construction/submit endpoint to see if I can get my tx added to the mempool, but it appears that rosetta endpoint wants the CBOR in string format. Any ideas how to get this once I’ve got a built and signed transaction from the serialization lib?

1 Like

Hello, I saw this was unanswered in a long time so I figured I would reply - you probably already figured it out.

  1. You don’t actually need Rosetta for this, you can submit transactions in numerous ways.
  2. most common way, when working with CSL (Cardano Serialization Lib) is to:
  • read utxo from a webwallet (cardano.nami.getUtxos() or another CIP30 compatible wallet)
  • construct a transaction through CSL
  • sign it through the webwallet (cardano.nami.signTx()), this will return a witnessSet
  • add the witnessSet to the TX
  • submit it through the users wallet (Nami, Eternl, Typhoon, etc, etc, etc)

This works, without having to run a backend Rosetta instance, Rosetta is more intended for exchanges.

Good luck and feel free to reach out in case you have any questions!

1 Like