HomeCoinsCosmos (ATOM)Rosetta API for Cosmos SDK. Introduction | by Jonathan Gimeno | Oct,...

Rosetta API for Cosmos SDK. Introduction | by Jonathan Gimeno | Oct, 2020

- Advertisement -

In the blockchain space, as well as in other industries that rely on operational processes and exchange or sharing of information between different systems, having a set of Interoperability standards is key to building solid and foundational protocols.

Rosetta API, an open-source specification and set of tools developed by Coinbase, makes integrating with blockchains simpler, faster, and more reliable by establishing a standard API for integrating blockchain applications.
By using a common interface that standardizes the process of how a user interacts with a blockchain, both the work of exchanges to integrate with new blockchains and also of the developers to build cross-blockchain applications such as block explorers, wallets and dApps is considerably reduced.

With IBC about to be enabled following the imminent Stargate upgrade and a vision of interconnectable blockchains on the horizon, Tendermint Engineering has been working on an initial implementation of Rosetta API for Cosmos SDK to enable applications to make blockchain data available through endpoints compliant with the standard proposed by Coinbase.

What does this mean for the Cosmos ecosystem?

The Rosetta API implementation allows:

  • Exchanges to seamlessly integrate new blockchains that run Rosetta API without any additional developer effort.

Tendermint team is excited to release the Rosetta API MVP, which we initially designed to support the Cosmos SDK Launchpad, and we invite the entire Cosmos community to test and provide feedback.

How can it be executed?

We have created a solution thinking broadly to be used in different use cases. The simpler one is to execute the standalone application that will communicate with a running node, preferably locally (but not enforced). But we know that some applications would prefer this service be embedded into their own application binaries. That is why we have abstracted the service in the code to provide the option to be instantiated via code. You can take an example reading the main.go in the repository.

How to install the Rosetta API Standalone gateway

  1. Clone the repo
$ git clone -b v0.1.0 https://github.com/tendermint/cosmos-rosetta-gateway

2. Install the tool:

$ cd cosmos-rosetta-gateway
$ make install

3. Make sure you have GOBIN properly configured, then execute:

$ crg --help

Testing the API

Any chain that uses the Cosmos SDK version 0.39.1 should work. (If not please open an issue). We will use Starport tool to scaffold and run a blockchain application and test against it. Here we go!

  1. Create an application:
$ starport app github.com/jgimeno/blog
$ cd blog
$ starport serve --verbose

These 3 commands should initiate a blockchain to run on your machine.

2. Look for flags:

  • -prefix: This flag is important, as not every cosmos blockchain uses the default “cosmos” prefix. For example, for IOV blockchain we would use `-prefix star`.

3. Execute the application:

$ crg

If everything went well we will have our service listening at port 8080.

Pulling Data

On top of the endpoints that are documented in the official Rosetta site, we have prepared a basic Postman collection in order to help with testing and using the endpoints, that you can find here. Link.

The vision of Cosmos has always been to become a major part of the Interchain, a network of interoperable and scalable blockchain token economies. With Rosetta API, the integration of new blockchains and cross blockchains apps becomes a much easier experience for developers as it’s standardizing operations that allow different systems to better work together.

Also, with the upcoming Stargate upgrade, we will be expecting Exchanges to be able to use IBC as a way to simplify listing. Link.

Today, we are happy to provide the first Rosetta API MVP for the community to be able to test and to integrate into their apps.
As this is the first release, some things are still pending and will be added with the upcoming integrations,
For now, we have added support for Cosmos Launchpad chains and MsgSend transaction types.

We would love to receive feedback! Don’t hesitate to contact us in the dedicated Cosmos discord channel.

Read the original article here

- Advertisement -
profile logo 500x500
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel

Most Popular

Bitcoin (BTC) $ 43,387.00
Ethereum (ETH) $ 3,035.19
Tether (USDT) $ 1.00
Bitcoin Cash (BCH) $ 515.28
Litecoin (LTC) $ 152.25
EOS (EOS) $ 4.01
OKB (OKB) $ 13.12
Tezos (XTZ) $ 7.03
LEO Token (LEO) $ 2.83
Cardano (ADA) $ 2.28
Monero (XMR) $ 234.87
Stellar (XLM) $ 0.279653
Chainlink (LINK) $ 24.82
Huobi Token (HT) $ 7.66
TRON (TRX) $ 0.089088
USD Coin (USDC) $ 1.00
Dash (DASH) $ 163.99
NEO (NEO) $ 38.75
IOTA (MIOTA) $ 1.21
NEM (XEM) $ 0.148174
Zcash (ZEC) $ 111.85
Maker (MKR) $ 2,368.30
Pax Dollar (USDP) $ 1.00
Ethereum Classic (ETC) $ 47.43
VeChain (VET) $ 0.092083
TrueUSD (TUSD) $ 1.00
FTX Token (FTT) $ 56.57
KuCoin Token (KCS) $ 10.56
Waves (WAVES) $ 24.16