@keyhive/keyhive 0.0.0-alpha.49 → 0.0.0-alpha.50

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": "@keyhive/keyhive",
3
- "version": "0.0.0-alpha.49",
3
+ "version": "0.0.0-alpha.50",
4
4
  "description": "",
5
5
  "main": "pkg/keyhive_wasm.js",
6
6
  "keywords": [],
@@ -1,12 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Panic hook lets us get better error messages if our Rust code ever panics.
5
- *
6
- * This function needs to be called at least once during initialisation.
7
- * https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/template-deep-dive/src-utils-rs.html#2-what-is-console_error_panic_hook
8
- */
9
- export function setPanicHook(): void;
3
+
10
4
  export class Access {
11
5
  private constructor();
12
6
  free(): void;
@@ -14,6 +8,7 @@ export class Access {
14
8
  toString(): string;
15
9
  static tryFromString(s: string): Access | undefined;
16
10
  }
11
+
17
12
  export class Agent {
18
13
  private constructor();
19
14
  free(): void;
@@ -24,6 +19,7 @@ export class Agent {
24
19
  isGroup(): boolean;
25
20
  readonly id: Identifier;
26
21
  }
22
+
27
23
  export class Archive {
28
24
  free(): void;
29
25
  [Symbol.dispose](): void;
@@ -31,16 +27,19 @@ export class Archive {
31
27
  tryToKeyhive(ciphertext_store: CiphertextStore, signer: Signer, event_handler: Function): Promise<Keyhive>;
32
28
  toBytes(): Uint8Array;
33
29
  }
30
+
34
31
  export class CannotParseEd25519SigningKey {
35
32
  private constructor();
36
33
  free(): void;
37
34
  [Symbol.dispose](): void;
38
35
  }
36
+
39
37
  export class CannotParseIdentifier {
40
38
  private constructor();
41
39
  free(): void;
42
40
  [Symbol.dispose](): void;
43
41
  }
42
+
44
43
  export class Capability {
45
44
  private constructor();
46
45
  free(): void;
@@ -49,12 +48,14 @@ export class Capability {
49
48
  readonly who: Agent;
50
49
  readonly proof: SignedDelegation;
51
50
  }
51
+
52
52
  export class CgkaOperation {
53
53
  private constructor();
54
54
  free(): void;
55
55
  [Symbol.dispose](): void;
56
56
  readonly variant: string;
57
57
  }
58
+
58
59
  export class ChangeId {
59
60
  free(): void;
60
61
  [Symbol.dispose](): void;
@@ -65,6 +66,7 @@ export class ChangeId {
65
66
  constructor(bytes: Uint8Array);
66
67
  readonly bytes: Uint8Array;
67
68
  }
69
+
68
70
  export class CiphertextStore {
69
71
  private constructor();
70
72
  free(): void;
@@ -72,6 +74,7 @@ export class CiphertextStore {
72
74
  static newInMemory(): CiphertextStore;
73
75
  static newFromWebStorage(storage: Storage): CiphertextStore;
74
76
  }
77
+
75
78
  export class ContactCard {
76
79
  private constructor();
77
80
  free(): void;
@@ -84,6 +87,7 @@ export class ContactCard {
84
87
  readonly id: Identifier;
85
88
  readonly shareKey: ShareKey;
86
89
  }
90
+
87
91
  export class Delegation {
88
92
  private constructor();
89
93
  free(): void;
@@ -93,6 +97,7 @@ export class Delegation {
93
97
  readonly proof: SignedDelegation | undefined;
94
98
  readonly delegate: Agent;
95
99
  }
100
+
96
101
  export class DocContentRefs {
97
102
  free(): void;
98
103
  [Symbol.dispose](): void;
@@ -101,6 +106,7 @@ export class DocContentRefs {
101
106
  readonly change_hashes: Promise<ChangeId[]>;
102
107
  readonly docId: DocumentId;
103
108
  }
109
+
104
110
  export class Document {
105
111
  private constructor();
106
112
  free(): void;
@@ -115,6 +121,7 @@ export class Document {
115
121
  readonly id: Identifier;
116
122
  readonly doc_id: DocumentId;
117
123
  }
124
+
118
125
  export class DocumentId {
119
126
  free(): void;
120
127
  [Symbol.dispose](): void;
@@ -123,6 +130,7 @@ export class DocumentId {
123
130
  constructor(bytes: Uint8Array);
124
131
  toBytes(): Uint8Array;
125
132
  }
133
+
126
134
  export class Encrypted {
127
135
  private constructor();
128
136
  free(): void;
@@ -134,6 +142,7 @@ export class Encrypted {
134
142
  readonly nonce: Uint8Array;
135
143
  readonly pred_refs: Uint8Array;
136
144
  }
145
+
137
146
  export class EncryptedContentWithUpdate {
138
147
  private constructor();
139
148
  free(): void;
@@ -141,6 +150,7 @@ export class EncryptedContentWithUpdate {
141
150
  encrypted_content(): Encrypted;
142
151
  update_op(): SignedCgkaOperation | undefined;
143
152
  }
153
+
144
154
  export class Event {
145
155
  private constructor();
146
156
  free(): void;
@@ -156,12 +166,14 @@ export class Event {
156
166
  readonly isDelegated: boolean;
157
167
  readonly variant: string;
158
168
  }
169
+
159
170
  export class GenerateWebCryptoError {
160
171
  private constructor();
161
172
  free(): void;
162
173
  [Symbol.dispose](): void;
163
174
  message(): string;
164
175
  }
176
+
165
177
  export class Group {
166
178
  private constructor();
167
179
  free(): void;
@@ -177,12 +189,14 @@ export class Group {
177
189
  readonly id: Identifier;
178
190
  readonly groupId: GroupId;
179
191
  }
192
+
180
193
  export class GroupId {
181
194
  private constructor();
182
195
  free(): void;
183
196
  [Symbol.dispose](): void;
184
197
  toString(): string;
185
198
  }
199
+
186
200
  export class History {
187
201
  private constructor();
188
202
  free(): void;
@@ -191,12 +205,14 @@ export class History {
191
205
  revocations(): SignedRevocation[];
192
206
  contentRefs(): DocContentRefs[];
193
207
  }
208
+
194
209
  export class Identifier {
195
210
  free(): void;
196
211
  [Symbol.dispose](): void;
197
212
  constructor(bytes: Uint8Array);
198
213
  toBytes(): Uint8Array;
199
214
  }
215
+
200
216
  export class Individual {
201
217
  private constructor();
202
218
  free(): void;
@@ -207,17 +223,20 @@ export class Individual {
207
223
  readonly individualId: IndividualId;
208
224
  readonly id: Identifier;
209
225
  }
226
+
210
227
  export class IndividualId {
211
228
  private constructor();
212
229
  free(): void;
213
230
  [Symbol.dispose](): void;
214
231
  readonly bytes: Uint8Array;
215
232
  }
233
+
216
234
  export class Invocation {
217
235
  private constructor();
218
236
  free(): void;
219
237
  [Symbol.dispose](): void;
220
238
  }
239
+
221
240
  export class Keyhive {
222
241
  private constructor();
223
242
  free(): void;
@@ -241,6 +260,7 @@ export class Keyhive {
241
260
  forcePcsUpdate(doc: Document): Promise<void>;
242
261
  ingestEventsBytes(events_bytes_array: Array<any>): Promise<Array<any>>;
243
262
  tryEncryptArchive(doc: Document, content_ref: ChangeId, pred_refs: ChangeId[], content: Uint8Array): Promise<EncryptedContentWithUpdate>;
263
+ pendingEventHashes(): Promise<Set<any>>;
244
264
  receiveContactCard(contact_card: ContactCard): Promise<Individual>;
245
265
  docMemberCapabilities(doc_id: DocumentId): Promise<Membership[]>;
246
266
  membershipOpsForAgent(agent: Agent): Promise<Map<any, any>>;
@@ -254,11 +274,13 @@ export class Keyhive {
254
274
  readonly whoami: IndividualId;
255
275
  readonly idString: string;
256
276
  }
277
+
257
278
  export class Membered {
258
279
  private constructor();
259
280
  free(): void;
260
281
  [Symbol.dispose](): void;
261
282
  }
283
+
262
284
  export class Membership {
263
285
  private constructor();
264
286
  free(): void;
@@ -266,6 +288,7 @@ export class Membership {
266
288
  readonly can: Access;
267
289
  readonly who: Agent;
268
290
  }
291
+
269
292
  export class Peer {
270
293
  private constructor();
271
294
  free(): void;
@@ -280,6 +303,7 @@ export class Peer {
280
303
  isGroup(): boolean;
281
304
  readonly id: Identifier;
282
305
  }
306
+
283
307
  export class Revocation {
284
308
  private constructor();
285
309
  free(): void;
@@ -289,11 +313,13 @@ export class Revocation {
289
313
  readonly proof: SignedDelegation | undefined;
290
314
  readonly revoked: SignedDelegation;
291
315
  }
316
+
292
317
  export class ShareKey {
293
318
  private constructor();
294
319
  free(): void;
295
320
  [Symbol.dispose](): void;
296
321
  }
322
+
297
323
  export class Signed {
298
324
  private constructor();
299
325
  free(): void;
@@ -305,6 +331,7 @@ export class Signed {
305
331
  readonly payload: Uint8Array;
306
332
  readonly signature: Uint8Array;
307
333
  }
334
+
308
335
  export class SignedCgkaOperation {
309
336
  private constructor();
310
337
  free(): void;
@@ -314,6 +341,7 @@ export class SignedCgkaOperation {
314
341
  readonly verifyingKey: Uint8Array;
315
342
  readonly signature: Uint8Array;
316
343
  }
344
+
317
345
  export class SignedDelegation {
318
346
  private constructor();
319
347
  free(): void;
@@ -323,11 +351,13 @@ export class SignedDelegation {
323
351
  readonly verifyingKey: Uint8Array;
324
352
  readonly signature: Uint8Array;
325
353
  }
354
+
326
355
  export class SignedInvocation {
327
356
  private constructor();
328
357
  free(): void;
329
358
  [Symbol.dispose](): void;
330
359
  }
360
+
331
361
  export class SignedRevocation {
332
362
  private constructor();
333
363
  free(): void;
@@ -337,6 +367,7 @@ export class SignedRevocation {
337
367
  readonly verifyingKey: Uint8Array;
338
368
  readonly signature: Uint8Array;
339
369
  }
370
+
340
371
  export class Signer {
341
372
  private constructor();
342
373
  free(): void;
@@ -351,6 +382,7 @@ export class Signer {
351
382
  readonly verifyingKey: Uint8Array;
352
383
  readonly variant: string;
353
384
  }
385
+
354
386
  export class Stats {
355
387
  private constructor();
356
388
  free(): void;
@@ -372,6 +404,7 @@ export class Stats {
372
404
  readonly docs: bigint;
373
405
  readonly groups: bigint;
374
406
  }
407
+
375
408
  export class Summary {
376
409
  private constructor();
377
410
  free(): void;
@@ -379,3 +412,11 @@ export class Summary {
379
412
  readonly doc: Document;
380
413
  readonly access: Access;
381
414
  }
415
+
416
+ /**
417
+ * Panic hook lets us get better error messages if our Rust code ever panics.
418
+ *
419
+ * This function needs to be called at least once during initialisation.
420
+ * https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/template-deep-dive/src-utils-rs.html#2-what-is-console_error_panic_hook
421
+ */
422
+ export function setPanicHook(): void;