@dxos/typings 0.6.5 → 0.6.6-main.e1a6e1f
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/project.json +1 -1
- package/src/hypercore.d.ts +13 -0
package/package.json
CHANGED
package/project.json
CHANGED
package/src/hypercore.d.ts
CHANGED
|
@@ -145,6 +145,15 @@ declare module 'hypercore' {
|
|
|
145
145
|
stats?: boolean;
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
+
export type Proof = {
|
|
149
|
+
nodes: {
|
|
150
|
+
index: number;
|
|
151
|
+
hash: Buffer;
|
|
152
|
+
size: number;
|
|
153
|
+
}[];
|
|
154
|
+
signature: Buffer;
|
|
155
|
+
};
|
|
156
|
+
|
|
148
157
|
/**
|
|
149
158
|
* Shared property definitions for raw and wrapped objects.
|
|
150
159
|
*/
|
|
@@ -265,6 +274,10 @@ declare module 'hypercore' {
|
|
|
265
274
|
// https://github.com/holepunchto/hypercore/tree/v9.12.0#feedsetdownloadingbool
|
|
266
275
|
setDownloading(bool): void;
|
|
267
276
|
|
|
277
|
+
proof(index: number, cb?: Callback<Proof>): void;
|
|
278
|
+
|
|
279
|
+
put(index: number, data: T, proof: Proof, cb?: Callback<void>): void;
|
|
280
|
+
|
|
268
281
|
// TODO(dmaretskyi): Add other events.
|
|
269
282
|
on(event: string, cb: (...args: any) => void): void;
|
|
270
283
|
on(event: 'download', cb: (index: number, data: any) => void): void;
|