Gathering detailed insights and metrics for @cosmjs/encoding
Gathering detailed insights and metrics for @cosmjs/encoding
Gathering detailed insights and metrics for @cosmjs/encoding
Gathering detailed insights and metrics for @cosmjs/encoding
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.
npm install @cosmjs/encoding
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
656 Stars
4,386 Commits
344 Forks
15 Watching
35 Branches
76 Contributors
Updated on 27 Nov 2024
TypeScript (89.95%)
JavaScript (6.37%)
Shell (3.35%)
Python (0.16%)
HTML (0.1%)
Dockerfile (0.06%)
CSS (0.01%)
Cumulative downloads
Total Downloads
Last day
25.5%
76,506
Compared to previous day
Last week
34.4%
427,331
Compared to previous week
Last month
31.2%
1,378,668
Compared to previous month
Last year
112%
9,825,043
Compared to previous year
3
34
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.
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.
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 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.
Documentation on how to use your own custom modules with CosmJS for Stargate chains (Cosmos SDK v0.41) can be found here.
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/stargate | A client library for the Cosmos SDK 0.40+ (Stargate) | |
@cosmjs/faucet | A faucet application for node.js | |
@cosmjs/cosmwasm-stargate | Client for Stargate chains with the CosmWasm module enabled | |
@cosmjs/crypto | Cryptography for blockchain projects, e.g. hashing (SHA-2, Keccak256, Ripemd160), signing (secp256k1, ed25519), HD key derivation (BIP-39, SLIP-0010), KDFs and symmetric encryption for key storage (PBKDF2, Argon2, XChaCha20Poly1305) | |
@cosmjs/encoding | Encoding helpers for blockchain projects | |
@cosmjs/math | Safe integers; decimals for handling financial amounts |
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):
If this was not enough to scare you away, check out the version including app runtime dependencies: cosmjs-tree-full.png.
Currently the codebase supports the following runtime environments:
Our current JavaScript target standard is ES2020. 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 swappable implementations.
With WebPack 5, you have to be explicit about the usage of Node.js types and modules that were simply replaced with re-implementations for browsers in Webpack 4.
Configs for 0.28 and later:
1module.exports = [ 2 { 3 // ... 4 plugins: [ 5 ..., 6 new webpack.ProvidePlugin({ 7 Buffer: ["buffer", "Buffer"], 8 }), 9 ], 10 // ... 11 resolve: { 12 fallback: { 13 buffer: false, 14 crypto: false, 15 events: false, 16 path: false, 17 stream: false, 18 string_decoder: false, 19 }, 20 }, 21 }, 22];
Configs for CosmJS < 0.28
1module.exports = [ 2 { 3 // ... 4 plugins: [ 5 ..., 6 new webpack.ProvidePlugin({ 7 Buffer: ["buffer", "Buffer"], 8 }), 9 ], 10 // ... 11 resolve: { 12 fallback: { 13 buffer: false, 14 crypto: false, 15 events: false, 16 path: false, 17 stream: require.resolve("stream-browserify"), 18 string_decoder: false, 19 }, 20 }, 21 }, 22];
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.
AuthExtension
and BankExtension
as well as
StargateClient.getAccountVerified
will fail because the storage keys are
not stable. Unverified queries can be used instead. Those queries are
deprecated now and will be removed in 0.27 (#910).AuthExtension
and all higher level Stargate clients only support
BaseAccount
s 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.The CosmJS development team is happy to get in touch with you for all questions and suggestions.
See HACKING.md.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 3/7 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
20 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More