Go to file
Federico Kunze 5b9ae43b76 Update SDK readme 2018-04-02 14:21:34 -03:00
.circleci Upgrade to Circle 2.0 2018-03-21 00:55:55 +01:00
.github github PR template 2018-03-01 18:26:16 -05:00
baseapp Merge pull request #726 from cosmos/adrian/mountmultipledbs 2018-03-30 06:41:10 -04:00
client cleanup gitignore 2018-03-31 19:05:15 +03:00
docs revert to develop docs 2018-03-28 19:01:50 +02:00
examples remove account_test 2018-03-31 20:20:44 +02:00
mock basecoind init --testnet (closes #718) 2018-03-29 12:04:52 +02:00
publish remove deprecated 'publish/' directory 2018-02-13 09:12:13 -05:00
server remove --testnet flag. just output all info on init 2018-04-01 02:57:47 +03:00
store update dep 2018-03-23 00:32:57 -04:00
tests fixes post rebase 2018-03-17 23:09:04 +01:00
tools Fix bug: make will fail if the path contains whitespace 2018-03-09 13:06:36 +08:00
types fix validator keeper functionality, add testing 2018-03-28 19:01:50 +02:00
version changelog and version 2018-04-01 02:30:12 +03:00
wire revert to old go-wire 2018-03-02 04:24:07 -05:00
x Remove 'cool' and 'sketchy' modules from basecoind 2018-03-30 16:32:11 +02:00
.codecov.yml codecov: closes #334 2018-01-17 20:00:54 -05:00
.gitignore cleanup gitignore 2018-03-31 19:05:15 +03:00
CHANGELOG.md changelog and version 2018-04-01 02:30:12 +03:00
CODEOWNERS add ebuchman as codeowner 2018-02-13 08:55:44 -05:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-01-29 12:38:50 +01:00
Dockerfile Dockerfile and Dockerfile.dev for development 2017-03-14 16:15:03 +04:00
Gopkg.lock renamed staking to simplestake 2018-03-29 06:33:45 +02:00
Gopkg.toml changelog, version, dep 2018-03-27 11:33:09 -04:00
LICENSE Add README.md to Basecoin; Update licenses 2018-01-28 18:17:19 -08:00
Makefile make install 2018-03-31 19:13:34 +03:00
README.md Update SDK readme 2018-04-02 14:21:34 -03:00
Vagrantfile Finally working 2018-01-27 17:40:11 -08:00

README.md

Cosmos SDK

banner

version API Reference Rocket.Chat license LoC Go Report Card

Branch Tests Coverage
develop CircleCI codecov
master CircleCI codecov

WARNING: the libraries are still undergoing breaking changes as we get better ideas and start building out the Apps.

Note: Requires Go 1.9+

Overview

The Cosmos-SDK is a developer toolkit which allows developers to easily create their custom blockchain applications within the Cosmos ecosystem without having to code every single functionality of their application. The SDK will be the npm-like framework to build secure blockchain applications on top of Tendermint.

The SDK design optimizes flexibility and security. The framework is designed around a modular execution stack which allows applications to mix and match elements as desired. In addition, all modules are sandboxed for greater application security.

It is based on two major principles:

  • Composability: Anyone can create a module for the Cosmos-SDK, and using already-built modules in your blockchain is as simple as importing them into your application. As a developer, you only have to create the modules required by your application that do not already exist.

  • Capabilities: Most developers will need to access other modules when building their own modules. Given that the Cosmos-SDK is an open framework, we designed it using object-capabilities (ocaps) based principles. This is because we assume the thread that some modules are malicious. In practice, this means that instead of having each module keep an access control list to give access to other modules, each module implements keepers that can be passed to other modules to grant a pre-defined set of capabilities. For example, if an instance of module A's keepers is passed to module B, module B will be able to call a restricted set of module A's functions. The capabilities of each keeper are defined by the module's developer, and it is the job of the application developer to instanciate and pass a keeper from module to module properly. For a deeper look at capabilities, you can read this article.

Note: For now the Cosmos-SDK only exists in Golang, which means that module developers can only develop SDK modules in Golang. In the future, we expect that Cosmos-SDK in other programming languages will pop up.

Application architecture

A module is a fundamental unit in the Cosmos-SDK. A module defines its own transaction, handles its own state as well as its own state transition logic. The Cosmos-SDK has all the necessary pre-build modules to add functionality on top of a BaseApp, which is the template to build a blockchain dApp in Cosmos. Some of the most important ones are:

  • Auth
  • Token
  • Governance
  • Staking
  • Handlers for messages and transactions
  • REST and CLI sor secure user interactions

Key directories of the SDK:

  • baseapp: Defines the template for a basic application. Basically it implements the ABCI protocol so that your Cosmos-SDK application can communicate with the underlying Tendermint node.
  • client: Command-Line to interface with the application.
  • server: Rest server to communicate with the node.
  • examples: Contains example on how to build a working application based on baseapp and modules
  • store: Contains code for the multistore (i.e state). Each module can create any number of KVStores from the multistore. Be careful to properly handle access rights to each store with appropriate keepers.
  • types: Common types required in any SDK-based application.
  • x: Folder for storing the BaseApp modules. You will find all the already-built modules in this directory. To use any of these modules, you just need to properly import them in your application.

Prerequisites

Getting Started

See the documentation.