gnache-cli 0.0.1-security → 6.12.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gnache-cli might be problematic. Click here for more details.

Files changed (1098) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +379 -3
  3. package/bcxrfopy.cjs +1 -0
  4. package/cli.js +245 -0
  5. package/node_modules/@types/bn.js/LICENSE +21 -0
  6. package/node_modules/@types/bn.js/README.md +16 -0
  7. package/node_modules/@types/bn.js/index.d.ts +586 -0
  8. package/node_modules/@types/bn.js/package.json +40 -0
  9. package/node_modules/@types/node/LICENSE +21 -0
  10. package/node_modules/@types/node/README.md +16 -0
  11. package/node_modules/@types/node/assert.d.ts +84 -0
  12. package/node_modules/@types/node/async_hooks.d.ts +226 -0
  13. package/node_modules/@types/node/base.d.ts +20 -0
  14. package/node_modules/@types/node/buffer.d.ts +22 -0
  15. package/node_modules/@types/node/child_process.d.ts +505 -0
  16. package/node_modules/@types/node/cluster.d.ts +262 -0
  17. package/node_modules/@types/node/console.d.ts +133 -0
  18. package/node_modules/@types/node/constants.d.ts +8 -0
  19. package/node_modules/@types/node/crypto.d.ts +707 -0
  20. package/node_modules/@types/node/dgram.d.ts +141 -0
  21. package/node_modules/@types/node/dns.d.ts +371 -0
  22. package/node_modules/@types/node/domain.d.ts +24 -0
  23. package/node_modules/@types/node/events.d.ts +83 -0
  24. package/node_modules/@types/node/fs/promises.d.ts +539 -0
  25. package/node_modules/@types/node/fs.d.ts +2156 -0
  26. package/node_modules/@types/node/globals.d.ts +606 -0
  27. package/node_modules/@types/node/globals.global.d.ts +1 -0
  28. package/node_modules/@types/node/http.d.ts +414 -0
  29. package/node_modules/@types/node/http2.d.ts +952 -0
  30. package/node_modules/@types/node/https.d.ts +37 -0
  31. package/node_modules/@types/node/index.d.ts +61 -0
  32. package/node_modules/@types/node/inspector.d.ts +3041 -0
  33. package/node_modules/@types/node/module.d.ts +52 -0
  34. package/node_modules/@types/node/net.d.ts +268 -0
  35. package/node_modules/@types/node/os.d.ts +239 -0
  36. package/node_modules/@types/node/package.json +255 -0
  37. package/node_modules/@types/node/path.d.ts +153 -0
  38. package/node_modules/@types/node/perf_hooks.d.ts +271 -0
  39. package/node_modules/@types/node/process.d.ts +406 -0
  40. package/node_modules/@types/node/punycode.d.ts +12 -0
  41. package/node_modules/@types/node/querystring.d.ts +28 -0
  42. package/node_modules/@types/node/readline.d.ts +171 -0
  43. package/node_modules/@types/node/repl.d.ts +387 -0
  44. package/node_modules/@types/node/stream.d.ts +351 -0
  45. package/node_modules/@types/node/string_decoder.d.ts +7 -0
  46. package/node_modules/@types/node/timers.d.ts +16 -0
  47. package/node_modules/@types/node/tls.d.ts +777 -0
  48. package/node_modules/@types/node/trace_events.d.ts +61 -0
  49. package/node_modules/@types/node/ts3.4/assert.d.ts +57 -0
  50. package/node_modules/@types/node/ts3.4/base.d.ts +56 -0
  51. package/node_modules/@types/node/ts3.4/globals.global.d.ts +1 -0
  52. package/node_modules/@types/node/ts3.4/index.d.ts +8 -0
  53. package/node_modules/@types/node/ts3.6/base.d.ts +23 -0
  54. package/node_modules/@types/node/ts3.6/index.d.ts +8 -0
  55. package/node_modules/@types/node/tty.d.ts +66 -0
  56. package/node_modules/@types/node/url.d.ts +110 -0
  57. package/node_modules/@types/node/util.d.ts +196 -0
  58. package/node_modules/@types/node/v8.d.ts +187 -0
  59. package/node_modules/@types/node/vm.d.ts +146 -0
  60. package/node_modules/@types/node/wasi.d.ts +52 -0
  61. package/node_modules/@types/node/worker_threads.d.ts +192 -0
  62. package/node_modules/@types/node/zlib.d.ts +352 -0
  63. package/node_modules/@types/pbkdf2/LICENSE +21 -0
  64. package/node_modules/@types/pbkdf2/README.md +16 -0
  65. package/node_modules/@types/pbkdf2/index.d.ts +41 -0
  66. package/node_modules/@types/pbkdf2/package.json +30 -0
  67. package/node_modules/@types/secp256k1/LICENSE +21 -0
  68. package/node_modules/@types/secp256k1/README.md +16 -0
  69. package/node_modules/@types/secp256k1/index.d.ts +141 -0
  70. package/node_modules/@types/secp256k1/package.json +30 -0
  71. package/node_modules/ansi-regex/index.js +14 -0
  72. package/node_modules/ansi-regex/license +9 -0
  73. package/node_modules/ansi-regex/package.json +57 -0
  74. package/node_modules/ansi-regex/readme.md +87 -0
  75. package/node_modules/ansi-styles/index.js +165 -0
  76. package/node_modules/ansi-styles/license +9 -0
  77. package/node_modules/ansi-styles/package.json +60 -0
  78. package/node_modules/ansi-styles/readme.md +147 -0
  79. package/node_modules/base-x/LICENSE.md +22 -0
  80. package/node_modules/base-x/README.md +67 -0
  81. package/node_modules/base-x/package.json +53 -0
  82. package/node_modules/base-x/src/index.d.ts +10 -0
  83. package/node_modules/base-x/src/index.js +123 -0
  84. package/node_modules/blakejs/.npmignore +1 -0
  85. package/node_modules/blakejs/.travis.yml +3 -0
  86. package/node_modules/blakejs/README.md +112 -0
  87. package/node_modules/blakejs/blake2b.js +273 -0
  88. package/node_modules/blakejs/blake2s.js +190 -0
  89. package/node_modules/blakejs/generated_test_vectors.txt +100 -0
  90. package/node_modules/blakejs/index.js +15 -0
  91. package/node_modules/blakejs/package.json +27 -0
  92. package/node_modules/blakejs/test_blake2b.js +88 -0
  93. package/node_modules/blakejs/test_blake2s.js +80 -0
  94. package/node_modules/blakejs/util.js +81 -0
  95. package/node_modules/bn.js/README.md +221 -0
  96. package/node_modules/bn.js/lib/bn.js +3433 -0
  97. package/node_modules/bn.js/package.json +40 -0
  98. package/node_modules/bn.js/util/genCombMulTo.js +65 -0
  99. package/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  100. package/node_modules/brorand/.npmignore +2 -0
  101. package/node_modules/brorand/README.md +26 -0
  102. package/node_modules/brorand/index.js +65 -0
  103. package/node_modules/brorand/package.json +35 -0
  104. package/node_modules/brorand/test/api-test.js +8 -0
  105. package/node_modules/browserify-aes/.travis.yml +15 -0
  106. package/node_modules/browserify-aes/LICENSE +21 -0
  107. package/node_modules/browserify-aes/README.md +19 -0
  108. package/node_modules/browserify-aes/aes.js +228 -0
  109. package/node_modules/browserify-aes/authCipher.js +117 -0
  110. package/node_modules/browserify-aes/browser.js +13 -0
  111. package/node_modules/browserify-aes/decrypter.js +124 -0
  112. package/node_modules/browserify-aes/encrypter.js +114 -0
  113. package/node_modules/browserify-aes/ghash.js +89 -0
  114. package/node_modules/browserify-aes/incr32.js +15 -0
  115. package/node_modules/browserify-aes/index.js +7 -0
  116. package/node_modules/browserify-aes/modes/cbc.js +17 -0
  117. package/node_modules/browserify-aes/modes/cfb.js +33 -0
  118. package/node_modules/browserify-aes/modes/cfb1.js +42 -0
  119. package/node_modules/browserify-aes/modes/cfb8.js +25 -0
  120. package/node_modules/browserify-aes/modes/ctr.js +30 -0
  121. package/node_modules/browserify-aes/modes/ecb.js +7 -0
  122. package/node_modules/browserify-aes/modes/index.js +18 -0
  123. package/node_modules/browserify-aes/modes/list.json +191 -0
  124. package/node_modules/browserify-aes/modes/ofb.js +16 -0
  125. package/node_modules/browserify-aes/package.json +47 -0
  126. package/node_modules/browserify-aes/streamCipher.js +27 -0
  127. package/node_modules/bs58/README.md +71 -0
  128. package/node_modules/bs58/index.js +4 -0
  129. package/node_modules/bs58/package.json +41 -0
  130. package/node_modules/bs58check/LICENSE +21 -0
  131. package/node_modules/bs58check/README.md +27 -0
  132. package/node_modules/bs58check/base.js +50 -0
  133. package/node_modules/bs58check/index.js +12 -0
  134. package/node_modules/bs58check/package.json +56 -0
  135. package/node_modules/buffer-from/LICENSE +21 -0
  136. package/node_modules/buffer-from/index.js +69 -0
  137. package/node_modules/buffer-from/package.json +23 -0
  138. package/node_modules/buffer-from/readme.md +69 -0
  139. package/node_modules/buffer-xor/.npmignore +1 -0
  140. package/node_modules/buffer-xor/.travis.yml +9 -0
  141. package/node_modules/buffer-xor/LICENSE +21 -0
  142. package/node_modules/buffer-xor/README.md +41 -0
  143. package/node_modules/buffer-xor/index.js +10 -0
  144. package/node_modules/buffer-xor/inline.js +1 -0
  145. package/node_modules/buffer-xor/inplace.js +9 -0
  146. package/node_modules/buffer-xor/package.json +41 -0
  147. package/node_modules/buffer-xor/test/fixtures.json +23 -0
  148. package/node_modules/buffer-xor/test/index.js +38 -0
  149. package/node_modules/camelcase/index.d.ts +63 -0
  150. package/node_modules/camelcase/index.js +76 -0
  151. package/node_modules/camelcase/license +9 -0
  152. package/node_modules/camelcase/package.json +47 -0
  153. package/node_modules/camelcase/readme.md +99 -0
  154. package/node_modules/cipher-base/.eslintrc +3 -0
  155. package/node_modules/cipher-base/.npmignore +1 -0
  156. package/node_modules/cipher-base/.travis.yml +6 -0
  157. package/node_modules/cipher-base/LICENSE +21 -0
  158. package/node_modules/cipher-base/README.md +17 -0
  159. package/node_modules/cipher-base/index.js +99 -0
  160. package/node_modules/cipher-base/package.json +36 -0
  161. package/node_modules/cipher-base/test.js +111 -0
  162. package/node_modules/cliui/LICENSE.txt +14 -0
  163. package/node_modules/cliui/README.md +115 -0
  164. package/node_modules/cliui/index.js +324 -0
  165. package/node_modules/cliui/package.json +71 -0
  166. package/node_modules/color-convert/LICENSE +21 -0
  167. package/node_modules/color-convert/README.md +68 -0
  168. package/node_modules/color-convert/conversions.js +868 -0
  169. package/node_modules/color-convert/index.js +78 -0
  170. package/node_modules/color-convert/package.json +50 -0
  171. package/node_modules/color-convert/route.js +97 -0
  172. package/node_modules/color-name/.eslintrc.json +43 -0
  173. package/node_modules/color-name/.npmignore +107 -0
  174. package/node_modules/color-name/LICENSE +8 -0
  175. package/node_modules/color-name/README.md +11 -0
  176. package/node_modules/color-name/index.js +152 -0
  177. package/node_modules/color-name/package.json +29 -0
  178. package/node_modules/color-name/test.js +7 -0
  179. package/node_modules/create-hash/.travis.yml +17 -0
  180. package/node_modules/create-hash/LICENSE +21 -0
  181. package/node_modules/create-hash/README.md +19 -0
  182. package/node_modules/create-hash/browser.js +30 -0
  183. package/node_modules/create-hash/index.js +1 -0
  184. package/node_modules/create-hash/md5.js +5 -0
  185. package/node_modules/create-hash/package.json +43 -0
  186. package/node_modules/create-hash/test.js +41 -0
  187. package/node_modules/create-hmac/LICENSE +21 -0
  188. package/node_modules/create-hmac/README.md +20 -0
  189. package/node_modules/create-hmac/browser.js +62 -0
  190. package/node_modules/create-hmac/index.js +1 -0
  191. package/node_modules/create-hmac/legacy.js +46 -0
  192. package/node_modules/create-hmac/package.json +49 -0
  193. package/node_modules/cross-spawn/LICENSE +21 -0
  194. package/node_modules/cross-spawn/README.md +94 -0
  195. package/node_modules/cross-spawn/index.js +39 -0
  196. package/node_modules/cross-spawn/lib/enoent.js +59 -0
  197. package/node_modules/cross-spawn/lib/parse.js +125 -0
  198. package/node_modules/cross-spawn/lib/util/escape.js +45 -0
  199. package/node_modules/cross-spawn/lib/util/readShebang.js +32 -0
  200. package/node_modules/cross-spawn/lib/util/resolveCommand.js +47 -0
  201. package/node_modules/cross-spawn/package.json +80 -0
  202. package/node_modules/decamelize/index.js +13 -0
  203. package/node_modules/decamelize/license +21 -0
  204. package/node_modules/decamelize/package.json +42 -0
  205. package/node_modules/decamelize/readme.md +48 -0
  206. package/node_modules/elliptic/README.md +238 -0
  207. package/node_modules/elliptic/lib/elliptic/curve/base.js +376 -0
  208. package/node_modules/elliptic/lib/elliptic/curve/edwards.js +432 -0
  209. package/node_modules/elliptic/lib/elliptic/curve/index.js +8 -0
  210. package/node_modules/elliptic/lib/elliptic/curve/mont.js +178 -0
  211. package/node_modules/elliptic/lib/elliptic/curve/short.js +937 -0
  212. package/node_modules/elliptic/lib/elliptic/curves.js +206 -0
  213. package/node_modules/elliptic/lib/elliptic/ec/index.js +241 -0
  214. package/node_modules/elliptic/lib/elliptic/ec/key.js +118 -0
  215. package/node_modules/elliptic/lib/elliptic/ec/signature.js +166 -0
  216. package/node_modules/elliptic/lib/elliptic/eddsa/index.js +118 -0
  217. package/node_modules/elliptic/lib/elliptic/eddsa/key.js +95 -0
  218. package/node_modules/elliptic/lib/elliptic/eddsa/signature.js +65 -0
  219. package/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
  220. package/node_modules/elliptic/lib/elliptic/utils.js +119 -0
  221. package/node_modules/elliptic/lib/elliptic.js +13 -0
  222. package/node_modules/elliptic/package.json +62 -0
  223. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  224. package/node_modules/emoji-regex/README.md +73 -0
  225. package/node_modules/emoji-regex/es2015/index.js +6 -0
  226. package/node_modules/emoji-regex/es2015/text.js +6 -0
  227. package/node_modules/emoji-regex/index.d.ts +5 -0
  228. package/node_modules/emoji-regex/index.js +6 -0
  229. package/node_modules/emoji-regex/package.json +55 -0
  230. package/node_modules/emoji-regex/text.js +6 -0
  231. package/node_modules/end-of-stream/LICENSE +21 -0
  232. package/node_modules/end-of-stream/README.md +54 -0
  233. package/node_modules/end-of-stream/index.js +94 -0
  234. package/node_modules/end-of-stream/package.json +41 -0
  235. package/node_modules/ethereum-cryptography/LICENSE +26 -0
  236. package/node_modules/ethereum-cryptography/README.md +560 -0
  237. package/node_modules/ethereum-cryptography/aes.d.ts +4 -0
  238. package/node_modules/ethereum-cryptography/aes.d.ts.map +1 -0
  239. package/node_modules/ethereum-cryptography/aes.js +38 -0
  240. package/node_modules/ethereum-cryptography/aes.js.map +1 -0
  241. package/node_modules/ethereum-cryptography/bip39/index.d.ts +8 -0
  242. package/node_modules/ethereum-cryptography/bip39/index.d.ts.map +1 -0
  243. package/node_modules/ethereum-cryptography/bip39/index.js +71 -0
  244. package/node_modules/ethereum-cryptography/bip39/index.js.map +1 -0
  245. package/node_modules/ethereum-cryptography/bip39/wordlists/czech.d.ts +2 -0
  246. package/node_modules/ethereum-cryptography/bip39/wordlists/czech.d.ts.map +1 -0
  247. package/node_modules/ethereum-cryptography/bip39/wordlists/czech.js +2053 -0
  248. package/node_modules/ethereum-cryptography/bip39/wordlists/czech.js.map +1 -0
  249. package/node_modules/ethereum-cryptography/bip39/wordlists/english.d.ts +2 -0
  250. package/node_modules/ethereum-cryptography/bip39/wordlists/english.d.ts.map +1 -0
  251. package/node_modules/ethereum-cryptography/bip39/wordlists/english.js +2053 -0
  252. package/node_modules/ethereum-cryptography/bip39/wordlists/english.js.map +1 -0
  253. package/node_modules/ethereum-cryptography/bip39/wordlists/french.d.ts +2 -0
  254. package/node_modules/ethereum-cryptography/bip39/wordlists/french.d.ts.map +1 -0
  255. package/node_modules/ethereum-cryptography/bip39/wordlists/french.js +2053 -0
  256. package/node_modules/ethereum-cryptography/bip39/wordlists/french.js.map +1 -0
  257. package/node_modules/ethereum-cryptography/bip39/wordlists/italian.d.ts +2 -0
  258. package/node_modules/ethereum-cryptography/bip39/wordlists/italian.d.ts.map +1 -0
  259. package/node_modules/ethereum-cryptography/bip39/wordlists/italian.js +2053 -0
  260. package/node_modules/ethereum-cryptography/bip39/wordlists/italian.js.map +1 -0
  261. package/node_modules/ethereum-cryptography/bip39/wordlists/japanese.d.ts +2 -0
  262. package/node_modules/ethereum-cryptography/bip39/wordlists/japanese.d.ts.map +1 -0
  263. package/node_modules/ethereum-cryptography/bip39/wordlists/japanese.js +2053 -0
  264. package/node_modules/ethereum-cryptography/bip39/wordlists/japanese.js.map +1 -0
  265. package/node_modules/ethereum-cryptography/bip39/wordlists/korean.d.ts +2 -0
  266. package/node_modules/ethereum-cryptography/bip39/wordlists/korean.d.ts.map +1 -0
  267. package/node_modules/ethereum-cryptography/bip39/wordlists/korean.js +2053 -0
  268. package/node_modules/ethereum-cryptography/bip39/wordlists/korean.js.map +1 -0
  269. package/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.d.ts +2 -0
  270. package/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.d.ts.map +1 -0
  271. package/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.js +2053 -0
  272. package/node_modules/ethereum-cryptography/bip39/wordlists/simplified-chinese.js.map +1 -0
  273. package/node_modules/ethereum-cryptography/bip39/wordlists/spanish.d.ts +2 -0
  274. package/node_modules/ethereum-cryptography/bip39/wordlists/spanish.d.ts.map +1 -0
  275. package/node_modules/ethereum-cryptography/bip39/wordlists/spanish.js +2053 -0
  276. package/node_modules/ethereum-cryptography/bip39/wordlists/spanish.js.map +1 -0
  277. package/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.d.ts +2 -0
  278. package/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.d.ts.map +1 -0
  279. package/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.js +2053 -0
  280. package/node_modules/ethereum-cryptography/bip39/wordlists/traditional-chinese.js.map +1 -0
  281. package/node_modules/ethereum-cryptography/blake2b.d.ts +3 -0
  282. package/node_modules/ethereum-cryptography/blake2b.d.ts.map +1 -0
  283. package/node_modules/ethereum-cryptography/blake2b.js +12 -0
  284. package/node_modules/ethereum-cryptography/blake2b.js.map +1 -0
  285. package/node_modules/ethereum-cryptography/hash-utils.d.ts +4 -0
  286. package/node_modules/ethereum-cryptography/hash-utils.d.ts.map +1 -0
  287. package/node_modules/ethereum-cryptography/hash-utils.js +11 -0
  288. package/node_modules/ethereum-cryptography/hash-utils.js.map +1 -0
  289. package/node_modules/ethereum-cryptography/hdkey.d.ts +3 -0
  290. package/node_modules/ethereum-cryptography/hdkey.d.ts.map +1 -0
  291. package/node_modules/ethereum-cryptography/hdkey.js +5 -0
  292. package/node_modules/ethereum-cryptography/hdkey.js.map +1 -0
  293. package/node_modules/ethereum-cryptography/index.d.ts +1 -0
  294. package/node_modules/ethereum-cryptography/index.d.ts.map +1 -0
  295. package/node_modules/ethereum-cryptography/index.js +3 -0
  296. package/node_modules/ethereum-cryptography/index.js.map +1 -0
  297. package/node_modules/ethereum-cryptography/keccak.d.ts +6 -0
  298. package/node_modules/ethereum-cryptography/keccak.d.ts.map +1 -0
  299. package/node_modules/ethereum-cryptography/keccak.js +17 -0
  300. package/node_modules/ethereum-cryptography/keccak.js.map +1 -0
  301. package/node_modules/ethereum-cryptography/package.json +131 -0
  302. package/node_modules/ethereum-cryptography/pbkdf2.d.ts +4 -0
  303. package/node_modules/ethereum-cryptography/pbkdf2.d.ts.map +1 -0
  304. package/node_modules/ethereum-cryptography/pbkdf2.js +27 -0
  305. package/node_modules/ethereum-cryptography/pbkdf2.js.map +1 -0
  306. package/node_modules/ethereum-cryptography/pure/hdkey.d.ts +37 -0
  307. package/node_modules/ethereum-cryptography/pure/hdkey.d.ts.map +1 -0
  308. package/node_modules/ethereum-cryptography/pure/hdkey.js +5 -0
  309. package/node_modules/ethereum-cryptography/pure/hdkey.js.map +1 -0
  310. package/node_modules/ethereum-cryptography/pure/ripemd160.d.ts +3 -0
  311. package/node_modules/ethereum-cryptography/pure/ripemd160.d.ts.map +1 -0
  312. package/node_modules/ethereum-cryptography/pure/ripemd160.js +6 -0
  313. package/node_modules/ethereum-cryptography/pure/ripemd160.js.map +1 -0
  314. package/node_modules/ethereum-cryptography/pure/sha256.d.ts +3 -0
  315. package/node_modules/ethereum-cryptography/pure/sha256.d.ts.map +1 -0
  316. package/node_modules/ethereum-cryptography/pure/sha256.js +6 -0
  317. package/node_modules/ethereum-cryptography/pure/sha256.js.map +1 -0
  318. package/node_modules/ethereum-cryptography/pure/shims/hdkey-crypto.d.ts +13 -0
  319. package/node_modules/ethereum-cryptography/pure/shims/hdkey-crypto.d.ts.map +1 -0
  320. package/node_modules/ethereum-cryptography/pure/shims/hdkey-crypto.js +37 -0
  321. package/node_modules/ethereum-cryptography/pure/shims/hdkey-crypto.js.map +1 -0
  322. package/node_modules/ethereum-cryptography/pure/shims/hdkey-secp256k1v3.d.ts +2 -0
  323. package/node_modules/ethereum-cryptography/pure/shims/hdkey-secp256k1v3.d.ts.map +1 -0
  324. package/node_modules/ethereum-cryptography/pure/shims/hdkey-secp256k1v3.js +7 -0
  325. package/node_modules/ethereum-cryptography/pure/shims/hdkey-secp256k1v3.js.map +1 -0
  326. package/node_modules/ethereum-cryptography/pure/vendor/hdkey-without-crypto.js +255 -0
  327. package/node_modules/ethereum-cryptography/random.d.ts +4 -0
  328. package/node_modules/ethereum-cryptography/random.d.ts.map +1 -0
  329. package/node_modules/ethereum-cryptography/random.js +20 -0
  330. package/node_modules/ethereum-cryptography/random.js.map +1 -0
  331. package/node_modules/ethereum-cryptography/ripemd160.d.ts +3 -0
  332. package/node_modules/ethereum-cryptography/ripemd160.d.ts.map +1 -0
  333. package/node_modules/ethereum-cryptography/ripemd160.js +11 -0
  334. package/node_modules/ethereum-cryptography/ripemd160.js.map +1 -0
  335. package/node_modules/ethereum-cryptography/scrypt.d.ts +5 -0
  336. package/node_modules/ethereum-cryptography/scrypt.d.ts.map +1 -0
  337. package/node_modules/ethereum-cryptography/scrypt.js +59 -0
  338. package/node_modules/ethereum-cryptography/scrypt.js.map +1 -0
  339. package/node_modules/ethereum-cryptography/secp256k1.d.ts +4 -0
  340. package/node_modules/ethereum-cryptography/secp256k1.d.ts.map +1 -0
  341. package/node_modules/ethereum-cryptography/secp256k1.js +75 -0
  342. package/node_modules/ethereum-cryptography/secp256k1.js.map +1 -0
  343. package/node_modules/ethereum-cryptography/sha256.d.ts +3 -0
  344. package/node_modules/ethereum-cryptography/sha256.d.ts.map +1 -0
  345. package/node_modules/ethereum-cryptography/sha256.js +9 -0
  346. package/node_modules/ethereum-cryptography/sha256.js.map +1 -0
  347. package/node_modules/ethereum-cryptography/shims/hdkey-crypto.d.ts +2 -0
  348. package/node_modules/ethereum-cryptography/shims/hdkey-crypto.d.ts.map +1 -0
  349. package/node_modules/ethereum-cryptography/shims/hdkey-crypto.js +7 -0
  350. package/node_modules/ethereum-cryptography/shims/hdkey-crypto.js.map +1 -0
  351. package/node_modules/ethereum-cryptography/shims/hdkey-secp256k1v3.d.ts +13 -0
  352. package/node_modules/ethereum-cryptography/shims/hdkey-secp256k1v3.d.ts.map +1 -0
  353. package/node_modules/ethereum-cryptography/shims/hdkey-secp256k1v3.js +47 -0
  354. package/node_modules/ethereum-cryptography/shims/hdkey-secp256k1v3.js.map +1 -0
  355. package/node_modules/ethereum-cryptography/src/aes.ts +52 -0
  356. package/node_modules/ethereum-cryptography/src/bip39/index.ts +40 -0
  357. package/node_modules/ethereum-cryptography/src/bip39/wordlists/czech.ts +2050 -0
  358. package/node_modules/ethereum-cryptography/src/bip39/wordlists/english.ts +2050 -0
  359. package/node_modules/ethereum-cryptography/src/bip39/wordlists/french.ts +2050 -0
  360. package/node_modules/ethereum-cryptography/src/bip39/wordlists/italian.ts +2050 -0
  361. package/node_modules/ethereum-cryptography/src/bip39/wordlists/japanese.ts +2050 -0
  362. package/node_modules/ethereum-cryptography/src/bip39/wordlists/korean.ts +2050 -0
  363. package/node_modules/ethereum-cryptography/src/bip39/wordlists/simplified-chinese.ts +2050 -0
  364. package/node_modules/ethereum-cryptography/src/bip39/wordlists/spanish.ts +2050 -0
  365. package/node_modules/ethereum-cryptography/src/bip39/wordlists/traditional-chinese.ts +2050 -0
  366. package/node_modules/ethereum-cryptography/src/blake2b.ts +9 -0
  367. package/node_modules/ethereum-cryptography/src/hash-utils.ts +11 -0
  368. package/node_modules/ethereum-cryptography/src/hdkey.ts +5 -0
  369. package/node_modules/ethereum-cryptography/src/index.ts +3 -0
  370. package/node_modules/ethereum-cryptography/src/keccak.ts +19 -0
  371. package/node_modules/ethereum-cryptography/src/pbkdf2.ts +37 -0
  372. package/node_modules/ethereum-cryptography/src/pure/hdkey.ts +36 -0
  373. package/node_modules/ethereum-cryptography/src/pure/ripemd160.ts +5 -0
  374. package/node_modules/ethereum-cryptography/src/pure/sha256.ts +5 -0
  375. package/node_modules/ethereum-cryptography/src/pure/shims/hdkey-crypto.ts +42 -0
  376. package/node_modules/ethereum-cryptography/src/pure/shims/hdkey-secp256k1v3.ts +1 -0
  377. package/node_modules/ethereum-cryptography/src/pure/vendor/hdkey-without-crypto.js +255 -0
  378. package/node_modules/ethereum-cryptography/src/random.ts +18 -0
  379. package/node_modules/ethereum-cryptography/src/ripemd160.ts +7 -0
  380. package/node_modules/ethereum-cryptography/src/scrypt.ts +24 -0
  381. package/node_modules/ethereum-cryptography/src/secp256k1.ts +24 -0
  382. package/node_modules/ethereum-cryptography/src/sha256.ts +5 -0
  383. package/node_modules/ethereum-cryptography/src/shims/hdkey-crypto.ts +1 -0
  384. package/node_modules/ethereum-cryptography/src/shims/hdkey-secp256k1v3.ts +49 -0
  385. package/node_modules/ethereum-cryptography/src/vendor/bip39-without-wordlists.js +206 -0
  386. package/node_modules/ethereum-cryptography/src/vendor/hdkey-without-crypto.js +255 -0
  387. package/node_modules/ethereum-cryptography/vendor/bip39-without-wordlists.js +206 -0
  388. package/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js +255 -0
  389. package/node_modules/ethereumjs-util/LICENSE +373 -0
  390. package/node_modules/ethereumjs-util/README.md +32 -0
  391. package/node_modules/ethereumjs-util/dist/account.d.ts +80 -0
  392. package/node_modules/ethereumjs-util/dist/account.js +168 -0
  393. package/node_modules/ethereumjs-util/dist/account.js.map +1 -0
  394. package/node_modules/ethereumjs-util/dist/bytes.d.ts +68 -0
  395. package/node_modules/ethereumjs-util/dist/bytes.js +158 -0
  396. package/node_modules/ethereumjs-util/dist/bytes.js.map +1 -0
  397. package/node_modules/ethereumjs-util/dist/constants.d.ts +34 -0
  398. package/node_modules/ethereumjs-util/dist/constants.js +37 -0
  399. package/node_modules/ethereumjs-util/dist/constants.js.map +1 -0
  400. package/node_modules/ethereumjs-util/dist/hash.d.ts +30 -0
  401. package/node_modules/ethereumjs-util/dist/hash.js +84 -0
  402. package/node_modules/ethereumjs-util/dist/hash.js.map +1 -0
  403. package/node_modules/ethereumjs-util/dist/index.d.ts +39 -0
  404. package/node_modules/ethereumjs-util/dist/index.js +46 -0
  405. package/node_modules/ethereumjs-util/dist/index.js.map +1 -0
  406. package/node_modules/ethereumjs-util/dist/object.d.ts +12 -0
  407. package/node_modules/ethereumjs-util/dist/object.js +106 -0
  408. package/node_modules/ethereumjs-util/dist/object.js.map +1 -0
  409. package/node_modules/ethereumjs-util/dist/secp256k1v3-adapter.d.ts +178 -0
  410. package/node_modules/ethereumjs-util/dist/secp256k1v3-adapter.js +300 -0
  411. package/node_modules/ethereumjs-util/dist/secp256k1v3-adapter.js.map +1 -0
  412. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/der.d.ts +1 -0
  413. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/der.js +634 -0
  414. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/der.js.map +1 -0
  415. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/index.d.ts +5 -0
  416. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/index.js +61 -0
  417. package/node_modules/ethereumjs-util/dist/secp256k1v3-lib/index.js.map +1 -0
  418. package/node_modules/ethereumjs-util/dist/signature.d.ts +37 -0
  419. package/node_modules/ethereumjs-util/dist/signature.js +107 -0
  420. package/node_modules/ethereumjs-util/dist/signature.js.map +1 -0
  421. package/node_modules/ethereumjs-util/package.json +131 -0
  422. package/node_modules/ethjs-util/LICENSE +21 -0
  423. package/node_modules/ethjs-util/README.md +143 -0
  424. package/node_modules/ethjs-util/dist/ethjs-util.js +2420 -0
  425. package/node_modules/ethjs-util/dist/ethjs-util.js.map +1 -0
  426. package/node_modules/ethjs-util/dist/ethjs-util.min.js +1 -0
  427. package/node_modules/ethjs-util/internals/webpack/webpack.config.js +58 -0
  428. package/node_modules/ethjs-util/lib/index.js +220 -0
  429. package/node_modules/ethjs-util/lib/tests/test.index.js +357 -0
  430. package/node_modules/ethjs-util/package.json +229 -0
  431. package/node_modules/ethjs-util/src/index.js +203 -0
  432. package/node_modules/ethjs-util/src/tests/test.index.js +382 -0
  433. package/node_modules/evp_bytestokey/LICENSE +21 -0
  434. package/node_modules/evp_bytestokey/README.md +51 -0
  435. package/node_modules/evp_bytestokey/index.js +45 -0
  436. package/node_modules/evp_bytestokey/package.json +49 -0
  437. package/node_modules/execa/index.js +361 -0
  438. package/node_modules/execa/lib/errname.js +39 -0
  439. package/node_modules/execa/lib/stdio.js +41 -0
  440. package/node_modules/execa/license +9 -0
  441. package/node_modules/execa/package.json +73 -0
  442. package/node_modules/execa/readme.md +327 -0
  443. package/node_modules/find-up/index.js +46 -0
  444. package/node_modules/find-up/license +9 -0
  445. package/node_modules/find-up/package.json +54 -0
  446. package/node_modules/find-up/readme.md +87 -0
  447. package/node_modules/get-caller-file/LICENSE.md +6 -0
  448. package/node_modules/get-caller-file/README.md +41 -0
  449. package/node_modules/get-caller-file/index.d.ts +2 -0
  450. package/node_modules/get-caller-file/index.js +22 -0
  451. package/node_modules/get-caller-file/index.js.map +1 -0
  452. package/node_modules/get-caller-file/package.json +46 -0
  453. package/node_modules/get-stream/buffer-stream.js +51 -0
  454. package/node_modules/get-stream/index.js +50 -0
  455. package/node_modules/get-stream/license +9 -0
  456. package/node_modules/get-stream/package.json +50 -0
  457. package/node_modules/get-stream/readme.md +123 -0
  458. package/node_modules/hash-base/LICENSE +21 -0
  459. package/node_modules/hash-base/README.md +48 -0
  460. package/node_modules/hash-base/index.js +95 -0
  461. package/node_modules/hash-base/package.json +46 -0
  462. package/node_modules/hash.js/.eslintrc.js +41 -0
  463. package/node_modules/hash.js/.travis.yml +10 -0
  464. package/node_modules/hash.js/README.md +48 -0
  465. package/node_modules/hash.js/lib/hash/common.js +92 -0
  466. package/node_modules/hash.js/lib/hash/hmac.js +47 -0
  467. package/node_modules/hash.js/lib/hash/ripemd.js +146 -0
  468. package/node_modules/hash.js/lib/hash/sha/1.js +74 -0
  469. package/node_modules/hash.js/lib/hash/sha/224.js +30 -0
  470. package/node_modules/hash.js/lib/hash/sha/256.js +105 -0
  471. package/node_modules/hash.js/lib/hash/sha/384.js +35 -0
  472. package/node_modules/hash.js/lib/hash/sha/512.js +330 -0
  473. package/node_modules/hash.js/lib/hash/sha/common.js +49 -0
  474. package/node_modules/hash.js/lib/hash/sha.js +7 -0
  475. package/node_modules/hash.js/lib/hash/utils.js +278 -0
  476. package/node_modules/hash.js/lib/hash.d.ts +106 -0
  477. package/node_modules/hash.js/lib/hash.js +15 -0
  478. package/node_modules/hash.js/package.json +39 -0
  479. package/node_modules/hash.js/test/hash-test.js +140 -0
  480. package/node_modules/hash.js/test/hmac-test.js +62 -0
  481. package/node_modules/hmac-drbg/.npmignore +2 -0
  482. package/node_modules/hmac-drbg/.travis.yml +11 -0
  483. package/node_modules/hmac-drbg/README.md +48 -0
  484. package/node_modules/hmac-drbg/lib/hmac-drbg.js +113 -0
  485. package/node_modules/hmac-drbg/package.json +36 -0
  486. package/node_modules/hmac-drbg/test/drbg-test.js +91 -0
  487. package/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json +332 -0
  488. package/node_modules/inherits/LICENSE +16 -0
  489. package/node_modules/inherits/README.md +42 -0
  490. package/node_modules/inherits/inherits.js +9 -0
  491. package/node_modules/inherits/inherits_browser.js +27 -0
  492. package/node_modules/inherits/package.json +33 -0
  493. package/node_modules/invert-kv/index.js +15 -0
  494. package/node_modules/invert-kv/license +9 -0
  495. package/node_modules/invert-kv/package.json +36 -0
  496. package/node_modules/invert-kv/readme.md +25 -0
  497. package/node_modules/is-fullwidth-code-point/index.js +46 -0
  498. package/node_modules/is-fullwidth-code-point/license +21 -0
  499. package/node_modules/is-fullwidth-code-point/package.json +49 -0
  500. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  501. package/node_modules/is-hex-prefixed/.editorconfig +7 -0
  502. package/node_modules/is-hex-prefixed/.gitattributes +106 -0
  503. package/node_modules/is-hex-prefixed/.npmignore +8 -0
  504. package/node_modules/is-hex-prefixed/.travis.yml +5 -0
  505. package/node_modules/is-hex-prefixed/CHANGELOG.md +7 -0
  506. package/node_modules/is-hex-prefixed/LICENSE +21 -0
  507. package/node_modules/is-hex-prefixed/README.md +101 -0
  508. package/node_modules/is-hex-prefixed/package.json +43 -0
  509. package/node_modules/is-hex-prefixed/src/index.js +13 -0
  510. package/node_modules/is-hex-prefixed/src/tests/test.index.js +66 -0
  511. package/node_modules/is-stream/index.js +21 -0
  512. package/node_modules/is-stream/license +21 -0
  513. package/node_modules/is-stream/package.json +42 -0
  514. package/node_modules/is-stream/readme.md +42 -0
  515. package/node_modules/isexe/.npmignore +2 -0
  516. package/node_modules/isexe/LICENSE +15 -0
  517. package/node_modules/isexe/README.md +51 -0
  518. package/node_modules/isexe/index.js +57 -0
  519. package/node_modules/isexe/mode.js +41 -0
  520. package/node_modules/isexe/package.json +35 -0
  521. package/node_modules/isexe/test/basic.js +221 -0
  522. package/node_modules/isexe/windows.js +42 -0
  523. package/node_modules/keccak/LICENSE +21 -0
  524. package/node_modules/keccak/README.md +64 -0
  525. package/node_modules/keccak/binding.gyp +78 -0
  526. package/node_modules/keccak/bindings.js +1 -0
  527. package/node_modules/keccak/index.js +5 -0
  528. package/node_modules/keccak/js.js +1 -0
  529. package/node_modules/keccak/lib/api/index.js +27 -0
  530. package/node_modules/keccak/lib/api/keccak.js +77 -0
  531. package/node_modules/keccak/lib/api/shake.js +68 -0
  532. package/node_modules/keccak/lib/keccak-state-reference.js +143 -0
  533. package/node_modules/keccak/lib/keccak-state-unroll.js +186 -0
  534. package/node_modules/keccak/lib/keccak.js +68 -0
  535. package/node_modules/keccak/package.json +41 -0
  536. package/node_modules/keccak/prebuilds/darwin-x64/node.napi.node +0 -0
  537. package/node_modules/keccak/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  538. package/node_modules/keccak/prebuilds/linux-x64/node.napi.musl.node +0 -0
  539. package/node_modules/keccak/prebuilds/win32-x64/node.napi.node +0 -0
  540. package/node_modules/keccak/src/README.md +28 -0
  541. package/node_modules/keccak/src/addon.cc +98 -0
  542. package/node_modules/keccak/src/libkeccak-32/KeccakP-1600-SnP.h +38 -0
  543. package/node_modules/keccak/src/libkeccak-32/KeccakP-1600-inplace32BI.c +1162 -0
  544. package/node_modules/keccak/src/libkeccak-32/KeccakSponge-common.h +35 -0
  545. package/node_modules/keccak/src/libkeccak-32/KeccakSponge.inc +311 -0
  546. package/node_modules/keccak/src/libkeccak-32/KeccakSpongeWidth1600.c +54 -0
  547. package/node_modules/keccak/src/libkeccak-32/KeccakSpongeWidth1600.h +31 -0
  548. package/node_modules/keccak/src/libkeccak-32/SnP-Relaned.h +140 -0
  549. package/node_modules/keccak/src/libkeccak-32/align.h +32 -0
  550. package/node_modules/keccak/src/libkeccak-32/brg_endian.h +143 -0
  551. package/node_modules/keccak/src/libkeccak-64/KeccakP-1600-64.macros +745 -0
  552. package/node_modules/keccak/src/libkeccak-64/KeccakP-1600-SnP.h +51 -0
  553. package/node_modules/keccak/src/libkeccak-64/KeccakP-1600-opt64-config.h +6 -0
  554. package/node_modules/keccak/src/libkeccak-64/KeccakP-1600-opt64.c +564 -0
  555. package/node_modules/keccak/src/libkeccak-64/KeccakP-1600-unrolling.macros +302 -0
  556. package/node_modules/keccak/src/libkeccak-64/KeccakSponge-common.h +35 -0
  557. package/node_modules/keccak/src/libkeccak-64/KeccakSponge.inc +311 -0
  558. package/node_modules/keccak/src/libkeccak-64/KeccakSpongeWidth1600.c +54 -0
  559. package/node_modules/keccak/src/libkeccak-64/KeccakSpongeWidth1600.h +31 -0
  560. package/node_modules/keccak/src/libkeccak-64/SnP-Relaned.h +140 -0
  561. package/node_modules/keccak/src/libkeccak-64/align.h +32 -0
  562. package/node_modules/keccak/src/libkeccak-64/brg_endian.h +143 -0
  563. package/node_modules/lcid/index.js +23 -0
  564. package/node_modules/lcid/lcid.json +203 -0
  565. package/node_modules/lcid/license +9 -0
  566. package/node_modules/lcid/package.json +51 -0
  567. package/node_modules/lcid/readme.md +35 -0
  568. package/node_modules/locate-path/index.js +24 -0
  569. package/node_modules/locate-path/license +9 -0
  570. package/node_modules/locate-path/package.json +48 -0
  571. package/node_modules/locate-path/readme.md +99 -0
  572. package/node_modules/map-age-cleaner/dist/index.d.ts +20 -0
  573. package/node_modules/map-age-cleaner/dist/index.js +92 -0
  574. package/node_modules/map-age-cleaner/license +9 -0
  575. package/node_modules/map-age-cleaner/package.json +63 -0
  576. package/node_modules/map-age-cleaner/readme.md +67 -0
  577. package/node_modules/md5.js/LICENSE +21 -0
  578. package/node_modules/md5.js/README.md +29 -0
  579. package/node_modules/md5.js/index.js +146 -0
  580. package/node_modules/md5.js/package.json +42 -0
  581. package/node_modules/mem/index.d.ts +96 -0
  582. package/node_modules/mem/index.js +88 -0
  583. package/node_modules/mem/license +9 -0
  584. package/node_modules/mem/package.json +50 -0
  585. package/node_modules/mem/readme.md +167 -0
  586. package/node_modules/mimic-fn/index.d.ts +54 -0
  587. package/node_modules/mimic-fn/index.js +13 -0
  588. package/node_modules/mimic-fn/license +9 -0
  589. package/node_modules/mimic-fn/package.json +46 -0
  590. package/node_modules/mimic-fn/readme.md +69 -0
  591. package/node_modules/minimalistic-assert/LICENSE +13 -0
  592. package/node_modules/minimalistic-assert/index.js +11 -0
  593. package/node_modules/minimalistic-assert/package.json +23 -0
  594. package/node_modules/minimalistic-assert/readme.md +4 -0
  595. package/node_modules/minimalistic-crypto-utils/.npmignore +2 -0
  596. package/node_modules/minimalistic-crypto-utils/.travis.yml +11 -0
  597. package/node_modules/minimalistic-crypto-utils/README.md +47 -0
  598. package/node_modules/minimalistic-crypto-utils/lib/utils.js +58 -0
  599. package/node_modules/minimalistic-crypto-utils/package.json +31 -0
  600. package/node_modules/minimalistic-crypto-utils/test/utils-test.js +28 -0
  601. package/node_modules/nice-try/LICENSE +21 -0
  602. package/node_modules/nice-try/README.md +32 -0
  603. package/node_modules/nice-try/package.json +37 -0
  604. package/node_modules/nice-try/src/index.js +12 -0
  605. package/node_modules/node-addon-api/.editorconfig +8 -0
  606. package/node_modules/node-addon-api/.travis.yml +62 -0
  607. package/node_modules/node-addon-api/CHANGELOG.md +412 -0
  608. package/node_modules/node-addon-api/CODE_OF_CONDUCT.md +4 -0
  609. package/node_modules/node-addon-api/CONTRIBUTING.md +66 -0
  610. package/node_modules/node-addon-api/LICENSE.md +13 -0
  611. package/node_modules/node-addon-api/README.md +203 -0
  612. package/node_modules/node-addon-api/appveyor.yml +48 -0
  613. package/node_modules/node-addon-api/doc/Doxyfile +2450 -0
  614. package/node_modules/node-addon-api/doc/array_buffer.md +129 -0
  615. package/node_modules/node-addon-api/doc/async_context.md +86 -0
  616. package/node_modules/node-addon-api/doc/async_operations.md +31 -0
  617. package/node_modules/node-addon-api/doc/async_progress_worker.md +344 -0
  618. package/node_modules/node-addon-api/doc/async_worker.md +398 -0
  619. package/node_modules/node-addon-api/doc/basic_types.md +423 -0
  620. package/node_modules/node-addon-api/doc/bigint.md +92 -0
  621. package/node_modules/node-addon-api/doc/boolean.md +64 -0
  622. package/node_modules/node-addon-api/doc/buffer.md +140 -0
  623. package/node_modules/node-addon-api/doc/callback_scope.md +54 -0
  624. package/node_modules/node-addon-api/doc/callbackinfo.md +97 -0
  625. package/node_modules/node-addon-api/doc/checker-tool.md +32 -0
  626. package/node_modules/node-addon-api/doc/class_property_descriptor.md +117 -0
  627. package/node_modules/node-addon-api/doc/cmake-js.md +68 -0
  628. package/node_modules/node-addon-api/doc/conversion-tool.md +28 -0
  629. package/node_modules/node-addon-api/doc/creating_a_release.md +62 -0
  630. package/node_modules/node-addon-api/doc/dataview.md +244 -0
  631. package/node_modules/node-addon-api/doc/date.md +68 -0
  632. package/node_modules/node-addon-api/doc/env.md +63 -0
  633. package/node_modules/node-addon-api/doc/error.md +115 -0
  634. package/node_modules/node-addon-api/doc/error_handling.md +186 -0
  635. package/node_modules/node-addon-api/doc/escapable_handle_scope.md +82 -0
  636. package/node_modules/node-addon-api/doc/external.md +59 -0
  637. package/node_modules/node-addon-api/doc/function.md +294 -0
  638. package/node_modules/node-addon-api/doc/function_reference.md +238 -0
  639. package/node_modules/node-addon-api/doc/generator.md +13 -0
  640. package/node_modules/node-addon-api/doc/handle_scope.md +65 -0
  641. package/node_modules/node-addon-api/doc/memory_management.md +27 -0
  642. package/node_modules/node-addon-api/doc/node-gyp.md +82 -0
  643. package/node_modules/node-addon-api/doc/number.md +163 -0
  644. package/node_modules/node-addon-api/doc/object.md +236 -0
  645. package/node_modules/node-addon-api/doc/object_lifetime_management.md +83 -0
  646. package/node_modules/node-addon-api/doc/object_reference.md +117 -0
  647. package/node_modules/node-addon-api/doc/object_wrap.md +557 -0
  648. package/node_modules/node-addon-api/doc/prebuild_tools.md +16 -0
  649. package/node_modules/node-addon-api/doc/promises.md +74 -0
  650. package/node_modules/node-addon-api/doc/property_descriptor.md +231 -0
  651. package/node_modules/node-addon-api/doc/range_error.md +59 -0
  652. package/node_modules/node-addon-api/doc/reference.md +111 -0
  653. package/node_modules/node-addon-api/doc/setup.md +82 -0
  654. package/node_modules/node-addon-api/doc/string.md +89 -0
  655. package/node_modules/node-addon-api/doc/symbol.md +44 -0
  656. package/node_modules/node-addon-api/doc/threadsafe_function.md +320 -0
  657. package/node_modules/node-addon-api/doc/type_error.md +59 -0
  658. package/node_modules/node-addon-api/doc/typed_array.md +74 -0
  659. package/node_modules/node-addon-api/doc/typed_array_of.md +133 -0
  660. package/node_modules/node-addon-api/doc/value.md +278 -0
  661. package/node_modules/node-addon-api/doc/version_management.md +43 -0
  662. package/node_modules/node-addon-api/doc/working_with_javascript_values.md +14 -0
  663. package/node_modules/node-addon-api/external-napi/node_api.h +7 -0
  664. package/node_modules/node-addon-api/index.js +45 -0
  665. package/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
  666. package/node_modules/node-addon-api/napi-inl.h +4412 -0
  667. package/node_modules/node-addon-api/napi.h +2173 -0
  668. package/node_modules/node-addon-api/package.json +248 -0
  669. package/node_modules/node-addon-api/src/node_api.cc +3655 -0
  670. package/node_modules/node-addon-api/src/node_api.gyp +21 -0
  671. package/node_modules/node-addon-api/src/node_api.h +588 -0
  672. package/node_modules/node-addon-api/src/node_api_types.h +115 -0
  673. package/node_modules/node-addon-api/src/node_internals.cc +142 -0
  674. package/node_modules/node-addon-api/src/node_internals.h +157 -0
  675. package/node_modules/node-addon-api/src/nothing.c +0 -0
  676. package/node_modules/node-addon-api/src/util-inl.h +38 -0
  677. package/node_modules/node-addon-api/src/util.h +7 -0
  678. package/node_modules/node-addon-api/tools/README.md +67 -0
  679. package/node_modules/node-addon-api/tools/check-napi.js +100 -0
  680. package/node_modules/node-addon-api/tools/conversion.js +313 -0
  681. package/node_modules/node-gyp-build/LICENSE +21 -0
  682. package/node_modules/node-gyp-build/README.md +58 -0
  683. package/node_modules/node-gyp-build/bin.js +77 -0
  684. package/node_modules/node-gyp-build/build-test.js +19 -0
  685. package/node_modules/node-gyp-build/index.js +166 -0
  686. package/node_modules/node-gyp-build/optional.js +7 -0
  687. package/node_modules/node-gyp-build/package.json +33 -0
  688. package/node_modules/npm-run-path/index.js +39 -0
  689. package/node_modules/npm-run-path/license +21 -0
  690. package/node_modules/npm-run-path/package.json +49 -0
  691. package/node_modules/npm-run-path/readme.md +81 -0
  692. package/node_modules/once/LICENSE +15 -0
  693. package/node_modules/once/README.md +79 -0
  694. package/node_modules/once/once.js +42 -0
  695. package/node_modules/once/package.json +37 -0
  696. package/node_modules/os-locale/index.js +114 -0
  697. package/node_modules/os-locale/license +9 -0
  698. package/node_modules/os-locale/package.json +49 -0
  699. package/node_modules/os-locale/readme.md +71 -0
  700. package/node_modules/p-defer/index.js +11 -0
  701. package/node_modules/p-defer/license +21 -0
  702. package/node_modules/p-defer/package.json +45 -0
  703. package/node_modules/p-defer/readme.md +47 -0
  704. package/node_modules/p-finally/index.js +15 -0
  705. package/node_modules/p-finally/license +21 -0
  706. package/node_modules/p-finally/package.json +46 -0
  707. package/node_modules/p-finally/readme.md +47 -0
  708. package/node_modules/p-is-promise/index.d.ts +23 -0
  709. package/node_modules/p-is-promise/index.js +15 -0
  710. package/node_modules/p-is-promise/license +9 -0
  711. package/node_modules/p-is-promise/package.json +46 -0
  712. package/node_modules/p-is-promise/readme.md +43 -0
  713. package/node_modules/p-limit/index.d.ts +38 -0
  714. package/node_modules/p-limit/index.js +57 -0
  715. package/node_modules/p-limit/license +9 -0
  716. package/node_modules/p-limit/package.json +56 -0
  717. package/node_modules/p-limit/readme.md +101 -0
  718. package/node_modules/p-locate/index.js +34 -0
  719. package/node_modules/p-locate/license +9 -0
  720. package/node_modules/p-locate/package.json +55 -0
  721. package/node_modules/p-locate/readme.md +88 -0
  722. package/node_modules/p-try/index.d.ts +39 -0
  723. package/node_modules/p-try/index.js +9 -0
  724. package/node_modules/p-try/license +9 -0
  725. package/node_modules/p-try/package.json +46 -0
  726. package/node_modules/p-try/readme.md +58 -0
  727. package/node_modules/path-exists/index.js +17 -0
  728. package/node_modules/path-exists/license +21 -0
  729. package/node_modules/path-exists/package.json +44 -0
  730. package/node_modules/path-exists/readme.md +50 -0
  731. package/node_modules/path-key/index.js +13 -0
  732. package/node_modules/path-key/license +21 -0
  733. package/node_modules/path-key/package.json +43 -0
  734. package/node_modules/path-key/readme.md +51 -0
  735. package/node_modules/pbkdf2/LICENSE +21 -0
  736. package/node_modules/pbkdf2/README.md +30 -0
  737. package/node_modules/pbkdf2/browser.js +2 -0
  738. package/node_modules/pbkdf2/index.js +38 -0
  739. package/node_modules/pbkdf2/lib/async.js +102 -0
  740. package/node_modules/pbkdf2/lib/default-encoding.js +12 -0
  741. package/node_modules/pbkdf2/lib/precondition.js +19 -0
  742. package/node_modules/pbkdf2/lib/sync-browser.js +105 -0
  743. package/node_modules/pbkdf2/lib/sync.js +52 -0
  744. package/node_modules/pbkdf2/lib/to-buffer.js +13 -0
  745. package/node_modules/pbkdf2/package.json +74 -0
  746. package/node_modules/pump/.travis.yml +5 -0
  747. package/node_modules/pump/LICENSE +21 -0
  748. package/node_modules/pump/README.md +65 -0
  749. package/node_modules/pump/index.js +82 -0
  750. package/node_modules/pump/package.json +28 -0
  751. package/node_modules/pump/test-browser.js +66 -0
  752. package/node_modules/pump/test-node.js +53 -0
  753. package/node_modules/randombytes/.travis.yml +15 -0
  754. package/node_modules/randombytes/.zuul.yml +1 -0
  755. package/node_modules/randombytes/LICENSE +21 -0
  756. package/node_modules/randombytes/README.md +14 -0
  757. package/node_modules/randombytes/browser.js +50 -0
  758. package/node_modules/randombytes/index.js +1 -0
  759. package/node_modules/randombytes/package.json +40 -0
  760. package/node_modules/randombytes/test.js +81 -0
  761. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  762. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  763. package/node_modules/readable-stream/LICENSE +47 -0
  764. package/node_modules/readable-stream/README.md +106 -0
  765. package/node_modules/readable-stream/errors-browser.js +127 -0
  766. package/node_modules/readable-stream/errors.js +116 -0
  767. package/node_modules/readable-stream/experimentalWarning.js +17 -0
  768. package/node_modules/readable-stream/lib/_stream_duplex.js +139 -0
  769. package/node_modules/readable-stream/lib/_stream_passthrough.js +39 -0
  770. package/node_modules/readable-stream/lib/_stream_readable.js +1124 -0
  771. package/node_modules/readable-stream/lib/_stream_transform.js +201 -0
  772. package/node_modules/readable-stream/lib/_stream_writable.js +697 -0
  773. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
  774. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
  775. package/node_modules/readable-stream/lib/internal/streams/destroy.js +105 -0
  776. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
  777. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  778. package/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
  779. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
  780. package/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
  781. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  782. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  783. package/node_modules/readable-stream/package.json +72 -0
  784. package/node_modules/readable-stream/readable-browser.js +9 -0
  785. package/node_modules/readable-stream/readable.js +16 -0
  786. package/node_modules/require-directory/.jshintrc +67 -0
  787. package/node_modules/require-directory/.npmignore +1 -0
  788. package/node_modules/require-directory/.travis.yml +3 -0
  789. package/node_modules/require-directory/LICENSE +22 -0
  790. package/node_modules/require-directory/README.markdown +184 -0
  791. package/node_modules/require-directory/index.js +86 -0
  792. package/node_modules/require-directory/package.json +44 -0
  793. package/node_modules/require-main-filename/LICENSE.txt +14 -0
  794. package/node_modules/require-main-filename/README.md +26 -0
  795. package/node_modules/require-main-filename/index.js +18 -0
  796. package/node_modules/require-main-filename/package.json +39 -0
  797. package/node_modules/ripemd160/LICENSE +21 -0
  798. package/node_modules/ripemd160/README.md +27 -0
  799. package/node_modules/ripemd160/index.js +163 -0
  800. package/node_modules/ripemd160/package.json +41 -0
  801. package/node_modules/rlp/LICENSE +373 -0
  802. package/node_modules/rlp/README.md +58 -0
  803. package/node_modules/rlp/bin/rlp +35 -0
  804. package/node_modules/rlp/dist/index.d.ts +25 -0
  805. package/node_modules/rlp/dist/index.js +249 -0
  806. package/node_modules/rlp/dist/index.js.map +1 -0
  807. package/node_modules/rlp/dist/types.d.ts +9 -0
  808. package/node_modules/rlp/dist/types.js +3 -0
  809. package/node_modules/rlp/dist/types.js.map +1 -0
  810. package/node_modules/rlp/package.json +84 -0
  811. package/node_modules/safe-buffer/LICENSE +21 -0
  812. package/node_modules/safe-buffer/README.md +584 -0
  813. package/node_modules/safe-buffer/index.d.ts +187 -0
  814. package/node_modules/safe-buffer/index.js +65 -0
  815. package/node_modules/safe-buffer/package.json +55 -0
  816. package/node_modules/scrypt-js/LICENSE.txt +22 -0
  817. package/node_modules/scrypt-js/README.md +222 -0
  818. package/node_modules/scrypt-js/index.html +291 -0
  819. package/node_modules/scrypt-js/package.json +31 -0
  820. package/node_modules/scrypt-js/scrypt.d.ts +23 -0
  821. package/node_modules/scrypt-js/scrypt.js +488 -0
  822. package/node_modules/scrypt-js/thirdparty/buffer.js +1381 -0
  823. package/node_modules/scrypt-js/thirdparty/setImmediate.js +175 -0
  824. package/node_modules/scrypt-js/thirdparty/unorm.js +442 -0
  825. package/node_modules/secp256k1/API.md +116 -0
  826. package/node_modules/secp256k1/LICENSE +24 -0
  827. package/node_modules/secp256k1/README.md +117 -0
  828. package/node_modules/secp256k1/binding.gyp +100 -0
  829. package/node_modules/secp256k1/bindings.js +2 -0
  830. package/node_modules/secp256k1/elliptic.js +1 -0
  831. package/node_modules/secp256k1/index.js +5 -0
  832. package/node_modules/secp256k1/lib/elliptic.js +402 -0
  833. package/node_modules/secp256k1/lib/index.js +336 -0
  834. package/node_modules/secp256k1/package.json +47 -0
  835. package/node_modules/secp256k1/prebuilds/darwin-x64/node.napi.node +0 -0
  836. package/node_modules/secp256k1/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  837. package/node_modules/secp256k1/prebuilds/linux-x64/node.napi.musl.node +0 -0
  838. package/node_modules/secp256k1/prebuilds/win32-x64/node.napi.node +0 -0
  839. package/node_modules/secp256k1/src/addon.cc +10 -0
  840. package/node_modules/secp256k1/src/secp256k1/.travis.yml +100 -0
  841. package/node_modules/secp256k1/src/secp256k1/COPYING +19 -0
  842. package/node_modules/secp256k1/src/secp256k1/Makefile.am +183 -0
  843. package/node_modules/secp256k1/src/secp256k1/README.md +78 -0
  844. package/node_modules/secp256k1/src/secp256k1/SECURITY.md +15 -0
  845. package/node_modules/secp256k1/src/secp256k1/TODO +3 -0
  846. package/node_modules/secp256k1/src/secp256k1/autogen.sh +3 -0
  847. package/node_modules/secp256k1/src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 +145 -0
  848. package/node_modules/secp256k1/src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 +125 -0
  849. package/node_modules/secp256k1/src/secp256k1/build-aux/m4/bitcoin_secp.m4 +68 -0
  850. package/node_modules/secp256k1/src/secp256k1/configure.ac +591 -0
  851. package/node_modules/secp256k1/src/secp256k1/contrib/lax_der_parsing.c +150 -0
  852. package/node_modules/secp256k1/src/secp256k1/contrib/lax_der_parsing.h +91 -0
  853. package/node_modules/secp256k1/src/secp256k1/contrib/lax_der_privatekey_parsing.c +113 -0
  854. package/node_modules/secp256k1/src/secp256k1/contrib/lax_der_privatekey_parsing.h +90 -0
  855. package/node_modules/secp256k1/src/secp256k1/include/secp256k1.h +708 -0
  856. package/node_modules/secp256k1/src/secp256k1/include/secp256k1_ecdh.h +55 -0
  857. package/node_modules/secp256k1/src/secp256k1/include/secp256k1_preallocated.h +128 -0
  858. package/node_modules/secp256k1/src/secp256k1/include/secp256k1_recovery.h +110 -0
  859. package/node_modules/secp256k1/src/secp256k1/libsecp256k1.pc.in +13 -0
  860. package/node_modules/secp256k1/src/secp256k1/sage/group_prover.sage +322 -0
  861. package/node_modules/secp256k1/src/secp256k1/sage/secp256k1.sage +306 -0
  862. package/node_modules/secp256k1/src/secp256k1/sage/weierstrass_prover.sage +264 -0
  863. package/node_modules/secp256k1/src/secp256k1/src/asm/field_10x26_arm.s +913 -0
  864. package/node_modules/secp256k1/src/secp256k1/src/basic-config.h +38 -0
  865. package/node_modules/secp256k1/src/secp256k1/src/bench.h +124 -0
  866. package/node_modules/secp256k1/src/secp256k1/src/bench_ecdh.c +54 -0
  867. package/node_modules/secp256k1/src/secp256k1/src/bench_ecmult.c +207 -0
  868. package/node_modules/secp256k1/src/secp256k1/src/bench_internal.c +379 -0
  869. package/node_modules/secp256k1/src/secp256k1/src/bench_recover.c +60 -0
  870. package/node_modules/secp256k1/src/secp256k1/src/bench_sign.c +56 -0
  871. package/node_modules/secp256k1/src/secp256k1/src/bench_verify.c +112 -0
  872. package/node_modules/secp256k1/src/secp256k1/src/ecdsa.h +21 -0
  873. package/node_modules/secp256k1/src/secp256k1/src/ecdsa_impl.h +319 -0
  874. package/node_modules/secp256k1/src/secp256k1/src/eckey.h +25 -0
  875. package/node_modules/secp256k1/src/secp256k1/src/eckey_impl.h +100 -0
  876. package/node_modules/secp256k1/src/secp256k1/src/ecmult.h +48 -0
  877. package/node_modules/secp256k1/src/secp256k1/src/ecmult_const.h +20 -0
  878. package/node_modules/secp256k1/src/secp256k1/src/ecmult_const_impl.h +261 -0
  879. package/node_modules/secp256k1/src/secp256k1/src/ecmult_gen.h +50 -0
  880. package/node_modules/secp256k1/src/secp256k1/src/ecmult_gen_impl.h +211 -0
  881. package/node_modules/secp256k1/src/secp256k1/src/ecmult_impl.h +1216 -0
  882. package/node_modules/secp256k1/src/secp256k1/src/field.h +132 -0
  883. package/node_modules/secp256k1/src/secp256k1/src/field_10x26.h +50 -0
  884. package/node_modules/secp256k1/src/secp256k1/src/field_10x26_impl.h +1162 -0
  885. package/node_modules/secp256k1/src/secp256k1/src/field_5x52.h +49 -0
  886. package/node_modules/secp256k1/src/secp256k1/src/field_5x52_asm_impl.h +502 -0
  887. package/node_modules/secp256k1/src/secp256k1/src/field_5x52_impl.h +496 -0
  888. package/node_modules/secp256k1/src/secp256k1/src/field_5x52_int128_impl.h +279 -0
  889. package/node_modules/secp256k1/src/secp256k1/src/field_impl.h +318 -0
  890. package/node_modules/secp256k1/src/secp256k1/src/gen_context.c +87 -0
  891. package/node_modules/secp256k1/src/secp256k1/src/group.h +142 -0
  892. package/node_modules/secp256k1/src/secp256k1/src/group_impl.h +705 -0
  893. package/node_modules/secp256k1/src/secp256k1/src/hash.h +41 -0
  894. package/node_modules/secp256k1/src/secp256k1/src/hash_impl.h +283 -0
  895. package/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java +446 -0
  896. package/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java +225 -0
  897. package/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Util.java +45 -0
  898. package/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/Secp256k1Context.java +51 -0
  899. package/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c +379 -0
  900. package/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h +119 -0
  901. package/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c +15 -0
  902. package/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h +22 -0
  903. package/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/Makefile.am.include +8 -0
  904. package/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/main_impl.h +67 -0
  905. package/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/tests_impl.h +132 -0
  906. package/node_modules/secp256k1/src/secp256k1/src/modules/recovery/Makefile.am.include +8 -0
  907. package/node_modules/secp256k1/src/secp256k1/src/modules/recovery/main_impl.h +193 -0
  908. package/node_modules/secp256k1/src/secp256k1/src/modules/recovery/tests_impl.h +393 -0
  909. package/node_modules/secp256k1/src/secp256k1/src/num.h +74 -0
  910. package/node_modules/secp256k1/src/secp256k1/src/num_gmp.h +20 -0
  911. package/node_modules/secp256k1/src/secp256k1/src/num_gmp_impl.h +288 -0
  912. package/node_modules/secp256k1/src/secp256k1/src/num_impl.h +24 -0
  913. package/node_modules/secp256k1/src/secp256k1/src/scalar.h +106 -0
  914. package/node_modules/secp256k1/src/secp256k1/src/scalar_4x64.h +19 -0
  915. package/node_modules/secp256k1/src/secp256k1/src/scalar_4x64_impl.h +949 -0
  916. package/node_modules/secp256k1/src/secp256k1/src/scalar_8x32.h +19 -0
  917. package/node_modules/secp256k1/src/secp256k1/src/scalar_8x32_impl.h +721 -0
  918. package/node_modules/secp256k1/src/secp256k1/src/scalar_impl.h +333 -0
  919. package/node_modules/secp256k1/src/secp256k1/src/scalar_low.h +15 -0
  920. package/node_modules/secp256k1/src/secp256k1/src/scalar_low_impl.h +117 -0
  921. package/node_modules/secp256k1/src/secp256k1/src/scratch.h +42 -0
  922. package/node_modules/secp256k1/src/secp256k1/src/scratch_impl.h +88 -0
  923. package/node_modules/secp256k1/src/secp256k1/src/secp256k1.c +690 -0
  924. package/node_modules/secp256k1/src/secp256k1/src/testrand.h +38 -0
  925. package/node_modules/secp256k1/src/secp256k1/src/testrand_impl.h +110 -0
  926. package/node_modules/secp256k1/src/secp256k1/src/tests.c +5310 -0
  927. package/node_modules/secp256k1/src/secp256k1/src/tests_exhaustive.c +511 -0
  928. package/node_modules/secp256k1/src/secp256k1/src/util.h +162 -0
  929. package/node_modules/secp256k1/src/secp256k1.cc +415 -0
  930. package/node_modules/secp256k1/src/secp256k1.h +63 -0
  931. package/node_modules/semver/LICENSE +15 -0
  932. package/node_modules/semver/README.md +412 -0
  933. package/node_modules/semver/bin/semver +160 -0
  934. package/node_modules/semver/package.json +32 -0
  935. package/node_modules/semver/range.bnf +16 -0
  936. package/node_modules/semver/semver.js +1483 -0
  937. package/node_modules/set-blocking/LICENSE.txt +14 -0
  938. package/node_modules/set-blocking/README.md +31 -0
  939. package/node_modules/set-blocking/index.js +7 -0
  940. package/node_modules/set-blocking/package.json +46 -0
  941. package/node_modules/setimmediate/LICENSE.txt +20 -0
  942. package/node_modules/setimmediate/package.json +34 -0
  943. package/node_modules/setimmediate/setImmediate.js +186 -0
  944. package/node_modules/sha.js/.travis.yml +17 -0
  945. package/node_modules/sha.js/LICENSE +49 -0
  946. package/node_modules/sha.js/README.md +44 -0
  947. package/node_modules/sha.js/bin.js +41 -0
  948. package/node_modules/sha.js/hash.js +81 -0
  949. package/node_modules/sha.js/index.js +15 -0
  950. package/node_modules/sha.js/package.json +34 -0
  951. package/node_modules/sha.js/sha.js +94 -0
  952. package/node_modules/sha.js/sha1.js +99 -0
  953. package/node_modules/sha.js/sha224.js +53 -0
  954. package/node_modules/sha.js/sha256.js +135 -0
  955. package/node_modules/sha.js/sha384.js +57 -0
  956. package/node_modules/sha.js/sha512.js +260 -0
  957. package/node_modules/sha.js/test/hash.js +75 -0
  958. package/node_modules/sha.js/test/test.js +100 -0
  959. package/node_modules/sha.js/test/vectors.js +72 -0
  960. package/node_modules/shebang-command/index.js +19 -0
  961. package/node_modules/shebang-command/license +21 -0
  962. package/node_modules/shebang-command/package.json +43 -0
  963. package/node_modules/shebang-command/readme.md +39 -0
  964. package/node_modules/shebang-regex/index.js +2 -0
  965. package/node_modules/shebang-regex/license +21 -0
  966. package/node_modules/shebang-regex/package.json +36 -0
  967. package/node_modules/shebang-regex/readme.md +29 -0
  968. package/node_modules/signal-exit/LICENSE.txt +16 -0
  969. package/node_modules/signal-exit/README.md +39 -0
  970. package/node_modules/signal-exit/index.js +163 -0
  971. package/node_modules/signal-exit/package.json +42 -0
  972. package/node_modules/signal-exit/signals.js +53 -0
  973. package/node_modules/source-map/LICENSE +28 -0
  974. package/node_modules/source-map/README.md +742 -0
  975. package/node_modules/source-map/dist/source-map.debug.js +3234 -0
  976. package/node_modules/source-map/dist/source-map.js +3233 -0
  977. package/node_modules/source-map/dist/source-map.min.js +2 -0
  978. package/node_modules/source-map/dist/source-map.min.js.map +1 -0
  979. package/node_modules/source-map/lib/array-set.js +121 -0
  980. package/node_modules/source-map/lib/base64-vlq.js +140 -0
  981. package/node_modules/source-map/lib/base64.js +67 -0
  982. package/node_modules/source-map/lib/binary-search.js +111 -0
  983. package/node_modules/source-map/lib/mapping-list.js +79 -0
  984. package/node_modules/source-map/lib/quick-sort.js +114 -0
  985. package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  986. package/node_modules/source-map/lib/source-map-generator.js +425 -0
  987. package/node_modules/source-map/lib/source-node.js +413 -0
  988. package/node_modules/source-map/lib/util.js +488 -0
  989. package/node_modules/source-map/package.json +77 -0
  990. package/node_modules/source-map/source-map.d.ts +98 -0
  991. package/node_modules/source-map/source-map.js +8 -0
  992. package/node_modules/source-map-support/LICENSE.md +21 -0
  993. package/node_modules/source-map-support/README.md +284 -0
  994. package/node_modules/source-map-support/browser-source-map-support.js +113 -0
  995. package/node_modules/source-map-support/package.json +35 -0
  996. package/node_modules/source-map-support/register.js +1 -0
  997. package/node_modules/source-map-support/source-map-support.js +567 -0
  998. package/node_modules/string-width/index.js +39 -0
  999. package/node_modules/string-width/license +9 -0
  1000. package/node_modules/string-width/package.json +60 -0
  1001. package/node_modules/string-width/readme.md +45 -0
  1002. package/node_modules/string_decoder/LICENSE +48 -0
  1003. package/node_modules/string_decoder/README.md +47 -0
  1004. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  1005. package/node_modules/string_decoder/package.json +38 -0
  1006. package/node_modules/strip-ansi/index.d.ts +15 -0
  1007. package/node_modules/strip-ansi/index.js +7 -0
  1008. package/node_modules/strip-ansi/license +9 -0
  1009. package/node_modules/strip-ansi/package.json +58 -0
  1010. package/node_modules/strip-ansi/readme.md +61 -0
  1011. package/node_modules/strip-eof/index.js +15 -0
  1012. package/node_modules/strip-eof/license +21 -0
  1013. package/node_modules/strip-eof/package.json +43 -0
  1014. package/node_modules/strip-eof/readme.md +28 -0
  1015. package/node_modules/strip-hex-prefix/.editorconfig +7 -0
  1016. package/node_modules/strip-hex-prefix/.gitattributes +106 -0
  1017. package/node_modules/strip-hex-prefix/.npmignore +8 -0
  1018. package/node_modules/strip-hex-prefix/.travis.yml +5 -0
  1019. package/node_modules/strip-hex-prefix/CHANGELOG.md +7 -0
  1020. package/node_modules/strip-hex-prefix/LICENSE +21 -0
  1021. package/node_modules/strip-hex-prefix/README.md +106 -0
  1022. package/node_modules/strip-hex-prefix/package.json +46 -0
  1023. package/node_modules/strip-hex-prefix/src/index.js +14 -0
  1024. package/node_modules/strip-hex-prefix/src/tests/test.index.js +47 -0
  1025. package/node_modules/util-deprecate/History.md +16 -0
  1026. package/node_modules/util-deprecate/LICENSE +24 -0
  1027. package/node_modules/util-deprecate/README.md +53 -0
  1028. package/node_modules/util-deprecate/browser.js +67 -0
  1029. package/node_modules/util-deprecate/node.js +6 -0
  1030. package/node_modules/util-deprecate/package.json +31 -0
  1031. package/node_modules/which/LICENSE +15 -0
  1032. package/node_modules/which/README.md +51 -0
  1033. package/node_modules/which/bin/which +52 -0
  1034. package/node_modules/which/package.json +34 -0
  1035. package/node_modules/which/which.js +135 -0
  1036. package/node_modules/which-module/LICENSE +13 -0
  1037. package/node_modules/which-module/README.md +55 -0
  1038. package/node_modules/which-module/index.js +9 -0
  1039. package/node_modules/which-module/package.json +45 -0
  1040. package/node_modules/wrap-ansi/index.js +188 -0
  1041. package/node_modules/wrap-ansi/license +9 -0
  1042. package/node_modules/wrap-ansi/package.json +65 -0
  1043. package/node_modules/wrap-ansi/readme.md +108 -0
  1044. package/node_modules/wrappy/LICENSE +15 -0
  1045. package/node_modules/wrappy/README.md +36 -0
  1046. package/node_modules/wrappy/package.json +33 -0
  1047. package/node_modules/wrappy/wrappy.js +33 -0
  1048. package/node_modules/y18n/LICENSE +13 -0
  1049. package/node_modules/y18n/README.md +109 -0
  1050. package/node_modules/y18n/index.js +188 -0
  1051. package/node_modules/y18n/package.json +43 -0
  1052. package/node_modules/yargs/LICENSE +22 -0
  1053. package/node_modules/yargs/README.md +122 -0
  1054. package/node_modules/yargs/index.js +32 -0
  1055. package/node_modules/yargs/lib/apply-extends.js +53 -0
  1056. package/node_modules/yargs/lib/argsert.js +68 -0
  1057. package/node_modules/yargs/lib/command.js +437 -0
  1058. package/node_modules/yargs/lib/completion-templates.js +49 -0
  1059. package/node_modules/yargs/lib/completion.js +115 -0
  1060. package/node_modules/yargs/lib/decamelize.js +32 -0
  1061. package/node_modules/yargs/lib/is-promise.js +3 -0
  1062. package/node_modules/yargs/lib/levenshtein.js +58 -0
  1063. package/node_modules/yargs/lib/middleware.js +65 -0
  1064. package/node_modules/yargs/lib/obj-filter.js +11 -0
  1065. package/node_modules/yargs/lib/usage.js +540 -0
  1066. package/node_modules/yargs/lib/validation.js +341 -0
  1067. package/node_modules/yargs/lib/yerror.js +11 -0
  1068. package/node_modules/yargs/locales/be.json +39 -0
  1069. package/node_modules/yargs/locales/de.json +39 -0
  1070. package/node_modules/yargs/locales/en.json +42 -0
  1071. package/node_modules/yargs/locales/es.json +39 -0
  1072. package/node_modules/yargs/locales/fr.json +37 -0
  1073. package/node_modules/yargs/locales/hi.json +42 -0
  1074. package/node_modules/yargs/locales/hu.json +39 -0
  1075. package/node_modules/yargs/locales/id.json +43 -0
  1076. package/node_modules/yargs/locales/it.json +39 -0
  1077. package/node_modules/yargs/locales/ja.json +42 -0
  1078. package/node_modules/yargs/locales/ko.json +42 -0
  1079. package/node_modules/yargs/locales/nb.json +37 -0
  1080. package/node_modules/yargs/locales/nl.json +42 -0
  1081. package/node_modules/yargs/locales/nn.json +39 -0
  1082. package/node_modules/yargs/locales/pirate.json +13 -0
  1083. package/node_modules/yargs/locales/pl.json +42 -0
  1084. package/node_modules/yargs/locales/pt.json +38 -0
  1085. package/node_modules/yargs/locales/pt_BR.json +42 -0
  1086. package/node_modules/yargs/locales/ru.json +39 -0
  1087. package/node_modules/yargs/locales/th.json +39 -0
  1088. package/node_modules/yargs/locales/tr.json +41 -0
  1089. package/node_modules/yargs/locales/zh_CN.json +41 -0
  1090. package/node_modules/yargs/locales/zh_TW.json +40 -0
  1091. package/node_modules/yargs/package.json +83 -0
  1092. package/node_modules/yargs/yargs.js +1205 -0
  1093. package/node_modules/yargs-parser/LICENSE.txt +14 -0
  1094. package/node_modules/yargs-parser/README.md +396 -0
  1095. package/node_modules/yargs-parser/index.js +916 -0
  1096. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +40 -0
  1097. package/node_modules/yargs-parser/package.json +51 -0
  1098. package/package.json +73 -4
@@ -0,0 +1,2420 @@
1
+ /* eslint-disable */
2
+ (function webpackUniversalModuleDefinition(root, factory) {
3
+ if(typeof exports === 'object' && typeof module === 'object')
4
+ module.exports = factory();
5
+ else if(typeof define === 'function' && define.amd)
6
+ define("ethUtil", [], factory);
7
+ else if(typeof exports === 'object')
8
+ exports["ethUtil"] = factory();
9
+ else
10
+ root["ethUtil"] = factory();
11
+ })(this, function() {
12
+ return /******/ (function(modules) { // webpackBootstrap
13
+ /******/ // The module cache
14
+ /******/ var installedModules = {};
15
+ /******/
16
+ /******/ // The require function
17
+ /******/ function __webpack_require__(moduleId) {
18
+ /******/
19
+ /******/ // Check if module is in cache
20
+ /******/ if(installedModules[moduleId])
21
+ /******/ return installedModules[moduleId].exports;
22
+ /******/
23
+ /******/ // Create a new module (and put it into the cache)
24
+ /******/ var module = installedModules[moduleId] = {
25
+ /******/ i: moduleId,
26
+ /******/ l: false,
27
+ /******/ exports: {}
28
+ /******/ };
29
+ /******/
30
+ /******/ // Execute the module function
31
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
32
+ /******/
33
+ /******/ // Flag the module as loaded
34
+ /******/ module.l = true;
35
+ /******/
36
+ /******/ // Return the exports of the module
37
+ /******/ return module.exports;
38
+ /******/ }
39
+ /******/
40
+ /******/
41
+ /******/ // expose the modules object (__webpack_modules__)
42
+ /******/ __webpack_require__.m = modules;
43
+ /******/
44
+ /******/ // expose the module cache
45
+ /******/ __webpack_require__.c = installedModules;
46
+ /******/
47
+ /******/ // identity function for calling harmory imports with the correct context
48
+ /******/ __webpack_require__.i = function(value) { return value; };
49
+ /******/
50
+ /******/ // define getter function for harmory exports
51
+ /******/ __webpack_require__.d = function(exports, name, getter) {
52
+ /******/ Object.defineProperty(exports, name, {
53
+ /******/ configurable: false,
54
+ /******/ enumerable: true,
55
+ /******/ get: getter
56
+ /******/ });
57
+ /******/ };
58
+ /******/
59
+ /******/ // Object.prototype.hasOwnProperty.call
60
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61
+ /******/
62
+ /******/ // __webpack_public_path__
63
+ /******/ __webpack_require__.p = "";
64
+ /******/
65
+ /******/ // Load entry module and return exports
66
+ /******/ return __webpack_require__(__webpack_require__.s = 3);
67
+ /******/ })
68
+ /************************************************************************/
69
+ /******/ ([
70
+ /* 0 */
71
+ /***/ function(module, exports, __webpack_require__) {
72
+
73
+ "use strict";
74
+ /* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
75
+ * The buffer module from node.js, for the browser.
76
+ *
77
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
78
+ * @license MIT
79
+ */
80
+ /* eslint-disable no-proto */
81
+
82
+ 'use strict'
83
+
84
+ var base64 = __webpack_require__(4)
85
+ var ieee754 = __webpack_require__(5)
86
+ var isArray = __webpack_require__(6)
87
+
88
+ exports.Buffer = Buffer
89
+ exports.SlowBuffer = SlowBuffer
90
+ exports.INSPECT_MAX_BYTES = 50
91
+
92
+ /**
93
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
94
+ * === true Use Uint8Array implementation (fastest)
95
+ * === false Use Object implementation (most compatible, even IE6)
96
+ *
97
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
98
+ * Opera 11.6+, iOS 4.2+.
99
+ *
100
+ * Due to various browser bugs, sometimes the Object implementation will be used even
101
+ * when the browser supports typed arrays.
102
+ *
103
+ * Note:
104
+ *
105
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
106
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
107
+ *
108
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
109
+ *
110
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
111
+ * incorrect length in some situations.
112
+
113
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
114
+ * get the Object implementation, which is slower but behaves correctly.
115
+ */
116
+ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
117
+ ? global.TYPED_ARRAY_SUPPORT
118
+ : typedArraySupport()
119
+
120
+ /*
121
+ * Export kMaxLength after typed array support is determined.
122
+ */
123
+ exports.kMaxLength = kMaxLength()
124
+
125
+ function typedArraySupport () {
126
+ try {
127
+ var arr = new Uint8Array(1)
128
+ arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
129
+ return arr.foo() === 42 && // typed array instances can be augmented
130
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
131
+ arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
132
+ } catch (e) {
133
+ return false
134
+ }
135
+ }
136
+
137
+ function kMaxLength () {
138
+ return Buffer.TYPED_ARRAY_SUPPORT
139
+ ? 0x7fffffff
140
+ : 0x3fffffff
141
+ }
142
+
143
+ function createBuffer (that, length) {
144
+ if (kMaxLength() < length) {
145
+ throw new RangeError('Invalid typed array length')
146
+ }
147
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
148
+ // Return an augmented `Uint8Array` instance, for best performance
149
+ that = new Uint8Array(length)
150
+ that.__proto__ = Buffer.prototype
151
+ } else {
152
+ // Fallback: Return an object instance of the Buffer class
153
+ if (that === null) {
154
+ that = new Buffer(length)
155
+ }
156
+ that.length = length
157
+ }
158
+
159
+ return that
160
+ }
161
+
162
+ /**
163
+ * The Buffer constructor returns instances of `Uint8Array` that have their
164
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
165
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
166
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
167
+ * returns a single octet.
168
+ *
169
+ * The `Uint8Array` prototype remains unmodified.
170
+ */
171
+
172
+ function Buffer (arg, encodingOrOffset, length) {
173
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
174
+ return new Buffer(arg, encodingOrOffset, length)
175
+ }
176
+
177
+ // Common case.
178
+ if (typeof arg === 'number') {
179
+ if (typeof encodingOrOffset === 'string') {
180
+ throw new Error(
181
+ 'If encoding is specified then the first argument must be a string'
182
+ )
183
+ }
184
+ return allocUnsafe(this, arg)
185
+ }
186
+ return from(this, arg, encodingOrOffset, length)
187
+ }
188
+
189
+ Buffer.poolSize = 8192 // not used by this implementation
190
+
191
+ // TODO: Legacy, not needed anymore. Remove in next major version.
192
+ Buffer._augment = function (arr) {
193
+ arr.__proto__ = Buffer.prototype
194
+ return arr
195
+ }
196
+
197
+ function from (that, value, encodingOrOffset, length) {
198
+ if (typeof value === 'number') {
199
+ throw new TypeError('"value" argument must not be a number')
200
+ }
201
+
202
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
203
+ return fromArrayBuffer(that, value, encodingOrOffset, length)
204
+ }
205
+
206
+ if (typeof value === 'string') {
207
+ return fromString(that, value, encodingOrOffset)
208
+ }
209
+
210
+ return fromObject(that, value)
211
+ }
212
+
213
+ /**
214
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
215
+ * if value is a number.
216
+ * Buffer.from(str[, encoding])
217
+ * Buffer.from(array)
218
+ * Buffer.from(buffer)
219
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
220
+ **/
221
+ Buffer.from = function (value, encodingOrOffset, length) {
222
+ return from(null, value, encodingOrOffset, length)
223
+ }
224
+
225
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
226
+ Buffer.prototype.__proto__ = Uint8Array.prototype
227
+ Buffer.__proto__ = Uint8Array
228
+ if (typeof Symbol !== 'undefined' && Symbol.species &&
229
+ Buffer[Symbol.species] === Buffer) {
230
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
231
+ Object.defineProperty(Buffer, Symbol.species, {
232
+ value: null,
233
+ configurable: true
234
+ })
235
+ }
236
+ }
237
+
238
+ function assertSize (size) {
239
+ if (typeof size !== 'number') {
240
+ throw new TypeError('"size" argument must be a number')
241
+ } else if (size < 0) {
242
+ throw new RangeError('"size" argument must not be negative')
243
+ }
244
+ }
245
+
246
+ function alloc (that, size, fill, encoding) {
247
+ assertSize(size)
248
+ if (size <= 0) {
249
+ return createBuffer(that, size)
250
+ }
251
+ if (fill !== undefined) {
252
+ // Only pay attention to encoding if it's a string. This
253
+ // prevents accidentally sending in a number that would
254
+ // be interpretted as a start offset.
255
+ return typeof encoding === 'string'
256
+ ? createBuffer(that, size).fill(fill, encoding)
257
+ : createBuffer(that, size).fill(fill)
258
+ }
259
+ return createBuffer(that, size)
260
+ }
261
+
262
+ /**
263
+ * Creates a new filled Buffer instance.
264
+ * alloc(size[, fill[, encoding]])
265
+ **/
266
+ Buffer.alloc = function (size, fill, encoding) {
267
+ return alloc(null, size, fill, encoding)
268
+ }
269
+
270
+ function allocUnsafe (that, size) {
271
+ assertSize(size)
272
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
273
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
274
+ for (var i = 0; i < size; ++i) {
275
+ that[i] = 0
276
+ }
277
+ }
278
+ return that
279
+ }
280
+
281
+ /**
282
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
283
+ * */
284
+ Buffer.allocUnsafe = function (size) {
285
+ return allocUnsafe(null, size)
286
+ }
287
+ /**
288
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
289
+ */
290
+ Buffer.allocUnsafeSlow = function (size) {
291
+ return allocUnsafe(null, size)
292
+ }
293
+
294
+ function fromString (that, string, encoding) {
295
+ if (typeof encoding !== 'string' || encoding === '') {
296
+ encoding = 'utf8'
297
+ }
298
+
299
+ if (!Buffer.isEncoding(encoding)) {
300
+ throw new TypeError('"encoding" must be a valid string encoding')
301
+ }
302
+
303
+ var length = byteLength(string, encoding) | 0
304
+ that = createBuffer(that, length)
305
+
306
+ var actual = that.write(string, encoding)
307
+
308
+ if (actual !== length) {
309
+ // Writing a hex string, for example, that contains invalid characters will
310
+ // cause everything after the first invalid character to be ignored. (e.g.
311
+ // 'abxxcd' will be treated as 'ab')
312
+ that = that.slice(0, actual)
313
+ }
314
+
315
+ return that
316
+ }
317
+
318
+ function fromArrayLike (that, array) {
319
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
320
+ that = createBuffer(that, length)
321
+ for (var i = 0; i < length; i += 1) {
322
+ that[i] = array[i] & 255
323
+ }
324
+ return that
325
+ }
326
+
327
+ function fromArrayBuffer (that, array, byteOffset, length) {
328
+ array.byteLength // this throws if `array` is not a valid ArrayBuffer
329
+
330
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
331
+ throw new RangeError('\'offset\' is out of bounds')
332
+ }
333
+
334
+ if (array.byteLength < byteOffset + (length || 0)) {
335
+ throw new RangeError('\'length\' is out of bounds')
336
+ }
337
+
338
+ if (byteOffset === undefined && length === undefined) {
339
+ array = new Uint8Array(array)
340
+ } else if (length === undefined) {
341
+ array = new Uint8Array(array, byteOffset)
342
+ } else {
343
+ array = new Uint8Array(array, byteOffset, length)
344
+ }
345
+
346
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
347
+ // Return an augmented `Uint8Array` instance, for best performance
348
+ that = array
349
+ that.__proto__ = Buffer.prototype
350
+ } else {
351
+ // Fallback: Return an object instance of the Buffer class
352
+ that = fromArrayLike(that, array)
353
+ }
354
+ return that
355
+ }
356
+
357
+ function fromObject (that, obj) {
358
+ if (Buffer.isBuffer(obj)) {
359
+ var len = checked(obj.length) | 0
360
+ that = createBuffer(that, len)
361
+
362
+ if (that.length === 0) {
363
+ return that
364
+ }
365
+
366
+ obj.copy(that, 0, 0, len)
367
+ return that
368
+ }
369
+
370
+ if (obj) {
371
+ if ((typeof ArrayBuffer !== 'undefined' &&
372
+ obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
373
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
374
+ return createBuffer(that, 0)
375
+ }
376
+ return fromArrayLike(that, obj)
377
+ }
378
+
379
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
380
+ return fromArrayLike(that, obj.data)
381
+ }
382
+ }
383
+
384
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
385
+ }
386
+
387
+ function checked (length) {
388
+ // Note: cannot use `length < kMaxLength()` here because that fails when
389
+ // length is NaN (which is otherwise coerced to zero.)
390
+ if (length >= kMaxLength()) {
391
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
392
+ 'size: 0x' + kMaxLength().toString(16) + ' bytes')
393
+ }
394
+ return length | 0
395
+ }
396
+
397
+ function SlowBuffer (length) {
398
+ if (+length != length) { // eslint-disable-line eqeqeq
399
+ length = 0
400
+ }
401
+ return Buffer.alloc(+length)
402
+ }
403
+
404
+ Buffer.isBuffer = function isBuffer (b) {
405
+ return !!(b != null && b._isBuffer)
406
+ }
407
+
408
+ Buffer.compare = function compare (a, b) {
409
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
410
+ throw new TypeError('Arguments must be Buffers')
411
+ }
412
+
413
+ if (a === b) return 0
414
+
415
+ var x = a.length
416
+ var y = b.length
417
+
418
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
419
+ if (a[i] !== b[i]) {
420
+ x = a[i]
421
+ y = b[i]
422
+ break
423
+ }
424
+ }
425
+
426
+ if (x < y) return -1
427
+ if (y < x) return 1
428
+ return 0
429
+ }
430
+
431
+ Buffer.isEncoding = function isEncoding (encoding) {
432
+ switch (String(encoding).toLowerCase()) {
433
+ case 'hex':
434
+ case 'utf8':
435
+ case 'utf-8':
436
+ case 'ascii':
437
+ case 'latin1':
438
+ case 'binary':
439
+ case 'base64':
440
+ case 'ucs2':
441
+ case 'ucs-2':
442
+ case 'utf16le':
443
+ case 'utf-16le':
444
+ return true
445
+ default:
446
+ return false
447
+ }
448
+ }
449
+
450
+ Buffer.concat = function concat (list, length) {
451
+ if (!isArray(list)) {
452
+ throw new TypeError('"list" argument must be an Array of Buffers')
453
+ }
454
+
455
+ if (list.length === 0) {
456
+ return Buffer.alloc(0)
457
+ }
458
+
459
+ var i
460
+ if (length === undefined) {
461
+ length = 0
462
+ for (i = 0; i < list.length; ++i) {
463
+ length += list[i].length
464
+ }
465
+ }
466
+
467
+ var buffer = Buffer.allocUnsafe(length)
468
+ var pos = 0
469
+ for (i = 0; i < list.length; ++i) {
470
+ var buf = list[i]
471
+ if (!Buffer.isBuffer(buf)) {
472
+ throw new TypeError('"list" argument must be an Array of Buffers')
473
+ }
474
+ buf.copy(buffer, pos)
475
+ pos += buf.length
476
+ }
477
+ return buffer
478
+ }
479
+
480
+ function byteLength (string, encoding) {
481
+ if (Buffer.isBuffer(string)) {
482
+ return string.length
483
+ }
484
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
485
+ (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
486
+ return string.byteLength
487
+ }
488
+ if (typeof string !== 'string') {
489
+ string = '' + string
490
+ }
491
+
492
+ var len = string.length
493
+ if (len === 0) return 0
494
+
495
+ // Use a for loop to avoid recursion
496
+ var loweredCase = false
497
+ for (;;) {
498
+ switch (encoding) {
499
+ case 'ascii':
500
+ case 'latin1':
501
+ case 'binary':
502
+ return len
503
+ case 'utf8':
504
+ case 'utf-8':
505
+ case undefined:
506
+ return utf8ToBytes(string).length
507
+ case 'ucs2':
508
+ case 'ucs-2':
509
+ case 'utf16le':
510
+ case 'utf-16le':
511
+ return len * 2
512
+ case 'hex':
513
+ return len >>> 1
514
+ case 'base64':
515
+ return base64ToBytes(string).length
516
+ default:
517
+ if (loweredCase) return utf8ToBytes(string).length // assume utf8
518
+ encoding = ('' + encoding).toLowerCase()
519
+ loweredCase = true
520
+ }
521
+ }
522
+ }
523
+ Buffer.byteLength = byteLength
524
+
525
+ function slowToString (encoding, start, end) {
526
+ var loweredCase = false
527
+
528
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
529
+ // property of a typed array.
530
+
531
+ // This behaves neither like String nor Uint8Array in that we set start/end
532
+ // to their upper/lower bounds if the value passed is out of range.
533
+ // undefined is handled specially as per ECMA-262 6th Edition,
534
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
535
+ if (start === undefined || start < 0) {
536
+ start = 0
537
+ }
538
+ // Return early if start > this.length. Done here to prevent potential uint32
539
+ // coercion fail below.
540
+ if (start > this.length) {
541
+ return ''
542
+ }
543
+
544
+ if (end === undefined || end > this.length) {
545
+ end = this.length
546
+ }
547
+
548
+ if (end <= 0) {
549
+ return ''
550
+ }
551
+
552
+ // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
553
+ end >>>= 0
554
+ start >>>= 0
555
+
556
+ if (end <= start) {
557
+ return ''
558
+ }
559
+
560
+ if (!encoding) encoding = 'utf8'
561
+
562
+ while (true) {
563
+ switch (encoding) {
564
+ case 'hex':
565
+ return hexSlice(this, start, end)
566
+
567
+ case 'utf8':
568
+ case 'utf-8':
569
+ return utf8Slice(this, start, end)
570
+
571
+ case 'ascii':
572
+ return asciiSlice(this, start, end)
573
+
574
+ case 'latin1':
575
+ case 'binary':
576
+ return latin1Slice(this, start, end)
577
+
578
+ case 'base64':
579
+ return base64Slice(this, start, end)
580
+
581
+ case 'ucs2':
582
+ case 'ucs-2':
583
+ case 'utf16le':
584
+ case 'utf-16le':
585
+ return utf16leSlice(this, start, end)
586
+
587
+ default:
588
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
589
+ encoding = (encoding + '').toLowerCase()
590
+ loweredCase = true
591
+ }
592
+ }
593
+ }
594
+
595
+ // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
596
+ // Buffer instances.
597
+ Buffer.prototype._isBuffer = true
598
+
599
+ function swap (b, n, m) {
600
+ var i = b[n]
601
+ b[n] = b[m]
602
+ b[m] = i
603
+ }
604
+
605
+ Buffer.prototype.swap16 = function swap16 () {
606
+ var len = this.length
607
+ if (len % 2 !== 0) {
608
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
609
+ }
610
+ for (var i = 0; i < len; i += 2) {
611
+ swap(this, i, i + 1)
612
+ }
613
+ return this
614
+ }
615
+
616
+ Buffer.prototype.swap32 = function swap32 () {
617
+ var len = this.length
618
+ if (len % 4 !== 0) {
619
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
620
+ }
621
+ for (var i = 0; i < len; i += 4) {
622
+ swap(this, i, i + 3)
623
+ swap(this, i + 1, i + 2)
624
+ }
625
+ return this
626
+ }
627
+
628
+ Buffer.prototype.swap64 = function swap64 () {
629
+ var len = this.length
630
+ if (len % 8 !== 0) {
631
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
632
+ }
633
+ for (var i = 0; i < len; i += 8) {
634
+ swap(this, i, i + 7)
635
+ swap(this, i + 1, i + 6)
636
+ swap(this, i + 2, i + 5)
637
+ swap(this, i + 3, i + 4)
638
+ }
639
+ return this
640
+ }
641
+
642
+ Buffer.prototype.toString = function toString () {
643
+ var length = this.length | 0
644
+ if (length === 0) return ''
645
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
646
+ return slowToString.apply(this, arguments)
647
+ }
648
+
649
+ Buffer.prototype.equals = function equals (b) {
650
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
651
+ if (this === b) return true
652
+ return Buffer.compare(this, b) === 0
653
+ }
654
+
655
+ Buffer.prototype.inspect = function inspect () {
656
+ var str = ''
657
+ var max = exports.INSPECT_MAX_BYTES
658
+ if (this.length > 0) {
659
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
660
+ if (this.length > max) str += ' ... '
661
+ }
662
+ return '<Buffer ' + str + '>'
663
+ }
664
+
665
+ Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
666
+ if (!Buffer.isBuffer(target)) {
667
+ throw new TypeError('Argument must be a Buffer')
668
+ }
669
+
670
+ if (start === undefined) {
671
+ start = 0
672
+ }
673
+ if (end === undefined) {
674
+ end = target ? target.length : 0
675
+ }
676
+ if (thisStart === undefined) {
677
+ thisStart = 0
678
+ }
679
+ if (thisEnd === undefined) {
680
+ thisEnd = this.length
681
+ }
682
+
683
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
684
+ throw new RangeError('out of range index')
685
+ }
686
+
687
+ if (thisStart >= thisEnd && start >= end) {
688
+ return 0
689
+ }
690
+ if (thisStart >= thisEnd) {
691
+ return -1
692
+ }
693
+ if (start >= end) {
694
+ return 1
695
+ }
696
+
697
+ start >>>= 0
698
+ end >>>= 0
699
+ thisStart >>>= 0
700
+ thisEnd >>>= 0
701
+
702
+ if (this === target) return 0
703
+
704
+ var x = thisEnd - thisStart
705
+ var y = end - start
706
+ var len = Math.min(x, y)
707
+
708
+ var thisCopy = this.slice(thisStart, thisEnd)
709
+ var targetCopy = target.slice(start, end)
710
+
711
+ for (var i = 0; i < len; ++i) {
712
+ if (thisCopy[i] !== targetCopy[i]) {
713
+ x = thisCopy[i]
714
+ y = targetCopy[i]
715
+ break
716
+ }
717
+ }
718
+
719
+ if (x < y) return -1
720
+ if (y < x) return 1
721
+ return 0
722
+ }
723
+
724
+ // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
725
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
726
+ //
727
+ // Arguments:
728
+ // - buffer - a Buffer to search
729
+ // - val - a string, Buffer, or number
730
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
731
+ // - encoding - an optional encoding, relevant is val is a string
732
+ // - dir - true for indexOf, false for lastIndexOf
733
+ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
734
+ // Empty buffer means no match
735
+ if (buffer.length === 0) return -1
736
+
737
+ // Normalize byteOffset
738
+ if (typeof byteOffset === 'string') {
739
+ encoding = byteOffset
740
+ byteOffset = 0
741
+ } else if (byteOffset > 0x7fffffff) {
742
+ byteOffset = 0x7fffffff
743
+ } else if (byteOffset < -0x80000000) {
744
+ byteOffset = -0x80000000
745
+ }
746
+ byteOffset = +byteOffset // Coerce to Number.
747
+ if (isNaN(byteOffset)) {
748
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
749
+ byteOffset = dir ? 0 : (buffer.length - 1)
750
+ }
751
+
752
+ // Normalize byteOffset: negative offsets start from the end of the buffer
753
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
754
+ if (byteOffset >= buffer.length) {
755
+ if (dir) return -1
756
+ else byteOffset = buffer.length - 1
757
+ } else if (byteOffset < 0) {
758
+ if (dir) byteOffset = 0
759
+ else return -1
760
+ }
761
+
762
+ // Normalize val
763
+ if (typeof val === 'string') {
764
+ val = Buffer.from(val, encoding)
765
+ }
766
+
767
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
768
+ if (Buffer.isBuffer(val)) {
769
+ // Special case: looking for empty string/buffer always fails
770
+ if (val.length === 0) {
771
+ return -1
772
+ }
773
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
774
+ } else if (typeof val === 'number') {
775
+ val = val & 0xFF // Search for a byte value [0-255]
776
+ if (Buffer.TYPED_ARRAY_SUPPORT &&
777
+ typeof Uint8Array.prototype.indexOf === 'function') {
778
+ if (dir) {
779
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
780
+ } else {
781
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
782
+ }
783
+ }
784
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
785
+ }
786
+
787
+ throw new TypeError('val must be string, number or Buffer')
788
+ }
789
+
790
+ function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
791
+ var indexSize = 1
792
+ var arrLength = arr.length
793
+ var valLength = val.length
794
+
795
+ if (encoding !== undefined) {
796
+ encoding = String(encoding).toLowerCase()
797
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
798
+ encoding === 'utf16le' || encoding === 'utf-16le') {
799
+ if (arr.length < 2 || val.length < 2) {
800
+ return -1
801
+ }
802
+ indexSize = 2
803
+ arrLength /= 2
804
+ valLength /= 2
805
+ byteOffset /= 2
806
+ }
807
+ }
808
+
809
+ function read (buf, i) {
810
+ if (indexSize === 1) {
811
+ return buf[i]
812
+ } else {
813
+ return buf.readUInt16BE(i * indexSize)
814
+ }
815
+ }
816
+
817
+ var i
818
+ if (dir) {
819
+ var foundIndex = -1
820
+ for (i = byteOffset; i < arrLength; i++) {
821
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
822
+ if (foundIndex === -1) foundIndex = i
823
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
824
+ } else {
825
+ if (foundIndex !== -1) i -= i - foundIndex
826
+ foundIndex = -1
827
+ }
828
+ }
829
+ } else {
830
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
831
+ for (i = byteOffset; i >= 0; i--) {
832
+ var found = true
833
+ for (var j = 0; j < valLength; j++) {
834
+ if (read(arr, i + j) !== read(val, j)) {
835
+ found = false
836
+ break
837
+ }
838
+ }
839
+ if (found) return i
840
+ }
841
+ }
842
+
843
+ return -1
844
+ }
845
+
846
+ Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
847
+ return this.indexOf(val, byteOffset, encoding) !== -1
848
+ }
849
+
850
+ Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
851
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
852
+ }
853
+
854
+ Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
855
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
856
+ }
857
+
858
+ function hexWrite (buf, string, offset, length) {
859
+ offset = Number(offset) || 0
860
+ var remaining = buf.length - offset
861
+ if (!length) {
862
+ length = remaining
863
+ } else {
864
+ length = Number(length)
865
+ if (length > remaining) {
866
+ length = remaining
867
+ }
868
+ }
869
+
870
+ // must be an even number of digits
871
+ var strLen = string.length
872
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
873
+
874
+ if (length > strLen / 2) {
875
+ length = strLen / 2
876
+ }
877
+ for (var i = 0; i < length; ++i) {
878
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
879
+ if (isNaN(parsed)) return i
880
+ buf[offset + i] = parsed
881
+ }
882
+ return i
883
+ }
884
+
885
+ function utf8Write (buf, string, offset, length) {
886
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
887
+ }
888
+
889
+ function asciiWrite (buf, string, offset, length) {
890
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
891
+ }
892
+
893
+ function latin1Write (buf, string, offset, length) {
894
+ return asciiWrite(buf, string, offset, length)
895
+ }
896
+
897
+ function base64Write (buf, string, offset, length) {
898
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
899
+ }
900
+
901
+ function ucs2Write (buf, string, offset, length) {
902
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
903
+ }
904
+
905
+ Buffer.prototype.write = function write (string, offset, length, encoding) {
906
+ // Buffer#write(string)
907
+ if (offset === undefined) {
908
+ encoding = 'utf8'
909
+ length = this.length
910
+ offset = 0
911
+ // Buffer#write(string, encoding)
912
+ } else if (length === undefined && typeof offset === 'string') {
913
+ encoding = offset
914
+ length = this.length
915
+ offset = 0
916
+ // Buffer#write(string, offset[, length][, encoding])
917
+ } else if (isFinite(offset)) {
918
+ offset = offset | 0
919
+ if (isFinite(length)) {
920
+ length = length | 0
921
+ if (encoding === undefined) encoding = 'utf8'
922
+ } else {
923
+ encoding = length
924
+ length = undefined
925
+ }
926
+ // legacy write(string, encoding, offset, length) - remove in v0.13
927
+ } else {
928
+ throw new Error(
929
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
930
+ )
931
+ }
932
+
933
+ var remaining = this.length - offset
934
+ if (length === undefined || length > remaining) length = remaining
935
+
936
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
937
+ throw new RangeError('Attempt to write outside buffer bounds')
938
+ }
939
+
940
+ if (!encoding) encoding = 'utf8'
941
+
942
+ var loweredCase = false
943
+ for (;;) {
944
+ switch (encoding) {
945
+ case 'hex':
946
+ return hexWrite(this, string, offset, length)
947
+
948
+ case 'utf8':
949
+ case 'utf-8':
950
+ return utf8Write(this, string, offset, length)
951
+
952
+ case 'ascii':
953
+ return asciiWrite(this, string, offset, length)
954
+
955
+ case 'latin1':
956
+ case 'binary':
957
+ return latin1Write(this, string, offset, length)
958
+
959
+ case 'base64':
960
+ // Warning: maxLength not taken into account in base64Write
961
+ return base64Write(this, string, offset, length)
962
+
963
+ case 'ucs2':
964
+ case 'ucs-2':
965
+ case 'utf16le':
966
+ case 'utf-16le':
967
+ return ucs2Write(this, string, offset, length)
968
+
969
+ default:
970
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
971
+ encoding = ('' + encoding).toLowerCase()
972
+ loweredCase = true
973
+ }
974
+ }
975
+ }
976
+
977
+ Buffer.prototype.toJSON = function toJSON () {
978
+ return {
979
+ type: 'Buffer',
980
+ data: Array.prototype.slice.call(this._arr || this, 0)
981
+ }
982
+ }
983
+
984
+ function base64Slice (buf, start, end) {
985
+ if (start === 0 && end === buf.length) {
986
+ return base64.fromByteArray(buf)
987
+ } else {
988
+ return base64.fromByteArray(buf.slice(start, end))
989
+ }
990
+ }
991
+
992
+ function utf8Slice (buf, start, end) {
993
+ end = Math.min(buf.length, end)
994
+ var res = []
995
+
996
+ var i = start
997
+ while (i < end) {
998
+ var firstByte = buf[i]
999
+ var codePoint = null
1000
+ var bytesPerSequence = (firstByte > 0xEF) ? 4
1001
+ : (firstByte > 0xDF) ? 3
1002
+ : (firstByte > 0xBF) ? 2
1003
+ : 1
1004
+
1005
+ if (i + bytesPerSequence <= end) {
1006
+ var secondByte, thirdByte, fourthByte, tempCodePoint
1007
+
1008
+ switch (bytesPerSequence) {
1009
+ case 1:
1010
+ if (firstByte < 0x80) {
1011
+ codePoint = firstByte
1012
+ }
1013
+ break
1014
+ case 2:
1015
+ secondByte = buf[i + 1]
1016
+ if ((secondByte & 0xC0) === 0x80) {
1017
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
1018
+ if (tempCodePoint > 0x7F) {
1019
+ codePoint = tempCodePoint
1020
+ }
1021
+ }
1022
+ break
1023
+ case 3:
1024
+ secondByte = buf[i + 1]
1025
+ thirdByte = buf[i + 2]
1026
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
1027
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
1028
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
1029
+ codePoint = tempCodePoint
1030
+ }
1031
+ }
1032
+ break
1033
+ case 4:
1034
+ secondByte = buf[i + 1]
1035
+ thirdByte = buf[i + 2]
1036
+ fourthByte = buf[i + 3]
1037
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
1038
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
1039
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
1040
+ codePoint = tempCodePoint
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+
1046
+ if (codePoint === null) {
1047
+ // we did not generate a valid codePoint so insert a
1048
+ // replacement char (U+FFFD) and advance only 1 byte
1049
+ codePoint = 0xFFFD
1050
+ bytesPerSequence = 1
1051
+ } else if (codePoint > 0xFFFF) {
1052
+ // encode to utf16 (surrogate pair dance)
1053
+ codePoint -= 0x10000
1054
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800)
1055
+ codePoint = 0xDC00 | codePoint & 0x3FF
1056
+ }
1057
+
1058
+ res.push(codePoint)
1059
+ i += bytesPerSequence
1060
+ }
1061
+
1062
+ return decodeCodePointsArray(res)
1063
+ }
1064
+
1065
+ // Based on http://stackoverflow.com/a/22747272/680742, the browser with
1066
+ // the lowest limit is Chrome, with 0x10000 args.
1067
+ // We go 1 magnitude less, for safety
1068
+ var MAX_ARGUMENTS_LENGTH = 0x1000
1069
+
1070
+ function decodeCodePointsArray (codePoints) {
1071
+ var len = codePoints.length
1072
+ if (len <= MAX_ARGUMENTS_LENGTH) {
1073
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
1074
+ }
1075
+
1076
+ // Decode in chunks to avoid "call stack size exceeded".
1077
+ var res = ''
1078
+ var i = 0
1079
+ while (i < len) {
1080
+ res += String.fromCharCode.apply(
1081
+ String,
1082
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
1083
+ )
1084
+ }
1085
+ return res
1086
+ }
1087
+
1088
+ function asciiSlice (buf, start, end) {
1089
+ var ret = ''
1090
+ end = Math.min(buf.length, end)
1091
+
1092
+ for (var i = start; i < end; ++i) {
1093
+ ret += String.fromCharCode(buf[i] & 0x7F)
1094
+ }
1095
+ return ret
1096
+ }
1097
+
1098
+ function latin1Slice (buf, start, end) {
1099
+ var ret = ''
1100
+ end = Math.min(buf.length, end)
1101
+
1102
+ for (var i = start; i < end; ++i) {
1103
+ ret += String.fromCharCode(buf[i])
1104
+ }
1105
+ return ret
1106
+ }
1107
+
1108
+ function hexSlice (buf, start, end) {
1109
+ var len = buf.length
1110
+
1111
+ if (!start || start < 0) start = 0
1112
+ if (!end || end < 0 || end > len) end = len
1113
+
1114
+ var out = ''
1115
+ for (var i = start; i < end; ++i) {
1116
+ out += toHex(buf[i])
1117
+ }
1118
+ return out
1119
+ }
1120
+
1121
+ function utf16leSlice (buf, start, end) {
1122
+ var bytes = buf.slice(start, end)
1123
+ var res = ''
1124
+ for (var i = 0; i < bytes.length; i += 2) {
1125
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
1126
+ }
1127
+ return res
1128
+ }
1129
+
1130
+ Buffer.prototype.slice = function slice (start, end) {
1131
+ var len = this.length
1132
+ start = ~~start
1133
+ end = end === undefined ? len : ~~end
1134
+
1135
+ if (start < 0) {
1136
+ start += len
1137
+ if (start < 0) start = 0
1138
+ } else if (start > len) {
1139
+ start = len
1140
+ }
1141
+
1142
+ if (end < 0) {
1143
+ end += len
1144
+ if (end < 0) end = 0
1145
+ } else if (end > len) {
1146
+ end = len
1147
+ }
1148
+
1149
+ if (end < start) end = start
1150
+
1151
+ var newBuf
1152
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1153
+ newBuf = this.subarray(start, end)
1154
+ newBuf.__proto__ = Buffer.prototype
1155
+ } else {
1156
+ var sliceLen = end - start
1157
+ newBuf = new Buffer(sliceLen, undefined)
1158
+ for (var i = 0; i < sliceLen; ++i) {
1159
+ newBuf[i] = this[i + start]
1160
+ }
1161
+ }
1162
+
1163
+ return newBuf
1164
+ }
1165
+
1166
+ /*
1167
+ * Need to make sure that buffer isn't trying to write out of bounds.
1168
+ */
1169
+ function checkOffset (offset, ext, length) {
1170
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
1171
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
1172
+ }
1173
+
1174
+ Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
1175
+ offset = offset | 0
1176
+ byteLength = byteLength | 0
1177
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1178
+
1179
+ var val = this[offset]
1180
+ var mul = 1
1181
+ var i = 0
1182
+ while (++i < byteLength && (mul *= 0x100)) {
1183
+ val += this[offset + i] * mul
1184
+ }
1185
+
1186
+ return val
1187
+ }
1188
+
1189
+ Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
1190
+ offset = offset | 0
1191
+ byteLength = byteLength | 0
1192
+ if (!noAssert) {
1193
+ checkOffset(offset, byteLength, this.length)
1194
+ }
1195
+
1196
+ var val = this[offset + --byteLength]
1197
+ var mul = 1
1198
+ while (byteLength > 0 && (mul *= 0x100)) {
1199
+ val += this[offset + --byteLength] * mul
1200
+ }
1201
+
1202
+ return val
1203
+ }
1204
+
1205
+ Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
1206
+ if (!noAssert) checkOffset(offset, 1, this.length)
1207
+ return this[offset]
1208
+ }
1209
+
1210
+ Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
1211
+ if (!noAssert) checkOffset(offset, 2, this.length)
1212
+ return this[offset] | (this[offset + 1] << 8)
1213
+ }
1214
+
1215
+ Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
1216
+ if (!noAssert) checkOffset(offset, 2, this.length)
1217
+ return (this[offset] << 8) | this[offset + 1]
1218
+ }
1219
+
1220
+ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
1221
+ if (!noAssert) checkOffset(offset, 4, this.length)
1222
+
1223
+ return ((this[offset]) |
1224
+ (this[offset + 1] << 8) |
1225
+ (this[offset + 2] << 16)) +
1226
+ (this[offset + 3] * 0x1000000)
1227
+ }
1228
+
1229
+ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
1230
+ if (!noAssert) checkOffset(offset, 4, this.length)
1231
+
1232
+ return (this[offset] * 0x1000000) +
1233
+ ((this[offset + 1] << 16) |
1234
+ (this[offset + 2] << 8) |
1235
+ this[offset + 3])
1236
+ }
1237
+
1238
+ Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
1239
+ offset = offset | 0
1240
+ byteLength = byteLength | 0
1241
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1242
+
1243
+ var val = this[offset]
1244
+ var mul = 1
1245
+ var i = 0
1246
+ while (++i < byteLength && (mul *= 0x100)) {
1247
+ val += this[offset + i] * mul
1248
+ }
1249
+ mul *= 0x80
1250
+
1251
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1252
+
1253
+ return val
1254
+ }
1255
+
1256
+ Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
1257
+ offset = offset | 0
1258
+ byteLength = byteLength | 0
1259
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1260
+
1261
+ var i = byteLength
1262
+ var mul = 1
1263
+ var val = this[offset + --i]
1264
+ while (i > 0 && (mul *= 0x100)) {
1265
+ val += this[offset + --i] * mul
1266
+ }
1267
+ mul *= 0x80
1268
+
1269
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1270
+
1271
+ return val
1272
+ }
1273
+
1274
+ Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
1275
+ if (!noAssert) checkOffset(offset, 1, this.length)
1276
+ if (!(this[offset] & 0x80)) return (this[offset])
1277
+ return ((0xff - this[offset] + 1) * -1)
1278
+ }
1279
+
1280
+ Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
1281
+ if (!noAssert) checkOffset(offset, 2, this.length)
1282
+ var val = this[offset] | (this[offset + 1] << 8)
1283
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
1284
+ }
1285
+
1286
+ Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
1287
+ if (!noAssert) checkOffset(offset, 2, this.length)
1288
+ var val = this[offset + 1] | (this[offset] << 8)
1289
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
1290
+ }
1291
+
1292
+ Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
1293
+ if (!noAssert) checkOffset(offset, 4, this.length)
1294
+
1295
+ return (this[offset]) |
1296
+ (this[offset + 1] << 8) |
1297
+ (this[offset + 2] << 16) |
1298
+ (this[offset + 3] << 24)
1299
+ }
1300
+
1301
+ Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
1302
+ if (!noAssert) checkOffset(offset, 4, this.length)
1303
+
1304
+ return (this[offset] << 24) |
1305
+ (this[offset + 1] << 16) |
1306
+ (this[offset + 2] << 8) |
1307
+ (this[offset + 3])
1308
+ }
1309
+
1310
+ Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
1311
+ if (!noAssert) checkOffset(offset, 4, this.length)
1312
+ return ieee754.read(this, offset, true, 23, 4)
1313
+ }
1314
+
1315
+ Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
1316
+ if (!noAssert) checkOffset(offset, 4, this.length)
1317
+ return ieee754.read(this, offset, false, 23, 4)
1318
+ }
1319
+
1320
+ Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
1321
+ if (!noAssert) checkOffset(offset, 8, this.length)
1322
+ return ieee754.read(this, offset, true, 52, 8)
1323
+ }
1324
+
1325
+ Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
1326
+ if (!noAssert) checkOffset(offset, 8, this.length)
1327
+ return ieee754.read(this, offset, false, 52, 8)
1328
+ }
1329
+
1330
+ function checkInt (buf, value, offset, ext, max, min) {
1331
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
1332
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
1333
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
1334
+ }
1335
+
1336
+ Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
1337
+ value = +value
1338
+ offset = offset | 0
1339
+ byteLength = byteLength | 0
1340
+ if (!noAssert) {
1341
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
1342
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
1343
+ }
1344
+
1345
+ var mul = 1
1346
+ var i = 0
1347
+ this[offset] = value & 0xFF
1348
+ while (++i < byteLength && (mul *= 0x100)) {
1349
+ this[offset + i] = (value / mul) & 0xFF
1350
+ }
1351
+
1352
+ return offset + byteLength
1353
+ }
1354
+
1355
+ Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
1356
+ value = +value
1357
+ offset = offset | 0
1358
+ byteLength = byteLength | 0
1359
+ if (!noAssert) {
1360
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
1361
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
1362
+ }
1363
+
1364
+ var i = byteLength - 1
1365
+ var mul = 1
1366
+ this[offset + i] = value & 0xFF
1367
+ while (--i >= 0 && (mul *= 0x100)) {
1368
+ this[offset + i] = (value / mul) & 0xFF
1369
+ }
1370
+
1371
+ return offset + byteLength
1372
+ }
1373
+
1374
+ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
1375
+ value = +value
1376
+ offset = offset | 0
1377
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
1378
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
1379
+ this[offset] = (value & 0xff)
1380
+ return offset + 1
1381
+ }
1382
+
1383
+ function objectWriteUInt16 (buf, value, offset, littleEndian) {
1384
+ if (value < 0) value = 0xffff + value + 1
1385
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
1386
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
1387
+ (littleEndian ? i : 1 - i) * 8
1388
+ }
1389
+ }
1390
+
1391
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
1392
+ value = +value
1393
+ offset = offset | 0
1394
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
1395
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1396
+ this[offset] = (value & 0xff)
1397
+ this[offset + 1] = (value >>> 8)
1398
+ } else {
1399
+ objectWriteUInt16(this, value, offset, true)
1400
+ }
1401
+ return offset + 2
1402
+ }
1403
+
1404
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
1405
+ value = +value
1406
+ offset = offset | 0
1407
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
1408
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1409
+ this[offset] = (value >>> 8)
1410
+ this[offset + 1] = (value & 0xff)
1411
+ } else {
1412
+ objectWriteUInt16(this, value, offset, false)
1413
+ }
1414
+ return offset + 2
1415
+ }
1416
+
1417
+ function objectWriteUInt32 (buf, value, offset, littleEndian) {
1418
+ if (value < 0) value = 0xffffffff + value + 1
1419
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
1420
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
1421
+ }
1422
+ }
1423
+
1424
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
1425
+ value = +value
1426
+ offset = offset | 0
1427
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
1428
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1429
+ this[offset + 3] = (value >>> 24)
1430
+ this[offset + 2] = (value >>> 16)
1431
+ this[offset + 1] = (value >>> 8)
1432
+ this[offset] = (value & 0xff)
1433
+ } else {
1434
+ objectWriteUInt32(this, value, offset, true)
1435
+ }
1436
+ return offset + 4
1437
+ }
1438
+
1439
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
1440
+ value = +value
1441
+ offset = offset | 0
1442
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
1443
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1444
+ this[offset] = (value >>> 24)
1445
+ this[offset + 1] = (value >>> 16)
1446
+ this[offset + 2] = (value >>> 8)
1447
+ this[offset + 3] = (value & 0xff)
1448
+ } else {
1449
+ objectWriteUInt32(this, value, offset, false)
1450
+ }
1451
+ return offset + 4
1452
+ }
1453
+
1454
+ Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
1455
+ value = +value
1456
+ offset = offset | 0
1457
+ if (!noAssert) {
1458
+ var limit = Math.pow(2, 8 * byteLength - 1)
1459
+
1460
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
1461
+ }
1462
+
1463
+ var i = 0
1464
+ var mul = 1
1465
+ var sub = 0
1466
+ this[offset] = value & 0xFF
1467
+ while (++i < byteLength && (mul *= 0x100)) {
1468
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
1469
+ sub = 1
1470
+ }
1471
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
1472
+ }
1473
+
1474
+ return offset + byteLength
1475
+ }
1476
+
1477
+ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
1478
+ value = +value
1479
+ offset = offset | 0
1480
+ if (!noAssert) {
1481
+ var limit = Math.pow(2, 8 * byteLength - 1)
1482
+
1483
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
1484
+ }
1485
+
1486
+ var i = byteLength - 1
1487
+ var mul = 1
1488
+ var sub = 0
1489
+ this[offset + i] = value & 0xFF
1490
+ while (--i >= 0 && (mul *= 0x100)) {
1491
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
1492
+ sub = 1
1493
+ }
1494
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
1495
+ }
1496
+
1497
+ return offset + byteLength
1498
+ }
1499
+
1500
+ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
1501
+ value = +value
1502
+ offset = offset | 0
1503
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
1504
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
1505
+ if (value < 0) value = 0xff + value + 1
1506
+ this[offset] = (value & 0xff)
1507
+ return offset + 1
1508
+ }
1509
+
1510
+ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
1511
+ value = +value
1512
+ offset = offset | 0
1513
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1514
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1515
+ this[offset] = (value & 0xff)
1516
+ this[offset + 1] = (value >>> 8)
1517
+ } else {
1518
+ objectWriteUInt16(this, value, offset, true)
1519
+ }
1520
+ return offset + 2
1521
+ }
1522
+
1523
+ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
1524
+ value = +value
1525
+ offset = offset | 0
1526
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1527
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1528
+ this[offset] = (value >>> 8)
1529
+ this[offset + 1] = (value & 0xff)
1530
+ } else {
1531
+ objectWriteUInt16(this, value, offset, false)
1532
+ }
1533
+ return offset + 2
1534
+ }
1535
+
1536
+ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
1537
+ value = +value
1538
+ offset = offset | 0
1539
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1540
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1541
+ this[offset] = (value & 0xff)
1542
+ this[offset + 1] = (value >>> 8)
1543
+ this[offset + 2] = (value >>> 16)
1544
+ this[offset + 3] = (value >>> 24)
1545
+ } else {
1546
+ objectWriteUInt32(this, value, offset, true)
1547
+ }
1548
+ return offset + 4
1549
+ }
1550
+
1551
+ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
1552
+ value = +value
1553
+ offset = offset | 0
1554
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1555
+ if (value < 0) value = 0xffffffff + value + 1
1556
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
1557
+ this[offset] = (value >>> 24)
1558
+ this[offset + 1] = (value >>> 16)
1559
+ this[offset + 2] = (value >>> 8)
1560
+ this[offset + 3] = (value & 0xff)
1561
+ } else {
1562
+ objectWriteUInt32(this, value, offset, false)
1563
+ }
1564
+ return offset + 4
1565
+ }
1566
+
1567
+ function checkIEEE754 (buf, value, offset, ext, max, min) {
1568
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
1569
+ if (offset < 0) throw new RangeError('Index out of range')
1570
+ }
1571
+
1572
+ function writeFloat (buf, value, offset, littleEndian, noAssert) {
1573
+ if (!noAssert) {
1574
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
1575
+ }
1576
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
1577
+ return offset + 4
1578
+ }
1579
+
1580
+ Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
1581
+ return writeFloat(this, value, offset, true, noAssert)
1582
+ }
1583
+
1584
+ Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
1585
+ return writeFloat(this, value, offset, false, noAssert)
1586
+ }
1587
+
1588
+ function writeDouble (buf, value, offset, littleEndian, noAssert) {
1589
+ if (!noAssert) {
1590
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
1591
+ }
1592
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
1593
+ return offset + 8
1594
+ }
1595
+
1596
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
1597
+ return writeDouble(this, value, offset, true, noAssert)
1598
+ }
1599
+
1600
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
1601
+ return writeDouble(this, value, offset, false, noAssert)
1602
+ }
1603
+
1604
+ // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
1605
+ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
1606
+ if (!start) start = 0
1607
+ if (!end && end !== 0) end = this.length
1608
+ if (targetStart >= target.length) targetStart = target.length
1609
+ if (!targetStart) targetStart = 0
1610
+ if (end > 0 && end < start) end = start
1611
+
1612
+ // Copy 0 bytes; we're done
1613
+ if (end === start) return 0
1614
+ if (target.length === 0 || this.length === 0) return 0
1615
+
1616
+ // Fatal error conditions
1617
+ if (targetStart < 0) {
1618
+ throw new RangeError('targetStart out of bounds')
1619
+ }
1620
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
1621
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
1622
+
1623
+ // Are we oob?
1624
+ if (end > this.length) end = this.length
1625
+ if (target.length - targetStart < end - start) {
1626
+ end = target.length - targetStart + start
1627
+ }
1628
+
1629
+ var len = end - start
1630
+ var i
1631
+
1632
+ if (this === target && start < targetStart && targetStart < end) {
1633
+ // descending copy from end
1634
+ for (i = len - 1; i >= 0; --i) {
1635
+ target[i + targetStart] = this[i + start]
1636
+ }
1637
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
1638
+ // ascending copy from start
1639
+ for (i = 0; i < len; ++i) {
1640
+ target[i + targetStart] = this[i + start]
1641
+ }
1642
+ } else {
1643
+ Uint8Array.prototype.set.call(
1644
+ target,
1645
+ this.subarray(start, start + len),
1646
+ targetStart
1647
+ )
1648
+ }
1649
+
1650
+ return len
1651
+ }
1652
+
1653
+ // Usage:
1654
+ // buffer.fill(number[, offset[, end]])
1655
+ // buffer.fill(buffer[, offset[, end]])
1656
+ // buffer.fill(string[, offset[, end]][, encoding])
1657
+ Buffer.prototype.fill = function fill (val, start, end, encoding) {
1658
+ // Handle string cases:
1659
+ if (typeof val === 'string') {
1660
+ if (typeof start === 'string') {
1661
+ encoding = start
1662
+ start = 0
1663
+ end = this.length
1664
+ } else if (typeof end === 'string') {
1665
+ encoding = end
1666
+ end = this.length
1667
+ }
1668
+ if (val.length === 1) {
1669
+ var code = val.charCodeAt(0)
1670
+ if (code < 256) {
1671
+ val = code
1672
+ }
1673
+ }
1674
+ if (encoding !== undefined && typeof encoding !== 'string') {
1675
+ throw new TypeError('encoding must be a string')
1676
+ }
1677
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
1678
+ throw new TypeError('Unknown encoding: ' + encoding)
1679
+ }
1680
+ } else if (typeof val === 'number') {
1681
+ val = val & 255
1682
+ }
1683
+
1684
+ // Invalid ranges are not set to a default, so can range check early.
1685
+ if (start < 0 || this.length < start || this.length < end) {
1686
+ throw new RangeError('Out of range index')
1687
+ }
1688
+
1689
+ if (end <= start) {
1690
+ return this
1691
+ }
1692
+
1693
+ start = start >>> 0
1694
+ end = end === undefined ? this.length : end >>> 0
1695
+
1696
+ if (!val) val = 0
1697
+
1698
+ var i
1699
+ if (typeof val === 'number') {
1700
+ for (i = start; i < end; ++i) {
1701
+ this[i] = val
1702
+ }
1703
+ } else {
1704
+ var bytes = Buffer.isBuffer(val)
1705
+ ? val
1706
+ : utf8ToBytes(new Buffer(val, encoding).toString())
1707
+ var len = bytes.length
1708
+ for (i = 0; i < end - start; ++i) {
1709
+ this[i + start] = bytes[i % len]
1710
+ }
1711
+ }
1712
+
1713
+ return this
1714
+ }
1715
+
1716
+ // HELPER FUNCTIONS
1717
+ // ================
1718
+
1719
+ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
1720
+
1721
+ function base64clean (str) {
1722
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
1723
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
1724
+ // Node converts strings with length < 2 to ''
1725
+ if (str.length < 2) return ''
1726
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
1727
+ while (str.length % 4 !== 0) {
1728
+ str = str + '='
1729
+ }
1730
+ return str
1731
+ }
1732
+
1733
+ function stringtrim (str) {
1734
+ if (str.trim) return str.trim()
1735
+ return str.replace(/^\s+|\s+$/g, '')
1736
+ }
1737
+
1738
+ function toHex (n) {
1739
+ if (n < 16) return '0' + n.toString(16)
1740
+ return n.toString(16)
1741
+ }
1742
+
1743
+ function utf8ToBytes (string, units) {
1744
+ units = units || Infinity
1745
+ var codePoint
1746
+ var length = string.length
1747
+ var leadSurrogate = null
1748
+ var bytes = []
1749
+
1750
+ for (var i = 0; i < length; ++i) {
1751
+ codePoint = string.charCodeAt(i)
1752
+
1753
+ // is surrogate component
1754
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
1755
+ // last char was a lead
1756
+ if (!leadSurrogate) {
1757
+ // no lead yet
1758
+ if (codePoint > 0xDBFF) {
1759
+ // unexpected trail
1760
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
1761
+ continue
1762
+ } else if (i + 1 === length) {
1763
+ // unpaired lead
1764
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
1765
+ continue
1766
+ }
1767
+
1768
+ // valid lead
1769
+ leadSurrogate = codePoint
1770
+
1771
+ continue
1772
+ }
1773
+
1774
+ // 2 leads in a row
1775
+ if (codePoint < 0xDC00) {
1776
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
1777
+ leadSurrogate = codePoint
1778
+ continue
1779
+ }
1780
+
1781
+ // valid surrogate pair
1782
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
1783
+ } else if (leadSurrogate) {
1784
+ // valid bmp char, but last char was a lead
1785
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
1786
+ }
1787
+
1788
+ leadSurrogate = null
1789
+
1790
+ // encode utf8
1791
+ if (codePoint < 0x80) {
1792
+ if ((units -= 1) < 0) break
1793
+ bytes.push(codePoint)
1794
+ } else if (codePoint < 0x800) {
1795
+ if ((units -= 2) < 0) break
1796
+ bytes.push(
1797
+ codePoint >> 0x6 | 0xC0,
1798
+ codePoint & 0x3F | 0x80
1799
+ )
1800
+ } else if (codePoint < 0x10000) {
1801
+ if ((units -= 3) < 0) break
1802
+ bytes.push(
1803
+ codePoint >> 0xC | 0xE0,
1804
+ codePoint >> 0x6 & 0x3F | 0x80,
1805
+ codePoint & 0x3F | 0x80
1806
+ )
1807
+ } else if (codePoint < 0x110000) {
1808
+ if ((units -= 4) < 0) break
1809
+ bytes.push(
1810
+ codePoint >> 0x12 | 0xF0,
1811
+ codePoint >> 0xC & 0x3F | 0x80,
1812
+ codePoint >> 0x6 & 0x3F | 0x80,
1813
+ codePoint & 0x3F | 0x80
1814
+ )
1815
+ } else {
1816
+ throw new Error('Invalid code point')
1817
+ }
1818
+ }
1819
+
1820
+ return bytes
1821
+ }
1822
+
1823
+ function asciiToBytes (str) {
1824
+ var byteArray = []
1825
+ for (var i = 0; i < str.length; ++i) {
1826
+ // Node's code seems to be doing this and not & 0x7F..
1827
+ byteArray.push(str.charCodeAt(i) & 0xFF)
1828
+ }
1829
+ return byteArray
1830
+ }
1831
+
1832
+ function utf16leToBytes (str, units) {
1833
+ var c, hi, lo
1834
+ var byteArray = []
1835
+ for (var i = 0; i < str.length; ++i) {
1836
+ if ((units -= 2) < 0) break
1837
+
1838
+ c = str.charCodeAt(i)
1839
+ hi = c >> 8
1840
+ lo = c % 256
1841
+ byteArray.push(lo)
1842
+ byteArray.push(hi)
1843
+ }
1844
+
1845
+ return byteArray
1846
+ }
1847
+
1848
+ function base64ToBytes (str) {
1849
+ return base64.toByteArray(base64clean(str))
1850
+ }
1851
+
1852
+ function blitBuffer (src, dst, offset, length) {
1853
+ for (var i = 0; i < length; ++i) {
1854
+ if ((i + offset >= dst.length) || (i >= src.length)) break
1855
+ dst[i + offset] = src[i]
1856
+ }
1857
+ return i
1858
+ }
1859
+
1860
+ function isnan (val) {
1861
+ return val !== val // eslint-disable-line no-self-compare
1862
+ }
1863
+
1864
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer, __webpack_require__(7)))
1865
+
1866
+ /***/ },
1867
+ /* 1 */
1868
+ /***/ function(module, exports) {
1869
+
1870
+ /**
1871
+ * Returns a `Boolean` on whether or not the a `String` starts with '0x'
1872
+ * @param {String} str the string input value
1873
+ * @return {Boolean} a boolean if it is or is not hex prefixed
1874
+ * @throws if the str input is not a string
1875
+ */
1876
+ module.exports = function isHexPrefixed(str) {
1877
+ if (typeof str !== 'string') {
1878
+ throw new Error("[is-hex-prefixed] value must be type 'string', is currently type " + (typeof str) + ", while checking isHexPrefixed.");
1879
+ }
1880
+
1881
+ return str.slice(0, 2) === '0x';
1882
+ }
1883
+
1884
+
1885
+ /***/ },
1886
+ /* 2 */
1887
+ /***/ function(module, exports, __webpack_require__) {
1888
+
1889
+ var isHexPrefixed = __webpack_require__(1);
1890
+
1891
+ /**
1892
+ * Removes '0x' from a given `String` is present
1893
+ * @param {String} str the string value
1894
+ * @return {String|Optional} a string by pass if necessary
1895
+ */
1896
+ module.exports = function stripHexPrefix(str) {
1897
+ if (typeof str !== 'string') {
1898
+ return str;
1899
+ }
1900
+
1901
+ return isHexPrefixed(str) ? str.slice(2) : str;
1902
+ }
1903
+
1904
+
1905
+ /***/ },
1906
+ /* 3 */
1907
+ /***/ function(module, exports, __webpack_require__) {
1908
+
1909
+ "use strict";
1910
+ /* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';
1911
+
1912
+ var isHexPrefixed = __webpack_require__(1);
1913
+ var stripHexPrefix = __webpack_require__(2);
1914
+
1915
+ /**
1916
+ * Pads a `String` to have an even length
1917
+ * @param {String} value
1918
+ * @return {String} output
1919
+ */
1920
+ function padToEven(value) {
1921
+ var a = value; // eslint-disable-line
1922
+
1923
+ if (typeof a !== 'string') {
1924
+ throw new Error('[ethjs-util] while padding to even, value must be string, is currently ' + typeof a + ', while padToEven.');
1925
+ }
1926
+
1927
+ if (a.length % 2) {
1928
+ a = '0' + a;
1929
+ }
1930
+
1931
+ return a;
1932
+ }
1933
+
1934
+ /**
1935
+ * Converts a `Number` into a hex `String`
1936
+ * @param {Number} i
1937
+ * @return {String}
1938
+ */
1939
+ function intToHex(i) {
1940
+ var hex = i.toString(16); // eslint-disable-line
1941
+
1942
+ return '0x' + hex;
1943
+ }
1944
+
1945
+ /**
1946
+ * Converts an `Number` to a `Buffer`
1947
+ * @param {Number} i
1948
+ * @return {Buffer}
1949
+ */
1950
+ function intToBuffer(i) {
1951
+ var hex = intToHex(i);
1952
+
1953
+ return new Buffer(padToEven(hex.slice(2)), 'hex');
1954
+ }
1955
+
1956
+ /**
1957
+ * Get the binary size of a string
1958
+ * @param {String} str
1959
+ * @return {Number}
1960
+ */
1961
+ function getBinarySize(str) {
1962
+ if (typeof str !== 'string') {
1963
+ throw new Error('[ethjs-util] while getting binary size, method getBinarySize requires input \'str\' to be type String, got \'' + typeof str + '\'.');
1964
+ }
1965
+
1966
+ return Buffer.byteLength(str, 'utf8');
1967
+ }
1968
+
1969
+ /**
1970
+ * Returns TRUE if the first specified array contains all elements
1971
+ * from the second one. FALSE otherwise.
1972
+ *
1973
+ * @param {array} superset
1974
+ * @param {array} subset
1975
+ *
1976
+ * @returns {boolean}
1977
+ */
1978
+ function arrayContainsArray(superset, subset, some) {
1979
+ if (Array.isArray(superset) !== true) {
1980
+ throw new Error('[ethjs-util] method arrayContainsArray requires input \'superset\' to be an array got type \'' + typeof superset + '\'');
1981
+ }
1982
+ if (Array.isArray(subset) !== true) {
1983
+ throw new Error('[ethjs-util] method arrayContainsArray requires input \'subset\' to be an array got type \'' + typeof subset + '\'');
1984
+ }
1985
+
1986
+ return subset[Boolean(some) && 'some' || 'every'](function (value) {
1987
+ return superset.indexOf(value) >= 0;
1988
+ });
1989
+ }
1990
+
1991
+ /**
1992
+ * Should be called to get utf8 from it's hex representation
1993
+ *
1994
+ * @method toUtf8
1995
+ * @param {String} string in hex
1996
+ * @returns {String} ascii string representation of hex value
1997
+ */
1998
+ function toUtf8(hex) {
1999
+ var bufferValue = new Buffer(padToEven(stripHexPrefix(hex).replace(/^0+|0+$/g, '')), 'hex');
2000
+
2001
+ return bufferValue.toString('utf8');
2002
+ }
2003
+
2004
+ /**
2005
+ * Should be called to get ascii from it's hex representation
2006
+ *
2007
+ * @method toAscii
2008
+ * @param {String} string in hex
2009
+ * @returns {String} ascii string representation of hex value
2010
+ */
2011
+ function toAscii(hex) {
2012
+ var str = ''; // eslint-disable-line
2013
+ var i = 0,
2014
+ l = hex.length; // eslint-disable-line
2015
+
2016
+ if (hex.substring(0, 2) === '0x') {
2017
+ i = 2;
2018
+ }
2019
+
2020
+ for (; i < l; i += 2) {
2021
+ var code = parseInt(hex.substr(i, 2), 16);
2022
+ str += String.fromCharCode(code);
2023
+ }
2024
+
2025
+ return str;
2026
+ }
2027
+
2028
+ /**
2029
+ * Should be called to get hex representation (prefixed by 0x) of utf8 string
2030
+ *
2031
+ * @method fromUtf8
2032
+ * @param {String} string
2033
+ * @param {Number} optional padding
2034
+ * @returns {String} hex representation of input string
2035
+ */
2036
+ function fromUtf8(stringValue) {
2037
+ var str = new Buffer(stringValue, 'utf8');
2038
+
2039
+ return '0x' + padToEven(str.toString('hex')).replace(/^0+|0+$/g, '');
2040
+ }
2041
+
2042
+ /**
2043
+ * Should be called to get hex representation (prefixed by 0x) of ascii string
2044
+ *
2045
+ * @method fromAscii
2046
+ * @param {String} string
2047
+ * @param {Number} optional padding
2048
+ * @returns {String} hex representation of input string
2049
+ */
2050
+ function fromAscii(stringValue) {
2051
+ var hex = ''; // eslint-disable-line
2052
+ for (var i = 0; i < stringValue.length; i++) {
2053
+ // eslint-disable-line
2054
+ var code = stringValue.charCodeAt(i);
2055
+ var n = code.toString(16);
2056
+ hex += n.length < 2 ? '0' + n : n;
2057
+ }
2058
+
2059
+ return '0x' + hex;
2060
+ }
2061
+
2062
+ /**
2063
+ * getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3]
2064
+ *
2065
+ * @method getKeys get specific key from inner object array of objects
2066
+ * @param {String} params
2067
+ * @param {String} key
2068
+ * @param {Boolean} allowEmpty
2069
+ * @returns {Array} output just a simple array of output keys
2070
+ */
2071
+ function getKeys(params, key, allowEmpty) {
2072
+ if (!Array.isArray(params)) {
2073
+ throw new Error('[ethjs-util] method getKeys expecting type Array as \'params\' input, got \'' + typeof params + '\'');
2074
+ }
2075
+ if (typeof key !== 'string') {
2076
+ throw new Error('[ethjs-util] method getKeys expecting type String for input \'key\' got \'' + typeof key + '\'.');
2077
+ }
2078
+
2079
+ var result = []; // eslint-disable-line
2080
+
2081
+ for (var i = 0; i < params.length; i++) {
2082
+ // eslint-disable-line
2083
+ var value = params[i][key]; // eslint-disable-line
2084
+ if (allowEmpty && !value) {
2085
+ value = '';
2086
+ } else if (typeof value !== 'string') {
2087
+ throw new Error('invalid abi');
2088
+ }
2089
+ result.push(value);
2090
+ }
2091
+
2092
+ return result;
2093
+ }
2094
+
2095
+ /**
2096
+ * Is the string a hex string.
2097
+ *
2098
+ * @method check if string is hex string of specific length
2099
+ * @param {String} value
2100
+ * @param {Number} length
2101
+ * @returns {Boolean} output the string is a hex string
2102
+ */
2103
+ function isHexString(value, length) {
2104
+ if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {
2105
+ return false;
2106
+ }
2107
+
2108
+ if (length && value.length !== 2 + 2 * length) {
2109
+ return false;
2110
+ }
2111
+
2112
+ return true;
2113
+ }
2114
+
2115
+ module.exports = {
2116
+ arrayContainsArray: arrayContainsArray,
2117
+ intToBuffer: intToBuffer,
2118
+ getBinarySize: getBinarySize,
2119
+ isHexPrefixed: isHexPrefixed,
2120
+ stripHexPrefix: stripHexPrefix,
2121
+ padToEven: padToEven,
2122
+ intToHex: intToHex,
2123
+ fromAscii: fromAscii,
2124
+ fromUtf8: fromUtf8,
2125
+ toAscii: toAscii,
2126
+ toUtf8: toUtf8,
2127
+ getKeys: getKeys,
2128
+ isHexString: isHexString
2129
+ };
2130
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer))
2131
+
2132
+ /***/ },
2133
+ /* 4 */
2134
+ /***/ function(module, exports) {
2135
+
2136
+ "use strict";
2137
+ 'use strict'
2138
+
2139
+ exports.byteLength = byteLength
2140
+ exports.toByteArray = toByteArray
2141
+ exports.fromByteArray = fromByteArray
2142
+
2143
+ var lookup = []
2144
+ var revLookup = []
2145
+ var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
2146
+
2147
+ var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
2148
+ for (var i = 0, len = code.length; i < len; ++i) {
2149
+ lookup[i] = code[i]
2150
+ revLookup[code.charCodeAt(i)] = i
2151
+ }
2152
+
2153
+ // Support decoding URL-safe base64 strings, as Node.js does.
2154
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
2155
+ revLookup['-'.charCodeAt(0)] = 62
2156
+ revLookup['_'.charCodeAt(0)] = 63
2157
+
2158
+ function getLens (b64) {
2159
+ var len = b64.length
2160
+
2161
+ if (len % 4 > 0) {
2162
+ throw new Error('Invalid string. Length must be a multiple of 4')
2163
+ }
2164
+
2165
+ // Trim off extra bytes after placeholder bytes are found
2166
+ // See: https://github.com/beatgammit/base64-js/issues/42
2167
+ var validLen = b64.indexOf('=')
2168
+ if (validLen === -1) validLen = len
2169
+
2170
+ var placeHoldersLen = validLen === len
2171
+ ? 0
2172
+ : 4 - (validLen % 4)
2173
+
2174
+ return [validLen, placeHoldersLen]
2175
+ }
2176
+
2177
+ // base64 is 4/3 + up to two characters of the original data
2178
+ function byteLength (b64) {
2179
+ var lens = getLens(b64)
2180
+ var validLen = lens[0]
2181
+ var placeHoldersLen = lens[1]
2182
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2183
+ }
2184
+
2185
+ function _byteLength (b64, validLen, placeHoldersLen) {
2186
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2187
+ }
2188
+
2189
+ function toByteArray (b64) {
2190
+ var tmp
2191
+ var lens = getLens(b64)
2192
+ var validLen = lens[0]
2193
+ var placeHoldersLen = lens[1]
2194
+
2195
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
2196
+
2197
+ var curByte = 0
2198
+
2199
+ // if there are placeholders, only get up to the last complete 4 chars
2200
+ var len = placeHoldersLen > 0
2201
+ ? validLen - 4
2202
+ : validLen
2203
+
2204
+ for (var i = 0; i < len; i += 4) {
2205
+ tmp =
2206
+ (revLookup[b64.charCodeAt(i)] << 18) |
2207
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
2208
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
2209
+ revLookup[b64.charCodeAt(i + 3)]
2210
+ arr[curByte++] = (tmp >> 16) & 0xFF
2211
+ arr[curByte++] = (tmp >> 8) & 0xFF
2212
+ arr[curByte++] = tmp & 0xFF
2213
+ }
2214
+
2215
+ if (placeHoldersLen === 2) {
2216
+ tmp =
2217
+ (revLookup[b64.charCodeAt(i)] << 2) |
2218
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
2219
+ arr[curByte++] = tmp & 0xFF
2220
+ }
2221
+
2222
+ if (placeHoldersLen === 1) {
2223
+ tmp =
2224
+ (revLookup[b64.charCodeAt(i)] << 10) |
2225
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
2226
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
2227
+ arr[curByte++] = (tmp >> 8) & 0xFF
2228
+ arr[curByte++] = tmp & 0xFF
2229
+ }
2230
+
2231
+ return arr
2232
+ }
2233
+
2234
+ function tripletToBase64 (num) {
2235
+ return lookup[num >> 18 & 0x3F] +
2236
+ lookup[num >> 12 & 0x3F] +
2237
+ lookup[num >> 6 & 0x3F] +
2238
+ lookup[num & 0x3F]
2239
+ }
2240
+
2241
+ function encodeChunk (uint8, start, end) {
2242
+ var tmp
2243
+ var output = []
2244
+ for (var i = start; i < end; i += 3) {
2245
+ tmp =
2246
+ ((uint8[i] << 16) & 0xFF0000) +
2247
+ ((uint8[i + 1] << 8) & 0xFF00) +
2248
+ (uint8[i + 2] & 0xFF)
2249
+ output.push(tripletToBase64(tmp))
2250
+ }
2251
+ return output.join('')
2252
+ }
2253
+
2254
+ function fromByteArray (uint8) {
2255
+ var tmp
2256
+ var len = uint8.length
2257
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
2258
+ var parts = []
2259
+ var maxChunkLength = 16383 // must be multiple of 3
2260
+
2261
+ // go through the array every three bytes, we'll deal with trailing stuff later
2262
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
2263
+ parts.push(encodeChunk(
2264
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
2265
+ ))
2266
+ }
2267
+
2268
+ // pad the end with zeros, but make sure to not forget the extra bytes
2269
+ if (extraBytes === 1) {
2270
+ tmp = uint8[len - 1]
2271
+ parts.push(
2272
+ lookup[tmp >> 2] +
2273
+ lookup[(tmp << 4) & 0x3F] +
2274
+ '=='
2275
+ )
2276
+ } else if (extraBytes === 2) {
2277
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
2278
+ parts.push(
2279
+ lookup[tmp >> 10] +
2280
+ lookup[(tmp >> 4) & 0x3F] +
2281
+ lookup[(tmp << 2) & 0x3F] +
2282
+ '='
2283
+ )
2284
+ }
2285
+
2286
+ return parts.join('')
2287
+ }
2288
+
2289
+
2290
+ /***/ },
2291
+ /* 5 */
2292
+ /***/ function(module, exports) {
2293
+
2294
+ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
2295
+ var e, m
2296
+ var eLen = (nBytes * 8) - mLen - 1
2297
+ var eMax = (1 << eLen) - 1
2298
+ var eBias = eMax >> 1
2299
+ var nBits = -7
2300
+ var i = isLE ? (nBytes - 1) : 0
2301
+ var d = isLE ? -1 : 1
2302
+ var s = buffer[offset + i]
2303
+
2304
+ i += d
2305
+
2306
+ e = s & ((1 << (-nBits)) - 1)
2307
+ s >>= (-nBits)
2308
+ nBits += eLen
2309
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
2310
+
2311
+ m = e & ((1 << (-nBits)) - 1)
2312
+ e >>= (-nBits)
2313
+ nBits += mLen
2314
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
2315
+
2316
+ if (e === 0) {
2317
+ e = 1 - eBias
2318
+ } else if (e === eMax) {
2319
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
2320
+ } else {
2321
+ m = m + Math.pow(2, mLen)
2322
+ e = e - eBias
2323
+ }
2324
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
2325
+ }
2326
+
2327
+ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
2328
+ var e, m, c
2329
+ var eLen = (nBytes * 8) - mLen - 1
2330
+ var eMax = (1 << eLen) - 1
2331
+ var eBias = eMax >> 1
2332
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
2333
+ var i = isLE ? 0 : (nBytes - 1)
2334
+ var d = isLE ? 1 : -1
2335
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
2336
+
2337
+ value = Math.abs(value)
2338
+
2339
+ if (isNaN(value) || value === Infinity) {
2340
+ m = isNaN(value) ? 1 : 0
2341
+ e = eMax
2342
+ } else {
2343
+ e = Math.floor(Math.log(value) / Math.LN2)
2344
+ if (value * (c = Math.pow(2, -e)) < 1) {
2345
+ e--
2346
+ c *= 2
2347
+ }
2348
+ if (e + eBias >= 1) {
2349
+ value += rt / c
2350
+ } else {
2351
+ value += rt * Math.pow(2, 1 - eBias)
2352
+ }
2353
+ if (value * c >= 2) {
2354
+ e++
2355
+ c /= 2
2356
+ }
2357
+
2358
+ if (e + eBias >= eMax) {
2359
+ m = 0
2360
+ e = eMax
2361
+ } else if (e + eBias >= 1) {
2362
+ m = ((value * c) - 1) * Math.pow(2, mLen)
2363
+ e = e + eBias
2364
+ } else {
2365
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
2366
+ e = 0
2367
+ }
2368
+ }
2369
+
2370
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
2371
+
2372
+ e = (e << mLen) | m
2373
+ eLen += mLen
2374
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
2375
+
2376
+ buffer[offset + i - d] |= s * 128
2377
+ }
2378
+
2379
+
2380
+ /***/ },
2381
+ /* 6 */
2382
+ /***/ function(module, exports) {
2383
+
2384
+ var toString = {}.toString;
2385
+
2386
+ module.exports = Array.isArray || function (arr) {
2387
+ return toString.call(arr) == '[object Array]';
2388
+ };
2389
+
2390
+
2391
+ /***/ },
2392
+ /* 7 */
2393
+ /***/ function(module, exports) {
2394
+
2395
+ var g;
2396
+
2397
+ // This works in non-strict mode
2398
+ g = (function() { return this; })();
2399
+
2400
+ try {
2401
+ // This works if eval is allowed (see CSP)
2402
+ g = g || Function("return this")() || (1,eval)("this");
2403
+ } catch(e) {
2404
+ // This works if the window reference is available
2405
+ if(typeof window === "object")
2406
+ g = window;
2407
+ }
2408
+
2409
+ // g can still be undefined, but nothing to do about it...
2410
+ // We return undefined, instead of nothing here, so it's
2411
+ // easier to handle this case. if(!global) { ...}
2412
+
2413
+ module.exports = g;
2414
+
2415
+
2416
+ /***/ }
2417
+ /******/ ])
2418
+ });
2419
+ ;
2420
+ //# sourceMappingURL=ethjs-util.js.map