Skip to content

raven-community/ravencoinjs-message

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

send messages on ravencoin with opsend and hex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published