Skip to content
shleger edited this page Apr 19, 2024 · 31 revisions

Rosetta API for Cardano Blockchain

Context

This solution is an implementation of the Rosetta API specification for Cardano Blockchain.

The specific changes in this implementation can be found in cardano-specific-api-additions

To use this Rosetta API for Cardano you can build the project from source or use the pre-built docker image. TODO -- insert link to docker image

The solution provides Construction API (mutation of data) and Data API (read data) with REST API that allows you to interact with the Cardano blockchain in a standard for Rosetta API way:

Here and below we use C4 notation to describe the solution architecture.

Figure 1. Context Diagram

From the Rosetta API it is recommended to have only one container with all components packaged inside. See detailed description here: Docker deployment

Figure 2. Container Diagram

Implementation

The solution consist of the following four components:

  • Cardano Node
  • Yaci Indexer App (extended from yaci-store)
  • Rosetta API App
  • Postgres Database

This solution relies on the Cardano Node to provide the blockchain data. The Cardano Node is a full node that stores the entire history of the Cardano blockchain. The Cardano Node is used to query the blockchain data and to submit transactions to the blockchain.

Yaci Indexer App retrieves data on per block basis from the Cardano Node and stores it in a Postgres database. The data stored in efficient way that is only required by the Rosetta API.

Rosetta API App in case of Data API read data from Postgres database and in case of Construction API it uses Cardano Node to submit transactions to the blockchain.

Figure 3. Component Diagram

Cardano Node

TODO

Yaci Indexer App

TODO

Rosetta API App

TODO

Postgres Database

TODO

Deployment

TODO: Helm chart / docker compose description (link)?

Clone this wiki locally