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?