Giter Site home page Giter Site logo

vaporyjs-util's Introduction

SYNOPSIS

NPM Package Build Status Coverage Status Gitter or #vaporyjs on freenode

js-standard-style

A collection of utility functions for vapory. It can be used in node.js or can be in the browser with browserify.

API

./docs/

Most of the string manipulation methods are provided by vapjs-util

LICENSE

MPL-2.0

vaporyjs-util's People

Contributors

asinyagin avatar axic avatar egodigitus avatar fanatid avatar greenkeeper[bot] avatar greenkeeperio-bot avatar holgerd77 avatar jwasinger avatar kumavis avatar marlonhanks avatar mrchico avatar serapath avatar silur avatar subramanianv avatar tcoulter avatar tgerring avatar tranvictor avatar wanderer avatar yusefnapora avatar zmanian avatar

Watchers

 avatar  avatar

vaporyjs-util's Issues

hashPersonalMessage test fails

Expected test to pass, instead error produced:

hashPersonalMessage
    1) should produce a deterministic hash

  isValidSignature
    ✓ should fail on an invalid signature (shorter r))
    ✓ should fail on an invalid signature (shorter s))
    ✓ should fail on an invalid signature (v = 21)
    ✓ should fail on an invalid signature (v = 29)
    ✓ should work otherwise

  .toChecksumAddress()
    ✓ should work

  .isValidChecksumAddress()
    ✓ should return true
    ✓ should validate

  .isValidAddress()
    ✓ should return true
    ✓ should return false

  message sig
    ✓ should return hex strings that the RPC can use
    ✓ should throw on invalid length
    ✓ pad short r and s values
    ✓ should throw on invalid v value


  90 passing (167ms)
  1 failing

  1) hashPersonalMessage
       should produce a deterministic hash:

      AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

Buffer(32) [Uint8Array] [
  146,
  79,
  202,
  189,
  87,
  174,
  90,
  136,
  252,
  16,
  182,
  81,
  221,
  213,
  29,
  64,
  97,
  154,
  30,
  69,
  98,
  241,
  201,
  224,
  6,
  166,
  173,
  182,
  101,
  197,
  178,
  231
]

should loosely deep-equal

Buffer(32) [Uint8Array] [
  129,
  68,
  166,
  250,
  38,
  190,
  37,
  43,
  134,
  69,
  100,
  145,
  251,
  205,
  67,
  193,
  222,
  126,
  2,
  34,
  65,
  132,
  95,
  254,
  161,
  195,
  223,
  6,
  111,
  124,
  254,
  222
]
      + expected - actual

       [
      -  146
      -  79
      -  202
      -  189
      -  87
      -  174
      -  90
      -  136
      -  252
      -  16
      -  182
      -  81
      -  221
      -  213
      -  29
      -  64
      -  97
      -  154
      -  30
      +  129
      +  68
      +  166
      +  250
      +  38
      +  190
      +  37
      +  43
      +  134
         69
      -  98
      -  241
      -  201
      -  224
      +  100
      +  145
      +  251
      +  205
      +  67
      +  193
      +  222
      +  126
      +  2
      +  34
      +  65
      +  132
      +  95
      +  254
      +  161
      +  195
      +  223
         6
      -  166
      -  173
      -  182
      -  101
      -  197
      -  178
      -  231
      +  111
      +  124
      +  254
      +  222
       ]

      at Context.<anonymous> (test/index.js:512:12)
      at processImmediate (internal/timers.js:461:21)



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:node: `npm run build:dist && istanbul test mocha -- --reporter spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ceo/.npm/_logs/2021-01-11T07_39_29_612Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `npm run test:node && npm run test:browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ceo/.npm/_logs/2021-01-11T07_39_29_650Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublishOnly: `npm run lint && npm run build:dist && npm run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublishOnly script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ceo/.npm/_logs/2021-01-11T07_39_29_735Z-debug.log

error log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/ceo/.nvm/versions/node/v12.20.0/bin/node',
1 verbose cli   '/home/ceo/.nvm/versions/node/v12.20.0/bin/npm',
1 verbose cli   'publish'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session b45ae370e6f451dd
5 verbose publish [ '.' ]
6 info lifecycle [email protected]~prepublish: [email protected]
7 info lifecycle [email protected]~prepare: [email protected]
8 info lifecycle [email protected]~prepublishOnly: [email protected]
9 verbose lifecycle [email protected]~prepublishOnly: unsafe-perm in lifecycle true
10 verbose lifecycle [email protected]~prepublishOnly: PATH: /home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ceo/live/vaporyjs/vaporyjs-util/node_modules/.bin:/home/ceo/live/jav$
11 verbose lifecycle [email protected]~prepublishOnly: CWD: .
12 silly lifecycle [email protected]~prepublishOnly: Args: [ '-c', 'npm run lint && npm run build:dist && npm run test' ]
13 silly lifecycle [email protected]~prepublishOnly: Returned: code: 1  signal: null
14 info lifecycle [email protected]~prepublishOnly: Failed to exec prepublishOnly script
15 verbose stack Error: [email protected] prepublishOnly: `npm run lint && npm run build:dist && npm run test`
15 verbose stack Exit status 1
15 verbose stack     at EventEmitter.<anonymous> (/home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
15 verbose stack     at EventEmitter.emit (events.js:314:20)
15 verbose stack     at ChildProcess.<anonymous> (/home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
15 verbose stack     at ChildProcess.emit (events.js:314:20)
15 verbose stack     at maybeClose (internal/child_process.js:1022:16)
15 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
16 verbose pkgid [email protected]
17 verbose cwd /home/ceo/live/vaporyjs/vaporyjs-util
18 verbose Linux 4.15.0-128-generic
19 verbose argv "/home/ceo/.nvm/versions/node/v12.20.0/bin/node" "/home/ceo/.nvm/versions/node/v12.20.0/bin/npm" "publish"
20 verbose node v12.20.0
21 verbose npm  v6.14.8
22 error code ELIFECYCLE
23 error errno 1
24 error [email protected] prepublishOnly: `npm run lint && npm run build:dist && npm run test`
24 error Exit status 1
25 error Failed at the [email protected] prepublishOnly script.T

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.