@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/typings",
3
- "version": "0.6.5",
3
+ "version": "0.6.6-main.e1a6e1f",
4
4
  "description": "Typescript defs for various base packages",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
package/project.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "targets": {
10
10
  "build": {
11
11
  "options": {
12
- "main": "packages/common/typings/src/index.d.ts",
12
+ "main": "{projectRoot}/src/index.d.ts",
13
13
  "outputPath": "packages/common/typings/dist/types",
14
14
  "tsConfig": "packages/common/typings/tsconfig.json"
15
15
  }
@@ -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;