Skip to content

Theta Implementation of the Rosetta RPC API standard developed by Coinbase.com

Notifications You must be signed in to change notification settings

thetatoken/theta-rosetta-rpc-adaptor

Repository files navigation

theta-rosetta-rpc-adaptor

Rosetta

Theta Rosetta

Overview

Theta-rosetta provides a reference implementation of the Rosetta specification for Theta.

Features

  • Comprehensive tracking of all ETH balance changes
  • Stateless, offline, curve-based transaction construction (with address checksum validation)
  • Atomic balance lookups using go-ethereum's GraphQL Endpoint
  • Idempotent access to all transaction traces and receipts

Pre-requisite

To run Theta-rosetta, you must install Docker. Please refer to Docker official documentation on installation instruction.

Usage

As specified in the Rosetta API Principles, all Rosetta implementations must be deployable via Docker and support running via either an online or offline mode.

YOU MUST INSTALL DOCKER FOR THE FOLLOWING INSTRUCTIONS TO WORK. YOU CAN DOWNLOAD DOCKER HERE.

Install

Running the following commands will create a Docker image called theta-rosetta-rpc-adaptor:latest.

Get the Dockerfile from this repository and put it into your desired local directory

docker build --no-cache -t theta-rosetta-rpc-adaptor:latest .

Run

Running the following command will start a Docker container and expose the Rosetta APIs.

docker run -p 8080:8080 -p 16888:16888 -p 15872:15872 -p 21000:21000 -p 30001:30001 -e THETA_NETWORK=testnet -it theta-rosetta-rpc-adaptor:latest

Restarting Theta-rosetta

docker stop <container name>
docker start <container name>

Restful APIs

Rosetta restful APIs

All supported Construction APIs specified in https://www.rosetta-api.org/docs/ConstructionApi.html

Unsupported APIs

Indexer APIs specifed in https://www.rosetta-api.org/docs/indexers.html

How to test

Install the latest rosetta-cli from https://github.com/coinbase/rosetta-cli.

Testing Data API

rosetta-cli check:data --configuration-file=cli-test-config.json

Testing Construction API

rosetta-cli check:construction --configuration-file=cli-test-config.json

End Conditions

The end conditions for check:construction is set to:

  broadcast complete for job "transfer (3)" with transaction hash <tx hash>

License

This project is available open source under the terms of the GNU Lesser General Public License 3.0.

© 2021 Theta

About

Theta Implementation of the Rosetta RPC API standard developed by Coinbase.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published