
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
A tree-shakeable, framework agnostic, pure ESM alternative of CosmJS and Cosmos Kit (generate bundles up to 10x smaller than Cosmos Kit).
[!WARNING]
This is still a work in progress. Beforev1is reached, the API is not guaranteed to be semver compatible - patch releases may break everything. See the changelog for notable changes.
For Cosmos SDK v0.47 and below:
npm install cosmes
pnpm add cosmes
yarn add cosmes
For Cosmos SDK v0.50, install using the sdk50 tag:
npm install cosmes@sdk50
pnpm add cosmes@sdk50
yarn add cosmes@sdk50
[!IMPORTANT]
The bump from v0.47 to v0.50 introduces significant breaking changes and is not recommended to be used unless necessary. To reduce the impact on consumers, themainbranch and the published package on npm with thelatesttag will continue to target v0.47 until the majority of live chains have migrated to v0.50.The
parallel/sdk50branch targetting v0.50 will be developed and maintained in parallel with themainbranch, where the same patch version number should have feature parity (eg.cosmes@0.0.69should have the same features ascosmes@0.0.69-sdk50.0).
This library only exports ES modules. To ensure imports from this library work correctly, the following configuration is required in tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "bundler", // recommended if using modern bundlers
// or "node16"
// or "nodenext"
// but NOT "node"
}
}
If you are using Vite, the following configuration is required in vite.config.ts:
export default defineConfig({
define: {
global: "window",
},
});
This can be removed once support for WalletConnect v1 is no longer required.
The Station wallet currently relies on WalletConnect v1. If you want to import and use StationController, a polyfill for Buffer is required:
// First, install the buffer package
npm install buffer
// Then, create a new file 'polyfill.ts'
import { Buffer } from "buffer";
(window as any).Buffer = Buffer;
// Finally, import the above file in your entry file
import "./polyfill";
See examples/solid-vite for a working example.
This can be removed once support for WalletConnect v1 is no longer required.
Docs do not exist yet - see the examples folder for various working examples:
signArbitrary function?This package is split into multiple subdirectories, with each subdirectory having their own set of functionalities. The root directory does not contain any exports, and all exports are exported from the subdirectories. Thus, imports must be done by referencing the subdirectories (ie. import { ... } from "cosmes/client").
cosmes/clientThis directory contains models and helper functions to interact with Cosmos SDK via the CometBFT RPC.
cosmes/codecThis directory contains various encoding and decoding functions that relies solely on Web APIs and has no dependencies on Node.js. For modern browsers and Node v16+, this should work out of the box.
cosmes/protobufsThis directory contains the auto-generated code for various Cosmos SDK based protobufs. See scripts/gen-protobufs.mjs for the script that generates the code.
cosmes/registryThis directory contains various APIs, data, and types needed for wallet interactions (ie. Keplr). Some types are auto-generated, see scripts/gen-registry.mjs for the script that generates the types.
cosmes/walletThis directory is a Cosmos Kit alternative to interact with wallets across all Cosmos SDK based blockchains. See examples/solid-vite for a working example.
Wallets supported:
Features:
See the benchmarks folder, where the bundle size of CosmES is compared against Cosmos Kit. The following are adhered to:
vite build command, including the size of all other dependencies like React/HTML/CSS/etc. (note: this is crude and not 100% accurate, but is the simplest method)Last updated: 4th May 2024
| Package | Minified | Gzipped |
|---|---|---|
| CosmES | 553 KB | 153 KB |
| Cosmos Kit v1 | 6010 KB | 1399 KB |
| Cosmos Kit v2 | 6780 KB | 1556 KB |
FAQs
<!-- omit in toc --> # CosmES
The npm package cosmes receives a total of 161 weekly downloads. As such, cosmes popularity was classified as not popular.
We found that cosmes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.