Coder Social home page Coder Social logo

halo-eth-cli's People

Contributors

ccamrobertson avatar jdmwood avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

verisart

halo-eth-cli's Issues

Unable to produce a correct signature

For some reason I can't produce a correct signature. Maybe I'm doing something wrong?

In node console:
Start by generating the digest to sign,

> ethers.utils.hashMessage('test')
'0x4a5c5d454721bbbb25540c3317521e71c373ae36458f960d2ad46ef088110e95'

In cli:
Sign the digest with the first public key,

node ./cli.js sign 1 4a5c5d454721bbbb25540c3317521e71c373ae36458f960d2ad46ef088110e95 
{
  operation: {
    keyNumber: 1,
    publicKey: '0471d9627d31c103b81f12085a67278ea4a1a2fda9dfaaa4b2191b8603ba3cd515f1dd092c42afb50ecb5961ee76755ab005783dea4e001a4b31907f61c0b22cfb',
    digest: '4161ccc2580cd8c7494f69cf32123e4254bef5952467b069ffae8fc127b4f8b9',
    data: '4a5c5d454721bbbb25540c3317521e71c373ae36458f960d2ad46ef088110e95'
  },
  signature: {
    raw: {
      r: '1ec53b1d1bd9fdb8ea946164e1a32dff825270cb54e1e4f8e368a1cb9ff49eef',
      s: '73608fb06eee7bc4802c962614068a701800ea0e9668064ca6186c3c34e75511',
      recoveryParam: 0
    },
    der: '304402201ec53b1d1bd9fdb8ea946164e1a32dff825270cb54e1e4f8e368a1cb9ff49eef022073608fb06eee7bc4802c962614068a701800ea0e9668064ca6186c3c34e75511',
    ether: '0x1ec53b1d1bd9fdb8ea946164e1a32dff825270cb54e1e4f8e368a1cb9ff49eef73608fb06eee7bc4802c962614068a701800ea0e9668064ca6186c3c34e755111b'
  }
}

In node console:
Copy the digest and the signature bytes from the previous step and the resulting public key differs from the public key in the output of the previous step,

ethers.utils.recoverPublicKey('0x4a5c5d454721bbbb25540c3317521e71c373ae36458f960d2ad46ef088110e95', '0x1ec53b1d1bd9fdb8ea946164e1a32dff825270cb54e1e4f8e368a1cb9ff49eef73608fb06eee7bc4802c962614068a701800ea0e9668064ca6186c3c34e755111b')
'0x042e43446368321475e5fe143bf4a1f0cf98605843659252e9275c996a8768736cc5ad7ba7c9edbfecd0c93916a4d552ef4a5406126498358d522354ba99a4cd9b'

Can't run `info` on tags: unknown tag version

Hi there,

I'm trying to run node cli.js info and I'm getting an error.

Error: Unknown tag version!
    at cb (/Users/john/3rdParty/halo-eth-cli/cli.js:234:19)
    at async ACR122Reader.<anonymous> (/Users/john/3rdParty/halo-eth-cli/cli.js:515:19)
NFC card or compatible PC/SC reader not found.

The tag version seems to be 0x73 on our chips and the reason it fails is because of a timeout. I tried increasing the timeout to 10 seconds but it still times out. Any ideas?

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.