@multiplechain/bitcoin 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
16
+
17
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
18
+
19
+ /**
20
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
21
+ *
22
+ * @version 0.8.0
23
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
24
+ * @copyright Chen, Yi-Cyuan 2015-2018
25
+ * @license MIT
26
+ */
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "namespace": "multiplechain",
3
3
  "name": "@multiplechain/bitcoin",
4
- "version": "0.1.6",
4
+ "version": "0.1.8",
5
5
  "description": "Bitcoin JS provider",
6
6
  "scripts": {
7
7
  "serve": "parcel test.html --no-cache --dist-dir test",
8
8
  "build": "webpack"
9
9
  },
10
10
  "files": [
11
- "src"
11
+ "src",
12
+ "dist"
12
13
  ],
13
14
  "main": "src/bitcoin-provider.js",
14
15
  "types": "index.d.ts",
@@ -33,7 +34,8 @@
33
34
  "bignumber.js": "^9.1.1",
34
35
  "install": "^0.13.0",
35
36
  "npm": "^9.7.2",
36
- "web3-utils": "^1.8.1"
37
+ "web3-utils": "^1.8.1",
38
+ "ws": "^8.13.0"
37
39
  },
38
40
  "devDependencies": {
39
41
  "assert": "^2.0.0",
package/src/provider.js CHANGED
@@ -2,6 +2,10 @@ const Coin = require("./entity/coin");
2
2
  const Token = require("./entity/token");
3
3
  const Transaction = require("./entity/transaction");
4
4
 
5
+ if (typeof window === 'undefined') {
6
+ WebSocket = require('ws');
7
+ }
8
+
5
9
  class Provider {
6
10
 
7
11
  /**