@neuraiproject/neurai-key 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +7 -6
- package/dist/NeuraiKey.js +60481 -0
- package/dist/main.js +140 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +115 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +65 -0
- package/dist/types.d.ts.map +1 -0
- package/index.ts +16 -17
- package/package.json +2 -2
- package/test.js +48 -18
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# neurai-key
|
|
2
2
|
|
|
3
3
|
Generate Neurai addresses from a mnemonic phrase following the standards BIP32, BIP39, BIP44.
|
|
4
4
|
|
|
5
|
-
That is, use your 12 words to get addresses for Neurai mainnet.
|
|
5
|
+
That is, use your 12 words to get addresses for Neurai mainnet and testnet.
|
|
6
|
+
The library also support Evrmorecoin EVR, both mainnet and testnet.
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
## Example get external and internal (change) addresses by path
|
|
@@ -19,7 +20,7 @@ import NeuraiKey from "@neuraiproject/neurai-key";
|
|
|
19
20
|
const mnemonic = NeuraiKey.generateMnemonic();
|
|
20
21
|
const ACCOUNT = 0; //default is zero
|
|
21
22
|
const POSITION = 0; //the first address for this wallet
|
|
22
|
-
const network = "xna"; //or
|
|
23
|
+
const network = "xna"; //or xna-test for testnet
|
|
23
24
|
const addressPair = NeuraiKey.getAddressPair(
|
|
24
25
|
network,
|
|
25
26
|
mnemonic,
|
|
@@ -32,7 +33,7 @@ console.info("Mnemonic", mnemonic);
|
|
|
32
33
|
console.log(addressPair);
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
Outputs
|
|
36
|
+
Outputs
|
|
36
37
|
|
|
37
38
|
```
|
|
38
39
|
Mnemonic wrong breeze brick wrestle exotic erode news clown copy install marble promote
|
|
@@ -66,7 +67,7 @@ import NeuraiKey from "@neuraiproject/neurai-key";
|
|
|
66
67
|
const mnemonic =
|
|
67
68
|
"Mnemonic erosion total live dial hamster helmet top response cash obey anger balcony";
|
|
68
69
|
const path = "m/44'/175'/0'/0/0";
|
|
69
|
-
const network = "xna";
|
|
70
|
+
const network = "xna"; //or xna-test for testnet
|
|
70
71
|
const hdKey = NeuraiKey.getHDKey("xna", mnemonic);
|
|
71
72
|
|
|
72
73
|
const address = NeuraiKey.getAddressByPath(network, hdKey, path);
|
|
@@ -75,7 +76,7 @@ console.log(address);
|
|
|
75
76
|
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
Outputs
|
|
79
|
+
Outputs
|
|
79
80
|
|
|
80
81
|
```
|
|
81
82
|
{
|