@libp2p/utils 7.2.2-a34745c01 → 7.2.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bloom-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/bloom-filter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,WAAY,YAAW,MAAM;IACxC,SAAgB,KAAK,EAAE,MAAM,EAAE,CAAA;IAC/B,SAAgB,IAAI,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,UAAU,CAAA;gBAEZ,OAAO,GAAE,kBAAuB;IAW7C;;OAEG;IACH,GAAG,CAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAarC;;;;OAIG;IACH,GAAG,CAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;IAmBxC;;OAEG;IACH,KAAK,IAAK,IAAI;IAId,MAAM,CAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAS1B,MAAM,CAAE,GAAG,EAAE,MAAM,GAAG,OAAO;CAO9B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAc,GAAG,MAAM,CAGvF"}
1
+ {"version":3,"file":"bloom-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/bloom-filter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,WAAY,YAAW,MAAM;IACxC,SAAgB,KAAK,EAAE,MAAM,EAAE,CAAA;IAC/B,SAAgB,IAAI,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,UAAU,CAAA;gBAEZ,OAAO,GAAE,kBAAuB;IAW7C;;OAEG;IACH,GAAG,CAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAarC;;;;OAIG;IACH,GAAG,CAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;IAmBxC;;OAEG;IACH,KAAK,IAAK,IAAI;IAId,MAAM,CAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAS1B,MAAM,CAAE,GAAG,EAAE,MAAM,GAAG,OAAO;CAO9B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAc,GAAG,MAAM,CAGvF"}
@@ -1,5 +1,4 @@
1
1
  // ported from xxbloom - https://github.com/ceejbot/xxbloom/blob/master/LICENSE
2
- import { randomBytes } from '@libp2p/crypto';
3
2
  import { Uint8ArrayList } from 'uint8arraylist';
4
3
  import { alloc } from 'uint8arrays/alloc';
5
4
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
@@ -89,7 +88,7 @@ function generateSeeds(count) {
89
88
  let j;
90
89
  const seeds = [];
91
90
  for (let i = 0; i < count; i++) {
92
- buf = new Uint8ArrayList(randomBytes(4));
91
+ buf = new Uint8ArrayList(crypto.getRandomValues(new Uint8Array(4)));
93
92
  seeds[i] = buf.getUint32(0, true);
94
93
  // Make sure we don't end up with two identical seeds,
95
94
  // which is unlikely but possible.
@@ -1 +1 @@
1
- {"version":3,"file":"bloom-filter.js","sourceRoot":"","sources":["../../../src/filters/bloom-filter.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,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AAK,GAAG,EAAE,CAAA;IAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,GAAG,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACnE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAEjC,sDAAsD;QACtD,kCAAkC;QAClC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1B,CAAC,EAAE,CAAA;gBACH,MAAK;YACP,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -0,0 +1,130 @@
1
+ {
2
+ "AbstractMessageStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.AbstractMessageStream.html",
3
+ "AbstractMultiaddrConnection": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.AbstractMultiaddrConnection.html",
4
+ "AbstractStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.AbstractStream.html",
5
+ "AbstractStreamMuxer": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.AbstractStreamMuxer.html",
6
+ "AdaptiveTimeout": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.AdaptiveTimeout.html",
7
+ "BloomFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.BloomFilter.html",
8
+ "CuckooFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.CuckooFilter.html",
9
+ "InvalidDataLengthError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.InvalidDataLengthError.html",
10
+ "InvalidDataLengthLengthError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.InvalidDataLengthLengthError.html",
11
+ "InvalidMessageLengthError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.InvalidMessageLengthError.html",
12
+ "LengthPrefixedDecoder": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.LengthPrefixedDecoder.html",
13
+ "MaxEarlyStreamsError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.MaxEarlyStreamsError.html",
14
+ "MemoryStorage": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.MemoryStorage.html",
15
+ "MockStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.MockStream.html",
16
+ "MovingAverage": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.MovingAverage.html",
17
+ "PeerQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.PeerQueue.html",
18
+ "PriorityQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.PriorityQueue.html",
19
+ "Queue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.Queue.html",
20
+ "QueueFullError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.QueueFullError.html",
21
+ "RateLimiter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.RateLimiter.html",
22
+ "RateLimitError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.RateLimitError.html",
23
+ "ScalableCuckooFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.ScalableCuckooFilter.html",
24
+ "StreamClosedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.StreamClosedError.html",
25
+ "UnexpectedEOFError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.UnexpectedEOFError.html",
26
+ "UnwrappedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.UnwrappedError.html",
27
+ "AbstractMultiaddrConnectionInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.AbstractMultiaddrConnectionInit.html",
28
+ "AbstractStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.AbstractStreamInit.html",
29
+ "AbstractStreamMuxerInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.AbstractStreamMuxerInit.html",
30
+ "AdaptiveTimeoutInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.AdaptiveTimeoutInit.html",
31
+ "AdaptiveTimeoutSignal": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.AdaptiveTimeoutSignal.html",
32
+ "BloomFilterOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.BloomFilterOptions.html",
33
+ "Bucket": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Bucket.html",
34
+ "ByteStream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ByteStream.html",
35
+ "ByteStreamOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ByteStreamOpts.html",
36
+ "Comparator": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Comparator.html",
37
+ "CreateTrackedListInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.CreateTrackedListInit.html",
38
+ "CreateTrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.CreateTrackedMapInit.html",
39
+ "CuckooFilterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.CuckooFilterInit.html",
40
+ "DebouncedFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.DebouncedFunction.html",
41
+ "DNS4NetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.DNS4NetConfig.html",
42
+ "DNS6NetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.DNS6NetConfig.html",
43
+ "DNSAddrNetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.DNSAddrNetConfig.html",
44
+ "DNSNetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.DNSNetConfig.html",
45
+ "Filter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Filter.html",
46
+ "Fingerprint": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Fingerprint.html",
47
+ "GetKeySecDurationOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.GetKeySecDurationOptions.html",
48
+ "GetTimeoutSignalOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.GetTimeoutSignalOptions.html",
49
+ "Hash": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Hash.html",
50
+ "IP4NetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.IP4NetConfig.html",
51
+ "IP6NetConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.IP6NetConfig.html",
52
+ "Job": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.Job.html",
53
+ "JobMatcher": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.JobMatcher.html",
54
+ "JobRecipient": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.JobRecipient.html",
55
+ "JobTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.JobTimeline.html",
56
+ "LengthPrefixedDecoderInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.LengthPrefixedDecoderInit.html",
57
+ "LengthPrefixedStream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.LengthPrefixedStream.html",
58
+ "LengthPrefixedStreamOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.LengthPrefixedStreamOpts.html",
59
+ "MessageStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.MessageStreamInit.html",
60
+ "MockMultiaddrConnectionInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.MockMultiaddrConnectionInit.html",
61
+ "MockMuxedStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.MockMuxedStreamInit.html",
62
+ "MultiaddrConnectionPairOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.MultiaddrConnectionPairOptions.html",
63
+ "PeerQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.PeerQueueJobOptions.html",
64
+ "PriorityQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.PriorityQueueJobOptions.html",
65
+ "ProtobufDecoder": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ProtobufDecoder.html",
66
+ "ProtobufEncoder": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ProtobufEncoder.html",
67
+ "ProtobufMessageStream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ProtobufMessageStream.html",
68
+ "ProtobufStream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ProtobufStream.html",
69
+ "ProtobufStreamOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ProtobufStreamOpts.html",
70
+ "QueueEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.QueueEvents.html",
71
+ "QueueInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.QueueInit.html",
72
+ "QueueJobFailure": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.QueueJobFailure.html",
73
+ "QueueJobSuccess": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.QueueJobSuccess.html",
74
+ "RateLimiterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RateLimiterInit.html",
75
+ "RateLimiterResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RateLimiterResult.html",
76
+ "RateRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RateRecord.html",
77
+ "ReadBytesOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ReadBytesOptions.html",
78
+ "RepeatingTask": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RepeatingTask.html",
79
+ "RepeatingTaskOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RepeatingTaskOptions.html",
80
+ "RunFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.RunFunction.html",
81
+ "ScalableCuckooFilterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.ScalableCuckooFilterInit.html",
82
+ "SendResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.SendResult.html",
83
+ "StreamPairOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.StreamPairOptions.html",
84
+ "TrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.TrackedMapInit.html",
85
+ "JobStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_utils.JobStatus.html",
86
+ "NetConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_utils.NetConfig.html",
87
+ "PipeInput": "https://libp2p.github.io/js-libp2p/types/_libp2p_utils.PipeInput.html",
88
+ "DEFAULT_FAILURE_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.DEFAULT_FAILURE_MULTIPLIER.html",
89
+ "DEFAULT_INTERVAL": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.DEFAULT_INTERVAL.html",
90
+ "DEFAULT_MAX_TIMEOUT": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.DEFAULT_MAX_TIMEOUT.html",
91
+ "DEFAULT_MIN_TIMEOUT": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.DEFAULT_MIN_TIMEOUT.html",
92
+ "DEFAULT_TIMEOUT_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.DEFAULT_TIMEOUT_MULTIPLIER.html",
93
+ "byteStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.byteStream.html",
94
+ "circuitRelayAddressesLast": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.circuitRelayAddressesLast.html",
95
+ "createBloomFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.createBloomFilter.html",
96
+ "createCuckooFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.createCuckooFilter.html",
97
+ "createScalableCuckooFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.createScalableCuckooFilter.html",
98
+ "debounce": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.debounce.html",
99
+ "defaultMultiaddrSorter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.defaultMultiaddrSorter.html",
100
+ "echo": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.echo.html",
101
+ "echoStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.echoStream.html",
102
+ "getNetConfig": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.getNetConfig.html",
103
+ "getThinWaistAddresses": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.getThinWaistAddresses.html",
104
+ "ipPortToMultiaddr": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.ipPortToMultiaddr.html",
105
+ "isAsyncGenerator": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isAsyncGenerator.html",
106
+ "isGenerator": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isGenerator.html",
107
+ "isGlobalUnicast": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isGlobalUnicast.html",
108
+ "isGlobalUnicastIp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isGlobalUnicastIp.html",
109
+ "isLinkLocal": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isLinkLocal.html",
110
+ "isLinkLocalIp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isLinkLocalIp.html",
111
+ "isLoopback": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isLoopback.html",
112
+ "isNetworkAddress": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isNetworkAddress.html",
113
+ "isPrivate": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isPrivate.html",
114
+ "isPrivateIp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isPrivateIp.html",
115
+ "isPromise": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.isPromise.html",
116
+ "loopbackAddressLast": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.loopbackAddressLast.html",
117
+ "lpStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.lpStream.html",
118
+ "messageStreamToDuplex": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.messageStreamToDuplex.html",
119
+ "mockMuxer": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.mockMuxer.html",
120
+ "multiaddrConnectionPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.multiaddrConnectionPair.html",
121
+ "pbStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.pbStream.html",
122
+ "pipe": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.pipe.html",
123
+ "publicAddressesFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.publicAddressesFirst.html",
124
+ "reliableTransportsFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.reliableTransportsFirst.html",
125
+ "repeatingTask": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.repeatingTask.html",
126
+ "streamPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.streamPair.html",
127
+ "trackedList": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.trackedList.html",
128
+ "trackedMap": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.trackedMap.html",
129
+ "tryGetNetConfig": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.tryGetNetConfig.html"
130
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/utils",
3
- "version": "7.2.2-a34745c01",
3
+ "version": "7.2.3",
4
4
  "description": "Package to aggregate shared logic and dependencies for the libp2p ecosystem",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/utils#readme",
@@ -47,9 +47,8 @@
47
47
  "dependencies": {
48
48
  "@chainsafe/is-ip": "^2.1.0",
49
49
  "@chainsafe/netmask": "^2.0.0",
50
- "@libp2p/crypto": "5.1.19-a34745c01",
51
- "@libp2p/interface": "3.2.3-a34745c01",
52
- "@libp2p/logger": "6.2.8-a34745c01",
50
+ "@libp2p/interface": "^3.2.4",
51
+ "@libp2p/logger": "^6.2.9",
53
52
  "@multiformats/multiaddr": "^13.0.3",
54
53
  "@multiformats/multiaddr-matcher": "^3.0.2",
55
54
  "@sindresorhus/fnv1a": "^3.1.0",
@@ -57,7 +56,7 @@
57
56
  "cborg": "^5.1.0",
58
57
  "delay": "^7.0.0",
59
58
  "is-loopback-addr": "^2.0.2",
60
- "it-length-prefixed": "^10.0.1",
59
+ "it-length-prefixed": "^11.0.1",
61
60
  "it-pipe": "^3.0.1",
62
61
  "it-pushable": "^3.2.3",
63
62
  "it-stream-types": "^2.0.2",
@@ -67,12 +66,13 @@
67
66
  "p-event": "^7.0.0",
68
67
  "progress-events": "^1.1.0",
69
68
  "race-signal": "^2.0.0",
70
- "uint8-varint": "^2.0.4",
71
- "uint8arraylist": "^2.4.8",
69
+ "uint8-varint": "^3.0.0",
70
+ "uint8arraylist": "^3.0.2",
72
71
  "uint8arrays": "^6.1.1"
73
72
  },
74
73
  "devDependencies": {
75
- "@libp2p/peer-id": "6.0.10-a34745c01",
74
+ "@libp2p/crypto": "^5.1.20",
75
+ "@libp2p/peer-id": "^6.0.11",
76
76
  "@types/netmask": "^2.0.5",
77
77
  "aegir": "^48.0.11",
78
78
  "benchmark": "^2.1.4",
@@ -1,5 +1,4 @@
1
1
  // ported from xxbloom - https://github.com/ceejbot/xxbloom/blob/master/LICENSE
2
- import { randomBytes } from '@libp2p/crypto'
3
2
  import { Uint8ArrayList } from 'uint8arraylist'
4
3
  import { alloc } from 'uint8arrays/alloc'
5
4
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
@@ -117,7 +116,7 @@ function generateSeeds (count: number): number[] {
117
116
  const seeds = []
118
117
 
119
118
  for (let i = 0; i < count; i++) {
120
- buf = new Uint8ArrayList(randomBytes(4))
119
+ buf = new Uint8ArrayList(crypto.getRandomValues(new Uint8Array(4)))
121
120
  seeds[i] = buf.getUint32(0, true)
122
121
 
123
122
  // Make sure we don't end up with two identical seeds,