0.0.1-beta.11 • Published 10 months ago

@interchainjs/ethermint v0.0.1-beta.11

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

@interchainjs/ethermint

Transaction codec and client to communicate with any injective blockchain.

Usage

npm install @interchainjs/ethermint

Taking direct signing mode as example.

// import * from "@interchainjs/ethermint"; // Error: use sub-imports, to ensure small app size
import { DirectSigner } from "@interchainjs/ethermint/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
  • See @interchainjs/auth to construct <AUTH>
  • See @interchainjs/ethermint-msgs(on progress) to construct <ENCODER>s and <CONVERTER>s, and also different message types.

Implementations

  • direct signer from @interchainjs/ethermint/direct
  • amino signer from @interchainjs/ethermint/amino
  • eip712 signer from @interchainjs/ethermint/eip712

License

MIT License (MIT) & Apache License

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