cosmos-client-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.18 • Public • Published

cosmos-client-ts

JavaScript client for the Cosmos SDK API. Made with TypeScript.

Usage

npm install --save cosmos-client-ts
const sdk = new CosmosSdk('http://localsdk:26657');
const privKeyBuffer = await HdWallet.generatePrivKeyByBip39('mnemonic', HdWallet.getBip32PathByBip44(0));
const privKey = new PrivKeySecp256k1(privKeyBuffer);
const stdTx = await Bank.postTransfer(sdk, ...);
const signedStdTx = sdk.signStdTx(privKey, stdTx, ...);
await Auth.postTransaction(sdk, new BroadcastReq(signedStdTx));
 
const accountInfo = await Auth.getAccount(sdk, privateKey.bech32Address);
 

Readme

Keywords

none

Package Sidebar

Install

npm i cosmos-client-ts

Weekly Downloads

18

Version

0.1.18

License

ISC

Unpacked Size

158 kB

Total Files

237

Last publish

Collaborators

  • kimurayu45z