generated from web3w/hd-address
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmnemonic.pwd.js
29 lines (25 loc) · 940 Bytes
/
mnemonic.pwd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
const hdAddress = require("hd-address")
let hdIndex = 6677
const mnemonic = hdAddress.mnemonic.getRandomMnemonic()
let hd = hdAddress.HD(mnemonic,hdAddress.keyType.mnemonic,"star")
let examplePwd = () => {
let addr = hd.BTC.getAddress(hdIndex)
console.log("BTC",addr.address)
addr = hd.BTC_TEST.getAddress(hdIndex)
console.log("BTC_TEST",addr.address)
addr = hd.BCH.getAddress(hdIndex)
console.log("BCH",addr.address)
addr = hd.BCH_TEST.getAddress(hdIndex)
console.log("BCH_TEST",addr.address)
addr = hd.LTC.getAddress(hdIndex)
console.log("LTC",addr.address)
addr = hd.LTC_TEST.getAddress(hdIndex)
console.log("LTC_TEST",addr.address)
addr = hd.ETH.getAddress(hdIndex)
console.log("ETH",addr.address)
addr = hd.TRX.getAddress(hdIndex)
console.log("TRX",addr.address)
}
console.log("----------mnemonic + passward -> address----------")
examplePwd()