README

Cosmos SDK

banner

The Cosmos-SDK is a framework for building blockchain applications in Golang. It is being used to build Gaia, the first implementation of the Cosmos Hub.

WARNING: The SDK has mostly stabilized, but we are still making some breaking changes.

Note: Requires Go 1.15+

Quick Start

To learn how the SDK works from a high-level perspective, go to the SDK Intro.

If you want to get started quickly and learn how to build on top of the SDK, please follow the SDK Application Tutorial. You can also fork the tutorial's repository to get started building your own Cosmos SDK application.

For more, please go to the Cosmos SDK Docs.

Cosmos Hub Mainnet

The Cosmos Hub application, gaia, has moved to its own repository. Go there to join the Cosmos Hub mainnet and more.

Starport

If you are starting a new app or a new module you can use Starport to help you get started and speed up development. If you have any questions or find a bug, feel free to open an issue in the repo.

Disambiguation

This Cosmos-SDK project is not related to the React-Cosmos project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.

Expand ▾ Collapse ▴

Directories

Path Synopsis
baseapp
client
client/debug
client/docs/statik
client/flags
client/grpc/reflection Package reflection is a reverse proxy.
client/grpc/tmservice Package tmservice is a reverse proxy.
client/input
client/keys
client/rest
client/rpc
client/tx
codec
codec/legacy Package legacy contains a global amino Cdc which is deprecated but still used in several places within the SDK.
codec/types Package types defines a custom wrapper for google.protobuf.Any which supports cached values as well as InterfaceRegistry which keeps track of types which can be used with Any for both security and introspection
codec/unknownproto unknownproto implements functionality to "type check" protobuf serialized byte sequences against an expected proto.Message to report: a) Unknown fields in the stream -- this is indicative of mismatched services, perhaps a malicious actor b) Mismatched wire types for a field -- this is indicative of mismatched services Its API signature is similar to proto.Unmarshal([]byte, proto.Message) in the strict case if err := RejectUnknownFieldsStrict(protoBlob, protoMessage, false); err != nil { // Handle the error.
crypto
crypto/codec
crypto/hd Package hd provides support for hierarchical deterministic wallets generation and derivation.
crypto/keyring Package keys provides common key management API.
crypto/keys/ed25519
crypto/keys/internal/benchmarking
crypto/keys/multisig
crypto/keys/secp256k1
crypto/keys/secp256k1/internal/secp256k1 nolint:gocritic Package secp256k1 wraps the bitcoin secp256k1 C library.
crypto/ledger
crypto/types
crypto/types/multisig
server The commands from the SDK are defined with `cobra` and configured with the `viper` package.
server/api
server/cmd
server/config
server/grpc
server/mock nolint
server/types
simapp
simapp/helpers
simapp/params Package params defines the simulation parameters in the simapp.
simapp/simd
simapp/simd/cmd
snapshots
snapshots/types
std Package std defines all the common and standard inter-module Cosmos SDK types and definitions modules and applications can depend on.
store
store/cache
store/cachekv
store/cachemulti
store/dbadapter
store/gaskv
store/iavl
store/internal/maps
store/internal/proofs
store/mem
store/prefix
store/rootmulti
store/tracekv
store/transient
store/types
telemetry
tests/mocks Package mocks is a generated GoMock package.
testutil
testutil/cli
testutil/network Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
types
types/bech32
types/errors Package errors implements custom error interfaces for cosmos-sdk.
types/grpc
types/kv
types/module Package module contains application module patterns and associated "manager" functionality.
types/msgservice
types/query
types/rest Package rest provides HTTP types and primitives for REST requests validation and responses handling.
types/simulation
types/tx Package tx is a reverse proxy.
types/tx/signing
version Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
x/auth
x/auth/ante
x/auth/client
x/auth/client/cli
x/auth/client/rest
x/auth/client/testutil
x/auth/keeper
x/auth/legacy/legacytx
x/auth/legacy/v034 DONTCOVER nolint
x/auth/legacy/v036 DONTCOVER nolint DONTCOVER nolint
x/auth/legacy/v038
x/auth/legacy/v039
x/auth/legacy/v040
x/auth/signing
x/auth/simulation
x/auth/testutil
x/auth/tx
x/auth/types Package types is a reverse proxy.
x/auth/vesting
x/auth/vesting/client/cli
x/auth/vesting/exported
x/auth/vesting/types
x/bank
x/bank/client/cli
x/bank/client/rest
x/bank/client/testutil
x/bank/exported
x/bank/keeper
x/bank/legacy/v036 DONTCOVER nolint
x/bank/legacy/v038
x/bank/legacy/v040
x/bank/simulation
x/bank/types Package types is a reverse proxy.
x/capability
x/capability/keeper
x/capability/simulation
x/capability/types
x/crisis
x/crisis/client/cli
x/crisis/keeper
x/crisis/legacy/v039
x/crisis/legacy/v040
x/crisis/types
x/distribution Package distribution implements a Cosmos SDK module, that provides an implementation of the F1 fee distribution algorithm.
x/distribution/client
x/distribution/client/cli
x/distribution/client/common
x/distribution/client/rest
x/distribution/client/testutil
x/distribution/keeper
x/distribution/legacy/v034 DONTCOVER nolint
x/distribution/legacy/v036 DONTCOVER nolint
x/distribution/legacy/v038
x/distribution/legacy/v040
x/distribution/simulation
x/distribution/types nolint Package types is a reverse proxy.
x/evidence Package evidence implements a Cosmos SDK module, per ADR 009, that allows for the submission and handling of arbitrary evidence of misbehavior.
x/evidence/client
x/evidence/client/cli
x/evidence/client/rest
x/evidence/exported
x/evidence/keeper
x/evidence/legacy/v038
x/evidence/legacy/v040
x/evidence/simulation
x/evidence/types DONTCOVER Package types is a reverse proxy.
x/genaccounts Package genaccounts is now deprecated.
x/genaccounts/legacy/v034 DONTCOVER nolint
x/genaccounts/legacy/v036 DONTCOVER nolint DONTCOVER nolint
x/genutil Package genutil contains a variety of genesis utility functionality for usage within a blockchain application.
x/genutil/client/cli
x/genutil/client/rest
x/genutil/client/testutil
x/genutil/legacy/v036
x/genutil/legacy/v038
x/genutil/legacy/v039
x/genutil/legacy/v040
x/genutil/types
x/gov
x/gov/client
x/gov/client/cli
x/gov/client/rest
x/gov/client/testutil
x/gov/client/utils
x/gov/keeper
x/gov/legacy/v034 DONTCOVER nolint
x/gov/legacy/v036 DONTCOVER nolint
x/gov/legacy/v040
x/gov/simulation
x/gov/types Package types is a reverse proxy.
x/ibc/applications/transfer
x/ibc/applications/transfer/client/cli
x/ibc/applications/transfer/keeper
x/ibc/applications/transfer/simulation
x/ibc/applications/transfer/types Package types is a reverse proxy.
x/ibc/core
x/ibc/core/02-client Package client implements the ICS 02 - Client Semantics specification https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics.
x/ibc/core/02-client/client/cli
x/ibc/core/02-client/client/utils
x/ibc/core/02-client/keeper
x/ibc/core/02-client/simulation
x/ibc/core/02-client/types Package types is a reverse proxy.
x/ibc/core/03-connection
x/ibc/core/03-connection/client/cli
x/ibc/core/03-connection/client/utils
x/ibc/core/03-connection/keeper
x/ibc/core/03-connection/simulation
x/ibc/core/03-connection/types Package types is a reverse proxy.
x/ibc/core/04-channel
x/ibc/core/04-channel/client/cli
x/ibc/core/04-channel/client/utils
x/ibc/core/04-channel/keeper
x/ibc/core/04-channel/simulation
x/ibc/core/04-channel/types Package types is a reverse proxy.
x/ibc/core/05-port/keeper
x/ibc/core/05-port/types
x/ibc/core/23-commitment/types
x/ibc/core/24-host
x/ibc/core/client
x/ibc/core/client/cli
x/ibc/core/exported
x/ibc/core/keeper
x/ibc/core/simulation
x/ibc/core/types
x/ibc/light-clients/06-solomachine Package solomachine implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the Solo Machine light client.
x/ibc/light-clients/06-solomachine/client/cli
x/ibc/light-clients/06-solomachine/types
x/ibc/light-clients/07-tendermint Package tendermint implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the Tendermint consensus light client.
x/ibc/light-clients/07-tendermint/client/cli
x/ibc/light-clients/07-tendermint/types
x/ibc/light-clients/09-localhost Package localhost implements a concrete `ConsensusState`, `Header`, `Misbehaviour` and `Equivocation` types for the loop-back client.
x/ibc/light-clients/09-localhost/types
x/ibc/testing
x/ibc/testing/mock This package is only intended to be used for testing core IBC.
x/mint
x/mint/client/cli
x/mint/client/rest
x/mint/keeper
x/mint/legacy/v039
x/mint/legacy/v040
x/mint/simulation
x/mint/types Package types is a reverse proxy.
x/params Package params provides a namespaced module parameter store.
x/params/client
x/params/client/cli
x/params/client/rest
x/params/client/utils
x/params/keeper
x/params/legacy/v036
x/params/simulation
x/params/types To prevent namespace collision between consumer modules, we define a type Subspace.
x/params/types/proposal Package proposal is a reverse proxy.
x/simulation Package simulation implements a full fledged Cosmos SDK application used for executing simulation test suites.
x/slashing
x/slashing/client/cli
x/slashing/client/rest
x/slashing/keeper
x/slashing/legacy/v039
x/slashing/legacy/v040
x/slashing/simulation
x/slashing/testslashing
x/slashing/types noalias noalias DONTCOVER Package types is a reverse proxy.
x/staking
x/staking/client/cli
x/staking/client/rest
x/staking/client/testutil
x/staking/exported
x/staking/keeper
x/staking/legacy/v034 DONTCOVER nolint
x/staking/legacy/v036 DONTCOVER nolint DONTCOVER nolint
x/staking/legacy/v038 DONTCOVER nolint DONTCOVER nolint
x/staking/legacy/v040
x/staking/simulation
x/staking/teststaking
x/staking/types Package types is a reverse proxy.
x/upgrade Package upgrade provides a Cosmos SDK module that can be used for smoothly upgrading a live Cosmos chain to a new software version.
x/upgrade/client
x/upgrade/client/cli
x/upgrade/client/rest
x/upgrade/keeper
x/upgrade/legacy/v038
x/upgrade/types Package types is a reverse proxy.
MODULE cosmovisor