tezos-sign
v1.4.1
Published
Offline tool for tezos
Downloads
266
Readme
tezos-sign
English | 简体中文
Offline sign tool for tezos divided from eztz
Directory
.
├── demo use demo
├── dist build output dir
├── doc docs
├── src source code
├── test unit test
├── CHANGELOG.md change log
└── TODO.md todo
Usage Guide
Install by npm:
$ npm install --save tezos-sign
For node:
var TezosSign = require('tezos-sign');
For webpack:
import TezosSign from 'tezos-sign';
Demo
import TezosSign from 'tezos-sign';
// sign transaction
// opbytes is operation bytes
// privateKey is your account private key
const siged = TezosSign.sign(opbytes, privateKey);
// generate transaction hash
// sopbytes = signed.sbytes
const hash = TezosSign.generateTxHash(sopbytes);
// generate keys
const keys = TezosSign.generateKeys('yugasun');
/*
keys {
mnemonic: 'memory key words',
passphrase: 'yugasun',
sk: 'private key',
pk: 'public key',
pkh: 'address',
}
*/
// generate keys without seed
const keysNoSeed = TezosSign.generateKeysNoSeed();
/*
keysNoSeed {
sk: 'private key',
pk: 'public key',
pkh: 'address',
}
*/
// extract keys
const extractKeys = TezosSign.extractKeys(keys.sk);
/*
extractKeys {
sk: 'private key',
pk: 'public key',
pkh: 'address',
}
*/
Develop
Install dependencies:
$ npm install
Build:
$ npm run build
Unit test:
$ npm test
Modify version in package.json
, README.md
, and release it
$ npm run release
Npm publish:
$ npm publish