0.0.1 • Published 4 years ago

testkuchainjs v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

This library supports kuchain address generation and verification. It enables you to create an offline signature functions of different types of transaction messages.

WARNING This library is under ACTIVE DEVELOPMENT and should be treated as alpha version. We will remove this warning when we have a release that is stable, secure, and propoerly tested

NPM

Installation

NPM

npm install testkuchainjs

Import

NodeJS

const kuchainjs = require("testkuchainjs");

Usage

  • Kuchain: Generate Kuchain address from mnemonic
const kuchainjs = require("testkuchainjs");

const chainId = "testing";
const lcdUrl = "http://127.0.0.1:1317";
const kuchain = kuchainjs.network(lcdUrl, chainId);

const mnemonic = "..."
const address = kuchain.getAddress(mnemonic);
const ecpairPriv = kuchain.getECPairPriv(mnemonic);
  • Create an account with a specialized auth.
kuchain.newCreateAccMsg("validator", "acc1", auth).then(Msg => {
	console.log(JSON.stringify(Msg))
})
	...
})
  • Sign transaction by using sign and broadcast which use REST API of Kuchain
const signedTx = kuchain.sign(Msg, ecpairPriv);
kuchain.broadcast(signedTx).then(response => console.log(response));
  • See more examples of how this library works, see examples.

Supporting Message Types (Updating...)

  • If you need more message types, you can commit issues

Documentation

This library is simple and easy to use. We don't have any formal documentation yet other than examples. Ask for help if our examples aren't enough to guide you

Contribution

  • Contributions, suggestions, improvements, and feature requests are always welcome
0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago