Nanoseconds Produce Minutes

    tezos-sign

    1.4.1 • Public • Published

    tezos-sign

    license Build Status NPM downloads

    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

    License

    MIT

    Keywords

    none

    Install

    npm i tezos-sign

    DownloadsWeekly Downloads

    4

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    115 kB

    Total Files

    12

    Last publish

    Collaborators

    • yugasun