aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/base-x/LICENSE.md22
-rw-r--r--libs/base-x/package.json44
-rw-r--r--libs/base-x/readme.md4
-rw-r--r--libs/base-x/ts_src/index.ts161
-rw-r--r--libs/base-x/tsconfig.json31
-rw-r--r--libs/bitcoinjs-bip38/index.js244
-rw-r--r--libs/bitcoinjs-bip38/package.json38
-rw-r--r--libs/bitcoinjs-bip38/readme.md4
-rw-r--r--libs/bitcoinjs-lib/bitcoinjs-lib.js5
-rw-r--r--libs/bitcoinjs-lib/package.json14
-rw-r--r--libs/bitcoinjs-lib/readme.md5
-rw-r--r--libs/ethereumjs-util/index.js736
-rw-r--r--libs/ethereumjs-util/package.json125
-rw-r--r--libs/ethereumjs-util/readme.md4
-rw-r--r--libs/stellar-util/package-lock.json1389
-rw-r--r--libs/stellar-util/package.json15
-rw-r--r--libs/stellar-util/readme.md4
-rw-r--r--libs/stellar-util/stellar-util.js16
18 files changed, 2861 insertions, 0 deletions
diff --git a/libs/base-x/LICENSE.md b/libs/base-x/LICENSE.md
new file mode 100644
index 0000000..c5dca45
--- /dev/null
+++ b/libs/base-x/LICENSE.md
@@ -0,0 +1,22 @@
1The MIT License (MIT)
2
3Copyright (c) 2018 base-x contributors
4Copyright (c) 2014-2018 The Bitcoin Core developers
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in all
14copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22SOFTWARE.
diff --git a/libs/base-x/package.json b/libs/base-x/package.json
new file mode 100644
index 0000000..c14a93e
--- /dev/null
+++ b/libs/base-x/package.json
@@ -0,0 +1,44 @@
1{
2 "name": "base-x",
3 "version": "3.0.7",
4 "description": "Fast base encoding / decoding of any given alphabet",
5 "keywords": [
6 "base-x",
7 "base58",
8 "base62",
9 "base64",
10 "crypto",
11 "crytography",
12 "decode",
13 "decoding",
14 "encode",
15 "encoding"
16 ],
17 "homepage": "https://github.com/cryptocoinjs/base-x",
18 "bugs": {
19 "url": "https://github.com/cryptocoinjs/base-x/issues"
20 },
21 "license": "MIT",
22 "author": "Daniel Cousens",
23 "files": [
24 "src"
25 ],
26 "main": "src/index.js",
27 "types": "src/index.d.ts",
28 "repository": {
29 "type": "git",
30 "url": "https://github.com/cryptocoinjs/base-x.git"
31 },
32 "scripts": {
33 "build": "tsc -p ./tsconfig.json ; standard --fix; browserify src/index.js --standalone basex > /tmp/base-x.js"
34 },
35 "devDependencies": {
36 "@types/node": "12.0.10",
37 "standard": "^10.0.3",
38 "tape": "^4.5.1",
39 "typescript": "3.5.2"
40 },
41 "dependencies": {
42 "safe-buffer": "^5.0.1"
43 }
44}
diff --git a/libs/base-x/readme.md b/libs/base-x/readme.md
new file mode 100644
index 0000000..96e6912
--- /dev/null
+++ b/libs/base-x/readme.md
@@ -0,0 +1,4 @@
1Build (will create a bundle and copy it to /tmp/base-x.js):
2
3 npm install
4 npm run build
diff --git a/libs/base-x/ts_src/index.ts b/libs/base-x/ts_src/index.ts
new file mode 100644
index 0000000..2fbedf5
--- /dev/null
+++ b/libs/base-x/ts_src/index.ts
@@ -0,0 +1,161 @@
1// base-x encoding / decoding
2// Copyright (c) 2018 base-x contributors
3// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
4// Distributed under the MIT software license, see the accompanying
5// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
6
7// @ts-ignore
8const _Buffer = require('safe-buffer').Buffer;
9
10function base (ALPHABET: string): base.BaseConverter {
11 if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
12
13 const BASE_MAP = new Uint8Array(256)
14 BASE_MAP.fill(255)
15
16 for (let i = 0; i < ALPHABET.length; i++) {
17 const x = ALPHABET.charAt(i)
18 const xc = x.charCodeAt(0)
19
20 if (BASE_MAP[xc] !== 255) throw new TypeError(x + ' is ambiguous')
21 BASE_MAP[xc] = i
22 }
23
24 const BASE = ALPHABET.length
25 const LEADER = ALPHABET.charAt(0)
26 const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up
27 const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up
28
29 function encode (source: Buffer): string {
30 if (!_Buffer.isBuffer(source)) throw new TypeError('Expected Buffer')
31 if (source.length === 0) return ''
32
33 // Skip & count leading zeroes.
34 let zeroes = 0
35 let length = 0
36 let pbegin = 0
37 const pend = source.length
38
39 while (pbegin !== pend && source[pbegin] === 0) {
40 pbegin++
41 zeroes++
42 }
43
44 // Allocate enough space in big-endian base58 representation.
45 const size = ((pend - pbegin) * iFACTOR + 1) >>> 0
46 const b58 = new Uint8Array(size)
47
48 // Process the bytes.
49 while (pbegin !== pend) {
50 let carry = source[pbegin]
51
52 // Apply "b58 = b58 * 256 + ch".
53 let i = 0
54 for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
55 carry += (256 * b58[it1]) >>> 0
56 b58[it1] = (carry % BASE) >>> 0
57 carry = (carry / BASE) >>> 0
58 }
59
60 if (carry !== 0) throw new Error('Non-zero carry')
61 length = i
62 pbegin++
63 }
64
65 // Skip leading zeroes in base58 result.
66 let it2 = size - length
67 while (it2 !== size && b58[it2] === 0) {
68 it2++
69 }
70
71 // Translate the result into a string.
72 let str = LEADER.repeat(zeroes)
73 for (; it2 < size; ++it2) str += ALPHABET.charAt(b58[it2])
74
75 return str
76 }
77
78 function decodeUnsafe (source: string): Buffer | undefined {
79 if (typeof source !== 'string') throw new TypeError('Expected String')
80 if (source.length === 0) return _Buffer.alloc(0)
81
82 let psz = 0
83
84 // Skip leading spaces.
85 if (source[psz] === ' ') return
86
87 // Skip and count leading '1's.
88 let zeroes = 0
89 let length = 0
90 while (source[psz] === LEADER) {
91 zeroes++
92 psz++
93 }
94
95 // Allocate enough space in big-endian base256 representation.
96 const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
97 const b256 = new Uint8Array(size)
98
99 // Process the characters.
100 while (source[psz]) {
101 // Decode character
102 let carry = BASE_MAP[source.charCodeAt(psz)]
103
104 // Invalid character
105 if (carry === 255) return
106
107 let i = 0
108 for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
109 carry += (BASE * b256[it3]) >>> 0
110 b256[it3] = (carry % 256) >>> 0
111 carry = (carry / 256) >>> 0
112 }
113
114 if (carry !== 0) throw new Error('Non-zero carry')
115 length = i
116 psz++
117 }
118
119 // Skip trailing spaces.
120 if (source[psz] === ' ') return
121
122 // Skip leading zeroes in b256.
123 let it4 = size - length
124 while (it4 !== size && b256[it4] === 0) {
125 it4++
126 }
127
128 const vch = _Buffer.allocUnsafe(zeroes + (size - it4))
129 vch.fill(0x00, 0, zeroes)
130
131 let j = zeroes
132 while (it4 !== size) {
133 vch[j++] = b256[it4++]
134 }
135
136 return vch
137 }
138
139 function decode (string: string): Buffer {
140 const buffer = decodeUnsafe(string)
141 if (buffer) return buffer
142
143 throw new Error('Non-base' + BASE + ' character')
144 }
145
146 return {
147 encode: encode,
148 decodeUnsafe: decodeUnsafe,
149 decode: decode
150 }
151}
152
153export = base;
154
155declare namespace base {
156 interface BaseConverter {
157 encode(buffer: Buffer): string;
158 decodeUnsafe(string: string): Buffer | undefined;
159 decode(string: string): Buffer;
160 }
161}
diff --git a/libs/base-x/tsconfig.json b/libs/base-x/tsconfig.json
new file mode 100644
index 0000000..bb8d1dc
--- /dev/null
+++ b/libs/base-x/tsconfig.json
@@ -0,0 +1,31 @@
1{
2 "compilerOptions": {
3 "target": "ES5",
4 "module": "commonjs",
5 "outDir": "./src",
6 "declaration": true,
7 "rootDir": "./ts_src",
8 "types": [
9 "node"
10 ],
11 "allowJs": false,
12 "strict": true,
13 "noImplicitAny": true,
14 "strictNullChecks": true,
15 "strictFunctionTypes": true,
16 "strictBindCallApply": true,
17 "strictPropertyInitialization": true,
18 "noImplicitThis": true,
19 "alwaysStrict": true,
20 "esModuleInterop": false,
21 "noUnusedLocals": true,
22 "noUnusedParameters": true
23 },
24 "include": [
25 "ts_src/**/*.ts"
26 ],
27 "exclude": [
28 "**/*.spec.ts",
29 "node_modules/**/*"
30 ]
31}
diff --git a/libs/bitcoinjs-bip38/index.js b/libs/bitcoinjs-bip38/index.js
new file mode 100644
index 0000000..51c20e4
--- /dev/null
+++ b/libs/bitcoinjs-bip38/index.js
@@ -0,0 +1,244 @@
1var aes = require('browserify-aes')
2var assert = require('assert')
3var Buffer = require('safe-buffer').Buffer
4var bs58check = require('bs58check')
5var createHash = require('create-hash')
6var scrypt = require('scryptsy')
7var xor = require('buffer-xor/inplace')
8
9var ecurve = require('ecurve')
10var curve = ecurve.getCurveByName('secp256k1')
11
12var BigInteger = require('bigi')
13
14// constants
15var SCRYPT_PARAMS = {
16 N: 16384, // specified by BIP38
17 r: 8,
18 p: 8
19}
20var NULL = Buffer.alloc(0)
21
22function hash160 (buffer) {
23 var hash
24 try {
25 hash = createHash('rmd160')
26 } catch (e) {
27 hash = createHash('ripemd160')
28 }
29 return hash.update(
30 createHash('sha256').update(buffer).digest()
31 ).digest()
32}
33
34function hash256 (buffer) {
35 return createHash('sha256').update(
36 createHash('sha256').update(buffer).digest()
37 ).digest()
38}
39
40function getAddress (d, compressed) {
41 var Q = curve.G.multiply(d).getEncoded(compressed)
42 var hash = hash160(Q)
43 var payload = Buffer.allocUnsafe(21)
44 payload.writeUInt8(0x00, 0) // XXX TODO FIXME bitcoin only??? damn you BIP38
45 hash.copy(payload, 1)
46
47 return bs58check.encode(payload)
48}
49
50function encryptRaw (buffer, compressed, passphrase, progressCallback, scryptParams) {
51 if (buffer.length !== 32) throw new Error('Invalid private key length')
52 scryptParams = scryptParams || SCRYPT_PARAMS
53
54 var d = BigInteger.fromBuffer(buffer)
55 var address = getAddress(d, compressed)
56 var secret = Buffer.from(passphrase, 'utf8')
57 var salt = hash256(address).slice(0, 4)
58
59 var N = scryptParams.N
60 var r = scryptParams.r
61 var p = scryptParams.p
62
63 var scryptBuf = scrypt(secret, salt, N, r, p, 64, progressCallback)
64 var derivedHalf1 = scryptBuf.slice(0, 32)
65 var derivedHalf2 = scryptBuf.slice(32, 64)
66
67 var xorBuf = xor(derivedHalf1, buffer)
68 var cipher = aes.createCipheriv('aes-256-ecb', derivedHalf2, NULL)
69 cipher.setAutoPadding(false)
70 cipher.end(xorBuf)
71
72 var cipherText = cipher.read()
73
74 // 0x01 | 0x42 | flagByte | salt (4) | cipherText (32)
75 var result = Buffer.allocUnsafe(7 + 32)
76 result.writeUInt8(0x01, 0)
77 result.writeUInt8(0x42, 1)
78 result.writeUInt8(compressed ? 0xe0 : 0xc0, 2)
79 salt.copy(result, 3)
80 cipherText.copy(result, 7)
81
82 return result
83}
84
85function encrypt (buffer, compressed, passphrase, progressCallback, scryptParams) {
86 return bs58check.encode(encryptRaw(buffer, compressed, passphrase, progressCallback, scryptParams))
87}
88
89// some of the techniques borrowed from: https://github.com/pointbiz/bitaddress.org
90function decryptRaw (buffer, passphrase, progressCallback, scryptParams) {
91 // 39 bytes: 2 bytes prefix, 37 bytes payload
92 if (buffer.length !== 39) throw new Error('Invalid BIP38 data length')
93 if (buffer.readUInt8(0) !== 0x01) throw new Error('Invalid BIP38 prefix')
94 scryptParams = scryptParams || SCRYPT_PARAMS
95
96 // check if BIP38 EC multiply
97 var type = buffer.readUInt8(1)
98 if (type === 0x43) return decryptECMult(buffer, passphrase, progressCallback, scryptParams)
99 if (type !== 0x42) throw new Error('Invalid BIP38 type')
100
101 passphrase = Buffer.from(passphrase, 'utf8')
102
103 var flagByte = buffer.readUInt8(2)
104 var compressed = flagByte === 0xe0
105 if (!compressed && flagByte !== 0xc0) throw new Error('Invalid BIP38 compression flag')
106
107 var N = scryptParams.N
108 var r = scryptParams.r
109 var p = scryptParams.p
110
111 var salt = buffer.slice(3, 7)
112 var scryptBuf = scrypt(passphrase, salt, N, r, p, 64, progressCallback)
113 var derivedHalf1 = scryptBuf.slice(0, 32)
114 var derivedHalf2 = scryptBuf.slice(32, 64)
115
116 var privKeyBuf = buffer.slice(7, 7 + 32)
117 var decipher = aes.createDecipheriv('aes-256-ecb', derivedHalf2, NULL)
118 decipher.setAutoPadding(false)
119 decipher.end(privKeyBuf)
120
121 var plainText = decipher.read()
122 var privateKey = xor(derivedHalf1, plainText)
123
124 // verify salt matches address
125 var d = BigInteger.fromBuffer(privateKey)
126 var address = getAddress(d, compressed)
127 var checksum = hash256(address).slice(0, 4)
128 assert.deepStrictEqual(salt, checksum)
129
130 return {
131 privateKey: privateKey,
132 compressed: compressed
133 }
134}
135
136function decrypt (string, passphrase, progressCallback, scryptParams) {
137 return decryptRaw(bs58check.decode(string), passphrase, progressCallback, scryptParams)
138}
139
140function decryptECMult (buffer, passphrase, progressCallback, scryptParams) {
141 passphrase = Buffer.from(passphrase, 'utf8')
142 buffer = buffer.slice(1) // FIXME: we can avoid this
143 scryptParams = scryptParams || SCRYPT_PARAMS
144
145 var flag = buffer.readUInt8(1)
146 var compressed = (flag & 0x20) !== 0
147 var hasLotSeq = (flag & 0x04) !== 0
148
149 assert.strictEqual((flag & 0x24), flag, 'Invalid private key.')
150
151 var addressHash = buffer.slice(2, 6)
152 var ownerEntropy = buffer.slice(6, 14)
153 var ownerSalt
154
155 // 4 bytes ownerSalt if 4 bytes lot/sequence
156 if (hasLotSeq) {
157 ownerSalt = ownerEntropy.slice(0, 4)
158
159 // else, 8 bytes ownerSalt
160 } else {
161 ownerSalt = ownerEntropy
162 }
163
164 var encryptedPart1 = buffer.slice(14, 22) // First 8 bytes
165 var encryptedPart2 = buffer.slice(22, 38) // 16 bytes
166
167 var N = scryptParams.N
168 var r = scryptParams.r
169 var p = scryptParams.p
170 var preFactor = scrypt(passphrase, ownerSalt, N, r, p, 32, progressCallback)
171
172 var passFactor
173 if (hasLotSeq) {
174 var hashTarget = Buffer.concat([preFactor, ownerEntropy])
175 passFactor = hash256(hashTarget)
176 } else {
177 passFactor = preFactor
178 }
179
180 var passInt = BigInteger.fromBuffer(passFactor)
181 var passPoint = curve.G.multiply(passInt).getEncoded(true)
182
183 var seedBPass = scrypt(passPoint, Buffer.concat([addressHash, ownerEntropy]), 1024, 1, 1, 64)
184 var derivedHalf1 = seedBPass.slice(0, 32)
185 var derivedHalf2 = seedBPass.slice(32, 64)
186
187 var decipher = aes.createDecipheriv('aes-256-ecb', derivedHalf2, Buffer.alloc(0))
188 decipher.setAutoPadding(false)
189 decipher.end(encryptedPart2)
190
191 var decryptedPart2 = decipher.read()
192 var tmp = xor(decryptedPart2, derivedHalf1.slice(16, 32))
193 var seedBPart2 = tmp.slice(8, 16)
194
195 var decipher2 = aes.createDecipheriv('aes-256-ecb', derivedHalf2, Buffer.alloc(0))
196 decipher2.setAutoPadding(false)
197 decipher2.write(encryptedPart1) // first 8 bytes
198 decipher2.end(tmp.slice(0, 8)) // last 8 bytes
199
200 var seedBPart1 = xor(decipher2.read(), derivedHalf1.slice(0, 16))
201 var seedB = Buffer.concat([seedBPart1, seedBPart2], 24)
202 var factorB = BigInteger.fromBuffer(hash256(seedB))
203
204 // d = passFactor * factorB (mod n)
205 var d = passInt.multiply(factorB).mod(curve.n)
206
207 return {
208 privateKey: d.toBuffer(32),
209 compressed: compressed
210 }
211}
212
213function verify (string) {
214 var decoded = bs58check.decodeUnsafe(string)
215 if (!decoded) return false
216
217 if (decoded.length !== 39) return false
218 if (decoded.readUInt8(0) !== 0x01) return false
219
220 var type = decoded.readUInt8(1)
221 var flag = decoded.readUInt8(2)
222
223 // encrypted WIF
224 if (type === 0x42) {
225 if (flag !== 0xc0 && flag !== 0xe0) return false
226
227 // EC mult
228 } else if (type === 0x43) {
229 if ((flag & ~0x24)) return false
230 } else {
231 return false
232 }
233
234 return true
235}
236
237module.exports = {
238 decrypt: decrypt,
239 decryptECMult: decryptECMult,
240 decryptRaw: decryptRaw,
241 encrypt: encrypt,
242 encryptRaw: encryptRaw,
243 verify: verify
244}
diff --git a/libs/bitcoinjs-bip38/package.json b/libs/bitcoinjs-bip38/package.json
new file mode 100644
index 0000000..480a5fa
--- /dev/null
+++ b/libs/bitcoinjs-bip38/package.json
@@ -0,0 +1,38 @@
1{
2 "name": "bip38",
3 "version": "2.0.2",
4 "description": "BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.",
5 "main": "index.js",
6 "keywords": [
7 "bitcoin",
8 "crypto",
9 "cryptography",
10 "litecoin"
11 ],
12 "homepage": "http://cryptocoinjs.com/modules/currency/bip38/",
13 "author": "JP Richardson",
14 "dependencies": {
15 "bigi": "^1.2.0",
16 "browserify-aes": "^1.0.1",
17 "bs58check": "<3.0.0",
18 "buffer-xor": "^1.0.2",
19 "create-hash": "^1.1.1",
20 "ecurve": "^1.0.0",
21 "scryptsy": "^2.0.0"
22 },
23 "devDependencies": {
24 },
25 "repository": {
26 "url": "git@github.com:bitcoinjs/bip38.git",
27 "type": "git"
28 },
29 "scripts": {
30 "browser-test": "mochify --wd -R spec --timeout 100000",
31 "build": "browserify index.js --standalone bitcoinjs-bip38 > /tmp/bitcoinjs-bip38.js",
32 "coverage": "istanbul cover _mocha -- --reporter list test/*.js",
33 "coveralls": "npm run-script coverage && coveralls < coverage/lcov.info",
34 "standard": "standard",
35 "test": "npm run standard && npm run unit",
36 "unit": "mocha --ui bdd --timeout 240000"
37 }
38}
diff --git a/libs/bitcoinjs-bip38/readme.md b/libs/bitcoinjs-bip38/readme.md
new file mode 100644
index 0000000..a97a316
--- /dev/null
+++ b/libs/bitcoinjs-bip38/readme.md
@@ -0,0 +1,4 @@
1Build (will create a bundle and copy it to /tmp/bitcoinjs-bip38.js):
2
3 npm install
4 npm run build
diff --git a/libs/bitcoinjs-lib/bitcoinjs-lib.js b/libs/bitcoinjs-lib/bitcoinjs-lib.js
new file mode 100644
index 0000000..d7358c2
--- /dev/null
+++ b/libs/bitcoinjs-lib/bitcoinjs-lib.js
@@ -0,0 +1,5 @@
1let bitcoin = require('bitcoinjs-lib')
2
3module.exports = {
4 bitcoin
5}
diff --git a/libs/bitcoinjs-lib/package.json b/libs/bitcoinjs-lib/package.json
new file mode 100644
index 0000000..dca015e
--- /dev/null
+++ b/libs/bitcoinjs-lib/package.json
@@ -0,0 +1,14 @@
1{
2 "name": "bitcoinjs-lib",
3 "version": "3.3.2",
4 "scripts": {
5 "build": "browserify bitcoinjs-lib.js --standalone bitcoinjs > /tmp/bitcoinjs-lib.js"
6 },
7 "dependencies": {
8 "bitcoinjs-lib": "3.3.2"
9 },
10 "devDependencies": {
11 "browserify": "^16.2.3",
12 "uglify-es": "^3.3.9"
13 }
14}
diff --git a/libs/bitcoinjs-lib/readme.md b/libs/bitcoinjs-lib/readme.md
new file mode 100644
index 0000000..14de4be
--- /dev/null
+++ b/libs/bitcoinjs-lib/readme.md
@@ -0,0 +1,5 @@
1Build (will create a bundle and copy it to /tmp/bitcoinjs-lib.js):
2
3 npm install
4 npm run build
5 manually add changes in https://github.com/iancoleman/bip39/commit/0702ecd3520c44cb8016f80329dcb5a3c8df88fc
diff --git a/libs/ethereumjs-util/index.js b/libs/ethereumjs-util/index.js
new file mode 100644
index 0000000..b17b7ae
--- /dev/null
+++ b/libs/ethereumjs-util/index.js
@@ -0,0 +1,736 @@
1const createKeccakHash = require('keccak')
2const secp256k1 = require('secp256k1')
3const assert = require('assert')
4const rlp = require('rlp')
5const BN = require('bn.js')
6const createHash = require('create-hash')
7const Buffer = require('safe-buffer').Buffer
8Object.assign(exports, require('ethjs-util'))
9
10/**
11 * the max integer that this VM can handle (a ```BN```)
12 * @var {BN} MAX_INTEGER
13 */
14exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)
15
16/**
17 * 2^256 (a ```BN```)
18 * @var {BN} TWO_POW256
19 */
20exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16)
21
22/**
23 * Keccak-256 hash of null (a ```String```)
24 * @var {String} KECCAK256_NULL_S
25 */
26exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
27
28/**
29 * Keccak-256 hash of null (a ```Buffer```)
30 * @var {Buffer} KECCAK256_NULL
31 */
32exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex')
33
34/**
35 * Keccak-256 of an RLP of an empty array (a ```String```)
36 * @var {String} KECCAK256_RLP_ARRAY_S
37 */
38exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'
39
40/**
41 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
42 * @var {Buffer} KECCAK256_RLP_ARRAY
43 */
44exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex')
45
46/**
47 * Keccak-256 hash of the RLP of null (a ```String```)
48 * @var {String} KECCAK256_RLP_S
49 */
50exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'
51
52/**
53 * Keccak-256 hash of the RLP of null (a ```Buffer```)
54 * @var {Buffer} KECCAK256_RLP
55 */
56exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex')
57
58/**
59 * [`BN`](https://github.com/indutny/bn.js)
60 * @var {Function}
61 */
62exports.BN = BN
63
64/**
65 * [`rlp`](https://github.com/ethereumjs/rlp)
66 * @var {Function}
67 */
68exports.rlp = rlp
69
70/**
71 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
72 * @var {Object}
73 */
74exports.secp256k1 = secp256k1
75
76/**
77 * Returns a buffer filled with 0s
78 * @method zeros
79 * @param {Number} bytes the number of bytes the buffer should be
80 * @return {Buffer}
81 */
82exports.zeros = function (bytes) {
83 return Buffer.allocUnsafe(bytes).fill(0)
84}
85
86/**
87 * Returns a zero address
88 * @method zeroAddress
89 * @return {String}
90 */
91exports.zeroAddress = function () {
92 const addressLength = 20
93 const zeroAddress = exports.zeros(addressLength)
94 return exports.bufferToHex(zeroAddress)
95}
96
97/**
98 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
99 * Or it truncates the beginning if it exceeds.
100 * @method lsetLength
101 * @param {Buffer|Array} msg the value to pad
102 * @param {Number} length the number of bytes the output should be
103 * @param {Boolean} [right=false] whether to start padding form the left or right
104 * @return {Buffer|Array}
105 */
106exports.setLengthLeft = exports.setLength = function (msg, length, right) {
107 const buf = exports.zeros(length)
108 msg = exports.toBuffer(msg)
109 if (right) {
110 if (msg.length < length) {
111 msg.copy(buf)
112 return buf
113 }
114 return msg.slice(0, length)
115 } else {
116 if (msg.length < length) {
117 msg.copy(buf, length - msg.length)
118 return buf
119 }
120 return msg.slice(-length)
121 }
122}
123
124/**
125 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
126 * Or it truncates the beginning if it exceeds.
127 * @param {Buffer|Array} msg the value to pad
128 * @param {Number} length the number of bytes the output should be
129 * @return {Buffer|Array}
130 */
131exports.setLengthRight = function (msg, length) {
132 return exports.setLength(msg, length, true)
133}
134
135/**
136 * Trims leading zeros from a `Buffer` or an `Array`
137 * @param {Buffer|Array|String} a
138 * @return {Buffer|Array|String}
139 */
140exports.unpad = exports.stripZeros = function (a) {
141 a = exports.stripHexPrefix(a)
142 let first = a[0]
143 while (a.length > 0 && first.toString() === '0') {
144 a = a.slice(1)
145 first = a[0]
146 }
147 return a
148}
149/**
150 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
151 * @param {*} v the value
152 */
153exports.toBuffer = function (v) {
154 if (!Buffer.isBuffer(v)) {
155 if (Array.isArray(v)) {
156 v = Buffer.from(v)
157 } else if (typeof v === 'string') {
158 if (exports.isHexString(v)) {
159 v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex')
160 } else {
161 v = Buffer.from(v)
162 }
163 } else if (typeof v === 'number') {
164 v = exports.intToBuffer(v)
165 } else if (v === null || v === undefined) {
166 v = Buffer.allocUnsafe(0)
167 } else if (BN.isBN(v)) {
168 v = v.toArrayLike(Buffer)
169 } else if (v.toArray) {
170 // converts a BN to a Buffer
171 v = Buffer.from(v.toArray())
172 } else {
173 throw new Error('invalid type')
174 }
175 }
176 return v
177}
178
179/**
180 * Converts a `Buffer` to a `Number`
181 * @param {Buffer} buf
182 * @return {Number}
183 * @throws If the input number exceeds 53 bits.
184 */
185exports.bufferToInt = function (buf) {
186 return new BN(exports.toBuffer(buf)).toNumber()
187}
188
189/**
190 * Converts a `Buffer` into a hex `String`
191 * @param {Buffer} buf
192 * @return {String}
193 */
194exports.bufferToHex = function (buf) {
195 buf = exports.toBuffer(buf)
196 return '0x' + buf.toString('hex')
197}
198
199/**
200 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
201 * @param {Buffer} num
202 * @return {BN}
203 */
204exports.fromSigned = function (num) {
205 return new BN(num).fromTwos(256)
206}
207
208/**
209 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
210 * @param {BN} num
211 * @return {Buffer}
212 */
213exports.toUnsigned = function (num) {
214 return Buffer.from(num.toTwos(256).toArray())
215}
216
217/**
218 * Creates Keccak hash of the input
219 * @param {Buffer|Array|String|Number} a the input data
220 * @param {Number} [bits=256] the Keccak width
221 * @return {Buffer}
222 */
223exports.keccak = function (a, bits) {
224 a = exports.toBuffer(a)
225 if (!bits) bits = 256
226
227 return createKeccakHash('keccak' + bits).update(a).digest()
228}
229
230/**
231 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
232 * @param {Buffer|Array|String|Number} a the input data
233 * @return {Buffer}
234 */
235exports.keccak256 = function (a) {
236 return exports.keccak(a)
237}
238
239/**
240 * Creates SHA256 hash of the input
241 * @param {Buffer|Array|String|Number} a the input data
242 * @return {Buffer}
243 */
244exports.sha256 = function (a) {
245 a = exports.toBuffer(a)
246 return createHash('sha256').update(a).digest()
247}
248
249/**
250 * Creates RIPEMD160 hash of the input
251 * @param {Buffer|Array|String|Number} a the input data
252 * @param {Boolean} padded whether it should be padded to 256 bits or not
253 * @return {Buffer}
254 */
255exports.ripemd160 = function (a, padded) {
256 a = exports.toBuffer(a)
257 const hash = createHash('rmd160').update(a).digest()
258 if (padded === true) {
259 return exports.setLength(hash, 32)
260 } else {
261 return hash
262 }
263}
264
265/**
266 * Creates SHA-3 hash of the RLP encoded version of the input
267 * @param {Buffer|Array|String|Number} a the input data
268 * @return {Buffer}
269 */
270exports.rlphash = function (a) {
271 return exports.keccak(rlp.encode(a))
272}
273
274/**
275 * Checks if the private key satisfies the rules of the curve secp256k1.
276 * @param {Buffer} privateKey
277 * @return {Boolean}
278 */
279exports.isValidPrivate = function (privateKey) {
280 return secp256k1.privateKeyVerify(privateKey)
281}
282
283/**
284 * Checks if the public key satisfies the rules of the curve secp256k1
285 * and the requirements of Ethereum.
286 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
287 * @param {Boolean} [sanitize=false] Accept public keys in other formats
288 * @return {Boolean}
289 */
290exports.isValidPublic = function (publicKey, sanitize) {
291 if (publicKey.length === 64) {
292 // Convert to SEC1 for secp256k1
293 return secp256k1.publicKeyVerify(Buffer.concat([ Buffer.from([4]), publicKey ]))
294 }
295
296 if (!sanitize) {
297 return false
298 }
299
300 return secp256k1.publicKeyVerify(publicKey)
301}
302
303/**
304 * Returns the ethereum address of a given public key.
305 * Accepts "Ethereum public keys" and SEC1 encoded keys.
306 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
307 * @param {Boolean} [sanitize=false] Accept public keys in other formats
308 * @return {Buffer}
309 */
310exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
311 pubKey = exports.toBuffer(pubKey)
312 if (sanitize && (pubKey.length !== 64)) {
313 pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1)
314 }
315 assert(pubKey.length === 64)
316 // Only take the lower 160bits of the hash
317 return exports.keccak(pubKey).slice(-20)
318}
319
320/**
321 * Returns the ethereum public key of a given private key
322 * @param {Buffer} privateKey A private key must be 256 bits wide
323 * @return {Buffer}
324 */
325const privateToPublic = exports.privateToPublic = function (privateKey) {
326 privateKey = exports.toBuffer(privateKey)
327 // skip the type flag and use the X, Y points
328 return secp256k1.publicKeyCreate(privateKey, false).slice(1)
329}
330
331/**
332 * Converts a public key to the Ethereum format.
333 * @param {Buffer} publicKey
334 * @return {Buffer}
335 */
336exports.importPublic = function (publicKey) {
337 publicKey = exports.toBuffer(publicKey)
338 if (publicKey.length !== 64) {
339 publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1)
340 }
341 return publicKey
342}
343
344/**
345 * ECDSA sign
346 * @param {Buffer} msgHash
347 * @param {Buffer} privateKey
348 * @param {Number} [chainId]
349 * @return {Object}
350 */
351exports.ecsign = function (msgHash, privateKey, chainId) {
352 const sig = secp256k1.sign(msgHash, privateKey)
353
354 const ret = {}
355 ret.r = sig.signature.slice(0, 32)
356 ret.s = sig.signature.slice(32, 64)
357 ret.v = chainId ? sig.recovery + (chainId * 2 + 35) : sig.recovery + 27
358 return ret
359}
360
361/**
362 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
363 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
364 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
365 * used to produce the signature.
366 * @param message
367 * @returns {Buffer} hash
368 */
369exports.hashPersonalMessage = function (message) {
370 const prefix = exports.toBuffer('\u0019Ethereum Signed Message:\n' + message.length.toString())
371 return exports.keccak(Buffer.concat([prefix, message]))
372}
373
374/**
375 * ECDSA public key recovery from signature
376 * @param {Buffer} msgHash
377 * @param {Number} v
378 * @param {Buffer} r
379 * @param {Buffer} s
380 * @param {Number} [chainId]
381 * @return {Buffer} publicKey
382 */
383exports.ecrecover = function (msgHash, v, r, s, chainId) {
384 const signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64)
385 const recovery = calculateSigRecovery(v, chainId)
386 if (!isValidSigRecovery(recovery)) {
387 throw new Error('Invalid signature v value')
388 }
389 const senderPubKey = secp256k1.recover(msgHash, signature, recovery)
390 return secp256k1.publicKeyConvert(senderPubKey, false).slice(1)
391}
392
393/**
394 * Convert signature parameters into the format of `eth_sign` RPC method
395 * @param {Number} v
396 * @param {Buffer} r
397 * @param {Buffer} s
398 * @param {Number} [chainId]
399 * @return {String} sig
400 */
401exports.toRpcSig = function (v, r, s, chainId) {
402 let recovery = calculateSigRecovery(v, chainId)
403 if (!isValidSigRecovery(recovery)) {
404 throw new Error('Invalid signature v value')
405 }
406
407 // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
408 return exports.bufferToHex(Buffer.concat([
409 exports.setLengthLeft(r, 32),
410 exports.setLengthLeft(s, 32),
411 exports.toBuffer(v)
412 ]))
413}
414
415/**
416 * Convert signature format of the `eth_sign` RPC method to signature parameters
417 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
418 * @param {String} sig
419 * @return {Object}
420 */
421exports.fromRpcSig = function (sig) {
422 sig = exports.toBuffer(sig)
423
424 // NOTE: with potential introduction of chainId this might need to be updated
425 if (sig.length !== 65) {
426 throw new Error('Invalid signature length')
427 }
428
429 let v = sig[64]
430 // support both versions of `eth_sign` responses
431 if (v < 27) {
432 v += 27
433 }
434
435 return {
436 v: v,
437 r: sig.slice(0, 32),
438 s: sig.slice(32, 64)
439 }
440}
441
442/**
443 * Returns the ethereum address of a given private key
444 * @param {Buffer} privateKey A private key must be 256 bits wide
445 * @return {Buffer}
446 */
447exports.privateToAddress = function (privateKey) {
448 return exports.publicToAddress(privateToPublic(privateKey))
449}
450
451/**
452 * Checks if the address is a valid. Accepts checksummed addresses too
453 * @param {String} address
454 * @return {Boolean}
455 */
456exports.isValidAddress = function (address) {
457 return /^0x[0-9a-fA-F]{40}$/.test(address)
458}
459
460/**
461 * Checks if a given address is a zero address
462 * @method isZeroAddress
463 * @param {String} address
464 * @return {Boolean}
465 */
466exports.isZeroAddress = function (address) {
467 const zeroAddress = exports.zeroAddress()
468 return zeroAddress === exports.addHexPrefix(address)
469}
470
471/**
472 * Returns a checksummed address
473 * @param {String} address
474 * @return {String}
475 */
476exports.toChecksumAddress = function (address) {
477 address = exports.stripHexPrefix(address).toLowerCase()
478 const hash = exports.keccak(address).toString('hex')
479 let ret = '0x'
480
481 for (let i = 0; i < address.length; i++) {
482 if (parseInt(hash[i], 16) >= 8) {
483 ret += address[i].toUpperCase()
484 } else {
485 ret += address[i]
486 }
487 }
488
489 return ret
490}
491
492/**
493 * Checks if the address is a valid checksummed address
494 * @param {Buffer} address
495 * @return {Boolean}
496 */
497exports.isValidChecksumAddress = function (address) {
498 return exports.isValidAddress(address) && (exports.toChecksumAddress(address) === address)
499}
500
501/**
502 * Generates an address of a newly created contract
503 * @param {Buffer} from the address which is creating this new address
504 * @param {Buffer} nonce the nonce of the from account
505 * @return {Buffer}
506 */
507exports.generateAddress = function (from, nonce) {
508 from = exports.toBuffer(from)
509 nonce = new BN(nonce)
510
511 if (nonce.isZero()) {
512 // in RLP we want to encode null in the case of zero nonce
513 // read the RLP documentation for an answer if you dare
514 nonce = null
515 } else {
516 nonce = Buffer.from(nonce.toArray())
517 }
518
519 // Only take the lower 160bits of the hash
520 return exports.rlphash([from, nonce]).slice(-20)
521}
522
523/**
524 * Generates an address for a contract created using CREATE2
525 * @param {Buffer} from the address which is creating this new address
526 * @param {Buffer} salt a salt
527 * @param {Buffer} initCode the init code of the contract being created
528 * @return {Buffer}
529 */
530exports.generateAddress2 = function (from, salt, initCode) {
531 from = exports.toBuffer(from)
532 salt = exports.toBuffer(salt)
533 initCode = exports.toBuffer(initCode)
534
535 assert(from.length === 20)
536 assert(salt.length === 32)
537
538 let address = exports.keccak256(Buffer.concat([
539 Buffer.from('ff', 'hex'),
540 from,
541 salt,
542 exports.keccak256(initCode)
543 ]))
544
545 return address.slice(-20)
546}
547
548/**
549 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
550 * @param {Buffer|String} address
551 * @return {Boolean}
552 */
553exports.isPrecompiled = function (address) {
554 const a = exports.unpad(address)
555 return a.length === 1 && a[0] >= 1 && a[0] <= 8
556}
557
558/**
559 * Adds "0x" to a given `String` if it does not already start with "0x"
560 * @param {String} str
561 * @return {String}
562 */
563exports.addHexPrefix = function (str) {
564 if (typeof str !== 'string') {
565 return str
566 }
567
568 return exports.isHexPrefixed(str) ? str : '0x' + str
569}
570
571/**
572 * Validate ECDSA signature
573 * @method isValidSignature
574 * @param {Buffer} v
575 * @param {Buffer} r
576 * @param {Buffer} s
577 * @param {Boolean} [homestead=true]
578 * @param {Number} [chainId]
579 * @return {Boolean}
580 */
581
582exports.isValidSignature = function (v, r, s, homestead, chainId) {
583 const SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16)
584 const SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16)
585
586 if (r.length !== 32 || s.length !== 32) {
587 return false
588 }
589
590 if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
591 return false
592 }
593
594 r = new BN(r)
595 s = new BN(s)
596
597 if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
598 return false
599 }
600
601 if ((homestead === false) && (new BN(s).cmp(SECP256K1_N_DIV_2) === 1)) {
602 return false
603 }
604
605 return true
606}
607
608/**
609 * Converts a `Buffer` or `Array` to JSON
610 * @param {Buffer|Array} ba
611 * @return {Array|String|null}
612 */
613exports.baToJSON = function (ba) {
614 if (Buffer.isBuffer(ba)) {
615 return '0x' + ba.toString('hex')
616 } else if (ba instanceof Array) {
617 const array = []
618 for (let i = 0; i < ba.length; i++) {
619 array.push(exports.baToJSON(ba[i]))
620 }
621 return array
622 }
623}
624
625/**
626 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
627 * @param {Object} self the `Object` to define properties on
628 * @param {Array} fields an array fields to define. Fields can contain:
629 * * `name` - the name of the properties
630 * * `length` - the number of bytes the field can have
631 * * `allowLess` - if the field can be less than the length
632 * * `allowEmpty`
633 * @param {*} data data to be validated against the definitions
634 */
635exports.defineProperties = function (self, fields, data) {
636 self.raw = []
637 self._fields = []
638
639 // attach the `toJSON`
640 self.toJSON = function (label) {
641 if (label) {
642 const obj = {}
643 self._fields.forEach((field) => {
644 obj[field] = '0x' + self[field].toString('hex')
645 })
646 return obj
647 }
648 return exports.baToJSON(this.raw)
649 }
650
651 self.serialize = function serialize () {
652 return rlp.encode(self.raw)
653 }
654
655 fields.forEach((field, i) => {
656 self._fields.push(field.name)
657 function getter () {
658 return self.raw[i]
659 }
660 function setter (v) {
661 v = exports.toBuffer(v)
662
663 if (v.toString('hex') === '00' && !field.allowZero) {
664 v = Buffer.allocUnsafe(0)
665 }
666
667 if (field.allowLess && field.length) {
668 v = exports.stripZeros(v)
669 assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes')
670 } else if (!(field.allowZero && v.length === 0) && field.length) {
671 assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length)
672 }
673
674 self.raw[i] = v
675 }
676
677 Object.defineProperty(self, field.name, {
678 enumerable: true,
679 configurable: true,
680 get: getter,
681 set: setter
682 })
683
684 if (field.default) {
685 self[field.name] = field.default
686 }
687
688 // attach alias
689 if (field.alias) {
690 Object.defineProperty(self, field.alias, {
691 enumerable: false,
692 configurable: true,
693 set: setter,
694 get: getter
695 })
696 }
697 })
698
699 // if the constuctor is passed data
700 if (data) {
701 if (typeof data === 'string') {
702 data = Buffer.from(exports.stripHexPrefix(data), 'hex')
703 }
704
705 if (Buffer.isBuffer(data)) {
706 data = rlp.decode(data)
707 }
708
709 if (Array.isArray(data)) {
710 if (data.length > self._fields.length) {
711 throw (new Error('wrong number of fields in data'))
712 }
713
714 // make sure all the items are buffers
715 data.forEach((d, i) => {
716 self[self._fields[i]] = exports.toBuffer(d)
717 })
718 } else if (typeof data === 'object') {
719 const keys = Object.keys(data)
720 fields.forEach((field) => {
721 if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name]
722 if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias]
723 })
724 } else {
725 throw new Error('invalid data')
726 }
727 }
728}
729
730function calculateSigRecovery (v, chainId) {
731 return chainId ? v - (2 * chainId + 35) : v - 27
732}
733
734function isValidSigRecovery (recovery) {
735 return recovery === 0 || recovery === 1
736}
diff --git a/libs/ethereumjs-util/package.json b/libs/ethereumjs-util/package.json
new file mode 100644
index 0000000..a49746f
--- /dev/null
+++ b/libs/ethereumjs-util/package.json
@@ -0,0 +1,125 @@
1{
2 "name": "ethereumjs-util",
3 "version": "6.0.0",
4 "description": "a collection of utility functions for Ethereum",
5 "main": "dist/index.js",
6 "files": [
7 "dist"
8 ],
9 "scripts": {
10 "build": "browserify index.js -s ethUtil -o /tmp/ethereumjs-util.js",
11 "coverage": "npm run build:dist && istanbul cover _mocha",
12 "coveralls": "npm run coverage && coveralls <coverage/lcov.info",
13 "lint": "standard",
14 "prepublishOnly": "npm run test && npm run build:dist",
15 "test": "npm run lint && npm run test:node && npm run test:browser",
16 "test:browser": "npm run build:dist && karma start karma.conf.js",
17 "test:node": "npm run build:dist && istanbul test mocha -- --reporter spec",
18 "build:dist": "babel index.js --source-root ./ -d ./dist",
19 "build:docs": "documentation build ./index.js --github --sort-order='alpha' -f md > ./docs/index.md"
20 },
21 "repository": {
22 "type": "git",
23 "url": "https://github.com/ethereumjs/ethereumjs-util.git"
24 },
25 "keywords": [
26 "ethereum",
27 "utilties"
28 ],
29 "author": "mjbecze <mjbecze@gmail.com>",
30 "contributors": [
31 {
32 "name": "Tim Coulter",
33 "email": "tim@timothyjcoulter.com",
34 "url": "https://github.com/tcoulter",
35 "contributions": 1,
36 "additions": 2,
37 "deletions": 2
38 },
39 {
40 "name": "Nick Dodson",
41 "url": "https://github.com/SilentCicero",
42 "contributions": 2,
43 "additions": 26,
44 "deletions": 2
45 },
46 {
47 "name": "Mr. Chico",
48 "url": "https://github.com/MrChico",
49 "contributions": 1,
50 "additions": 11,
51 "deletions": 1
52 },
53 {
54 "name": "Dũng Trần",
55 "email": "tad88.dev@gmail.com",
56 "url": "https://github.com/tad88dev",
57 "contributions": 2,
58 "additions": 5,
59 "deletions": 5
60 },
61 {
62 "name": "Alex Beregszaszi",
63 "email": "alex@rtfs.hu",
64 "url": "https://github.com/axic",
65 "contributions": 77,
66 "additions": 1796,
67 "deletions": 642
68 },
69 {
70 "name": "Taylor Gerring",
71 "url": "https://github.com/tgerring",
72 "contributions": 1,
73 "additions": 1,
74 "deletions": 1
75 },
76 {
77 "name": "Kirill Fomichev",
78 "email": "fanatid@ya.ru",
79 "url": "https://github.com/fanatid",
80 "contributions": 8,
81 "additions": 32,
82 "deletions": 16
83 },
84 {
85 "name": "kumavis",
86 "email": "aaron@kumavis.me",
87 "url": "https://github.com/kumavis",
88 "contributions": 2,
89 "additions": 2,
90 "deletions": 2
91 },
92 {
93 "name": "Alexander Sinyagin",
94 "email": "sinyagin.alexander@gmail.com",
95 "url": "https://github.com/asinyagin",
96 "contributions": 1,
97 "additions": 3,
98 "deletions": 1
99 }
100 ],
101 "license": "MPL-2.0",
102 "bugs": {
103 "url": "https://github.com/ethereumjs/ethereumjs-util/issues"
104 },
105 "homepage": "https://github.com/ethereumjs/ethereumjs-util",
106 "dependencies": {
107 "bn.js": "^4.11.0",
108 "create-hash": "^1.1.2",
109 "ethjs-util": "^0.1.6",
110 "keccak": "^1.0.2",
111 "rlp": "^2.0.0",
112 "safe-buffer": "^5.1.1",
113 "secp256k1": "^3.0.1"
114 },
115 "devDependencies": {},
116 "standard": {
117 "globals": [
118 "describe",
119 "it"
120 ],
121 "ignore": [
122 "dist/**"
123 ]
124 }
125}
diff --git a/libs/ethereumjs-util/readme.md b/libs/ethereumjs-util/readme.md
new file mode 100644
index 0000000..2cc717a
--- /dev/null
+++ b/libs/ethereumjs-util/readme.md
@@ -0,0 +1,4 @@
1Build (will create a bundle and copy it to /tmp/ethereumjs-util.js):
2
3 npm install
4 npm run build
diff --git a/libs/stellar-util/package-lock.json b/libs/stellar-util/package-lock.json
new file mode 100644
index 0000000..5c428ee
--- /dev/null
+++ b/libs/stellar-util/package-lock.json
@@ -0,0 +1,1389 @@
1{
2 "name": "stellar-util",
3 "version": "0.0.1",
4 "lockfileVersion": 1,
5 "requires": true,
6 "dependencies": {
7 "JSONStream": {
8 "version": "1.3.5",
9 "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
10 "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
11 "dev": true,
12 "requires": {
13 "jsonparse": "^1.2.0",
14 "through": ">=2.2.7 <3"
15 }
16 },
17 "acorn": {
18 "version": "6.0.4",
19 "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz",
20 "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==",
21 "dev": true
22 },
23 "acorn-dynamic-import": {
24 "version": "4.0.0",
25 "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
26 "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==",
27 "dev": true
28 },
29 "acorn-node": {
30 "version": "1.6.2",
31 "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz",
32 "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==",
33 "dev": true,
34 "requires": {
35 "acorn": "^6.0.2",
36 "acorn-dynamic-import": "^4.0.0",
37 "acorn-walk": "^6.1.0",
38 "xtend": "^4.0.1"
39 }
40 },
41 "acorn-walk": {
42 "version": "6.1.1",
43 "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz",
44 "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==",
45 "dev": true
46 },
47 "array-filter": {
48 "version": "0.0.1",
49 "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
50 "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
51 "dev": true
52 },
53 "array-map": {
54 "version": "0.0.0",
55 "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
56 "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
57 "dev": true
58 },
59 "array-reduce": {
60 "version": "0.0.0",
61 "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
62 "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
63 "dev": true
64 },
65 "asn1.js": {
66 "version": "4.10.1",
67 "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
68 "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
69 "dev": true,
70 "requires": {
71 "bn.js": "^4.0.0",
72 "inherits": "^2.0.1",
73 "minimalistic-assert": "^1.0.0"
74 }
75 },
76 "assert": {
77 "version": "1.4.1",
78 "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
79 "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
80 "dev": true,
81 "requires": {
82 "util": "0.10.3"
83 },
84 "dependencies": {
85 "inherits": {
86 "version": "2.0.1",
87 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
88 "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
89 "dev": true
90 },
91 "util": {
92 "version": "0.10.3",
93 "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
94 "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
95 "dev": true,
96 "requires": {
97 "inherits": "2.0.1"
98 }
99 }
100 }
101 },
102 "balanced-match": {
103 "version": "1.0.0",
104 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
105 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
106 "dev": true
107 },
108 "base32.js": {
109 "version": "0.1.0",
110 "resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.1.0.tgz",
111 "integrity": "sha1-tYLexpPC8R6JPPBk7mrFthMaIgI="
112 },
113 "base64-js": {
114 "version": "1.3.0",
115 "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
116 "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
117 "dev": true
118 },
119 "bignumber.js": {
120 "version": "4.1.0",
121 "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz",
122 "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA=="
123 },
124 "bindings": {
125 "version": "1.3.1",
126 "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz",
127 "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==",
128 "optional": true
129 },
130 "bip39": {
131 "version": "2.5.0",
132 "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz",
133 "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==",
134 "requires": {
135 "create-hash": "^1.1.0",
136 "pbkdf2": "^3.0.9",
137 "randombytes": "^2.0.1",
138 "safe-buffer": "^5.0.1",
139 "unorm": "^1.3.3"
140 }
141 },
142 "bn.js": {
143 "version": "4.11.8",
144 "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
145 "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
146 "dev": true
147 },
148 "brace-expansion": {
149 "version": "1.1.11",
150 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
151 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
152 "dev": true,
153 "requires": {
154 "balanced-match": "^1.0.0",
155 "concat-map": "0.0.1"
156 }
157 },
158 "brorand": {
159 "version": "1.1.0",
160 "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
161 "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
162 "dev": true
163 },
164 "browser-pack": {
165 "version": "6.1.0",
166 "resolved": "http://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz",
167 "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==",
168 "dev": true,
169 "requires": {
170 "JSONStream": "^1.0.3",
171 "combine-source-map": "~0.8.0",
172 "defined": "^1.0.0",
173 "safe-buffer": "^5.1.1",
174 "through2": "^2.0.0",
175 "umd": "^3.0.0"
176 }
177 },
178 "browser-resolve": {
179 "version": "1.11.3",
180 "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
181 "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
182 "dev": true,
183 "requires": {
184 "resolve": "1.1.7"
185 },
186 "dependencies": {
187 "resolve": {
188 "version": "1.1.7",
189 "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
190 "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
191 "dev": true
192 }
193 }
194 },
195 "browserify": {
196 "version": "16.2.3",
197 "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz",
198 "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==",
199 "dev": true,
200 "requires": {
201 "JSONStream": "^1.0.3",
202 "assert": "^1.4.0",
203 "browser-pack": "^6.0.1",
204 "browser-resolve": "^1.11.0",
205 "browserify-zlib": "~0.2.0",
206 "buffer": "^5.0.2",
207 "cached-path-relative": "^1.0.0",
208 "concat-stream": "^1.6.0",
209 "console-browserify": "^1.1.0",
210 "constants-browserify": "~1.0.0",
211 "crypto-browserify": "^3.0.0",
212 "defined": "^1.0.0",
213 "deps-sort": "^2.0.0",
214 "domain-browser": "^1.2.0",
215 "duplexer2": "~0.1.2",
216 "events": "^2.0.0",
217 "glob": "^7.1.0",
218 "has": "^1.0.0",
219 "htmlescape": "^1.1.0",
220 "https-browserify": "^1.0.0",
221 "inherits": "~2.0.1",
222 "insert-module-globals": "^7.0.0",
223 "labeled-stream-splicer": "^2.0.0",
224 "mkdirp": "^0.5.0",
225 "module-deps": "^6.0.0",
226 "os-browserify": "~0.3.0",
227 "parents": "^1.0.1",
228 "path-browserify": "~0.0.0",
229 "process": "~0.11.0",
230 "punycode": "^1.3.2",
231 "querystring-es3": "~0.2.0",
232 "read-only-stream": "^2.0.0",
233 "readable-stream": "^2.0.2",
234 "resolve": "^1.1.4",
235 "shasum": "^1.0.0",
236 "shell-quote": "^1.6.1",
237 "stream-browserify": "^2.0.0",
238 "stream-http": "^2.0.0",
239 "string_decoder": "^1.1.1",
240 "subarg": "^1.0.0",
241 "syntax-error": "^1.1.1",
242 "through2": "^2.0.0",
243 "timers-browserify": "^1.0.1",
244 "tty-browserify": "0.0.1",
245 "url": "~0.11.0",
246 "util": "~0.10.1",
247 "vm-browserify": "^1.0.0",
248 "xtend": "^4.0.0"
249 }
250 },
251 "browserify-aes": {
252 "version": "1.2.0",
253 "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
254 "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
255 "dev": true,
256 "requires": {
257 "buffer-xor": "^1.0.3",
258 "cipher-base": "^1.0.0",
259 "create-hash": "^1.1.0",
260 "evp_bytestokey": "^1.0.3",
261 "inherits": "^2.0.1",
262 "safe-buffer": "^5.0.1"
263 }
264 },
265 "browserify-cipher": {
266 "version": "1.0.1",
267 "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
268 "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
269 "dev": true,
270 "requires": {
271 "browserify-aes": "^1.0.4",
272 "browserify-des": "^1.0.0",
273 "evp_bytestokey": "^1.0.0"
274 }
275 },
276 "browserify-des": {
277 "version": "1.0.2",
278 "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
279 "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
280 "dev": true,
281 "requires": {
282 "cipher-base": "^1.0.1",
283 "des.js": "^1.0.0",
284 "inherits": "^2.0.1",
285 "safe-buffer": "^5.1.2"
286 }
287 },
288 "browserify-rsa": {
289 "version": "4.0.1",
290 "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
291 "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
292 "dev": true,
293 "requires": {
294 "bn.js": "^4.1.0",
295 "randombytes": "^2.0.1"
296 }
297 },
298 "browserify-sign": {
299 "version": "4.0.4",
300 "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
301 "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
302 "dev": true,
303 "requires": {
304 "bn.js": "^4.1.1",
305 "browserify-rsa": "^4.0.0",
306 "create-hash": "^1.1.0",
307 "create-hmac": "^1.1.2",
308 "elliptic": "^6.0.0",
309 "inherits": "^2.0.1",
310 "parse-asn1": "^5.0.0"
311 }
312 },
313 "browserify-zlib": {
314 "version": "0.2.0",
315 "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
316 "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
317 "dev": true,
318 "requires": {
319 "pako": "~1.0.5"
320 }
321 },
322 "buffer": {
323 "version": "5.2.1",
324 "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
325 "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
326 "dev": true,
327 "requires": {
328 "base64-js": "^1.0.2",
329 "ieee754": "^1.1.4"
330 }
331 },
332 "buffer-from": {
333 "version": "1.1.1",
334 "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
335 "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
336 "dev": true
337 },
338 "buffer-xor": {
339 "version": "1.0.3",
340 "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
341 "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
342 "dev": true
343 },
344 "builtin-status-codes": {
345 "version": "3.0.0",
346 "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
347 "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
348 "dev": true
349 },
350 "cached-path-relative": {
351 "version": "1.0.2",
352 "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz",
353 "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==",
354 "dev": true
355 },
356 "cipher-base": {
357 "version": "1.0.4",
358 "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
359 "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
360 "requires": {
361 "inherits": "^2.0.1",
362 "safe-buffer": "^5.0.1"
363 }
364 },
365 "combine-source-map": {
366 "version": "0.8.0",
367 "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
368 "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
369 "dev": true,
370 "requires": {
371 "convert-source-map": "~1.1.0",
372 "inline-source-map": "~0.6.0",
373 "lodash.memoize": "~3.0.3",
374 "source-map": "~0.5.3"
375 }
376 },
377 "commander": {
378 "version": "2.13.0",
379 "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
380 "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==",
381 "dev": true
382 },
383 "concat-map": {
384 "version": "0.0.1",
385 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
386 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
387 "dev": true
388 },
389 "concat-stream": {
390 "version": "1.6.2",
391 "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
392 "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
393 "dev": true,
394 "requires": {
395 "buffer-from": "^1.0.0",
396 "inherits": "^2.0.3",
397 "readable-stream": "^2.2.2",
398 "typedarray": "^0.0.6"
399 }
400 },
401 "console-browserify": {
402 "version": "1.1.0",
403 "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
404 "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
405 "dev": true,
406 "requires": {
407 "date-now": "^0.1.4"
408 }
409 },
410 "constants-browserify": {
411 "version": "1.0.0",
412 "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
413 "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
414 "dev": true
415 },
416 "convert-source-map": {
417 "version": "1.1.3",
418 "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
419 "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
420 "dev": true
421 },
422 "core-util-is": {
423 "version": "1.0.2",
424 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
425 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
426 "dev": true
427 },
428 "crc": {
429 "version": "3.5.0",
430 "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz",
431 "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ="
432 },
433 "create-ecdh": {
434 "version": "4.0.3",
435 "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
436 "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
437 "dev": true,
438 "requires": {
439 "bn.js": "^4.1.0",
440 "elliptic": "^6.0.0"
441 }
442 },
443 "create-hash": {
444 "version": "1.2.0",
445 "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
446 "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
447 "requires": {
448 "cipher-base": "^1.0.1",
449 "inherits": "^2.0.1",
450 "md5.js": "^1.3.4",
451 "ripemd160": "^2.0.1",
452 "sha.js": "^2.4.0"
453 }
454 },
455 "create-hmac": {
456 "version": "1.1.7",
457 "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
458 "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
459 "requires": {
460 "cipher-base": "^1.0.3",
461 "create-hash": "^1.1.0",
462 "inherits": "^2.0.1",
463 "ripemd160": "^2.0.0",
464 "safe-buffer": "^5.0.1",
465 "sha.js": "^2.4.8"
466 }
467 },
468 "crypto-browserify": {
469 "version": "3.12.0",
470 "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
471 "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
472 "dev": true,
473 "requires": {
474 "browserify-cipher": "^1.0.0",
475 "browserify-sign": "^4.0.0",
476 "create-ecdh": "^4.0.0",
477 "create-hash": "^1.1.0",
478 "create-hmac": "^1.1.0",
479 "diffie-hellman": "^5.0.0",
480 "inherits": "^2.0.1",
481 "pbkdf2": "^3.0.3",
482 "public-encrypt": "^4.0.0",
483 "randombytes": "^2.0.0",
484 "randomfill": "^1.0.3"
485 }
486 },
487 "cursor": {
488 "version": "0.1.5",
489 "resolved": "https://registry.npmjs.org/cursor/-/cursor-0.1.5.tgz",
490 "integrity": "sha1-6neMKwnTPC5WT9khRwdnUEg+uyw="
491 },
492 "date-now": {
493 "version": "0.1.4",
494 "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
495 "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
496 "dev": true
497 },
498 "defined": {
499 "version": "1.0.0",
500 "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
501 "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
502 "dev": true
503 },
504 "deps-sort": {
505 "version": "2.0.0",
506 "resolved": "http://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz",
507 "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=",
508 "dev": true,
509 "requires": {
510 "JSONStream": "^1.0.3",
511 "shasum": "^1.0.0",
512 "subarg": "^1.0.0",
513 "through2": "^2.0.0"
514 }
515 },
516 "des.js": {
517 "version": "1.0.0",
518 "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
519 "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
520 "dev": true,
521 "requires": {
522 "inherits": "^2.0.1",
523 "minimalistic-assert": "^1.0.0"
524 }
525 },
526 "detective": {
527 "version": "5.1.0",
528 "resolved": "http://registry.npmjs.org/detective/-/detective-5.1.0.tgz",
529 "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==",
530 "dev": true,
531 "requires": {
532 "acorn-node": "^1.3.0",
533 "defined": "^1.0.0",
534 "minimist": "^1.1.1"
535 }
536 },
537 "diffie-hellman": {
538 "version": "5.0.3",
539 "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
540 "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
541 "dev": true,
542 "requires": {
543 "bn.js": "^4.1.0",
544 "miller-rabin": "^4.0.0",
545 "randombytes": "^2.0.0"
546 }
547 },
548 "domain-browser": {
549 "version": "1.2.0",
550 "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
551 "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
552 "dev": true
553 },
554 "duplexer2": {
555 "version": "0.1.4",
556 "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
557 "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
558 "dev": true,
559 "requires": {
560 "readable-stream": "^2.0.2"
561 }
562 },
563 "ed25519": {
564 "version": "0.0.4",
565 "resolved": "https://registry.npmjs.org/ed25519/-/ed25519-0.0.4.tgz",
566 "integrity": "sha1-5WIYrOL8kD0llZOu8LKpY59HW+s=",
567 "optional": true,
568 "requires": {
569 "bindings": "^1.2.1",
570 "nan": "^2.0.9"
571 }
572 },
573 "ed25519-hd-key": {
574 "version": "1.0.0",
575 "resolved": "https://registry.npmjs.org/ed25519-hd-key/-/ed25519-hd-key-1.0.0.tgz",
576 "integrity": "sha512-PbL2RemtcV6UzhJv9lCAFraa3V/M8mxlRJlJeqpaRDtFaHObt43x6nIm8/NMc0Wc70NHee4K9x4V9H5T+MM69Q==",
577 "requires": {
578 "bip39": "^2.4.0",
579 "create-hmac": "^1.1.6",
580 "js-nacl": "^1.2.2"
581 }
582 },
583 "elliptic": {
584 "version": "6.4.1",
585 "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
586 "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",
587 "dev": true,
588 "requires": {
589 "bn.js": "^4.4.0",
590 "brorand": "^1.0.1",
591 "hash.js": "^1.0.0",
592 "hmac-drbg": "^1.0.0",
593 "inherits": "^2.0.1",
594 "minimalistic-assert": "^1.0.0",
595 "minimalistic-crypto-utils": "^1.0.0"
596 }
597 },
598 "events": {
599 "version": "2.1.0",
600 "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz",
601 "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==",
602 "dev": true
603 },
604 "evp_bytestokey": {
605 "version": "1.0.3",
606 "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
607 "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
608 "dev": true,
609 "requires": {
610 "md5.js": "^1.3.4",
611 "safe-buffer": "^5.1.1"
612 }
613 },
614 "fs.realpath": {
615 "version": "1.0.0",
616 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
617 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
618 "dev": true
619 },
620 "function-bind": {
621 "version": "1.1.1",
622 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
623 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
624 "dev": true
625 },
626 "get-assigned-identifiers": {
627 "version": "1.2.0",
628 "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz",
629 "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==",
630 "dev": true
631 },
632 "glob": {
633 "version": "7.1.3",
634 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
635 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
636 "dev": true,
637 "requires": {
638 "fs.realpath": "^1.0.0",
639 "inflight": "^1.0.4",
640 "inherits": "2",
641 "minimatch": "^3.0.4",
642 "once": "^1.3.0",
643 "path-is-absolute": "^1.0.0"
644 }
645 },
646 "has": {
647 "version": "1.0.3",
648 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
649 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
650 "dev": true,
651 "requires": {
652 "function-bind": "^1.1.1"
653 }
654 },
655 "hash-base": {
656 "version": "3.0.4",
657 "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
658 "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
659 "requires": {
660 "inherits": "^2.0.1",
661 "safe-buffer": "^5.0.1"
662 }
663 },
664 "hash.js": {
665 "version": "1.1.7",
666 "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
667 "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
668 "dev": true,
669 "requires": {
670 "inherits": "^2.0.3",
671 "minimalistic-assert": "^1.0.1"
672 }
673 },
674 "hmac-drbg": {
675 "version": "1.0.1",
676 "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
677 "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
678 "dev": true,
679 "requires": {
680 "hash.js": "^1.0.3",
681 "minimalistic-assert": "^1.0.0",
682 "minimalistic-crypto-utils": "^1.0.1"
683 }
684 },
685 "htmlescape": {
686 "version": "1.1.1",
687 "resolved": "http://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
688 "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
689 "dev": true
690 },
691 "https-browserify": {
692 "version": "1.0.0",
693 "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
694 "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
695 "dev": true
696 },
697 "ieee754": {
698 "version": "1.1.12",
699 "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
700 "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
701 "dev": true
702 },
703 "inflight": {
704 "version": "1.0.6",
705 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
706 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
707 "dev": true,
708 "requires": {
709 "once": "^1.3.0",
710 "wrappy": "1"
711 }
712 },
713 "inherits": {
714 "version": "2.0.3",
715 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
716 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
717 },
718 "inline-source-map": {
719 "version": "0.6.2",
720 "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
721 "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
722 "dev": true,
723 "requires": {
724 "source-map": "~0.5.3"
725 }
726 },
727 "insert-module-globals": {
728 "version": "7.2.0",
729 "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz",
730 "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==",
731 "dev": true,
732 "requires": {
733 "JSONStream": "^1.0.3",
734 "acorn-node": "^1.5.2",
735 "combine-source-map": "^0.8.0",
736 "concat-stream": "^1.6.1",
737 "is-buffer": "^1.1.0",
738 "path-is-absolute": "^1.0.1",
739 "process": "~0.11.0",
740 "through2": "^2.0.0",
741 "undeclared-identifiers": "^1.1.2",
742 "xtend": "^4.0.0"
743 }
744 },
745 "is-buffer": {
746 "version": "1.1.6",
747 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
748 "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
749 "dev": true
750 },
751 "isarray": {
752 "version": "1.0.0",
753 "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
754 "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
755 "dev": true
756 },
757 "js-nacl": {
758 "version": "1.3.2",
759 "resolved": "https://registry.npmjs.org/js-nacl/-/js-nacl-1.3.2.tgz",
760 "integrity": "sha512-XEV2slQ60lLhtL8X+PfFYFfen3b0eg+IU3deWKXKF285nqAf/f24Z15LvlLkVogpAb/9eAxe7o1AtThhKGvQkg=="
761 },
762 "js-xdr": {
763 "version": "1.0.5",
764 "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-1.0.5.tgz",
765 "integrity": "sha512-v0jffMa8bko3uFcGYt1lHrtpd1adhH6qk41RfLPsNPj77/K8fi7LOi4+lUUY3MBEIFnJgaGHrbc6sxdTwHImxQ==",
766 "requires": {
767 "cursor": "^0.1.5",
768 "lodash": "^4.17.5",
769 "long": "^2.2.3"
770 }
771 },
772 "json-stable-stringify": {
773 "version": "0.0.1",
774 "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz",
775 "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=",
776 "dev": true,
777 "requires": {
778 "jsonify": "~0.0.0"
779 }
780 },
781 "jsonify": {
782 "version": "0.0.0",
783 "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
784 "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
785 "dev": true
786 },
787 "jsonparse": {
788 "version": "1.3.1",
789 "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
790 "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
791 "dev": true
792 },
793 "labeled-stream-splicer": {
794 "version": "2.0.1",
795 "resolved": "http://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz",
796 "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==",
797 "dev": true,
798 "requires": {
799 "inherits": "^2.0.1",
800 "isarray": "^2.0.4",
801 "stream-splicer": "^2.0.0"
802 },
803 "dependencies": {
804 "isarray": {
805 "version": "2.0.4",
806 "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz",
807 "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==",
808 "dev": true
809 }
810 }
811 },
812 "lodash": {
813 "version": "4.17.11",
814 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
815 "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
816 },
817 "lodash.memoize": {
818 "version": "3.0.4",
819 "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
820 "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
821 "dev": true
822 },
823 "long": {
824 "version": "2.4.0",
825 "resolved": "https://registry.npmjs.org/long/-/long-2.4.0.tgz",
826 "integrity": "sha1-n6GAux2VAM3CnEFWdmoZleH0Uk8="
827 },
828 "md5.js": {
829 "version": "1.3.5",
830 "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
831 "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
832 "requires": {
833 "hash-base": "^3.0.0",
834 "inherits": "^2.0.1",
835 "safe-buffer": "^5.1.2"
836 }
837 },
838 "miller-rabin": {
839 "version": "4.0.1",
840 "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
841 "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
842 "dev": true,
843 "requires": {
844 "bn.js": "^4.0.0",
845 "brorand": "^1.0.1"
846 }
847 },
848 "minimalistic-assert": {
849 "version": "1.0.1",
850 "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
851 "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
852 "dev": true
853 },
854 "minimalistic-crypto-utils": {
855 "version": "1.0.1",
856 "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
857 "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
858 "dev": true
859 },
860 "minimatch": {
861 "version": "3.0.4",
862 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
863 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
864 "dev": true,
865 "requires": {
866 "brace-expansion": "^1.1.7"
867 }
868 },
869 "minimist": {
870 "version": "1.2.0",
871 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
872 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
873 "dev": true
874 },
875 "mkdirp": {
876 "version": "0.5.1",
877 "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
878 "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
879 "dev": true,
880 "requires": {
881 "minimist": "0.0.8"
882 },
883 "dependencies": {
884 "minimist": {
885 "version": "0.0.8",
886 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
887 "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
888 "dev": true
889 }
890 }
891 },
892 "module-deps": {
893 "version": "6.2.0",
894 "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz",
895 "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==",
896 "dev": true,
897 "requires": {
898 "JSONStream": "^1.0.3",
899 "browser-resolve": "^1.7.0",
900 "cached-path-relative": "^1.0.0",
901 "concat-stream": "~1.6.0",
902 "defined": "^1.0.0",
903 "detective": "^5.0.2",
904 "duplexer2": "^0.1.2",
905 "inherits": "^2.0.1",
906 "parents": "^1.0.0",
907 "readable-stream": "^2.0.2",
908 "resolve": "^1.4.0",
909 "stream-combiner2": "^1.1.1",
910 "subarg": "^1.0.0",
911 "through2": "^2.0.0",
912 "xtend": "^4.0.0"
913 }
914 },
915 "nan": {
916 "version": "2.12.0",
917 "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.0.tgz",
918 "integrity": "sha512-zT5nC0JhbljmyEf+Z456nvm7iO7XgRV2hYxoBtPpnyp+0Q4aCoP6uWNn76v/I6k2kCYNLWqWbwBWQcjsNI/bjw==",
919 "optional": true
920 },
921 "once": {
922 "version": "1.4.0",
923 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
924 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
925 "dev": true,
926 "requires": {
927 "wrappy": "1"
928 }
929 },
930 "os-browserify": {
931 "version": "0.3.0",
932 "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
933 "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
934 "dev": true
935 },
936 "pako": {
937 "version": "1.0.7",
938 "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz",
939 "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==",
940 "dev": true
941 },
942 "parents": {
943 "version": "1.0.1",
944 "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
945 "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
946 "dev": true,
947 "requires": {
948 "path-platform": "~0.11.15"
949 }
950 },
951 "parse-asn1": {
952 "version": "5.1.1",
953 "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz",
954 "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==",
955 "dev": true,
956 "requires": {
957 "asn1.js": "^4.0.0",
958 "browserify-aes": "^1.0.0",
959 "create-hash": "^1.1.0",
960 "evp_bytestokey": "^1.0.0",
961 "pbkdf2": "^3.0.3"
962 }
963 },
964 "path-browserify": {
965 "version": "0.0.1",
966 "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
967 "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
968 "dev": true
969 },
970 "path-is-absolute": {
971 "version": "1.0.1",
972 "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
973 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
974 "dev": true
975 },
976 "path-parse": {
977 "version": "1.0.6",
978 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
979 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
980 "dev": true
981 },
982 "path-platform": {
983 "version": "0.11.15",
984 "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
985 "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
986 "dev": true
987 },
988 "pbkdf2": {
989 "version": "3.0.17",
990 "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
991 "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
992 "requires": {
993 "create-hash": "^1.1.2",
994 "create-hmac": "^1.1.4",
995 "ripemd160": "^2.0.1",
996 "safe-buffer": "^5.0.1",
997 "sha.js": "^2.4.8"
998 }
999 },
1000 "process": {
1001 "version": "0.11.10",
1002 "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
1003 "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
1004 "dev": true
1005 },
1006 "process-nextick-args": {
1007 "version": "2.0.0",
1008 "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
1009 "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
1010 "dev": true
1011 },
1012 "public-encrypt": {
1013 "version": "4.0.3",
1014 "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
1015 "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
1016 "dev": true,
1017 "requires": {
1018 "bn.js": "^4.1.0",
1019 "browserify-rsa": "^4.0.0",
1020 "create-hash": "^1.1.0",
1021 "parse-asn1": "^5.0.0",
1022 "randombytes": "^2.0.1",
1023 "safe-buffer": "^5.1.2"
1024 }
1025 },
1026 "punycode": {
1027 "version": "1.4.1",
1028 "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
1029 "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
1030 "dev": true
1031 },
1032 "querystring": {
1033 "version": "0.2.0",
1034 "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
1035 "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
1036 "dev": true
1037 },
1038 "querystring-es3": {
1039 "version": "0.2.1",
1040 "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
1041 "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
1042 "dev": true
1043 },
1044 "randombytes": {
1045 "version": "2.0.6",
1046 "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz",
1047 "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==",
1048 "requires": {
1049 "safe-buffer": "^5.1.0"
1050 }
1051 },
1052 "randomfill": {
1053 "version": "1.0.4",
1054 "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
1055 "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
1056 "dev": true,
1057 "requires": {
1058 "randombytes": "^2.0.5",
1059 "safe-buffer": "^5.1.0"
1060 }
1061 },
1062 "read-only-stream": {
1063 "version": "2.0.0",
1064 "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
1065 "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
1066 "dev": true,
1067 "requires": {
1068 "readable-stream": "^2.0.2"
1069 }
1070 },
1071 "readable-stream": {
1072 "version": "2.3.6",
1073 "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
1074 "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
1075 "dev": true,
1076 "requires": {
1077 "core-util-is": "~1.0.0",
1078 "inherits": "~2.0.3",
1079 "isarray": "~1.0.0",
1080 "process-nextick-args": "~2.0.0",
1081 "safe-buffer": "~5.1.1",
1082 "string_decoder": "~1.1.1",
1083 "util-deprecate": "~1.0.1"
1084 },
1085 "dependencies": {
1086 "string_decoder": {
1087 "version": "1.1.1",
1088 "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1089 "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1090 "dev": true,
1091 "requires": {
1092 "safe-buffer": "~5.1.0"
1093 }
1094 }
1095 }
1096 },
1097 "resolve": {
1098 "version": "1.8.1",
1099 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
1100 "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
1101 "dev": true,
1102 "requires": {
1103 "path-parse": "^1.0.5"
1104 }
1105 },
1106 "ripemd160": {
1107 "version": "2.0.2",
1108 "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
1109 "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
1110 "requires": {
1111 "hash-base": "^3.0.0",
1112 "inherits": "^2.0.1"
1113 }
1114 },
1115 "safe-buffer": {
1116 "version": "5.1.2",
1117 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1118 "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
1119 },
1120 "sha.js": {
1121 "version": "2.4.11",
1122 "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
1123 "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
1124 "requires": {
1125 "inherits": "^2.0.1",
1126 "safe-buffer": "^5.0.1"
1127 }
1128 },
1129 "shasum": {
1130 "version": "1.0.2",
1131 "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
1132 "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
1133 "dev": true,
1134 "requires": {
1135 "json-stable-stringify": "~0.0.0",
1136 "sha.js": "~2.4.4"
1137 }
1138 },
1139 "shell-quote": {
1140 "version": "1.6.1",
1141 "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz",
1142 "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=",
1143 "dev": true,
1144 "requires": {
1145 "array-filter": "~0.0.0",
1146 "array-map": "~0.0.0",
1147 "array-reduce": "~0.0.0",
1148 "jsonify": "~0.0.0"
1149 }
1150 },
1151 "simple-concat": {
1152 "version": "1.0.0",
1153 "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz",
1154 "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=",
1155 "dev": true
1156 },
1157 "source-map": {
1158 "version": "0.5.7",
1159 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
1160 "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
1161 "dev": true
1162 },
1163 "stellar-base": {
1164 "version": "0.10.0",
1165 "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-0.10.0.tgz",
1166 "integrity": "sha512-PPuVWAc9t63q9eiMrV3czO2Q2ZozcU7dEMJX8Hu8AIVuV4DbDMyGk5a4nzsJajVsSZyq2Tyccv3dqVudKkBZUA==",
1167 "requires": {
1168 "base32.js": "~0.1.0",
1169 "bignumber.js": "^4.0.0",
1170 "crc": "3.5.0",
1171 "ed25519": "0.0.4",
1172 "js-xdr": "^1.0.5",
1173 "lodash": "^4.17.10",
1174 "sha.js": "^2.3.6",
1175 "tweetnacl": "^1.0.0"
1176 }
1177 },
1178 "stream-browserify": {
1179 "version": "2.0.1",
1180 "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
1181 "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
1182 "dev": true,
1183 "requires": {
1184 "inherits": "~2.0.1",
1185 "readable-stream": "^2.0.2"
1186 }
1187 },
1188 "stream-combiner2": {
1189 "version": "1.1.1",
1190 "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
1191 "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
1192 "dev": true,
1193 "requires": {
1194 "duplexer2": "~0.1.0",
1195 "readable-stream": "^2.0.2"
1196 }
1197 },
1198 "stream-http": {
1199 "version": "2.8.3",
1200 "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
1201 "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
1202 "dev": true,
1203 "requires": {
1204 "builtin-status-codes": "^3.0.0",
1205 "inherits": "^2.0.1",
1206 "readable-stream": "^2.3.6",
1207 "to-arraybuffer": "^1.0.0",
1208 "xtend": "^4.0.0"
1209 }
1210 },
1211 "stream-splicer": {
1212 "version": "2.0.0",
1213 "resolved": "http://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz",
1214 "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=",
1215 "dev": true,
1216 "requires": {
1217 "inherits": "^2.0.1",
1218 "readable-stream": "^2.0.2"
1219 }
1220 },
1221 "string_decoder": {
1222 "version": "1.2.0",
1223 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
1224 "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
1225 "dev": true,
1226 "requires": {
1227 "safe-buffer": "~5.1.0"
1228 }
1229 },
1230 "subarg": {
1231 "version": "1.0.0",
1232 "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
1233 "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
1234 "dev": true,
1235 "requires": {
1236 "minimist": "^1.1.0"
1237 }
1238 },
1239 "syntax-error": {
1240 "version": "1.4.0",
1241 "resolved": "http://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz",
1242 "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==",
1243 "dev": true,
1244 "requires": {
1245 "acorn-node": "^1.2.0"
1246 }
1247 },
1248 "through": {
1249 "version": "2.3.8",
1250 "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
1251 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
1252 "dev": true
1253 },
1254 "through2": {
1255 "version": "2.0.5",
1256 "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
1257 "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
1258 "dev": true,
1259 "requires": {
1260 "readable-stream": "~2.3.6",
1261 "xtend": "~4.0.1"
1262 }
1263 },
1264 "timers-browserify": {
1265 "version": "1.4.2",
1266 "resolved": "http://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
1267 "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
1268 "dev": true,
1269 "requires": {
1270 "process": "~0.11.0"
1271 }
1272 },
1273 "to-arraybuffer": {
1274 "version": "1.0.1",
1275 "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
1276 "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
1277 "dev": true
1278 },
1279 "tty-browserify": {
1280 "version": "0.0.1",
1281 "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",
1282 "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==",
1283 "dev": true
1284 },
1285 "tweetnacl": {
1286 "version": "1.0.0",
1287 "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
1288 "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
1289 },
1290 "typedarray": {
1291 "version": "0.0.6",
1292 "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1293 "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
1294 "dev": true
1295 },
1296 "uglify-es": {
1297 "version": "3.3.9",
1298 "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz",
1299 "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==",
1300 "dev": true,
1301 "requires": {
1302 "commander": "~2.13.0",
1303 "source-map": "~0.6.1"
1304 },
1305 "dependencies": {
1306 "source-map": {
1307 "version": "0.6.1",
1308 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
1309 "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
1310 "dev": true
1311 }
1312 }
1313 },
1314 "umd": {
1315 "version": "3.0.3",
1316 "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz",
1317 "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==",
1318 "dev": true
1319 },
1320 "undeclared-identifiers": {
1321 "version": "1.1.2",
1322 "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz",
1323 "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==",
1324 "dev": true,
1325 "requires": {
1326 "acorn-node": "^1.3.0",
1327 "get-assigned-identifiers": "^1.2.0",
1328 "simple-concat": "^1.0.0",
1329 "xtend": "^4.0.1"
1330 }
1331 },
1332 "unorm": {
1333 "version": "1.4.1",
1334 "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz",
1335 "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA="
1336 },
1337 "url": {
1338 "version": "0.11.0",
1339 "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
1340 "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
1341 "dev": true,
1342 "requires": {
1343 "punycode": "1.3.2",
1344 "querystring": "0.2.0"
1345 },
1346 "dependencies": {
1347 "punycode": {
1348 "version": "1.3.2",
1349 "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
1350 "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
1351 "dev": true
1352 }
1353 }
1354 },
1355 "util": {
1356 "version": "0.10.4",
1357 "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
1358 "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
1359 "dev": true,
1360 "requires": {
1361 "inherits": "2.0.3"
1362 }
1363 },
1364 "util-deprecate": {
1365 "version": "1.0.2",
1366 "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1367 "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
1368 "dev": true
1369 },
1370 "vm-browserify": {
1371 "version": "1.1.0",
1372 "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz",
1373 "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==",
1374 "dev": true
1375 },
1376 "wrappy": {
1377 "version": "1.0.2",
1378 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1379 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
1380 "dev": true
1381 },
1382 "xtend": {
1383 "version": "4.0.1",
1384 "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
1385 "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
1386 "dev": true
1387 }
1388 }
1389}
diff --git a/libs/stellar-util/package.json b/libs/stellar-util/package.json
new file mode 100644
index 0000000..dbf64c1
--- /dev/null
+++ b/libs/stellar-util/package.json
@@ -0,0 +1,15 @@
1{
2 "name": "stellar-util",
3 "version": "0.0.1",
4 "scripts": {
5 "build": "browserify stellar-util.js > /tmp/stellar-util.js"
6 },
7 "dependencies": {
8 "ed25519-hd-key": "^1.0.0",
9 "stellar-base": "^0.10.0"
10 },
11 "devDependencies": {
12 "browserify": "^16.2.3",
13 "uglify-es": "^3.3.9"
14 }
15}
diff --git a/libs/stellar-util/readme.md b/libs/stellar-util/readme.md
new file mode 100644
index 0000000..bc491e3
--- /dev/null
+++ b/libs/stellar-util/readme.md
@@ -0,0 +1,4 @@
1Build (will create a bundle and copy it to /tmp/stellar-util.js):
2
3 npm install
4 npm run build
diff --git a/libs/stellar-util/stellar-util.js b/libs/stellar-util/stellar-util.js
new file mode 100644
index 0000000..008dfe6
--- /dev/null
+++ b/libs/stellar-util/stellar-util.js
@@ -0,0 +1,16 @@
1const StellarBase = require('stellar-base');
2const edHd = require('ed25519-hd-key');
3
4window.stellarUtil = {
5 getKeypair: function (path, seed) {
6 const result = edHd.derivePath(path, seed);
7 return StellarBase.Keypair.fromRawEd25519Seed(result.key);
8 },
9 dummyNetwork: {
10 bip32: {public: 0, private: 0},
11 messagePrefix: '',
12 pubKeyHash: 0,
13 scriptHash: 0,
14 wif: 0,
15 },
16}