@bsv/sdk 1.9.10 → 1.9.11

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": "@bsv/sdk",
3
- "version": "1.9.10",
3
+ "version": "1.9.11",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Software Development Kit",
6
6
  "main": "dist/cjs/mod.js",
@@ -7,7 +7,6 @@
7
7
  * - Modern browsers via globalThis.crypto, self.crypto, or window.crypto
8
8
  * - Web Workers and Service Workers via self.crypto
9
9
  * - Deno and Bun via globalThis.crypto
10
- * - React Native (requires react-native-get-random-values polyfill)
11
10
  *
12
11
  * @throws {Error} If no secure random number generator is available
13
12
  */
@@ -72,34 +71,6 @@ class Rand {
72
71
  return
73
72
  }
74
73
 
75
- // React Native support - try to load polyfill
76
- if (typeof navigator !== 'undefined' && (navigator as any).product === 'ReactNative') {
77
- try {
78
- // Try to require the polyfill - this will populate globalThis.crypto
79
- // eslint-disable-next-line @typescript-eslint/no-var-requires
80
- require('react-native-get-random-values')
81
-
82
- if (typeof (globalThis as any).crypto?.getRandomValues === 'function') {
83
- this._rand = (n) => {
84
- /* eslint-disable-next-line */
85
- return this.getRandomValues(globalThis as any, n)
86
- }
87
- return
88
- }
89
- } catch (e) {
90
- // Polyfill not available - provide helpful error
91
- this._rand = (): never => {
92
- throw new Error(
93
- 'React Native detected but crypto is not available. ' +
94
- 'Please install and import "react-native-get-random-values" at the top of your entry file:\n' +
95
- 'npm install react-native-get-random-values\n' +
96
- 'Then add: import "react-native-get-random-values" to your index.js/App.js'
97
- )
98
- }
99
- return
100
- }
101
- }
102
-
103
74
  // No crypto available
104
75
  this._rand = noRand
105
76
  }