Socket
Book a DemoInstallSign in
Socket

ravencoinjs-message

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ravencoinjs-message

ravencoinjs-message

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
21
425%
Maintainers
1
Weekly downloads
 
Created
Source

ravencoinjs-message

js-standard-style

Examples

var ravencoin = require('ravencoinjs-lib') // v1.x.x
var ravencoinMessage = require('ravencoinjs-message')

sign(message, privateKey, compressed[, network.messagePrefix])

Sign a Ravencoin message

var keyPair = ravencoin.ECPair.fromWIF('5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss')
var privateKey = keyPair.privateKey
var message = 'This is an example of a signed message.'

var signature = ravencoinMessage.sign(message, privateKey, keyPair.compressed)
console.log(signature.toString('base64'))

verify(message, address, signature[, network.messagePrefix])

Verify a Ravencoin message

var address = '1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN'

console.log(ravencoinMessage.verify(message, address, signature))
// => true

LICENSE MIT

Keywords

ravencoinjs-message

FAQs

Package last updated on 12 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts