<p>Without using an API service like BlockFrost <a href="https://blockfrost.io/" rel="nofollow noreferrer">https://blockfrost.io/</a> you can utilise the Transaction output (cborHex) string from the completed Serialization Library build process by copying it into an existing Cardano-Cli Signed Transaction and submit it via the Cli.</p>
<p>Signed Cli Transaction Format for file <em>tx_1.signed</em>:</p>
<pre><code>{
    &quot;type&quot;: &quot;Tx AlonzoEra&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;cborHex&quot;: &quot;&lt;insert the cborHex string created by the serialization-lib here and submit via cli command&quot;
}
</code></pre>
<p>Cli Command format for testnet</p>
<pre><code>cardano-cli transaction submit --tx-file /Users/someuser/cardano-src/*tx_1.signed* --testnet-magic 1097911063
</code></pre>
<p>There is also a simple boolean function for testing if the Transaction is valid:</p>
<pre><code>pub fn is_valid(&amp;self) -&gt; bool {
        self.is_valid.clone()
    }
</code></pre>
<p><a href="https://github.com/Emurgo/cardano-serialization-lib/blob/master/rust/src/lib.rs" rel="nofollow noreferrer">https://github.com/Emurgo/cardano-serialization-lib/blob/master/rust/src/lib.rs</a></p>
<p>Hope this helps.</p>

CC BY-SA 4.0
2022-05-30T21:24:03.023Z
2022-05-30T21:24:03.023Z
Rust_Dev
<p>When using the Cardano serialisation library by emurgo, how do you test the output works as intended? Would this change when using parameterised contracts?</p>

<transaction><cardano-serialization-lib><decentralized-applications><emurgo><bytes>
How to test the serialisation of a transaction?
# How to test the serialisation of a transaction?

(Asked by: username_0 on 2022-05-28)

When using the Cardano serialisation library by emurgo, how do you test the output works as intended? Would this change when using parameterised contracts?

**Tags:** transaction, cardano-serialization-lib, decentralized-applications, emurgo, bytes

---

## 1 answers

### Answer by username_1 on 2022-05-30. Score: 1 | Accepted answer

Without using an API service like BlockFrost https://blockfrost.io/ you can utilise the Transaction output (cborHex) string from the completed Serialization Library build process by copying it into an existing Cardano-Cli Signed Transaction and submit it via the Cli.
Signed Cli Transaction Format for file tx_1.signed:
{
    "type": "Tx AlonzoEra",
    "description": "",
    "cborHex": "
Cli Command format for testnet
cardano-cli transaction submit --tx-file /Users/someuser/cardano-src/*tx_1.signed* --testnet-magic 1097911063

There is also a simple boolean function for testing if the Transaction is valid:
pub fn is_valid(&self) -> bool {
        self.is_valid.clone()
    }

https://github.com/Emurgo/cardano-serialization-lib/blob/master/rust/src/lib.rs
Hope this helps.


---

