Skip to content

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.

License

LambdaIM/cosmjs

 
 

Repository files navigation

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.

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

In addition to the development board and our release milestones, we maintain a higher level roadmap in this Trello board.

Development

See HACKING.md.

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 59.9%
  • JavaScript 38.2%
  • Shell 1.7%
  • Python 0.1%
  • HTML 0.1%
  • CSS 0.0%