Starport v0.16 Brings Keplr, Better IBC support, and a Whole Lot More

Denis Fadeev
Tendermint Blog
Published in
6 min readMay 25, 2021

Starport v0.16 has landed and it makes building your own blockchain easier than ever before. If you’re considering highly scalable, interoperable, and energy-efficient Cosmos technology for your blockchain project, read on to find out more about this significant upgrade — and how to easily deploy your own blockchain in minutes.

Starport v0.16

With more and more people using Starport to build their blockchains and experiment with the bleeding-edge technology that Cosmos offers, we decided to make it even easier to use. With Starport v0.16, you can now install Starport with a single click, benefit from improved scaffolding capabilities, and connect to other chains using our groundbreaking Inter-Blockchain Communication protocol (IBC).

One of the major advantages of Starport v0.16 is that it bundles all its dependencies with the binary. This means that, after you install Starport with a single command, you can start building immediately. We’ve also expanded the set of scaffolding commands, made scaffolding more reliable by intelligently detecting placeholders, and even added the ability to scaffold modules in projects that were not created with Starport, providing you maximum flexibility.

The standard Vue frontend now features Keplr wallet integration, allowing you to connect more easily to your end-users through an intuitive UI. A dedicated relayer section lets you connect your chain to the Cosmos Hub or other IBC-enabled chains and plug into a growing ecosystem of interconnected blockchains. New network functionality provides more control over the process of launching a chain, and you even can pass a custom initial genesis file and manually send "create validator" transactions.

Scaffold Tests, Queries, and Modules

One of the core features that make Starport so appealing to blockchain developers is the ability to scaffold code to bootstrap the development process. In v0.16, we, therefore, made scaffolding even more reliable and added new components that you can scaffold.

CRUD scaffolding with type command now generates a full set of tests to promote best development practices and help you better understand how to write tests for Cosmos SDK blockchains. All unit and integration tests are generated automatically. To check out this functionality, simply scaffold some types and run go test ./....

CRUD is incredibly useful because it allows you to add functionality to your blockchain with a single command. With the ability to run tests, it’s even easier to manage the generated code. One consideration to keep in mind here is that, in some cases, types are updated from the logic within handlers and don’t require messages. This means that, with the new --no-message flag, you can skip scaffolding the messages so that only the code you need is scaffolded. The --no-message flag works for type and packet scaffolding.

To make scaffolding even more flexible, we’ve also added the starport query command to scaffold a single query. For example:

starport query sellOrderBook orderID --response amountDenom,priceDenom

Simply pass request fields as arguments and pass comma-separated list responses with a --response (-r) flag. CLI query description can be passed using the optional --desc flag to provide more information about a command to end-users. Often queries require pagination that can be enabled using the optional --paginated flag.

To make all scaffolding commands even more reliable, we've added advanced placeholder tracking that prevents scaffolding code if the required placeholders are not present. This ensures that Starport generates code that can be successfully compiled and prevents scaffolding-related errors.

Another great addition is the ability to scaffold a Cosmos SDK module even the chain wasn't scaffolded with Starport. So, for example, a chain like Gaia can be extended with a custom module, and types, messages, and queries can be easily scaffolded.

OpenAPI

Starport now automatically generates OpenAPI documentation for your blockchain’s API for standard, imported, and custom Cosmos SDK modules. By default, an OpenAPI document is generated in the docs directory. This document is ready to be published on the web and is embedded in the node's binary. To make it easier to see available API endpoints and make HTTP requests, a simple Swagger UI is made available when you run starport serve. As with all features in v0.16, we've considered ease of use and optimization at every stage.

IBC Relayer

Relayers play a key role in the network of interconnected blockchains. In the previous Starport release, we included Go relayer functionality to streamline the development of IBC-enabled modules and allow you to quickly and easily connect to other chains both local and remote.

In v0.16, we’ve switched our CLI commands to use the more robust TypeScript relayer. The interface of high-level starport relayer configure and connect commands hasn't changed, but now connecting to mainnet chains like Cosmos Hub happens more reliably.

With the TypeScript relayer, we’ve also been able to add the relayer functionality to the Vue frontend. This means that you now can connect chains from the browser from an intuitive graphical UI.

Keplr Integration

Keplr is the most popular wallet extension in the Cosmos ecosystem. Keplr is easy to install, convenient to use, and even offers IBC functionality. Naturally, most developers want their chain UI to be integrated with this wallet to give end-users the ability to see their token balances and sign transactions directly from the extension.

The Starport Vue frontend now seamlessly integrates with Keplr, bridging the gap between your end-users and your blockchain. To check out Keplr support, you can scaffold a new chain or use the standalone Vue template.

Launch a Chain with Custom Genesis

In Starport v0.16, we expanded the set of network commands to facilitate launching chains with a custom genesis file. You can simply use the --genesis flag to pass a URL to a file that will act as an initial genesis file.

starport network chain create [chainID] --genesis <https://example.org/genesis.json>

The join command now features new optional flags: --gentx for passing a "create validator" transaction file (gentx.json) and --peer to pass a peer address of the server on which the validator node will run.

starport network chain join [chainID] --gentx gentx.json --peer 9c32599f243182c0a2af240711ad9ee7257f9bb9@1.2.3.4:26656

The show command can now output the genesis file with --genesis flag or a list of peers with the --peers flag.

All starport network commands have the --nightly flag that's meant to be used with the Starport CLI that's built from the develop branch. By default, requests from Starport go to the https://rpc.alpha.starport.network testnet. The --nightly requests are sent to the https://rpc.nightly.starport.network testnet.

All these additions make it possible for you to easily launch your own testnet and experiment with onboarding your validators in a safe environment. The upcoming launch of Starport Network is another step by us aimed at making validator onboarding easier and more accessible for all.

Starport Network is under active development. So be sure to stay tuned as more information is released later this year. The current version of starport network commands aims to provide a sneak peek at the features that we're working on.

Other Changes

  • We removed support for Cosmos SDK v0.39 Launchpad
  • starport serve no longer starts the web app in the vue directory. Use npm to manually start the web app
  • Default scaffold no longer includes legacy REST API endpoints (thanks @bensooraj!)
  • We fixed the error that prevented scaffolding a chain when an underscore was in the repo name (thanks again, @bensooraj!)

Get Started with Starport

Are you ready to get started with Starport v0.16?

curl <https://get.starport.network/starport>! | bash

Got questions? Join our channel on Discord: https://discord.gg/vcExX9T where you’ll find an active community of Starport users and developers. They can help you with any doubts and make launching your own Cosmos blockchain and connecting to our ecosystem even easier.

--

--