@keyhive/keyhive 0.0.0-alpha.2 → 0.0.0-alpha.21
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 +1 -6
- package/package.json +4 -2
- package/pkg/README.md +1 -6
- package/pkg/keyhive_wasm.d.ts +5 -2
- package/pkg/keyhive_wasm_bg.js +130 -144
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +112 -109
- package/pkg-node/README.md +1 -6
- package/pkg-node/keyhive_wasm.d.ts +5 -2
- package/pkg-node/keyhive_wasm.js +129 -143
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +112 -109
- package/pkg-slim/README.md +1 -6
- package/pkg-slim/keyhive_wasm.d.ts +117 -111
- package/pkg-slim/keyhive_wasm.js +123 -135
- package/pkg-slim/keyhive_wasm_bg.wasm +0 -0
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.js +1 -1
- package/pkg-slim/keyhive_wasm_bg.wasm.d.ts +112 -109
|
@@ -1,65 +1,55 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
4
|
+
export const __wbg_keyhive_free: (a: number, b: number) => void;
|
|
5
|
+
export const keyhive_init: (a: number, b: number, c: any) => any;
|
|
6
|
+
export const keyhive_id: (a: number) => number;
|
|
7
|
+
export const keyhive_individual: (a: number) => number;
|
|
8
|
+
export const keyhive_idString: (a: number) => [number, number];
|
|
9
|
+
export const keyhive_generateGroup: (a: number, b: number, c: number) => any;
|
|
10
|
+
export const keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
11
|
+
export const keyhive_trySign: (a: number, b: number, c: number) => any;
|
|
12
|
+
export const keyhive_tryEncrypt: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
13
|
+
export const keyhive_tryEncryptArchive: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
14
|
+
export const keyhive_tryDecrypt: (a: number, b: number, c: number) => [number, number, number, number];
|
|
15
|
+
export const keyhive_addMember: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
16
|
+
export const keyhive_revokeMember: (a: number, b: number, c: number, d: number) => any;
|
|
17
|
+
export const keyhive_reachableDocs: (a: number) => [number, number];
|
|
18
|
+
export const keyhive_forcePcsUpdate: (a: number, b: number) => any;
|
|
19
|
+
export const keyhive_rotatePrekey: (a: number, b: number) => any;
|
|
20
|
+
export const keyhive_expandPrekeys: (a: number) => any;
|
|
21
|
+
export const keyhive_contactCard: (a: number) => any;
|
|
22
|
+
export const keyhive_receiveContactCard: (a: number, b: number) => [number, number, number];
|
|
23
|
+
export const keyhive_getAgent: (a: number, b: number) => number;
|
|
24
|
+
export const keyhive_getGroup: (a: number, b: number) => number;
|
|
25
|
+
export const keyhive_getDocument: (a: number, b: number) => number;
|
|
26
|
+
export const keyhive_docMemberCapabilities: (a: number, b: number) => [number, number];
|
|
27
|
+
export const keyhive_accessForDoc: (a: number, b: number, c: number) => number;
|
|
28
|
+
export const keyhive_intoArchive: (a: number) => number;
|
|
29
|
+
export const keyhive_toArchive: (a: number) => number;
|
|
30
|
+
export const keyhive_ingestArchive: (a: number, b: number) => any;
|
|
31
|
+
export const __wbg_jsreceiveprekeyoperror_free: (a: number, b: number) => void;
|
|
32
|
+
export const __wbg_jsencrypterror_free: (a: number, b: number) => void;
|
|
33
|
+
export const __wbg_jsdecrypterror_free: (a: number, b: number) => void;
|
|
34
|
+
export const __wbg_jsreceivestaticeventerror_free: (a: number, b: number) => void;
|
|
35
|
+
export const keyhive_whoami: (a: number) => number;
|
|
36
|
+
export const __wbg_addmembererror_free: (a: number, b: number) => void;
|
|
37
|
+
export const addmembererror_message: (a: number) => [number, number];
|
|
38
38
|
export const __wbg_agent_free: (a: number, b: number) => void;
|
|
39
39
|
export const agent_toString: (a: number) => [number, number];
|
|
40
40
|
export const agent_isIndividual: (a: number) => number;
|
|
41
41
|
export const agent_isGroup: (a: number) => number;
|
|
42
42
|
export const agent_isDocument: (a: number) => number;
|
|
43
43
|
export const agent_id: (a: number) => number;
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const capability_proof: (a: number) => number;
|
|
48
|
-
export const __wbg_simplecapability_free: (a: number, b: number) => void;
|
|
49
|
-
export const simplecapability_who: (a: number) => number;
|
|
50
|
-
export const simplecapability_can: (a: number) => number;
|
|
44
|
+
export const __wbg_changeref_free: (a: number, b: number) => void;
|
|
45
|
+
export const changeref_new: (a: number, b: number) => number;
|
|
46
|
+
export const changeref_bytes: (a: number) => [number, number];
|
|
51
47
|
export const __wbg_delegation_free: (a: number, b: number) => void;
|
|
52
48
|
export const delegation_delegate: (a: number) => number;
|
|
53
49
|
export const delegation_can: (a: number) => number;
|
|
54
50
|
export const delegation_proof: (a: number) => number;
|
|
55
51
|
export const delegation_after: (a: number) => number;
|
|
56
52
|
export const __wbg_delegationerror_free: (a: number, b: number) => void;
|
|
57
|
-
export const __wbg_encrypted_free: (a: number, b: number) => void;
|
|
58
|
-
export const encrypted_ciphertext: (a: number) => [number, number];
|
|
59
|
-
export const encrypted_nonce: (a: number) => [number, number];
|
|
60
|
-
export const encrypted_pcs_key_hash: (a: number) => [number, number];
|
|
61
|
-
export const encrypted_content_ref: (a: number) => [number, number];
|
|
62
|
-
export const encrypted_pred_refs: (a: number) => [number, number];
|
|
63
53
|
export const __wbg_encryptedcontentwithupdate_free: (a: number, b: number) => void;
|
|
64
54
|
export const encryptedcontentwithupdate_encrypted_content: (a: number) => number;
|
|
65
55
|
export const encryptedcontentwithupdate_update_op: (a: number) => number;
|
|
@@ -71,21 +61,15 @@ export const event_tryIntoSignedDelegation: (a: number) => number;
|
|
|
71
61
|
export const event_tryIntoSignedRevocation: (a: number) => number;
|
|
72
62
|
export const __wbg_generatedocerror_free: (a: number, b: number) => void;
|
|
73
63
|
export const generatedocerror_message: (a: number) => [number, number];
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
64
|
+
export const __wbg_identifier_free: (a: number, b: number) => void;
|
|
65
|
+
export const identifier_new: (a: number, b: number) => [number, number, number];
|
|
66
|
+
export const identifier_toBytes: (a: number) => [number, number];
|
|
67
|
+
export const __wbg_cannotparseidentifier_free: (a: number, b: number) => void;
|
|
78
68
|
export const __wbg_peer_free: (a: number, b: number) => void;
|
|
79
69
|
export const peer_toString: (a: number) => [number, number];
|
|
80
70
|
export const peer_isIndividual: (a: number) => number;
|
|
81
71
|
export const peer_isGroup: (a: number) => number;
|
|
82
72
|
export const peer_isDocument: (a: number) => number;
|
|
83
|
-
export const __wbg_revocation_free: (a: number, b: number) => void;
|
|
84
|
-
export const revocation_subject_id: (a: number) => number;
|
|
85
|
-
export const revocation_revoked: (a: number) => number;
|
|
86
|
-
export const revocation_proof: (a: number) => number;
|
|
87
|
-
export const revocation_after: (a: number) => number;
|
|
88
|
-
export const __wbg_sharekey_free: (a: number, b: number) => void;
|
|
89
73
|
export const __wbg_signed_free: (a: number, b: number) => void;
|
|
90
74
|
export const signed_fromBytes: (a: number, b: number) => number;
|
|
91
75
|
export const signed_toBytes: (a: number) => [number, number];
|
|
@@ -108,42 +92,20 @@ export const signedrevocation_verify: (a: number) => number;
|
|
|
108
92
|
export const signedrevocation_delegation: (a: number) => number;
|
|
109
93
|
export const signedrevocation_verifyingKey: (a: number) => [number, number];
|
|
110
94
|
export const signedrevocation_signature: (a: number) => [number, number];
|
|
111
|
-
export const
|
|
112
|
-
export const
|
|
113
|
-
export const
|
|
114
|
-
export const
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
119
|
-
export const
|
|
120
|
-
export const
|
|
121
|
-
export const
|
|
122
|
-
export const
|
|
123
|
-
export const
|
|
124
|
-
export const
|
|
125
|
-
export const keyhive_reachableDocs: (a: number) => [number, number];
|
|
126
|
-
export const keyhive_forcePcsUpdate: (a: number, b: number) => any;
|
|
127
|
-
export const keyhive_rotatePrekey: (a: number, b: number) => any;
|
|
128
|
-
export const keyhive_expandPrekeys: (a: number) => any;
|
|
129
|
-
export const keyhive_contactCard: (a: number) => any;
|
|
130
|
-
export const keyhive_receiveContactCard: (a: number, b: number) => [number, number, number];
|
|
131
|
-
export const keyhive_getAgent: (a: number, b: number) => number;
|
|
132
|
-
export const keyhive_getGroup: (a: number, b: number) => number;
|
|
133
|
-
export const keyhive_docMemberCapabilities: (a: number, b: number) => [number, number];
|
|
134
|
-
export const keyhive_accessForDoc: (a: number, b: number, c: number) => number;
|
|
135
|
-
export const keyhive_intoArchive: (a: number) => number;
|
|
136
|
-
export const keyhive_toArchive: (a: number) => number;
|
|
137
|
-
export const keyhive_ingestArchive: (a: number, b: number) => any;
|
|
138
|
-
export const __wbg_jsreceiveprekeyoperror_free: (a: number, b: number) => void;
|
|
139
|
-
export const __wbg_jsencrypterror_free: (a: number, b: number) => void;
|
|
140
|
-
export const __wbg_jsdecrypterror_free: (a: number, b: number) => void;
|
|
141
|
-
export const __wbg_jsreceivestaticeventerror_free: (a: number, b: number) => void;
|
|
142
|
-
export const keyhive_whoami: (a: number) => number;
|
|
143
|
-
export const __wbg_addmembererror_free: (a: number, b: number) => void;
|
|
144
|
-
export const addmembererror_message: (a: number) => [number, number];
|
|
145
|
-
export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
|
|
146
|
-
export const cgkaoperation_variant: (a: number) => [number, number];
|
|
95
|
+
export const __wbg_summary_free: (a: number, b: number) => void;
|
|
96
|
+
export const summary_doc: (a: number) => number;
|
|
97
|
+
export const summary_access: (a: number) => number;
|
|
98
|
+
export const __wbg_access_free: (a: number, b: number) => void;
|
|
99
|
+
export const access_tryFromString: (a: number, b: number) => number;
|
|
100
|
+
export const access_toString: (a: number) => [number, number];
|
|
101
|
+
export const __wbg_archive_free: (a: number, b: number) => void;
|
|
102
|
+
export const archive_try_from_bytes: (a: number, b: number) => [number, number, number];
|
|
103
|
+
export const archive_toBytes: (a: number) => [number, number, number, number];
|
|
104
|
+
export const archive_tryToKeyhive: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
105
|
+
export const __wbg_tryfromarchiveerror_free: (a: number, b: number) => void;
|
|
106
|
+
export const tryfromarchiveerror_toError: (a: number) => any;
|
|
107
|
+
export const __wbg_serializationerror_free: (a: number, b: number) => void;
|
|
108
|
+
export const serializationerror_toError: (a: number) => any;
|
|
147
109
|
export const __wbg_ciphertextstore_free: (a: number, b: number) => void;
|
|
148
110
|
export const ciphertextstore_newInMemory: () => number;
|
|
149
111
|
export const ciphertextstore_newFromWebStorage: (a: any) => number;
|
|
@@ -163,20 +125,15 @@ export const doccontentrefs_docId: (a: number) => number;
|
|
|
163
125
|
export const doccontentrefs_change_hashes: (a: number) => [number, number];
|
|
164
126
|
export const __wbg_documentid_free: (a: number, b: number) => void;
|
|
165
127
|
export const documentid_new: (a: number, b: number) => [number, number, number];
|
|
166
|
-
export const
|
|
128
|
+
export const documentid_toString: (a: number) => [number, number];
|
|
167
129
|
export const documentid_toJsValue: (a: number) => any;
|
|
168
130
|
export const documentid_toBytes: (a: number) => [number, number];
|
|
169
|
-
export const
|
|
170
|
-
export const
|
|
171
|
-
export const
|
|
172
|
-
export const
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
175
|
-
export const individual_toPeer: (a: number) => number;
|
|
176
|
-
export const individual_toAgent: (a: number) => number;
|
|
177
|
-
export const individual_id: (a: number) => number;
|
|
178
|
-
export const individual_individualId: (a: number) => number;
|
|
179
|
-
export const individual_pickPrekey: (a: number, b: number) => number;
|
|
131
|
+
export const __wbg_encrypted_free: (a: number, b: number) => void;
|
|
132
|
+
export const encrypted_ciphertext: (a: number) => [number, number];
|
|
133
|
+
export const encrypted_nonce: (a: number) => [number, number];
|
|
134
|
+
export const encrypted_pcs_key_hash: (a: number) => [number, number];
|
|
135
|
+
export const encrypted_content_ref: (a: number) => [number, number];
|
|
136
|
+
export const encrypted_pred_refs: (a: number) => [number, number];
|
|
180
137
|
export const __wbg_revokemembererror_free: (a: number, b: number) => void;
|
|
181
138
|
export const revokemembererror_message: (a: number) => [number, number];
|
|
182
139
|
export const __wbg_signer_free: (a: number, b: number) => void;
|
|
@@ -194,16 +151,62 @@ export const __wbg_generatewebcryptoerror_free: (a: number, b: number) => void;
|
|
|
194
151
|
export const generatewebcryptoerror_message: (a: number) => [number, number];
|
|
195
152
|
export const __wbg_signingerror_free: (a: number, b: number) => void;
|
|
196
153
|
export const signingerror_message: (a: number) => [number, number];
|
|
197
|
-
export const
|
|
154
|
+
export const encrypted_toBytes: (a: number) => [number, number];
|
|
155
|
+
export const __wbg_capability_free: (a: number, b: number) => void;
|
|
156
|
+
export const capability_who: (a: number) => number;
|
|
157
|
+
export const capability_can: (a: number) => number;
|
|
158
|
+
export const capability_proof: (a: number) => number;
|
|
159
|
+
export const __wbg_simplecapability_free: (a: number, b: number) => void;
|
|
160
|
+
export const simplecapability_who: (a: number) => number;
|
|
161
|
+
export const simplecapability_can: (a: number) => number;
|
|
162
|
+
export const __wbg_document_free: (a: number, b: number) => void;
|
|
163
|
+
export const document_id: (a: number) => number;
|
|
164
|
+
export const document_doc_id: (a: number) => number;
|
|
165
|
+
export const document_toPeer: (a: number) => number;
|
|
166
|
+
export const document_toAgent: (a: number) => number;
|
|
167
|
+
export const document_toMembered: (a: number) => number;
|
|
168
|
+
export const __wbg_group_free: (a: number, b: number) => void;
|
|
169
|
+
export const group_id: (a: number) => number;
|
|
170
|
+
export const group_groupId: (a: number) => number;
|
|
171
|
+
export const group_members: (a: number) => [number, number];
|
|
172
|
+
export const group_toPeer: (a: number) => number;
|
|
173
|
+
export const group_toAgent: (a: number) => number;
|
|
174
|
+
export const group_toMembered: (a: number) => number;
|
|
175
|
+
export const __wbg_signedinvocation_free: (a: number, b: number) => void;
|
|
176
|
+
export const __wbg_individual_free: (a: number, b: number) => void;
|
|
177
|
+
export const individual_toPeer: (a: number) => number;
|
|
178
|
+
export const individual_toAgent: (a: number) => number;
|
|
179
|
+
export const individual_id: (a: number) => number;
|
|
180
|
+
export const individual_individualId: (a: number) => number;
|
|
181
|
+
export const individual_pickPrekey: (a: number, b: number) => number;
|
|
182
|
+
export const __wbg_sharekey_free: (a: number, b: number) => void;
|
|
183
|
+
export const setPanicHook: () => void;
|
|
184
|
+
export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
|
|
185
|
+
export const cgkaoperation_variant: (a: number) => [number, number];
|
|
186
|
+
export const __wbg_groupid_free: (a: number, b: number) => void;
|
|
187
|
+
export const groupid_toString: (a: number) => [number, number];
|
|
188
|
+
export const __wbg_history_free: (a: number, b: number) => void;
|
|
189
|
+
export const history_delegations: (a: number) => [number, number];
|
|
190
|
+
export const history_revocations: (a: number) => [number, number];
|
|
191
|
+
export const history_contentRefs: (a: number) => [number, number];
|
|
192
|
+
export const __wbg_individualid_free: (a: number, b: number) => void;
|
|
193
|
+
export const individualid_bytes: (a: number) => [number, number];
|
|
194
|
+
export const __wbg_invocation_free: (a: number, b: number) => void;
|
|
195
|
+
export const __wbg_revocation_free: (a: number, b: number) => void;
|
|
196
|
+
export const revocation_subject_id: (a: number) => number;
|
|
197
|
+
export const revocation_revoked: (a: number) => number;
|
|
198
|
+
export const revocation_proof: (a: number) => number;
|
|
199
|
+
export const revocation_after: (a: number) => number;
|
|
200
|
+
export const __wbg_membered_free: (a: number, b: number) => void;
|
|
198
201
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
199
202
|
export const __externref_table_alloc: () => number;
|
|
200
203
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
201
204
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
202
205
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
203
206
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
204
|
-
export const __wbindgen_export_6: WebAssembly.Table;
|
|
205
207
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
208
|
+
export const __wbindgen_export_7: WebAssembly.Table;
|
|
206
209
|
export const __externref_table_dealloc: (a: number) => void;
|
|
207
|
-
export const
|
|
208
|
-
export const
|
|
210
|
+
export const closure494_externref_shim: (a: number, b: number, c: any) => void;
|
|
211
|
+
export const closure651_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
209
212
|
export const __wbindgen_start: () => void;
|
package/pkg-node/README.md
CHANGED
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
## Build package
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
|
|
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
|
|
@@ -112,6 +112,7 @@ export class Document {
|
|
|
112
112
|
[Symbol.dispose](): void;
|
|
113
113
|
toPeer(): Peer;
|
|
114
114
|
toAgent(): Agent;
|
|
115
|
+
toMembered(): Membered;
|
|
115
116
|
readonly id: Identifier;
|
|
116
117
|
readonly doc_id: DocumentId;
|
|
117
118
|
}
|
|
@@ -119,7 +120,7 @@ export class DocumentId {
|
|
|
119
120
|
free(): void;
|
|
120
121
|
[Symbol.dispose](): void;
|
|
121
122
|
constructor(bytes: Uint8Array);
|
|
122
|
-
|
|
123
|
+
toString(): string;
|
|
123
124
|
toJsValue(): any;
|
|
124
125
|
toBytes(): Uint8Array;
|
|
125
126
|
}
|
|
@@ -261,7 +262,8 @@ export class Keyhive {
|
|
|
261
262
|
contactCard(): Promise<ContactCard>;
|
|
262
263
|
receiveContactCard(contact_card: ContactCard): Individual;
|
|
263
264
|
getAgent(id: Identifier): Agent | undefined;
|
|
264
|
-
getGroup(id:
|
|
265
|
+
getGroup(id: GroupId): Group | undefined;
|
|
266
|
+
getDocument(id: DocumentId): Document | undefined;
|
|
265
267
|
docMemberCapabilities(doc_id: DocumentId): SimpleCapability[];
|
|
266
268
|
accessForDoc(id: Identifier, doc_id: DocumentId): Access | undefined;
|
|
267
269
|
intoArchive(): Archive;
|
|
@@ -269,6 +271,7 @@ export class Keyhive {
|
|
|
269
271
|
ingestArchive(archive: Archive): Promise<void>;
|
|
270
272
|
readonly id: IndividualId;
|
|
271
273
|
readonly whoami: IndividualId;
|
|
274
|
+
readonly individual: Individual;
|
|
272
275
|
readonly idString: string;
|
|
273
276
|
}
|
|
274
277
|
export class Membered {
|