@keyhive/keyhive 0.0.0-alpha.7 → 0.0.0-alpha.9

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/README.md CHANGED
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyhive/keyhive",
3
- "version": "0.0.0-alpha.7",
3
+ "version": "0.0.0-alpha.9",
4
4
  "description": "",
5
5
  "main": "pkg/keyhive_wasm.js",
6
6
  "keywords": [],
@@ -39,6 +39,7 @@
39
39
  "@playwright/test": "^1.55.0",
40
40
  "@types/node": "^22.17.2",
41
41
  "html-webpack-plugin": "^5.6.4",
42
+ "http-server": "^14.1.1",
42
43
  "ts-loader": "^9.5.2",
43
44
  "typescript": "^5.9.2",
44
45
  "vite": "^5.4.19",
@@ -52,6 +53,7 @@
52
53
  "build": "pnpm run build-node && pnpm run build-bundler && pnpm run build-slim",
53
54
  "build-node": "wasm-pack build --out-dir pkg-node --target nodejs --release -- --features ingest_static",
54
55
  "build-bundler": "wasm-pack build --out-dir pkg --target bundler --release -- --features ingest_static",
56
+ "build-web": "wasm-pack build --out-dir pkg-web --target web --release -- --features ingest_static",
55
57
  "build-slim": "node build_slim.js"
56
58
  }
57
59
  }
package/pkg/README.md CHANGED
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
@@ -120,7 +120,7 @@ export class DocumentId {
120
120
  free(): void;
121
121
  [Symbol.dispose](): void;
122
122
  constructor(bytes: Uint8Array);
123
- fromString(): string;
123
+ toString(): string;
124
124
  toJsValue(): any;
125
125
  toBytes(): Uint8Array;
126
126
  }
@@ -271,6 +271,7 @@ export class Keyhive {
271
271
  ingestArchive(archive: Archive): Promise<void>;
272
272
  readonly id: IndividualId;
273
273
  readonly whoami: IndividualId;
274
+ readonly individual: Individual;
274
275
  readonly idString: string;
275
276
  }
276
277
  export class Membered {
@@ -269,12 +269,12 @@ export function setPanicHook() {
269
269
  wasm.setPanicHook();
270
270
  }
271
271
 
272
- function __wbg_adapter_8(arg0, arg1, arg2) {
273
- wasm.closure429_externref_shim(arg0, arg1, arg2);
272
+ function __wbg_adapter_12(arg0, arg1, arg2) {
273
+ wasm.closure433_externref_shim(arg0, arg1, arg2);
274
274
  }
275
275
 
276
- function __wbg_adapter_272(arg0, arg1, arg2, arg3) {
277
- wasm.closure570_externref_shim(arg0, arg1, arg2, arg3);
276
+ function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
277
+ wasm.closure574_externref_shim(arg0, arg1, arg2, arg3);
278
278
  }
279
279
 
280
280
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1102,11 +1102,11 @@ export class DocumentId {
1102
1102
  /**
1103
1103
  * @returns {string}
1104
1104
  */
1105
- fromString() {
1105
+ toString() {
1106
1106
  let deferred1_0;
1107
1107
  let deferred1_1;
1108
1108
  try {
1109
- const ret = wasm.documentid_fromString(this.__wbg_ptr);
1109
+ const ret = wasm.documentid_toString(this.__wbg_ptr);
1110
1110
  deferred1_0 = ret[0];
1111
1111
  deferred1_1 = ret[1];
1112
1112
  return getStringFromWasm0(ret[0], ret[1]);
@@ -1957,6 +1957,13 @@ export class Keyhive {
1957
1957
  const ret = wasm.keyhive_id(this.__wbg_ptr);
1958
1958
  return IndividualId.__wrap(ret);
1959
1959
  }
1960
+ /**
1961
+ * @returns {Individual}
1962
+ */
1963
+ get individual() {
1964
+ const ret = wasm.keyhive_individual(this.__wbg_ptr);
1965
+ return Individual.__wrap(ret);
1966
+ }
1960
1967
  /**
1961
1968
  * @returns {string}
1962
1969
  */
@@ -3245,7 +3252,7 @@ export function __wbg_new_2e3c58a15f39f5f9(arg0, arg1) {
3245
3252
  const a = state0.a;
3246
3253
  state0.a = 0;
3247
3254
  try {
3248
- return __wbg_adapter_272(a, state0.b, arg0, arg1);
3255
+ return __wbg_adapter_273(a, state0.b, arg0, arg1);
3249
3256
  } finally {
3250
3257
  state0.a = a;
3251
3258
  }
@@ -3489,9 +3496,9 @@ export function __wbindgen_cast_25a0a844437d0e92(arg0, arg1) {
3489
3496
  return ret;
3490
3497
  };
3491
3498
 
3492
- export function __wbindgen_cast_a788a31e51647739(arg0, arg1) {
3493
- // Cast intrinsic for `Closure(Closure { dtor_idx: 428, function: Function { arguments: [Externref], shim_idx: 429, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3494
- const ret = makeMutClosure(arg0, arg1, 428, __wbg_adapter_8);
3499
+ export function __wbindgen_cast_878a9170ed4959ff(arg0, arg1) {
3500
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 432, function: Function { arguments: [Externref], shim_idx: 433, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3501
+ const ret = makeMutClosure(arg0, arg1, 432, __wbg_adapter_12);
3495
3502
  return ret;
3496
3503
  };
3497
3504
 
Binary file
@@ -14,12 +14,6 @@ export const __wbg_tryfromarchiveerror_free: (a: number, b: number) => void;
14
14
  export const tryfromarchiveerror_toError: (a: number) => any;
15
15
  export const __wbg_serializationerror_free: (a: number, b: number) => void;
16
16
  export const serializationerror_toError: (a: number) => any;
17
- export const __wbg_document_free: (a: number, b: number) => void;
18
- export const document_id: (a: number) => number;
19
- export const document_doc_id: (a: number) => number;
20
- export const document_toPeer: (a: number) => number;
21
- export const document_toAgent: (a: number) => number;
22
- export const document_toMembered: (a: number) => number;
23
17
  export const __wbg_group_free: (a: number, b: number) => void;
24
18
  export const group_id: (a: number) => number;
25
19
  export const group_groupId: (a: number) => number;
@@ -27,12 +21,19 @@ export const group_members: (a: number) => [number, number];
27
21
  export const group_toPeer: (a: number) => number;
28
22
  export const group_toAgent: (a: number) => number;
29
23
  export const group_toMembered: (a: number) => number;
24
+ export const __wbg_history_free: (a: number, b: number) => void;
25
+ export const history_delegations: (a: number) => [number, number];
26
+ export const history_revocations: (a: number) => [number, number];
27
+ export const history_contentRefs: (a: number) => [number, number];
30
28
  export const __wbg_invocation_free: (a: number, b: number) => void;
31
29
  export const __wbg_membered_free: (a: number, b: number) => void;
30
+ export const __wbg_revocation_free: (a: number, b: number) => void;
31
+ export const revocation_subject_id: (a: number) => number;
32
+ export const revocation_revoked: (a: number) => number;
33
+ export const revocation_proof: (a: number) => number;
34
+ export const revocation_after: (a: number) => number;
35
+ export const __wbg_sharekey_free: (a: number, b: number) => void;
32
36
  export const __wbg_signedinvocation_free: (a: number, b: number) => void;
33
- export const __wbg_summary_free: (a: number, b: number) => void;
34
- export const summary_doc: (a: number) => number;
35
- export const summary_access: (a: number) => number;
36
37
  export const __wbg_addmembererror_free: (a: number, b: number) => void;
37
38
  export const addmembererror_message: (a: number) => [number, number];
38
39
  export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
@@ -56,7 +57,7 @@ export const doccontentrefs_docId: (a: number) => number;
56
57
  export const doccontentrefs_change_hashes: (a: number) => [number, number];
57
58
  export const __wbg_documentid_free: (a: number, b: number) => void;
58
59
  export const documentid_new: (a: number, b: number) => [number, number, number];
59
- export const documentid_fromString: (a: number) => [number, number];
60
+ export const documentid_toString: (a: number) => [number, number];
60
61
  export const documentid_toJsValue: (a: number) => any;
61
62
  export const documentid_toBytes: (a: number) => [number, number];
62
63
  export const __wbg_groupid_free: (a: number, b: number) => void;
@@ -91,6 +92,7 @@ export const identifier_new: (a: number, b: number) => [number, number, number];
91
92
  export const __wbg_keyhive_free: (a: number, b: number) => void;
92
93
  export const keyhive_init: (a: number, b: number, c: any) => any;
93
94
  export const keyhive_id: (a: number) => number;
95
+ export const keyhive_individual: (a: number) => number;
94
96
  export const keyhive_idString: (a: number) => [number, number];
95
97
  export const keyhive_generateGroup: (a: number, b: number, c: number) => any;
96
98
  export const keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
@@ -142,6 +144,12 @@ export const delegation_can: (a: number) => number;
142
144
  export const delegation_proof: (a: number) => number;
143
145
  export const delegation_after: (a: number) => number;
144
146
  export const __wbg_delegationerror_free: (a: number, b: number) => void;
147
+ export const __wbg_document_free: (a: number, b: number) => void;
148
+ export const document_id: (a: number) => number;
149
+ export const document_doc_id: (a: number) => number;
150
+ export const document_toPeer: (a: number) => number;
151
+ export const document_toAgent: (a: number) => number;
152
+ export const document_toMembered: (a: number) => number;
145
153
  export const __wbg_encrypted_free: (a: number, b: number) => void;
146
154
  export const encrypted_ciphertext: (a: number) => [number, number];
147
155
  export const encrypted_nonce: (a: number) => [number, number];
@@ -159,21 +167,11 @@ export const event_tryIntoSignedDelegation: (a: number) => number;
159
167
  export const event_tryIntoSignedRevocation: (a: number) => number;
160
168
  export const __wbg_generatedocerror_free: (a: number, b: number) => void;
161
169
  export const generatedocerror_message: (a: number) => [number, number];
162
- export const __wbg_history_free: (a: number, b: number) => void;
163
- export const history_delegations: (a: number) => [number, number];
164
- export const history_revocations: (a: number) => [number, number];
165
- export const history_contentRefs: (a: number) => [number, number];
166
170
  export const __wbg_peer_free: (a: number, b: number) => void;
167
171
  export const peer_toString: (a: number) => [number, number];
168
172
  export const peer_isIndividual: (a: number) => number;
169
173
  export const peer_isGroup: (a: number) => number;
170
174
  export const peer_isDocument: (a: number) => number;
171
- export const __wbg_revocation_free: (a: number, b: number) => void;
172
- export const revocation_subject_id: (a: number) => number;
173
- export const revocation_revoked: (a: number) => number;
174
- export const revocation_proof: (a: number) => number;
175
- export const revocation_after: (a: number) => number;
176
- export const __wbg_sharekey_free: (a: number, b: number) => void;
177
175
  export const __wbg_signed_free: (a: number, b: number) => void;
178
176
  export const signed_fromBytes: (a: number, b: number) => number;
179
177
  export const signed_toBytes: (a: number) => [number, number];
@@ -196,6 +194,9 @@ export const signedrevocation_verify: (a: number) => number;
196
194
  export const signedrevocation_delegation: (a: number) => number;
197
195
  export const signedrevocation_verifyingKey: (a: number) => [number, number];
198
196
  export const signedrevocation_signature: (a: number) => [number, number];
197
+ export const __wbg_summary_free: (a: number, b: number) => void;
198
+ export const summary_doc: (a: number) => number;
199
+ export const summary_access: (a: number) => number;
199
200
  export const encrypted_toBytes: (a: number) => [number, number];
200
201
  export const __wbindgen_exn_store: (a: number) => void;
201
202
  export const __externref_table_alloc: () => number;
@@ -206,6 +207,6 @@ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) =>
206
207
  export const __externref_drop_slice: (a: number, b: number) => void;
207
208
  export const __wbindgen_export_7: WebAssembly.Table;
208
209
  export const __externref_table_dealloc: (a: number) => void;
209
- export const closure429_externref_shim: (a: number, b: number, c: any) => void;
210
- export const closure570_externref_shim: (a: number, b: number, c: any, d: any) => void;
210
+ export const closure433_externref_shim: (a: number, b: number, c: any) => void;
211
+ export const closure574_externref_shim: (a: number, b: number, c: any, d: any) => void;
211
212
  export const __wbindgen_start: () => void;
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
@@ -120,7 +120,7 @@ export class DocumentId {
120
120
  free(): void;
121
121
  [Symbol.dispose](): void;
122
122
  constructor(bytes: Uint8Array);
123
- fromString(): string;
123
+ toString(): string;
124
124
  toJsValue(): any;
125
125
  toBytes(): Uint8Array;
126
126
  }
@@ -271,6 +271,7 @@ export class Keyhive {
271
271
  ingestArchive(archive: Archive): Promise<void>;
272
272
  readonly id: IndividualId;
273
273
  readonly whoami: IndividualId;
274
+ readonly individual: Individual;
274
275
  readonly idString: string;
275
276
  }
276
277
  export class Membered {
@@ -259,12 +259,12 @@ exports.setPanicHook = function() {
259
259
  wasm.setPanicHook();
260
260
  };
261
261
 
262
- function __wbg_adapter_6(arg0, arg1, arg2) {
263
- wasm.closure429_externref_shim(arg0, arg1, arg2);
262
+ function __wbg_adapter_12(arg0, arg1, arg2) {
263
+ wasm.closure433_externref_shim(arg0, arg1, arg2);
264
264
  }
265
265
 
266
- function __wbg_adapter_272(arg0, arg1, arg2, arg3) {
267
- wasm.closure570_externref_shim(arg0, arg1, arg2, arg3);
266
+ function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
267
+ wasm.closure574_externref_shim(arg0, arg1, arg2, arg3);
268
268
  }
269
269
 
270
270
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1122,11 +1122,11 @@ class DocumentId {
1122
1122
  /**
1123
1123
  * @returns {string}
1124
1124
  */
1125
- fromString() {
1125
+ toString() {
1126
1126
  let deferred1_0;
1127
1127
  let deferred1_1;
1128
1128
  try {
1129
- const ret = wasm.documentid_fromString(this.__wbg_ptr);
1129
+ const ret = wasm.documentid_toString(this.__wbg_ptr);
1130
1130
  deferred1_0 = ret[0];
1131
1131
  deferred1_1 = ret[1];
1132
1132
  return getStringFromWasm0(ret[0], ret[1]);
@@ -2013,6 +2013,13 @@ class Keyhive {
2013
2013
  const ret = wasm.keyhive_id(this.__wbg_ptr);
2014
2014
  return IndividualId.__wrap(ret);
2015
2015
  }
2016
+ /**
2017
+ * @returns {Individual}
2018
+ */
2019
+ get individual() {
2020
+ const ret = wasm.keyhive_individual(this.__wbg_ptr);
2021
+ return Individual.__wrap(ret);
2022
+ }
2016
2023
  /**
2017
2024
  * @returns {string}
2018
2025
  */
@@ -3337,7 +3344,7 @@ exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
3337
3344
  const a = state0.a;
3338
3345
  state0.a = 0;
3339
3346
  try {
3340
- return __wbg_adapter_272(a, state0.b, arg0, arg1);
3347
+ return __wbg_adapter_273(a, state0.b, arg0, arg1);
3341
3348
  } finally {
3342
3349
  state0.a = a;
3343
3350
  }
@@ -3581,9 +3588,9 @@ exports.__wbindgen_cast_25a0a844437d0e92 = function(arg0, arg1) {
3581
3588
  return ret;
3582
3589
  };
3583
3590
 
3584
- exports.__wbindgen_cast_a788a31e51647739 = function(arg0, arg1) {
3585
- // Cast intrinsic for `Closure(Closure { dtor_idx: 428, function: Function { arguments: [Externref], shim_idx: 429, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3586
- const ret = makeMutClosure(arg0, arg1, 428, __wbg_adapter_6);
3591
+ exports.__wbindgen_cast_878a9170ed4959ff = function(arg0, arg1) {
3592
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 432, function: Function { arguments: [Externref], shim_idx: 433, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3593
+ const ret = makeMutClosure(arg0, arg1, 432, __wbg_adapter_12);
3587
3594
  return ret;
3588
3595
  };
3589
3596
 
Binary file
@@ -14,12 +14,6 @@ export const __wbg_tryfromarchiveerror_free: (a: number, b: number) => void;
14
14
  export const tryfromarchiveerror_toError: (a: number) => any;
15
15
  export const __wbg_serializationerror_free: (a: number, b: number) => void;
16
16
  export const serializationerror_toError: (a: number) => any;
17
- export const __wbg_document_free: (a: number, b: number) => void;
18
- export const document_id: (a: number) => number;
19
- export const document_doc_id: (a: number) => number;
20
- export const document_toPeer: (a: number) => number;
21
- export const document_toAgent: (a: number) => number;
22
- export const document_toMembered: (a: number) => number;
23
17
  export const __wbg_group_free: (a: number, b: number) => void;
24
18
  export const group_id: (a: number) => number;
25
19
  export const group_groupId: (a: number) => number;
@@ -27,12 +21,19 @@ export const group_members: (a: number) => [number, number];
27
21
  export const group_toPeer: (a: number) => number;
28
22
  export const group_toAgent: (a: number) => number;
29
23
  export const group_toMembered: (a: number) => number;
24
+ export const __wbg_history_free: (a: number, b: number) => void;
25
+ export const history_delegations: (a: number) => [number, number];
26
+ export const history_revocations: (a: number) => [number, number];
27
+ export const history_contentRefs: (a: number) => [number, number];
30
28
  export const __wbg_invocation_free: (a: number, b: number) => void;
31
29
  export const __wbg_membered_free: (a: number, b: number) => void;
30
+ export const __wbg_revocation_free: (a: number, b: number) => void;
31
+ export const revocation_subject_id: (a: number) => number;
32
+ export const revocation_revoked: (a: number) => number;
33
+ export const revocation_proof: (a: number) => number;
34
+ export const revocation_after: (a: number) => number;
35
+ export const __wbg_sharekey_free: (a: number, b: number) => void;
32
36
  export const __wbg_signedinvocation_free: (a: number, b: number) => void;
33
- export const __wbg_summary_free: (a: number, b: number) => void;
34
- export const summary_doc: (a: number) => number;
35
- export const summary_access: (a: number) => number;
36
37
  export const __wbg_addmembererror_free: (a: number, b: number) => void;
37
38
  export const addmembererror_message: (a: number) => [number, number];
38
39
  export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
@@ -56,7 +57,7 @@ export const doccontentrefs_docId: (a: number) => number;
56
57
  export const doccontentrefs_change_hashes: (a: number) => [number, number];
57
58
  export const __wbg_documentid_free: (a: number, b: number) => void;
58
59
  export const documentid_new: (a: number, b: number) => [number, number, number];
59
- export const documentid_fromString: (a: number) => [number, number];
60
+ export const documentid_toString: (a: number) => [number, number];
60
61
  export const documentid_toJsValue: (a: number) => any;
61
62
  export const documentid_toBytes: (a: number) => [number, number];
62
63
  export const __wbg_groupid_free: (a: number, b: number) => void;
@@ -91,6 +92,7 @@ export const identifier_new: (a: number, b: number) => [number, number, number];
91
92
  export const __wbg_keyhive_free: (a: number, b: number) => void;
92
93
  export const keyhive_init: (a: number, b: number, c: any) => any;
93
94
  export const keyhive_id: (a: number) => number;
95
+ export const keyhive_individual: (a: number) => number;
94
96
  export const keyhive_idString: (a: number) => [number, number];
95
97
  export const keyhive_generateGroup: (a: number, b: number, c: number) => any;
96
98
  export const keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
@@ -142,6 +144,12 @@ export const delegation_can: (a: number) => number;
142
144
  export const delegation_proof: (a: number) => number;
143
145
  export const delegation_after: (a: number) => number;
144
146
  export const __wbg_delegationerror_free: (a: number, b: number) => void;
147
+ export const __wbg_document_free: (a: number, b: number) => void;
148
+ export const document_id: (a: number) => number;
149
+ export const document_doc_id: (a: number) => number;
150
+ export const document_toPeer: (a: number) => number;
151
+ export const document_toAgent: (a: number) => number;
152
+ export const document_toMembered: (a: number) => number;
145
153
  export const __wbg_encrypted_free: (a: number, b: number) => void;
146
154
  export const encrypted_ciphertext: (a: number) => [number, number];
147
155
  export const encrypted_nonce: (a: number) => [number, number];
@@ -159,21 +167,11 @@ export const event_tryIntoSignedDelegation: (a: number) => number;
159
167
  export const event_tryIntoSignedRevocation: (a: number) => number;
160
168
  export const __wbg_generatedocerror_free: (a: number, b: number) => void;
161
169
  export const generatedocerror_message: (a: number) => [number, number];
162
- export const __wbg_history_free: (a: number, b: number) => void;
163
- export const history_delegations: (a: number) => [number, number];
164
- export const history_revocations: (a: number) => [number, number];
165
- export const history_contentRefs: (a: number) => [number, number];
166
170
  export const __wbg_peer_free: (a: number, b: number) => void;
167
171
  export const peer_toString: (a: number) => [number, number];
168
172
  export const peer_isIndividual: (a: number) => number;
169
173
  export const peer_isGroup: (a: number) => number;
170
174
  export const peer_isDocument: (a: number) => number;
171
- export const __wbg_revocation_free: (a: number, b: number) => void;
172
- export const revocation_subject_id: (a: number) => number;
173
- export const revocation_revoked: (a: number) => number;
174
- export const revocation_proof: (a: number) => number;
175
- export const revocation_after: (a: number) => number;
176
- export const __wbg_sharekey_free: (a: number, b: number) => void;
177
175
  export const __wbg_signed_free: (a: number, b: number) => void;
178
176
  export const signed_fromBytes: (a: number, b: number) => number;
179
177
  export const signed_toBytes: (a: number) => [number, number];
@@ -196,6 +194,9 @@ export const signedrevocation_verify: (a: number) => number;
196
194
  export const signedrevocation_delegation: (a: number) => number;
197
195
  export const signedrevocation_verifyingKey: (a: number) => [number, number];
198
196
  export const signedrevocation_signature: (a: number) => [number, number];
197
+ export const __wbg_summary_free: (a: number, b: number) => void;
198
+ export const summary_doc: (a: number) => number;
199
+ export const summary_access: (a: number) => number;
199
200
  export const encrypted_toBytes: (a: number) => [number, number];
200
201
  export const __wbindgen_exn_store: (a: number) => void;
201
202
  export const __externref_table_alloc: () => number;
@@ -206,6 +207,6 @@ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) =>
206
207
  export const __externref_drop_slice: (a: number, b: number) => void;
207
208
  export const __wbindgen_export_7: WebAssembly.Table;
208
209
  export const __externref_table_dealloc: (a: number) => void;
209
- export const closure429_externref_shim: (a: number, b: number, c: any) => void;
210
- export const closure570_externref_shim: (a: number, b: number, c: any, d: any) => void;
210
+ export const closure433_externref_shim: (a: number, b: number, c: any) => void;
211
+ export const closure574_externref_shim: (a: number, b: number, c: any, d: any) => void;
211
212
  export const __wbindgen_start: () => void;
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
@@ -120,7 +120,7 @@ export class DocumentId {
120
120
  free(): void;
121
121
  [Symbol.dispose](): void;
122
122
  constructor(bytes: Uint8Array);
123
- fromString(): string;
123
+ toString(): string;
124
124
  toJsValue(): any;
125
125
  toBytes(): Uint8Array;
126
126
  }
@@ -271,6 +271,7 @@ export class Keyhive {
271
271
  ingestArchive(archive: Archive): Promise<void>;
272
272
  readonly id: IndividualId;
273
273
  readonly whoami: IndividualId;
274
+ readonly individual: Individual;
274
275
  readonly idString: string;
275
276
  }
276
277
  export class Membered {
@@ -419,12 +420,6 @@ export interface InitOutput {
419
420
  readonly tryfromarchiveerror_toError: (a: number) => any;
420
421
  readonly __wbg_serializationerror_free: (a: number, b: number) => void;
421
422
  readonly serializationerror_toError: (a: number) => any;
422
- readonly __wbg_document_free: (a: number, b: number) => void;
423
- readonly document_id: (a: number) => number;
424
- readonly document_doc_id: (a: number) => number;
425
- readonly document_toPeer: (a: number) => number;
426
- readonly document_toAgent: (a: number) => number;
427
- readonly document_toMembered: (a: number) => number;
428
423
  readonly __wbg_group_free: (a: number, b: number) => void;
429
424
  readonly group_id: (a: number) => number;
430
425
  readonly group_groupId: (a: number) => number;
@@ -432,12 +427,19 @@ export interface InitOutput {
432
427
  readonly group_toPeer: (a: number) => number;
433
428
  readonly group_toAgent: (a: number) => number;
434
429
  readonly group_toMembered: (a: number) => number;
430
+ readonly __wbg_history_free: (a: number, b: number) => void;
431
+ readonly history_delegations: (a: number) => [number, number];
432
+ readonly history_revocations: (a: number) => [number, number];
433
+ readonly history_contentRefs: (a: number) => [number, number];
435
434
  readonly __wbg_invocation_free: (a: number, b: number) => void;
436
435
  readonly __wbg_membered_free: (a: number, b: number) => void;
436
+ readonly __wbg_revocation_free: (a: number, b: number) => void;
437
+ readonly revocation_subject_id: (a: number) => number;
438
+ readonly revocation_revoked: (a: number) => number;
439
+ readonly revocation_proof: (a: number) => number;
440
+ readonly revocation_after: (a: number) => number;
441
+ readonly __wbg_sharekey_free: (a: number, b: number) => void;
437
442
  readonly __wbg_signedinvocation_free: (a: number, b: number) => void;
438
- readonly __wbg_summary_free: (a: number, b: number) => void;
439
- readonly summary_doc: (a: number) => number;
440
- readonly summary_access: (a: number) => number;
441
443
  readonly __wbg_addmembererror_free: (a: number, b: number) => void;
442
444
  readonly addmembererror_message: (a: number) => [number, number];
443
445
  readonly __wbg_cgkaoperation_free: (a: number, b: number) => void;
@@ -461,7 +463,7 @@ export interface InitOutput {
461
463
  readonly doccontentrefs_change_hashes: (a: number) => [number, number];
462
464
  readonly __wbg_documentid_free: (a: number, b: number) => void;
463
465
  readonly documentid_new: (a: number, b: number) => [number, number, number];
464
- readonly documentid_fromString: (a: number) => [number, number];
466
+ readonly documentid_toString: (a: number) => [number, number];
465
467
  readonly documentid_toJsValue: (a: number) => any;
466
468
  readonly documentid_toBytes: (a: number) => [number, number];
467
469
  readonly __wbg_groupid_free: (a: number, b: number) => void;
@@ -496,6 +498,7 @@ export interface InitOutput {
496
498
  readonly __wbg_keyhive_free: (a: number, b: number) => void;
497
499
  readonly keyhive_init: (a: number, b: number, c: any) => any;
498
500
  readonly keyhive_id: (a: number) => number;
501
+ readonly keyhive_individual: (a: number) => number;
499
502
  readonly keyhive_idString: (a: number) => [number, number];
500
503
  readonly keyhive_generateGroup: (a: number, b: number, c: number) => any;
501
504
  readonly keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
@@ -547,6 +550,12 @@ export interface InitOutput {
547
550
  readonly delegation_proof: (a: number) => number;
548
551
  readonly delegation_after: (a: number) => number;
549
552
  readonly __wbg_delegationerror_free: (a: number, b: number) => void;
553
+ readonly __wbg_document_free: (a: number, b: number) => void;
554
+ readonly document_id: (a: number) => number;
555
+ readonly document_doc_id: (a: number) => number;
556
+ readonly document_toPeer: (a: number) => number;
557
+ readonly document_toAgent: (a: number) => number;
558
+ readonly document_toMembered: (a: number) => number;
550
559
  readonly __wbg_encrypted_free: (a: number, b: number) => void;
551
560
  readonly encrypted_ciphertext: (a: number) => [number, number];
552
561
  readonly encrypted_nonce: (a: number) => [number, number];
@@ -564,21 +573,11 @@ export interface InitOutput {
564
573
  readonly event_tryIntoSignedRevocation: (a: number) => number;
565
574
  readonly __wbg_generatedocerror_free: (a: number, b: number) => void;
566
575
  readonly generatedocerror_message: (a: number) => [number, number];
567
- readonly __wbg_history_free: (a: number, b: number) => void;
568
- readonly history_delegations: (a: number) => [number, number];
569
- readonly history_revocations: (a: number) => [number, number];
570
- readonly history_contentRefs: (a: number) => [number, number];
571
576
  readonly __wbg_peer_free: (a: number, b: number) => void;
572
577
  readonly peer_toString: (a: number) => [number, number];
573
578
  readonly peer_isIndividual: (a: number) => number;
574
579
  readonly peer_isGroup: (a: number) => number;
575
580
  readonly peer_isDocument: (a: number) => number;
576
- readonly __wbg_revocation_free: (a: number, b: number) => void;
577
- readonly revocation_subject_id: (a: number) => number;
578
- readonly revocation_revoked: (a: number) => number;
579
- readonly revocation_proof: (a: number) => number;
580
- readonly revocation_after: (a: number) => number;
581
- readonly __wbg_sharekey_free: (a: number, b: number) => void;
582
581
  readonly __wbg_signed_free: (a: number, b: number) => void;
583
582
  readonly signed_fromBytes: (a: number, b: number) => number;
584
583
  readonly signed_toBytes: (a: number) => [number, number];
@@ -601,6 +600,9 @@ export interface InitOutput {
601
600
  readonly signedrevocation_delegation: (a: number) => number;
602
601
  readonly signedrevocation_verifyingKey: (a: number) => [number, number];
603
602
  readonly signedrevocation_signature: (a: number) => [number, number];
603
+ readonly __wbg_summary_free: (a: number, b: number) => void;
604
+ readonly summary_doc: (a: number) => number;
605
+ readonly summary_access: (a: number) => number;
604
606
  readonly encrypted_toBytes: (a: number) => [number, number];
605
607
  readonly __wbindgen_exn_store: (a: number) => void;
606
608
  readonly __externref_table_alloc: () => number;
@@ -611,8 +613,8 @@ export interface InitOutput {
611
613
  readonly __externref_drop_slice: (a: number, b: number) => void;
612
614
  readonly __wbindgen_export_7: WebAssembly.Table;
613
615
  readonly __externref_table_dealloc: (a: number) => void;
614
- readonly closure429_externref_shim: (a: number, b: number, c: any) => void;
615
- readonly closure570_externref_shim: (a: number, b: number, c: any, d: any) => void;
616
+ readonly closure433_externref_shim: (a: number, b: number, c: any) => void;
617
+ readonly closure574_externref_shim: (a: number, b: number, c: any, d: any) => void;
616
618
  readonly __wbindgen_start: () => void;
617
619
  }
618
620
 
@@ -265,12 +265,12 @@ export function setPanicHook() {
265
265
  wasm.setPanicHook();
266
266
  }
267
267
 
268
- function __wbg_adapter_6(arg0, arg1, arg2) {
269
- wasm.closure429_externref_shim(arg0, arg1, arg2);
268
+ function __wbg_adapter_12(arg0, arg1, arg2) {
269
+ wasm.closure433_externref_shim(arg0, arg1, arg2);
270
270
  }
271
271
 
272
- function __wbg_adapter_272(arg0, arg1, arg2, arg3) {
273
- wasm.closure570_externref_shim(arg0, arg1, arg2, arg3);
272
+ function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
273
+ wasm.closure574_externref_shim(arg0, arg1, arg2, arg3);
274
274
  }
275
275
 
276
276
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1098,11 +1098,11 @@ export class DocumentId {
1098
1098
  /**
1099
1099
  * @returns {string}
1100
1100
  */
1101
- fromString() {
1101
+ toString() {
1102
1102
  let deferred1_0;
1103
1103
  let deferred1_1;
1104
1104
  try {
1105
- const ret = wasm.documentid_fromString(this.__wbg_ptr);
1105
+ const ret = wasm.documentid_toString(this.__wbg_ptr);
1106
1106
  deferred1_0 = ret[0];
1107
1107
  deferred1_1 = ret[1];
1108
1108
  return getStringFromWasm0(ret[0], ret[1]);
@@ -1953,6 +1953,13 @@ export class Keyhive {
1953
1953
  const ret = wasm.keyhive_id(this.__wbg_ptr);
1954
1954
  return IndividualId.__wrap(ret);
1955
1955
  }
1956
+ /**
1957
+ * @returns {Individual}
1958
+ */
1959
+ get individual() {
1960
+ const ret = wasm.keyhive_individual(this.__wbg_ptr);
1961
+ return Individual.__wrap(ret);
1962
+ }
1956
1963
  /**
1957
1964
  * @returns {string}
1958
1965
  */
@@ -3245,7 +3252,7 @@ function __wbg_get_imports() {
3245
3252
  const a = state0.a;
3246
3253
  state0.a = 0;
3247
3254
  try {
3248
- return __wbg_adapter_272(a, state0.b, arg0, arg1);
3255
+ return __wbg_adapter_273(a, state0.b, arg0, arg1);
3249
3256
  } finally {
3250
3257
  state0.a = a;
3251
3258
  }
@@ -3444,9 +3451,9 @@ function __wbg_get_imports() {
3444
3451
  const ret = v0;
3445
3452
  return ret;
3446
3453
  };
3447
- imports.wbg.__wbindgen_cast_a788a31e51647739 = function(arg0, arg1) {
3448
- // Cast intrinsic for `Closure(Closure { dtor_idx: 428, function: Function { arguments: [Externref], shim_idx: 429, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3449
- const ret = makeMutClosure(arg0, arg1, 428, __wbg_adapter_6);
3454
+ imports.wbg.__wbindgen_cast_878a9170ed4959ff = function(arg0, arg1) {
3455
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 432, function: Function { arguments: [Externref], shim_idx: 433, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3456
+ const ret = makeMutClosure(arg0, arg1, 432, __wbg_adapter_12);
3450
3457
  return ret;
3451
3458
  };
3452
3459
  imports.wbg.__wbindgen_cast_ae91babfc5c19b28 = function(arg0, arg1) {
Binary file