Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feat] Message verification and signing

See original GitHub issue


I think adding message verification and signing would be a nice addition to this library.

As I need to sign some content using the users Wif or private key for a DApp v2.

Wouldn’t mind implementing this.

An API along the lines

const signature = Neon.create.signMessage('PrivateKeyOrWiff', 'Hello World')
const verified = Neon.create.verifyMessage('NeoAddress', 'Hello World', signature)


const account = new wallet.Account(privateKey)
const signature = account.signMessage('Hello World')
const verified = Neon.get.verifyMessage('NeoAddress', 'Hello World', signature)

Thoughts or suggestions?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

said-alicommented, Feb 28, 2018

Within the wallet module.


 * Generates a signature of the message based on given private key.
 * @param {string} message 
 * @param {string} privateKey
 * @return {string} Signature
export const signMessage = (message, privateKey) => {
  /// Sign and generate message signature using elliptic p256

 * Verifies signature matches message and is valid for a given public key.
 * @param {string} message
 * @param {string} signature
 * @param {string} publicKey
 * @return {boolean}

export const verifyMessage = (message, signature, publicKey) => {
  // verify publicKey, message, signature match using elliptic p256

api usage:

let signature = Neon.sign.message('Hello', 'private key')
let verified = Neon.verify.message('Hello', signature,  'public key')

What do you think? any remarks?

snowypowerscommented, Mar 5, 2018

Thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Sign a Custom Message and Verify the Signature On ...
Hey! In this video I show you how to sign a custom message and then verify the produced signature on chain.SOURCE CODE +...
Read more >
Signing and verifying messages - YouTube
How to sign and verify messages in Coinomi.Examples from this video that you can verify yourself:BTC address: ...
Read more >
Taylor Swift: Home
The Official Website of Taylor Swift.
Read more >
Online Transcription Jobs | Apply Today! - GoTranscript
Please note: buying and selling a GoTranscript account is illegal ... We will send you an SMS with a code. You will need...
Read more >
Set up text messaging as your verification method
If you're prompted to set this up immediately after you sign in to your work or school account, see the detailed steps in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found