Skip to content

cardano-foundation/cf-token-metadata-registry

Repository files navigation

License: MPL 2.0 GitHub top language Build Issues


Cardano offchain metadata registry

A reference implementation of a Cardano CIP-26 compliant offchain metadata registry.

Introduction

This repository contains an implementaiton of a CIP-26 compliant offchain metadata registry for Cardano. It exposes an extended API (see the OpenAPI v3 spec hosted by our staging deployments here) with regards to the one specified in CIP-26 to allow for more querying options and also write access to the registry to get rid of parts of the GitHub based process (but still stick to the known GitHub repository as a single source of truth for now).

Implementation of client tools for metadata creation can be found here and at IOG's reference implementation repository.

How to build?

For building you need

Building from source

Clone this repository

$ git clone git@github.com:cardano-foundation/cf-token-metadata-registry.git

cd into the directory where git did clone the sources into and build the application via Maven

$ cd cf-token-metadata-registry
$ mvn package

How to run?

The simplest approach to running the application after having built it is to use the provided Docker Compose setup and Docker containers included in the various sub folders. This is done simply by calling the following command in the root directory of this repository:

$ docker compose up

Note

If you change the code, in order to make the changes visible to docker compose you need to rebuild the local image with docker compose build and then docker compose up will take care to restart containers who have a new image available

The complete Docker Compose setup runs the following services:

  1. Setup a Postgres database in a docker container and exposes it to localhost on port 5432 (service name db)
  2. Starts the actual Spring application that exposes the CIP-26 REST API and exposes it to localhost on port 8081 (service name api)

To test if the API is running query its health endpoint by executing:

$ curl http://localhost:8081/actuator/health

Have a look at the .env file for the various configuration options.

At the moment the application needs a PostgreSQL database as a storage layer which might change in the future. Database evolutions are managed by the api project using flyway.

Features

Offchain metadata related:

  • Expose CIP-26 compliant REST API

WIP:

  • Add CIP-88 support
  • Expose verification API for offchain metadata based on extended CIP-26 trust concept
  • Provide a CLI application for metadata creation and verification
  • Implement metadata verification based on public key registries

Contributing

File an issue or a PR or reach out directly to us if you want to contribute.

When contributing to this project and interacting with others, please follow our Contributing Guidelines and Code of Conduct.


Thanks for visiting and enjoy ❤️!