Go to file
2021-06-01 10:50:02 +02:00
.circleci Update CI config 2021-05-25 16:22:11 +02:00
.yarn Add yarn typescript sdk 2021-05-26 15:25:14 +02:00
docs Add additional resources to YARN.md 2021-05-26 17:44:12 +02:00
packages Remove executable flag from jasmine testrunners 2021-06-01 10:50:02 +02:00
scripts Support unix in yarn node shebangs 2021-05-19 15:13:41 +02:00
.editorconfig Set up format and lint configs 2020-01-22 22:24:22 +01:00
.eslintignore eslint: Update .eslintignore 2020-07-15 13:22:32 +02:00
.eslintrc.base.js Sort out eslint 2021-05-18 15:16:03 +02:00
.gitattributes Add .zip files to LFS 2021-05-18 15:16:03 +02:00
.gitignore Update .gitignore for Yarn PnP 2021-05-18 15:16:01 +02:00
.mergify.yml Rename branch master -> main 2021-01-19 23:37:10 +01:00
.nycrc.yml Standardize .nycrc.yml 2020-10-13 12:31:16 +02:00
.pnp.js Add typescript to root 2021-05-26 15:25:14 +02:00
.prettierrc.json Move prettier config for markdown to config 2021-04-28 16:54:44 +02:00
.yarnrc.yml Remove yarn typescript plugin 2021-05-20 14:00:43 +02:00
CHANGELOG.md Prepare CHANGELOG for 0.25.3 2021-05-19 15:13:43 +02:00
codecov.yml Disable bot comments for PRs 2020-06-25 13:32:26 +02:00
HACKING.md Update docs for cosmwasm-launchpad 2020-12-15 16:50:08 +00:00
jasmine-spec-reporter.config.json Upgrade dev packages (#256) 2020-06-28 10:20:15 +02:00
LICENSE Use an unmodified copy of Apache-2.0 2020-01-23 18:32:43 +01:00
NOTICE Fork @iov/socket (#250) 2020-06-25 16:01:41 +02:00
package.json Add typescript to root 2021-05-26 15:25:14 +02:00
README.md root: Add link to custom Stargate modules in README 2021-03-18 12:25:06 +01:00
tsconfig.json launchpad-ledger: Add basic type declaration for ledger-cosmos-js 2020-09-15 10:47:01 +02:00
yarn.lock Add typescript to root 2021-05-26 15:25:14 +02:00

CosmJS

CosmJS is the Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers in the Cosmos ecosystem.

"Cosm" is short for Cosmos and "JS" is short for runs everywhere we actually develop in TypeScript.

Documentation

Here is a list of examples using the Stargate package for use with Cosmos SDK 0.41 applications (like gaia 4). Take a look at the wiki page, "What can CosmJS do for me?" and various tests (ex) for more example usage of the packages.

API documentation

The full API documentation is hosted at cosmos.github.io/cosmjs. This is a bit tricky to navigate and requires basic TypeScript understanding. It is helpful if you have want to look up details for advanced use cases. This documentation is auto-generated based on the current main branch and can occasionally diverge from the latest release.

Using custom Stargate modules

Documentation on how to use your own custom modules with CosmJS for Stargate chains (Cosmos SDK v0.41) can be found here.

Packages

CosmJS is a library that consists of many smaller npm packages within the @cosmjs namespace, a so called monorepo. Here are some of them to get an idea:

Package Description Latest
@cosmjs/launchpad A client library for the Cosmos SDK 0.37 (cosmoshub-3), 0.38 and 0.39 (Launchpad) npm version
@cosmjs/faucet A faucet application for node.js npm version
@cosmjs/cosmwasm-launchpad Client for chains with the CosmWasm module enabled npm version
@cosmjs/crypto Cryptography for blockchain projects, e.g. hashing (SHA-2, Keccak256, Ripemd160), signing (secp256k1, ed25519), HD key derivation (BIPO39, SLIP-0010), KDFs and symmetric encryption for key storage (PBKDF2, Argon2, XChaCha20Poly1305) npm version
@cosmjs/encoding Encoding helpers for blockchain projects npm version
@cosmjs/math Safe integers; decimals for handling financial amounts npm version

Modularity

We're pretty proud of the modularity and a clean dependency tree in this monorepo. This ensures software quality on our side and lets users pick exactly what they need. Here you see how everything fits together (every item is a npm package; right depends on left):

CosmJS dependency tree

If this was not enough to scare you away, check out the version including app runtime dependencies: cosmjs-tree-full.png.

Supported JS environments

Currently the codebase supports the following runtime environments:

  1. Node.js 10+
  2. Modern browsers (Chromium/Firefox/Safari, no Internet Explorer or Edge Spartan)
  3. Browser extensions (Chromium/Firefox)

Our current JavaScript target standard is ES2017, giving us native async/await support. We use WebAssembly to implement certain cryptographic functions.

We're happy to adjust this list according to users' needs as long as you don't ask for Internet Explorer support. If your environment does not support Wasm, we can work on a solution with swapable implementations.

Roadmap

We maintain a development board, use release milestones and share important updates in the CosmWasm Community Call. For higher level roadmap discussion please reach out to the team.

Known limitations

0.24

  1. AuthExtension and all higher level Stargate clients only support BaseAccounts for all functionality, including getting account numbers and sequences for transaction signing. This will be implemented for all common Cosmos SDK account types in the 0.25 series.

Get in touch

The CosmJS development team is happy to get in touch with you for all questions and suggestions.

Development

See HACKING.md.