@hive-p2p/browser 1.0.81 → 1.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hive-p2p/browser",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,6 +16,7 @@
16
16
  "hive-p2p.min.js"
17
17
  ],
18
18
  "dependencies": {
19
+ "simple-peer": "~9.11.1",
19
20
  "@noble/curves": "2.0.1",
20
21
  "@noble/ciphers": "2.0.1"
21
22
  },
@@ -2,7 +2,7 @@ const base58Alphabet = { '1': 0, '2': 1, '3': 2, '4': 3, '5': 4, '6': 5, '7': 6,
2
2
  const base58AlphabetArray = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' ];
3
3
 
4
4
  export class Converter {
5
- IS_BROWSER = typeof window !== 'undefined';
5
+ IS_BROWSER = typeof self !== 'undefined';
6
6
  FROMBASE64_AVAILABLE = typeof Uint8Array.fromBase64 === 'function';
7
7
  textEncoder = new TextEncoder();
8
8
  textDecoder = new TextDecoder();
@@ -1,5 +1,5 @@
1
1
  import { Converter } from './converter.mjs';
2
- const IS_BROWSER = typeof window !== 'undefined';
2
+ const IS_BROWSER = typeof self !== 'undefined';
3
3
 
4
4
  // ED25519 EXPOSURE NODEJS/BROWSER COMPATIBLE ---------------------------------
5
5
  const { ed25519, x25519 } = await import('@noble/curves/ed25519.js');