GithubHelp home page GithubHelp logo

bitcore-message's Introduction

bitcore-message's People

Contributors

braydonf avatar eordano avatar maraoz avatar matiu avatar trevinhofmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcore-message's Issues

Using with Bitcore

The sign method is giving me "bitcore.ErrorInvalidArgument: Invalid Argument: First argument should be an instance of PrivateKey" although I created the private key with bitcore. I believe the problem is that the bitcore-message module uses a different bitcore module internally then the one I created the private key with.

Can't verify testnet signature

I've been trying to verify the following testnet message/signature with bitcore-message, but keep getting this stack trace.

message: localhost:3000
address: mx5u3nqdPpzvEZ3vfnuUQEyHg3gHd8zrrH
signature: G4Bi9/Z7hF17MpE9t7Txm3n0aBH6yCVLFB1VWzkZRz17FxErgA/oOWmwXWYr6/ILlRCmeYjc8MeI8PQWYAElZY8=
Invalid Argument: Error: i must be 0, 1, 2, or 3
Error
    at Error.NodeError (/src/node_modules/bitcore/lib/errors/index.js:20:41)
    at Object.module.exports.checkArgument (/src/node_modules/bitcore/lib/util/preconditions.js:14:13)
    at Function.Signature.fromCompact (/src/node_modules/bitcore/lib/crypto/signature.js:41:5)
    at Message.verify (/src/node_modules/bitcore-message/lib/message.js:92:29)
    at authenticate (/src/server/helpers/authenticate.js:38:32)
    at Layer.handle [as handle_request] (/src/node_modules/express/lib/router/layer.js:82:5)

breaks if you use this with bitcore-lib-cash

If you use this with bitcore-lib-cash you will get issues when trying to sign.

In particular

 throw new errors.InvalidArgument(argumentName, message, docsPath);
      ^
Invalid Argument: First argument should be an instance of PrivateKey

This is because bitcore-message requires bitcore-lib not bitcore-lib-cash as a dependency. Thus they reference a different instance of PrivateKey

Simple fix is to change the bitcore-lib dependency to bitcore-lib-cash to proceed.

Just a pain if you run npm update/install, you will have to change this back each time.

Encryption/Decryption?

Is this module explicitly for signing/verification, or could we add encryption and decryption of messages?

[REQ] Add Segwit Sign/Verify support

Bitcoin issue 10542 discusses how to expand the current sign/verify functionality to include Segwit.

The basic idea is to expand the header byte to help identify the segwit address scheme

35-38 p2sh segwit pubkey (base58)
39-42 segwit pubkey (bech32)

The Trezor FW has already implemented this in commit b5f9a5

As bitcoin core is likely to implement this and Trezor already has, it would be useful to have it implemented in a block explorer too.

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.