Cardano serialization library

This is a library for serialization and deserialization of data structures used in Cardano’s Haskell implementation of Shelley along with useful utility functions.

Using the library

Due to the portability of Rust, you can bind to the native Rust library from any common programming language (including C and WebAssembly). This library generates both Typescript and Flow type definitions, and you can check out possible options by just looking at Flow types. You can also explore the example folder to see how to use this library from Typescript and experiment with it.

Benefits of using this library

Serialization/deserialization code is automatically generated from Cardano’s official specification, which guarantees it can easily stay up to date. This is enabled due to the use of an EMURGO-written tool called cddl-codegen, which can be re-used for other tasks such as the automatic generation of a Rust library for Cardano metadata specifications.

It is also easy to create scripts in Rust or WASM to share with stake pools, or even embed inside an online tool. The library is powerful and flexible enough to be used to power wallets and exchanges.

Other Cardano versions

If you are looking for legacy bindings, you can find them at:

Original binary specifications

You can find original CDDL specifications at:

Instructions

Before you start, see building, testing and publishing tips here. Then proceed exploring more in the doc folder, or follow the link to the repository below.

For more information: Go to GitHub repo

© IOHK 2015 - 2022


Cardano Logo

Cardano is an open-source project.

Cardano is a software platform ONLY and does not conduct any independent diligence on, or substantive review of, any blockchain asset, digital currency, cryptocurrency or associated funds. You are fully and solely responsible for evaluating your investments, for determining whether you will exchange blockchain assets based on your own judgement, and for all your decisions as to whether to exchange blockchain assets with Cardano. In many cases, blockchain assets you exchange on the basis of your research may not increase in value, and may decrease in value. Similarly, blockchain assets you exchange on the basis of your research may fall or rise in value after your exchange.

Past performance is not indicative of future results. Any investment in blockchain assets involves the risk of loss of part or all of your investment. The value of the blockchain assets you exchange is subject to market and other investment risks