@minip2p/node 0.10.1 → 0.10.2
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/dist/addon.d.ts +74 -0
- package/package.json +9 -9
- package/src/addon.d.ts +74 -0
package/dist/addon.d.ts
CHANGED
|
@@ -137,6 +137,20 @@ export interface NodeEndpointConfig {
|
|
|
137
137
|
discovery?: NodeDiscoveryOptions
|
|
138
138
|
/** mDNS configuration. */
|
|
139
139
|
mdns?: NodeMdnsOptions
|
|
140
|
+
/** Transport limit overrides. */
|
|
141
|
+
limits?: NodeLimitsOptions
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Transport limit overrides accepted from Node.js; see `LimitsOptions`. */
|
|
145
|
+
export interface NodeLimitsOptions {
|
|
146
|
+
/** QUIC limits. */
|
|
147
|
+
quic?: NodeQuicLimitsOptions
|
|
148
|
+
/** TCP limits. */
|
|
149
|
+
tcp?: NodeTcpLimitsOptions
|
|
150
|
+
/** Relay circuits' Yamux limits. */
|
|
151
|
+
circuit?: NodeYamuxOptions
|
|
152
|
+
/** Most relayed circuits held at once. */
|
|
153
|
+
maxCircuits?: bigint
|
|
140
154
|
}
|
|
141
155
|
|
|
142
156
|
/** mDNS configuration accepted from Node.js. */
|
|
@@ -157,5 +171,65 @@ export interface NodeMdnsOptions {
|
|
|
157
171
|
autoDial: boolean
|
|
158
172
|
}
|
|
159
173
|
|
|
174
|
+
/** QUIC limit overrides accepted from Node.js; see `QuicLimitsOptions`. */
|
|
175
|
+
export interface NodeQuicLimitsOptions {
|
|
176
|
+
/** Simultaneous connections. */
|
|
177
|
+
maxConnections?: bigint
|
|
178
|
+
/** Locally initiated streams per connection. */
|
|
179
|
+
maxStreamsPerConnection?: bigint
|
|
180
|
+
/** Bytes queued per stream. */
|
|
181
|
+
maxPendingBytesPerStream?: bigint
|
|
182
|
+
/** Bytes queued per connection. */
|
|
183
|
+
maxPendingConnectionBytes?: bigint
|
|
184
|
+
/** Connection queue reserved for control streams. */
|
|
185
|
+
controlStreamReserveBytes?: bigint
|
|
186
|
+
/** Datagrams retained while the socket would block. */
|
|
187
|
+
maxPendingDatagrams?: bigint
|
|
188
|
+
/** Idle timeout in milliseconds. */
|
|
189
|
+
idleTimeoutMs?: bigint
|
|
190
|
+
/** Whether inbound connections need a Retry first. */
|
|
191
|
+
requireAddressValidation?: boolean
|
|
192
|
+
/** Per-stream receive window. */
|
|
193
|
+
streamReceiveWindow?: bigint
|
|
194
|
+
/** Per-connection receive window, or `"unlimited"`. */
|
|
195
|
+
connectionReceiveWindow?: bigint | string
|
|
196
|
+
/** Per-connection send window. */
|
|
197
|
+
sendWindow?: bigint
|
|
198
|
+
/** WebTransport handshake timeout in milliseconds. */
|
|
199
|
+
webtransportHandshakeTimeoutMs?: bigint
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** TCP limit overrides accepted from Node.js; see `TcpLimitsOptions`. */
|
|
203
|
+
export interface NodeTcpLimitsOptions {
|
|
204
|
+
/** Connections held at once. */
|
|
205
|
+
maxConnections?: bigint
|
|
206
|
+
/** Authentication timeout in milliseconds, or `"never"`. */
|
|
207
|
+
handshakeTimeoutMs?: bigint | string
|
|
208
|
+
/** Encrypted bytes held per connection. */
|
|
209
|
+
maxBufferedSend?: bigint
|
|
210
|
+
/** Send-stall timeout in milliseconds, or `"never"`. */
|
|
211
|
+
sendStallTimeoutMs?: bigint | string
|
|
212
|
+
/** Each connection's Yamux limits. */
|
|
213
|
+
yamux?: NodeYamuxOptions
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Yamux limit overrides accepted from Node.js; see `YamuxOptions`. */
|
|
217
|
+
export interface NodeYamuxOptions {
|
|
218
|
+
/** Per-stream receive window. */
|
|
219
|
+
receiveWindow?: number
|
|
220
|
+
/** Largest data-frame payload sent. */
|
|
221
|
+
maxFrameLen?: number
|
|
222
|
+
/** Streams tracked at once. */
|
|
223
|
+
maxStreams?: bigint
|
|
224
|
+
/** Per-stream send cap. */
|
|
225
|
+
maxBufferedSend?: bigint
|
|
226
|
+
/** Session-wide send cap. */
|
|
227
|
+
maxTotalBufferedSend?: bigint
|
|
228
|
+
/** Session-wide send cap reserved for control streams. */
|
|
229
|
+
controlStreamReserve?: bigint
|
|
230
|
+
/** Control frames that may wait to be pulled. */
|
|
231
|
+
maxPendingControl?: bigint
|
|
232
|
+
}
|
|
233
|
+
|
|
160
234
|
/** Derives a peer ID from raw Ed25519 secret key material. */
|
|
161
235
|
export declare function peerIdFromSecretKey(secretKey: Uint8Array): string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minip2p/node",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Node.js bindings for minip2p",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libp2p",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"registry": "https://registry.npmjs.org/"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@minip2p/core": "0.10.
|
|
41
|
+
"@minip2p/core": "0.10.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@minip2p/test-fixtures": "0.0.0",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"typescript": "7.0.2"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@minip2p/node-darwin-arm64": "0.10.
|
|
52
|
-
"@minip2p/node-darwin-x64": "0.10.
|
|
53
|
-
"@minip2p/node-linux-arm64-gnu": "0.10.
|
|
54
|
-
"@minip2p/node-linux-arm64-musl": "0.10.
|
|
55
|
-
"@minip2p/node-linux-x64-gnu": "0.10.
|
|
56
|
-
"@minip2p/node-linux-x64-musl": "0.10.
|
|
57
|
-
"@minip2p/node-win32-x64-msvc": "0.10.
|
|
51
|
+
"@minip2p/node-darwin-arm64": "0.10.2",
|
|
52
|
+
"@minip2p/node-darwin-x64": "0.10.2",
|
|
53
|
+
"@minip2p/node-linux-arm64-gnu": "0.10.2",
|
|
54
|
+
"@minip2p/node-linux-arm64-musl": "0.10.2",
|
|
55
|
+
"@minip2p/node-linux-x64-gnu": "0.10.2",
|
|
56
|
+
"@minip2p/node-linux-x64-musl": "0.10.2",
|
|
57
|
+
"@minip2p/node-win32-x64-msvc": "0.10.2"
|
|
58
58
|
},
|
|
59
59
|
"napi": {
|
|
60
60
|
"binaryName": "minip2p",
|
package/src/addon.d.ts
CHANGED
|
@@ -137,6 +137,20 @@ export interface NodeEndpointConfig {
|
|
|
137
137
|
discovery?: NodeDiscoveryOptions
|
|
138
138
|
/** mDNS configuration. */
|
|
139
139
|
mdns?: NodeMdnsOptions
|
|
140
|
+
/** Transport limit overrides. */
|
|
141
|
+
limits?: NodeLimitsOptions
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Transport limit overrides accepted from Node.js; see `LimitsOptions`. */
|
|
145
|
+
export interface NodeLimitsOptions {
|
|
146
|
+
/** QUIC limits. */
|
|
147
|
+
quic?: NodeQuicLimitsOptions
|
|
148
|
+
/** TCP limits. */
|
|
149
|
+
tcp?: NodeTcpLimitsOptions
|
|
150
|
+
/** Relay circuits' Yamux limits. */
|
|
151
|
+
circuit?: NodeYamuxOptions
|
|
152
|
+
/** Most relayed circuits held at once. */
|
|
153
|
+
maxCircuits?: bigint
|
|
140
154
|
}
|
|
141
155
|
|
|
142
156
|
/** mDNS configuration accepted from Node.js. */
|
|
@@ -157,5 +171,65 @@ export interface NodeMdnsOptions {
|
|
|
157
171
|
autoDial: boolean
|
|
158
172
|
}
|
|
159
173
|
|
|
174
|
+
/** QUIC limit overrides accepted from Node.js; see `QuicLimitsOptions`. */
|
|
175
|
+
export interface NodeQuicLimitsOptions {
|
|
176
|
+
/** Simultaneous connections. */
|
|
177
|
+
maxConnections?: bigint
|
|
178
|
+
/** Locally initiated streams per connection. */
|
|
179
|
+
maxStreamsPerConnection?: bigint
|
|
180
|
+
/** Bytes queued per stream. */
|
|
181
|
+
maxPendingBytesPerStream?: bigint
|
|
182
|
+
/** Bytes queued per connection. */
|
|
183
|
+
maxPendingConnectionBytes?: bigint
|
|
184
|
+
/** Connection queue reserved for control streams. */
|
|
185
|
+
controlStreamReserveBytes?: bigint
|
|
186
|
+
/** Datagrams retained while the socket would block. */
|
|
187
|
+
maxPendingDatagrams?: bigint
|
|
188
|
+
/** Idle timeout in milliseconds. */
|
|
189
|
+
idleTimeoutMs?: bigint
|
|
190
|
+
/** Whether inbound connections need a Retry first. */
|
|
191
|
+
requireAddressValidation?: boolean
|
|
192
|
+
/** Per-stream receive window. */
|
|
193
|
+
streamReceiveWindow?: bigint
|
|
194
|
+
/** Per-connection receive window, or `"unlimited"`. */
|
|
195
|
+
connectionReceiveWindow?: bigint | string
|
|
196
|
+
/** Per-connection send window. */
|
|
197
|
+
sendWindow?: bigint
|
|
198
|
+
/** WebTransport handshake timeout in milliseconds. */
|
|
199
|
+
webtransportHandshakeTimeoutMs?: bigint
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** TCP limit overrides accepted from Node.js; see `TcpLimitsOptions`. */
|
|
203
|
+
export interface NodeTcpLimitsOptions {
|
|
204
|
+
/** Connections held at once. */
|
|
205
|
+
maxConnections?: bigint
|
|
206
|
+
/** Authentication timeout in milliseconds, or `"never"`. */
|
|
207
|
+
handshakeTimeoutMs?: bigint | string
|
|
208
|
+
/** Encrypted bytes held per connection. */
|
|
209
|
+
maxBufferedSend?: bigint
|
|
210
|
+
/** Send-stall timeout in milliseconds, or `"never"`. */
|
|
211
|
+
sendStallTimeoutMs?: bigint | string
|
|
212
|
+
/** Each connection's Yamux limits. */
|
|
213
|
+
yamux?: NodeYamuxOptions
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Yamux limit overrides accepted from Node.js; see `YamuxOptions`. */
|
|
217
|
+
export interface NodeYamuxOptions {
|
|
218
|
+
/** Per-stream receive window. */
|
|
219
|
+
receiveWindow?: number
|
|
220
|
+
/** Largest data-frame payload sent. */
|
|
221
|
+
maxFrameLen?: number
|
|
222
|
+
/** Streams tracked at once. */
|
|
223
|
+
maxStreams?: bigint
|
|
224
|
+
/** Per-stream send cap. */
|
|
225
|
+
maxBufferedSend?: bigint
|
|
226
|
+
/** Session-wide send cap. */
|
|
227
|
+
maxTotalBufferedSend?: bigint
|
|
228
|
+
/** Session-wide send cap reserved for control streams. */
|
|
229
|
+
controlStreamReserve?: bigint
|
|
230
|
+
/** Control frames that may wait to be pulled. */
|
|
231
|
+
maxPendingControl?: bigint
|
|
232
|
+
}
|
|
233
|
+
|
|
160
234
|
/** Derives a peer ID from raw Ed25519 secret key material. */
|
|
161
235
|
export declare function peerIdFromSecretKey(secretKey: Uint8Array): string
|