Skip to content

Commit 6d51017

Browse files
authored
feat: remove unnecessary direct dependency (#92)
Remove `iso-random-stream` direct dependency, use `randomBytes` API from `@libp2p/crypto` instead. `iso-random-stream` brings in `buffer` dependency which then needs to be polyfilled when targeting the browser.
1 parent 7a68b4b commit 6d51017

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@
190190
"@multiformats/multiaddr": "^10.2.0",
191191
"abortable-iterator": "^4.0.2",
192192
"err-code": "^3.0.1",
193-
"iso-random-stream": "^2.0.0",
194193
"it-length-prefixed": "^8.0.2",
195194
"it-pipe": "^2.0.3",
196195
"it-pushable": "^3.0.0",

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { randomBytes } from 'iso-random-stream'
1+
import { randomBytes } from '@libp2p/crypto'
22
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
33
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
44
import { sha256 } from 'multiformats/hashes/sha2'

0 commit comments

Comments
 (0)