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

0.0.5 • Public • Published

Cosmos

Transaction codec and client to communicate with any cosmos blockchain.

Usage

npm install @uni-sign/cosmos

Taking direct signing mode as example.

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

const signer = new DirectSigner(<AUTH>, <ENCODER>[], <RPC_ENDPOINT>); // **ONLY** rpc endpoint is supported for now
const result = await signer.signAndBroadcast(<MESSAGE>[]);
console.log(result.hash); // the hash of TxRaw

Implementations

  • direct signer from @uni-sign/cosmos/direct
  • amino signer from @uni-sign/cosmos/amino

License

MIT License (MIT) & Apache License

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

Package Sidebar

Install

npm i @uni-sign/cosmos

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

2.05 MB

Total Files

258

Last publish

Collaborators

  • ljun
  • pyramation