sthjs

0.2.3 • Public • Published

Build Status

SmartHoldem JS Library

JavaScript library for sending SmartHoldem transactions from the client or server

Tests lib

npm test

Build documentation

npm build:docs

Build lib for browser

npm build:browserify

Clean browser

npm clean:browserify

Examples

On the client:

<script src="node_modules/sthjs/bundle.min.js"></script>

On the server:

var sth = require("sthjs");

To generate a public / private key pair from a given passphrase:

var keyz = sth.crypto.getKeys("pass phrase");

response keyz

{
publicKey: '022b903c7eae707b38e91be3952b2243910fff080b9d158884264f3c6394bd2a3e',
privateKey: ''
}

get private key:

console.log('privKey:'+keys.d.toBuffer().toString("hex"));

response

privKey:84d6b9b64dd6a2111e2616544e16e07580d590df9a8d5ce1d9dc5a168a1b1188

Dependents (0)

Package Sidebar

Install

npm i sthjs

Weekly Downloads

4

Version

0.2.3

License

MIT

Unpacked Size

152 kB

Total Files

43

Last publish

Collaborators

  • technolog