Skip to content
JavaScript client for the Cosmos SDK API
TypeScript JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 155 commits ahead of cosmos:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
karma.conf.js
package-lock.json
package.json
tsconfig.json

README.md

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);
You can’t perform that action at this time.