Skip to content
unification-comPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

npm version

und-js-v2

The FUND Javascript SDK supporting Cosmos SDK stargate (>= v0.42.x)

Prerequisites

NodeJS >=14.0.0 required. See .nvmrc

Usage

Install:

yarn add @unification-com/und-js-v2

Import into your project:

const { UndClient } = require("@unification-com/und-js-v2")

const fund = new UndClient("http://localhost:1317")
await fund.initChain()
const privKey = UndClient.crypto.getPrivateKeyFromMnemonic("mnemonic")
await fund.setPrivateKey(privKey)

fund.getBalance().then(response => console.log(response))

See examples and jsdoc

Development

Proto Javascript can be regenerated using the script:

./gen-proto.sh

This is required, for example, when proto definitions change for Cosmos SDK, Tendermint, Mainchain etc.

proto.js needs a slight tweak after the script runs:

// Exported root namespace
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages