0.0.5 • Published 1 year ago

@uni-sign/cosmos v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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/)