0.1.0 • Published 7 years ago
bitcore-message-mue v0.1.0
MUE Message Verification and Signing for Bitcore-MUE
bitcore-message-mue adds support for verifying and signing MUE messages in Node.js and web browsers.
See the main bitcore-mue repo for more information.
Getting Started
npm install bitcore-message-mue
bower install bitcore-message-mue
To sign a message:
var bitcore = require('bitcore-lib-mue');
var Message = require('bitcore-message-mue');
var privateKey = bitcore.PrivateKey.fromWIF('KkAfUvhooWCr3RQdaTHciTgsZV8iW6dWnJFxBffkDPfjuw2nBDTP');
var signature = Message('hello, to MonetaryUnit world').sign(privateKey);
To verify a message:
var address = '7ZohJkuycJqfh2uqU1FB4DZhGqd6EirzAS';
var signature = 'II/bwxbxaAf2FI7YS9qEIhqGX2F9X1f1VHkEpBtbw7NGVs0V2o38g8NQoIiNWAMMYL3Jbju8qfNm8It/eFcFKBQ=';
var verified = Message('hello, to MonetaryUnit world').verify(address, signature);
Contributing
See CONTRIBUTING.md on the main bitcore-dash repo for information about how to contribute.
License
Code released under the MIT license.
Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.
0.1.0
7 years ago