0.0.1-beta.34 • Published 8 months ago

@interchainjs/cosmos v0.0.1-beta.34

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@interchainjs/cosmos

Transaction codec and client to communicate with any cosmos blockchain.

Usage

npm install @interchainjs/cosmos

Taking direct signing mode as example.

// import * from "@interchainjs/cosmos"; // Error: use sub-imports, to ensure small app size
import { DirectSigner } from "@interchainjs/cosmos/signers/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 @interchainjs/cosmos/signers/direct
  • amino signer from @interchainjs/cosmos/signers/amino

License

MIT License (MIT) & Apache License

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