Skip to content

Commit

Permalink
docs(rosetta): add Rosetta documentation page
Browse files Browse the repository at this point in the history
related to #9575
  • Loading branch information
noandrea committed Jul 13, 2021
1 parent c23f386 commit 340d636
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ aside: false
- **[Specifications](./spec/)**: Specifications of modules and other parts of the Cosmos SDK.
- **[SDK API Reference](https://godoc.org/github.com/cosmos/cosmos-sdk)**: Godocs of the Cosmos SDK.
- **[REST and RPC Endpoints](https://cosmos.network/rpc/)**: List of endpoints to interact with a `gaia` full-node.
- **[Rosetta API](./rosetta/)**: Rosetta API integration.

## Cosmos Hub

Expand Down
50 changes: 50 additions & 0 deletions docs/rosetta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
order: false
parent:
order: 2
-->

# Rosetta

This folder contains instructions about how to use the Coinbase Rosetta API integration.

## Motivations and design

For the motivation an design choices refer to the [ADR 035](../architecture/adr-035-rosetta-api-support.md)

## Usage

The Rosetta API server is a stand-alone server that connects to a node of a chain developed with the Cosmos-SDK.

To enable the Rosetta API server support it's required to Add the `RosettaCommand` to your application root command file.
After the

```
initRootCmd(rootCmd, encodingConfig)
```

line, add the following lines:

```
rootCmd.AddCommand(
server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler)
)
```


The application root command file is in the server package in `github.com/cosmos/cosmos-sdk/server`.

Since we’ve updated the Cosmos SDK to work with the Rosetta API, updating the application root command file is all you need to do.

To run Rosetta in your application CLI, use the following command:
`appd rosetta --help`.
To test and run Rosetta API endpoints for applications that are running and exposed, use the following command:

```
appd rosetta
--blockchain "your application name (ex: gaia)"
--network "your chain identifier (ex: testnet-1)"
--tendermint "tendermint endpoint (ex: localhost:26657)"
--grpc "gRPC endpoint (ex: localhost:9090)"
--addr "rosetta binding address (ex: :8080)"
```

0 comments on commit 340d636

Please sign in to comment.