-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathshowuser.js
More file actions
19 lines (18 loc) · 994 Bytes
/
showuser.js
File metadata and controls
19 lines (18 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var { PrivateKey, Address } = require("bitsharesjs");
var seedrandom = require('seedrandom');
var bip39 = require("bip39");
var fs = require('fs');
fs.readFile('./key', 'utf-8', function (err, data) {
if (err) {
throw err;
}
let privateKey = PrivateKey.fromWif(data);
let publicKey = privateKey.toPublicKey();
let address = Address.fromPublic(publicKey);
console.log("\n 这是你的信息 \n");
console.log("+--------------+---------------------------------------------------------------------------------------+");
console.log("| Privatekey |", privateKey.toWif().toString()," |");
console.log("| Publickey |", publicKey.toString(), " |");
console.log("| Address |", address.toString()," |");
console.log("+------------ +---------------------------------------------------------------------------------------+");
});