cosmjs/README.md

72 lines
5.7 KiB
Markdown
Raw Normal View History

2020-08-11 17:02:32 +02:00
<h1><p align="center"><img alt="CosmJS" src="docs/logo-vertical-light.png" width="180" /></p></h1>
2020-01-22 09:41:48 +01:00
2020-06-18 11:58:00 +02:00
CosmJS is the Swiss Army knife to power JavaScript based client solutions
2020-06-18 09:48:56 +02:00
ranging from Web apps/explorers over browser extensions to server-side clients
like faucets/scrapers in the Cosmos ecosystem.
2020-06-18 11:58:00 +02:00
"Cosm" is short for Cosmos and "JS" is short for _runs everywhere_ we actually
2020-06-18 09:48:56 +02:00
develop in TypeScript.
## Packages
CosmJS is a library that consists of many smaller npm packages within the
[@cosmjs namespace](https://www.npmjs.com/org/cosmjs), a so called monorepo.
Here are some of them to get an idea:
2020-12-15 16:18:57 +00:00
| Package | Description | Latest |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| [@cosmjs/launchpad](packages/launchpad) | A client library for the Cosmos SDK 0.37 (cosmoshub-3), 0.38 and 0.39 (Launchpad) | [![npm version](https://img.shields.io/npm/v/@cosmjs/launchpad.svg)](https://www.npmjs.com/package/@cosmjs/launchpad) |
| [@cosmjs/faucet](packages/faucet) | A faucet application for node.js | [![npm version](https://img.shields.io/npm/v/@cosmjs/faucet.svg)](https://www.npmjs.com/package/@cosmjs/faucet) |
| [@cosmjs/cosmwasm-launchpad](packages/cosmwasm) | Client for chains with the CosmWasm module enabled | [![npm version](https://img.shields.io/npm/v/@cosmjs/cosmwasm-launchpad.svg)](https://www.npmjs.com/package/@cosmjs/cosmwasm-launchpad) |
| [@cosmjs/crypto](packages/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](https://img.shields.io/npm/v/@cosmjs/crypto.svg)](https://www.npmjs.com/package/@cosmjs/crypto) |
| [@cosmjs/encoding](packages/encoding) | Encoding helpers for blockchain projects | [![npm version](https://img.shields.io/npm/v/@cosmjs/encoding.svg)](https://www.npmjs.com/package/@cosmjs/encoding) |
| [@cosmjs/math](packages/math) | Safe integers; decimals for handling financial amounts | [![npm version](https://img.shields.io/npm/v/@cosmjs/math.svg)](https://www.npmjs.com/package/@cosmjs/math) |
2020-06-18 09:48:56 +02:00
### 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
2020-06-18 10:09:01 +02:00
what they need. Here you see how everything fits together (every item is a npm
2020-06-18 09:48:56 +02:00
package; right depends on left):
![CosmJS dependency tree](docs/cosmjs-tree.png)
2020-06-29 08:37:32 +02:00
If this was not enough to scare you away, check out the version including app
runtime dependencies: [cosmjs-tree-full.png](docs/cosmjs-tree-full.png).
2020-06-28 20:26:46 +02:00
2020-06-18 09:48:56 +02:00
<!--
Build with depsight (https://github.com/webmaster128/depsight), using:
2020-08-10 06:46:38 +02:00
from_npm . | depsight --include "^@cosmjs" --format png --dpi 150 --output docs/cosmjs-tree.png
from_npm . | depsight --exclude cosmjs-monorepo-root --format png --dpi 150 --output docs/cosmjs-tree-full.png
2020-06-28 20:26:46 +02:00
optipng docs/cosmjs-tree*.png
2020-06-18 09:48:56 +02:00
-->
### Supported JS environments
2020-06-18 10:09:01 +02:00
Currently the codebase supports the following runtime environments:
2020-06-18 09:48:56 +02:00
1. Node.js 10+
2020-06-18 10:09:01 +02:00
2. Modern browsers (Chromium/Firefox/Safari, no Internet Explorer or
[Edge Spartan](https://en.wikipedia.org/wiki/Microsoft_Edge#Development))
2020-06-18 09:48:56 +02:00
3. Browser extensions (Chromium/Firefox)
2020-06-18 11:58:00 +02:00
Our current JavaScript target standard is ES2017, giving us native async/await
support. We use WebAssembly to implement certain cryptographic functions.
2020-06-18 09:48:56 +02:00
We're happy to adjust this list according to users' needs as long as you don't
2020-06-18 10:09:01 +02:00
ask for Internet Explorer support. If your environment does not support Wasm, we
can work on a solution with swapable implementations.
2020-01-22 09:41:48 +01:00
2020-06-19 18:04:21 +02:00
## Roadmap
In addition to the
[development board](https://github.com/orgs/CosmWasm/projects/2) and our
[release milestones](https://github.com/CosmWasm/cosmjs/milestones), we maintain
a higher level roadmap
[in this Trello board](https://trello.com/b/vIW8awLl/cosmjs-roadmap).
## Development
See [HACKING.md](HACKING.md).