Sitelet https://github.com/dfinity/rosetta-node/tree/main/rosetta-api
Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Latest commit

 

History

History

This is a standalone server which implements the Rosetta API

When complete this will allow cryptocurrency exchanges with this binary to read and write ICPT transactions using a standard interface.

The Rosetta API uses slightly different terminology to us: * Accounts are canisters on our system * Shards are subnets * Mempools are the ingress queue

Pulling Docker images from GitLab

First log in to the registry

docker login registry.gitlab.com --username coinbase --password gxNpUvPsh5Cf4y476cYx

Then pull an image

docker pull registry.gitlab.com/dfinity-lab/rosetta-node/rosetta-api

Then run it

docker run \
    --interactive \
    --tty \
    --publish 8080:8080 \
    --rm \
    registry.gitlab.com/dfinity-lab/rosetta-node/rosetta-api

Pushing Docker images to Docker Hub

First log in to the registry (docker login) with your username and password. Make sure that the user is in the dfinity organization. Then, pull the image from GitLab, as above. Then tag it as follows, and then and push.

docker tag \
    registry.gitlab.com/dfinity-lab/rosetta-node/rosetta-api:latest \
    dfinity/rosetta-api:latest
docker push dfinity/rosetta-api:latest

The image is now available directly from Docker Hub.

docker run \
    --interactive \
    --tty \
    --publish 8080:8080 \
    --rm \
    dfinity/rosetta-api

Building and running Docker image

Building Docker image requires GitHub token repository permissions in order to download tarball with the sources via GitHub API. The command below assumes that the token is available in github-token.txt in the current working directory.

docker build . \
    --build-arg GITHUB_TOKEN=$(cat github-token.txt) \
    --file Dockerfile-Coinbase \
    --tag dfinity/rosetta-api

Once the image is built, start Rosetta API server with

docker run \
    --interactive \
    --tty \
    --publish 8080:8080 \
    --rm \
    dfinity/rosetta-api