@cosmonauts/cosmos
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Cosmos

Transaction codec and client to communicate with any cosmos blockchain.

Usage

npm install @cosmonauts/cosmos

Taking direct signing mode as example.

// import * from "@cosmonauts/cosmos"; // Error: use sub-imports, to ensure small app size
import { DirectSigner } from "@cosmonauts/cosmos/direct";

const signer = new DirectSigner(<auth>, <encoders>, <rpc endpoint>);
const result = await signer.signAndBroadcast(<messages>);
console.log(result.hash); // the hash of TxRaw

Implementations

  • direct signer from @cosmonauts/cosmos/direct
  • amino signer from @cosmonauts/cosmos/amino

License

MIT License (MIT) & Apache License

Copyright (c) 2024 Cosmology (https://cosmology.zone/)

Package Sidebar

Install

npm i @cosmonauts/cosmos

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

2.55 MB

Total Files

251

Last publish

Collaborators

  • zetazz
  • ljun
  • pyramation