# tezos-sign

> Offline tool for tezos

Latest version **1.4.1** (published 2019-01-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install tezos-sign
pnpm add tezos-sign
yarn add tezos-sign
bun add tezos-sign
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2019-01-15 |
| First published | 2018-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 112.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | yugasun |
| Maintainers | yugasun |

## Links

- npm: https://www.npmjs.com/package/tezos-sign
- Repository: https://github.com/yugasun/tezos-sign
- Homepage: https://github.com/yugasun/tezos-sign#readme
- Issues: https://github.com/yugasun/tezos-sign/issues
- npm.io page: https://npm.io/package/tezos-sign

## Dependencies (3)

- [bip39](https://npm.io/package/bip39.md) ^2.5.0
- [bs58check](https://npm.io/package/bs58check.md) ^2.1.2
- [libsodium-wrappers](https://npm.io/package/libsodium-wrappers.md) ^0.5.4

## Recent versions

- 1.4.1 (latest) — 2019-01-15
- 1.4.0 — 2018-11-30
- 1.3.0 — 2018-11-15
- 1.2.0 — 2018-10-31
- 1.1.0 — 2018-10-31
- 1.0.1 — 2018-10-30
- 1.0.0 — 2018-10-30
- 0.1.0 — 2018-10-30

## README

# [tezos-sign](https://github.com/yugasun/tezos-sign)

[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yugasun/tezos-sign/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/yugasun/tezos-sign.svg?branch=master)](https://travis-ci.org/yugasun/tezos-sign)
[![NPM downloads](http://img.shields.io/npm/dm/tezos-sign.svg?style=flat-square)](http://www.npmtrends.com/tezos-sign)

English | [简体中文](./README.zh-CN.md)

Offline sign tool for [tezos](https://tezos.com/) divided from [eztz](https://github.com/TezTech/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:

```bash
$ npm install --save tezos-sign
```

For node:

```js
var TezosSign = require('tezos-sign');
```

For webpack:

```js
import TezosSign from 'tezos-sign';
```

## Demo

```js
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:

```bash
$ npm install
```

Build:

```bash
$ npm run build
```

Unit test:

```bash
$ npm test
```

Modify version in `package.json`, `README.md`, and release it

```bash
$ npm run release
```

Npm publish:

```bash
$ npm publish
```

## License

[MIT](./LICENSE)

---
_Source: https://npm.io/package/tezos-sign · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
