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

Requirements:
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
462FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,495FollowersFollow
2,230SubscribersSubscribe

Most Popular

bitcoin
Bitcoin (BTC) $ 43,387.00
ethereum
Ethereum (ETH) $ 3,035.19
tether
Tether (USDT) $ 1.00
bitcoin-cash
Bitcoin Cash (BCH) $ 515.28
litecoin
Litecoin (LTC) $ 152.25
eos
EOS (EOS) $ 4.01
okb
OKB (OKB) $ 13.12
tezos
Tezos (XTZ) $ 7.03
leo-token
LEO Token (LEO) $ 2.83
cardano
Cardano (ADA) $ 2.28
monero
Monero (XMR) $ 234.87
stellar
Stellar (XLM) $ 0.279653
chainlink
Chainlink (LINK) $ 24.82
huobi-token
Huobi Token (HT) $ 7.66
tron
TRON (TRX) $ 0.089088
usd-coin
USD Coin (USDC) $ 1.00
dash
Dash (DASH) $ 163.99
neo
NEO (NEO) $ 38.75
iota
IOTA (MIOTA) $ 1.21
nem
NEM (XEM) $ 0.148174
zcash
Zcash (ZEC) $ 111.85
maker
Maker (MKR) $ 2,368.30
paxos-standard
Pax Dollar (USDP) $ 1.00
ethereum-classic
Ethereum Classic (ETC) $ 47.43
vechain
VeChain (VET) $ 0.092083
true-usd
TrueUSD (TUSD) $ 1.00
ftx-token
FTX Token (FTT) $ 56.57
kucoin-shares
KuCoin Token (KCS) $ 10.56
waves
Waves (WAVES) $ 24.16