@dxos/typings 0.1.57-main.e87098f → 0.1.57
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 +1 -1
- package/src/hypercore.d.ts +14 -4
package/package.json
CHANGED
package/src/hypercore.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ declare module 'hypercore' {
|
|
|
24
24
|
*/
|
|
25
25
|
export type Range = {
|
|
26
26
|
start: number;
|
|
27
|
-
end
|
|
28
|
-
linear
|
|
27
|
+
end?: number;
|
|
28
|
+
linear?: boolean;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -93,7 +93,7 @@ declare module 'hypercore' {
|
|
|
93
93
|
keyPair?: { publicKey: Buffer; secretKey: Buffer };
|
|
94
94
|
onauthenticate?: (remotePublicKey: Buffer, cb: () => void) => void;
|
|
95
95
|
onfeedauthenticate?: (feed: Hypercore, remotePublicKey: Buffer, cb: () => void) => void;
|
|
96
|
-
maxRequests?: number;
|
|
96
|
+
maxRequests?: number; // Default 16.
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
/**
|
|
@@ -134,7 +134,9 @@ declare module 'hypercore' {
|
|
|
134
134
|
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-feed--hypercorestorage-key-options
|
|
135
135
|
*/
|
|
136
136
|
export type HypercoreOptions = {
|
|
137
|
-
sparse?: boolean; //
|
|
137
|
+
sparse?: boolean; // Do not mark the entire feed to be downloaded.
|
|
138
|
+
eagerUpdate?: boolean;
|
|
139
|
+
maxRequests?: number;
|
|
138
140
|
createIfMissing?: boolean;
|
|
139
141
|
secretKey?: Buffer;
|
|
140
142
|
valueEncoding?: ValueEncoding;
|
|
@@ -209,6 +211,14 @@ declare module 'hypercore' {
|
|
|
209
211
|
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedcreatewritestreamopts
|
|
210
212
|
createWriteStream(options?: WriteStreamOptions): Writable;
|
|
211
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Sets up a replication stream.
|
|
216
|
+
* Blocks are downloaded:
|
|
217
|
+
* - explicitly when download or get called;
|
|
218
|
+
* - implicitly if options.sparse and options.eagerUpdate are true.
|
|
219
|
+
* @param initiator
|
|
220
|
+
* @param options
|
|
221
|
+
*/
|
|
212
222
|
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedreplicateisinitiator-options
|
|
213
223
|
replicate(initiator: boolean, options?: ReplicationOptions): ProtocolStream;
|
|
214
224
|
|