Skip to content
Snippets Groups Projects
Commit bdb59cb9 authored by Dan Notestein's avatar Dan Notestein
Browse files

Merge branch 'mirafun-master-patch-74854' into 'master'

#30 export Signature class

See merge request !32
parents 282df5ad 60f1eaca
No related branches found
No related tags found
1 merge request!32#30 export Signature class
......@@ -2289,6 +2289,11 @@ hive.auth.wifToPublic(privWif);
hive.auth.signTransaction(trx, keys);
```
### Sign a message
```js
hive.auth.signMessage(message, privateKey)
```
# Formatter
### Amount
......
{
"name": "@hiveio/hive-js",
"version": "2.0.6",
"version": "2.0.7",
"description": "Hive.js the JavaScript API for Hive blockchain",
"main": "lib/index.js",
"scripts": {
......
......@@ -98,9 +98,13 @@ Auth.wifToPublic = function (privWif) {
return pubWif;
};
Auth.isPubkey = function(pubkey, address_prefix) {
Auth.isPubkey = function (pubkey, address_prefix) {
return PublicKey.fromString(pubkey, address_prefix) != null
}
};
Auth.signMessage = function (msg, privWif) {
return Signature.sign(msg, privWif).toHex();
};
Auth.signTransaction = function (trx, keys) {
var signatures = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment