@keyhive/keyhive 0.0.0-alpha.4 → 0.0.0-alpha.41
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 +7 -4
- package/pkg/README.md +1 -6
- package/pkg/keyhive_wasm.d.ts +62 -96
- package/pkg/keyhive_wasm_bg.js +665 -813
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +122 -124
- package/pkg/package.json +2 -2
- package/pkg-node/README.md +1 -6
- package/pkg-node/keyhive_wasm.d.ts +62 -96
- package/pkg-node/keyhive_wasm.js +660 -832
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +122 -124
- package/pkg-node/package.json +2 -2
- package/pkg-slim/README.md +1 -6
- package/pkg-slim/keyhive_wasm.d.ts +184 -220
- package/pkg-slim/keyhive_wasm.js +645 -817
- 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 +122 -124
- package/pkg-slim/package.json +2 -2
package/pkg/keyhive_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,76 +1,86 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_changeref_free: (a: number, b: number) => void;
|
|
5
|
-
export const changeref_new: (a: number, b: number) => number;
|
|
6
|
-
export const changeref_bytes: (a: number) => [number, number];
|
|
7
|
-
export const __wbg_individualid_free: (a: number, b: number) => void;
|
|
8
|
-
export const individualid_bytes: (a: number) => [number, number];
|
|
9
4
|
export const __wbg_archive_free: (a: number, b: number) => void;
|
|
10
5
|
export const archive_try_from_bytes: (a: number, b: number) => [number, number, number];
|
|
11
6
|
export const archive_toBytes: (a: number) => [number, number, number, number];
|
|
12
|
-
export const archive_tryToKeyhive: (a: number, b: number, c: number, d: any) =>
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
7
|
+
export const archive_tryToKeyhive: (a: number, b: number, c: number, d: any) => any;
|
|
8
|
+
export const __wbg_ciphertextstore_free: (a: number, b: number) => void;
|
|
9
|
+
export const ciphertextstore_newInMemory: () => number;
|
|
10
|
+
export const ciphertextstore_newFromWebStorage: (a: any) => number;
|
|
11
|
+
export const __wbg_contactcard_free: (a: number, b: number) => void;
|
|
12
|
+
export const contactcard_id: (a: number) => number;
|
|
13
|
+
export const contactcard_shareKey: (a: number) => number;
|
|
14
|
+
export const contactcard_signature: (a: number) => [number, number];
|
|
15
|
+
export const contactcard_toAgent: (a: number) => number;
|
|
16
|
+
export const contactcard_fromJson: (a: number, b: number) => [number, number, number];
|
|
17
|
+
export const contactcard_toJson: (a: number) => [number, number, number, number];
|
|
18
|
+
export const __wbg_encrypted_free: (a: number, b: number) => void;
|
|
19
|
+
export const encrypted_ciphertext: (a: number) => [number, number];
|
|
20
|
+
export const encrypted_nonce: (a: number) => [number, number];
|
|
21
|
+
export const encrypted_pcs_key_hash: (a: number) => [number, number];
|
|
22
|
+
export const encrypted_content_ref: (a: number) => [number, number];
|
|
23
|
+
export const encrypted_pred_refs: (a: number) => [number, number];
|
|
24
|
+
export const __wbg_identifier_free: (a: number, b: number) => void;
|
|
25
|
+
export const identifier_new: (a: number, b: number) => [number, number, number];
|
|
26
|
+
export const identifier_toBytes: (a: number) => [number, number];
|
|
27
|
+
export const __wbg_cannotparseidentifier_free: (a: number, b: number) => void;
|
|
28
|
+
export const __wbg_signed_free: (a: number, b: number) => void;
|
|
29
|
+
export const signed_fromBytes: (a: number, b: number) => [number, number, number];
|
|
30
|
+
export const signed_toBytes: (a: number) => [number, number, number, number];
|
|
31
|
+
export const signed_verify: (a: number) => number;
|
|
32
|
+
export const signed_payload: (a: number) => [number, number];
|
|
33
|
+
export const signed_verifyingKey: (a: number) => [number, number];
|
|
34
|
+
export const signed_signature: (a: number) => [number, number];
|
|
35
|
+
export const encrypted_toBytes: (a: number) => [number, number];
|
|
17
36
|
export const __wbg_document_free: (a: number, b: number) => void;
|
|
18
|
-
export const document_id: (a: number) => number;
|
|
19
37
|
export const document_doc_id: (a: number) => number;
|
|
20
38
|
export const document_toPeer: (a: number) => number;
|
|
21
39
|
export const document_toAgent: (a: number) => number;
|
|
40
|
+
export const document_toMembered: (a: number) => number;
|
|
41
|
+
export const document___wasm_refgen_toDocument: (a: number) => number;
|
|
42
|
+
export const __wbg_event_free: (a: number, b: number) => void;
|
|
43
|
+
export const event_variant: (a: number) => [number, number];
|
|
44
|
+
export const event_isDelegated: (a: number) => number;
|
|
45
|
+
export const event_isRevoked: (a: number) => number;
|
|
46
|
+
export const event_tryIntoSignedDelegation: (a: number) => number;
|
|
47
|
+
export const event_tryIntoSignedRevocation: (a: number) => number;
|
|
48
|
+
export const event_toBytes: (a: number) => [number, number, number, number];
|
|
22
49
|
export const __wbg_group_free: (a: number, b: number) => void;
|
|
23
|
-
export const
|
|
24
|
-
export const group_groupId: (a: number) => number;
|
|
25
|
-
export const group_members: (a: number) => [number, number];
|
|
50
|
+
export const group_members: (a: number) => any;
|
|
26
51
|
export const group_toPeer: (a: number) => number;
|
|
27
52
|
export const group_toAgent: (a: number) => number;
|
|
28
53
|
export const group_toMembered: (a: number) => number;
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
54
|
+
export const group___wasm_refgen_toGroup: (a: number) => number;
|
|
55
|
+
export const __wbg_individualid_free: (a: number, b: number) => void;
|
|
56
|
+
export const individualid_bytes: (a: number) => [number, number];
|
|
57
|
+
export const document_id: (a: number) => number;
|
|
58
|
+
export const group_id: (a: number) => number;
|
|
59
|
+
export const group_groupId: (a: number) => number;
|
|
60
|
+
export const __wbg_access_free: (a: number, b: number) => void;
|
|
61
|
+
export const access_tryFromString: (a: number, b: number) => number;
|
|
62
|
+
export const access_toString: (a: number) => [number, number];
|
|
37
63
|
export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
|
|
38
64
|
export const cgkaoperation_variant: (a: number) => [number, number];
|
|
39
|
-
export const __wbg_ciphertextstore_free: (a: number, b: number) => void;
|
|
40
|
-
export const ciphertextstore_newInMemory: () => number;
|
|
41
|
-
export const ciphertextstore_newFromWebStorage: (a: any) => number;
|
|
42
|
-
export const __wbg_removeciphertexterror_free: (a: number, b: number) => void;
|
|
43
|
-
export const __wbg_getciphertexterror_free: (a: number, b: number) => void;
|
|
44
|
-
export const getciphertexterror_message: (a: number) => [number, number];
|
|
45
|
-
export const __wbg_contactcard_free: (a: number, b: number) => void;
|
|
46
|
-
export const contactcard_id: (a: number) => number;
|
|
47
|
-
export const contactcard_shareKey: (a: number) => number;
|
|
48
|
-
export const contactcard_signature: (a: number) => [number, number];
|
|
49
|
-
export const contactcard_fromJson: (a: number, b: number) => [number, number, number];
|
|
50
|
-
export const contactcard_toJson: (a: number) => [number, number, number, number];
|
|
51
65
|
export const __wbg_doccontentrefs_free: (a: number, b: number) => void;
|
|
52
66
|
export const doccontentrefs_new: (a: number, b: number, c: number) => [number, number, number];
|
|
53
|
-
export const
|
|
67
|
+
export const doccontentrefs_addChangeId: (a: number, b: number) => any;
|
|
54
68
|
export const doccontentrefs_docId: (a: number) => number;
|
|
55
|
-
export const doccontentrefs_change_hashes: (a: number) =>
|
|
69
|
+
export const doccontentrefs_change_hashes: (a: number) => any;
|
|
56
70
|
export const __wbg_documentid_free: (a: number, b: number) => void;
|
|
57
71
|
export const documentid_new: (a: number, b: number) => [number, number, number];
|
|
58
|
-
export const
|
|
72
|
+
export const documentid_toString: (a: number) => [number, number];
|
|
59
73
|
export const documentid_toJsValue: (a: number) => any;
|
|
60
74
|
export const documentid_toBytes: (a: number) => [number, number];
|
|
61
75
|
export const __wbg_groupid_free: (a: number, b: number) => void;
|
|
62
76
|
export const groupid_toString: (a: number) => [number, number];
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const individual_individualId: (a: number) => number;
|
|
71
|
-
export const individual_pickPrekey: (a: number, b: number) => number;
|
|
72
|
-
export const __wbg_revokemembererror_free: (a: number, b: number) => void;
|
|
73
|
-
export const revokemembererror_message: (a: number) => [number, number];
|
|
77
|
+
export const __wbg_membered_free: (a: number, b: number) => void;
|
|
78
|
+
export const __wbg_peer_free: (a: number, b: number) => void;
|
|
79
|
+
export const peer_toString: (a: number) => [number, number];
|
|
80
|
+
export const peer_isIndividual: (a: number) => number;
|
|
81
|
+
export const peer_isGroup: (a: number) => number;
|
|
82
|
+
export const peer_isDocument: (a: number) => number;
|
|
83
|
+
export const peer___wasm_refgen_toPeer: (a: number) => number;
|
|
74
84
|
export const __wbg_signer_free: (a: number, b: number) => void;
|
|
75
85
|
export const signer_generate: () => any;
|
|
76
86
|
export const signer_generateMemory: () => number;
|
|
@@ -84,100 +94,90 @@ export const signer_clone: (a: number) => number;
|
|
|
84
94
|
export const __wbg_cannotparseed25519signingkey_free: (a: number, b: number) => void;
|
|
85
95
|
export const __wbg_generatewebcryptoerror_free: (a: number, b: number) => void;
|
|
86
96
|
export const generatewebcryptoerror_message: (a: number) => [number, number];
|
|
87
|
-
export const
|
|
88
|
-
export const
|
|
89
|
-
export const
|
|
97
|
+
export const __wbg_stats_free: (a: number, b: number) => void;
|
|
98
|
+
export const stats_individuals: (a: number) => bigint;
|
|
99
|
+
export const stats_groups: (a: number) => bigint;
|
|
100
|
+
export const stats_docs: (a: number) => bigint;
|
|
101
|
+
export const stats_delegations: (a: number) => bigint;
|
|
102
|
+
export const stats_revocations: (a: number) => bigint;
|
|
103
|
+
export const peer_id: (a: number) => number;
|
|
104
|
+
export const __wbg_encryptedcontentwithupdate_free: (a: number, b: number) => void;
|
|
105
|
+
export const encryptedcontentwithupdate_encrypted_content: (a: number) => number;
|
|
106
|
+
export const encryptedcontentwithupdate_update_op: (a: number) => number;
|
|
107
|
+
export const __wbg_membership_free: (a: number, b: number) => void;
|
|
108
|
+
export const membership_who: (a: number) => number;
|
|
109
|
+
export const membership_can: (a: number) => number;
|
|
110
|
+
export const __wbg_individual_free: (a: number, b: number) => void;
|
|
111
|
+
export const individual_toPeer: (a: number) => number;
|
|
112
|
+
export const individual_toAgent: (a: number) => number;
|
|
113
|
+
export const individual_id: (a: number) => number;
|
|
114
|
+
export const individual_pickPrekey: (a: number, b: number) => any;
|
|
115
|
+
export const individual_individualId: (a: number) => number;
|
|
116
|
+
export const __wbg_agent_free: (a: number, b: number) => void;
|
|
117
|
+
export const agent_toString: (a: number) => [number, number];
|
|
118
|
+
export const agent_isIndividual: (a: number) => number;
|
|
119
|
+
export const agent_isGroup: (a: number) => number;
|
|
120
|
+
export const agent_isDocument: (a: number) => number;
|
|
121
|
+
export const agent_id: (a: number) => number;
|
|
90
122
|
export const __wbg_keyhive_free: (a: number, b: number) => void;
|
|
91
123
|
export const keyhive_init: (a: number, b: number, c: any) => any;
|
|
92
124
|
export const keyhive_id: (a: number) => number;
|
|
125
|
+
export const keyhive_individual: (a: number) => any;
|
|
93
126
|
export const keyhive_idString: (a: number) => [number, number];
|
|
94
127
|
export const keyhive_generateGroup: (a: number, b: number, c: number) => any;
|
|
95
128
|
export const keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
96
129
|
export const keyhive_trySign: (a: number, b: number, c: number) => any;
|
|
97
130
|
export const keyhive_tryEncrypt: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
98
131
|
export const keyhive_tryEncryptArchive: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
99
|
-
export const keyhive_tryDecrypt: (a: number, b: number, c: number) =>
|
|
132
|
+
export const keyhive_tryDecrypt: (a: number, b: number, c: number) => any;
|
|
100
133
|
export const keyhive_addMember: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
101
134
|
export const keyhive_revokeMember: (a: number, b: number, c: number, d: number) => any;
|
|
102
|
-
export const keyhive_reachableDocs: (a: number) =>
|
|
135
|
+
export const keyhive_reachableDocs: (a: number) => any;
|
|
103
136
|
export const keyhive_forcePcsUpdate: (a: number, b: number) => any;
|
|
104
137
|
export const keyhive_rotatePrekey: (a: number, b: number) => any;
|
|
105
138
|
export const keyhive_expandPrekeys: (a: number) => any;
|
|
106
139
|
export const keyhive_contactCard: (a: number) => any;
|
|
107
|
-
export const keyhive_receiveContactCard: (a: number, b: number) =>
|
|
108
|
-
export const keyhive_getAgent: (a: number, b: number) =>
|
|
109
|
-
export const keyhive_getGroup: (a: number, b: number) =>
|
|
110
|
-
export const
|
|
111
|
-
export const
|
|
112
|
-
export const
|
|
113
|
-
export const
|
|
140
|
+
export const keyhive_receiveContactCard: (a: number, b: number) => any;
|
|
141
|
+
export const keyhive_getAgent: (a: number, b: number) => any;
|
|
142
|
+
export const keyhive_getGroup: (a: number, b: number) => any;
|
|
143
|
+
export const keyhive_getDocument: (a: number, b: number) => any;
|
|
144
|
+
export const keyhive_docMemberCapabilities: (a: number, b: number) => any;
|
|
145
|
+
export const keyhive_accessForDoc: (a: number, b: number, c: number) => any;
|
|
146
|
+
export const keyhive_intoArchive: (a: number) => any;
|
|
147
|
+
export const keyhive_toArchive: (a: number) => any;
|
|
114
148
|
export const keyhive_ingestArchive: (a: number, b: number) => any;
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
149
|
+
export const keyhive_ingestEventsBytes: (a: number, b: any) => any;
|
|
150
|
+
export const keyhive_stats: (a: number) => any;
|
|
151
|
+
export const __wbg_sharekey_free: (a: number, b: number) => void;
|
|
152
|
+
export const setPanicHook: () => void;
|
|
119
153
|
export const keyhive_whoami: (a: number) => number;
|
|
120
|
-
export const __wbg_access_free: (a: number, b: number) => void;
|
|
121
|
-
export const access_tryFromString: (a: number, b: number) => number;
|
|
122
|
-
export const access_toString: (a: number) => [number, number];
|
|
123
|
-
export const __wbg_agent_free: (a: number, b: number) => void;
|
|
124
|
-
export const agent_toString: (a: number) => [number, number];
|
|
125
|
-
export const agent_isIndividual: (a: number) => number;
|
|
126
|
-
export const agent_isGroup: (a: number) => number;
|
|
127
|
-
export const agent_isDocument: (a: number) => number;
|
|
128
|
-
export const agent_id: (a: number) => number;
|
|
129
|
-
export const __wbg_capability_free: (a: number, b: number) => void;
|
|
130
|
-
export const capability_who: (a: number) => number;
|
|
131
|
-
export const capability_can: (a: number) => number;
|
|
132
|
-
export const capability_proof: (a: number) => number;
|
|
133
|
-
export const __wbg_simplecapability_free: (a: number, b: number) => void;
|
|
134
|
-
export const simplecapability_who: (a: number) => number;
|
|
135
|
-
export const simplecapability_can: (a: number) => number;
|
|
136
|
-
export const __wbg_delegation_free: (a: number, b: number) => void;
|
|
137
|
-
export const delegation_delegate: (a: number) => number;
|
|
138
|
-
export const delegation_can: (a: number) => number;
|
|
139
|
-
export const delegation_proof: (a: number) => number;
|
|
140
|
-
export const delegation_after: (a: number) => number;
|
|
141
|
-
export const __wbg_delegationerror_free: (a: number, b: number) => void;
|
|
142
|
-
export const __wbg_encrypted_free: (a: number, b: number) => void;
|
|
143
|
-
export const encrypted_ciphertext: (a: number) => [number, number];
|
|
144
|
-
export const encrypted_nonce: (a: number) => [number, number];
|
|
145
|
-
export const encrypted_pcs_key_hash: (a: number) => [number, number];
|
|
146
|
-
export const encrypted_content_ref: (a: number) => [number, number];
|
|
147
|
-
export const encrypted_pred_refs: (a: number) => [number, number];
|
|
148
|
-
export const __wbg_encryptedcontentwithupdate_free: (a: number, b: number) => void;
|
|
149
|
-
export const encryptedcontentwithupdate_encrypted_content: (a: number) => number;
|
|
150
|
-
export const encryptedcontentwithupdate_update_op: (a: number) => number;
|
|
151
|
-
export const __wbg_event_free: (a: number, b: number) => void;
|
|
152
|
-
export const event_variant: (a: number) => [number, number];
|
|
153
|
-
export const event_isDelegated: (a: number) => number;
|
|
154
|
-
export const event_isRevoked: (a: number) => number;
|
|
155
|
-
export const event_tryIntoSignedDelegation: (a: number) => number;
|
|
156
|
-
export const event_tryIntoSignedRevocation: (a: number) => number;
|
|
157
|
-
export const __wbg_generatedocerror_free: (a: number, b: number) => void;
|
|
158
|
-
export const generatedocerror_message: (a: number) => [number, number];
|
|
159
154
|
export const __wbg_history_free: (a: number, b: number) => void;
|
|
160
155
|
export const history_delegations: (a: number) => [number, number];
|
|
161
156
|
export const history_revocations: (a: number) => [number, number];
|
|
162
157
|
export const history_contentRefs: (a: number) => [number, number];
|
|
163
|
-
export const
|
|
164
|
-
export const
|
|
165
|
-
export const
|
|
166
|
-
export const
|
|
167
|
-
export const
|
|
158
|
+
export const __wbg_summary_free: (a: number, b: number) => void;
|
|
159
|
+
export const summary_doc: (a: number) => number;
|
|
160
|
+
export const summary_access: (a: number) => number;
|
|
161
|
+
export const __wbg_changeid_free: (a: number, b: number) => void;
|
|
162
|
+
export const changeid_new: (a: number, b: number) => number;
|
|
163
|
+
export const changeid_bytes: (a: number) => [number, number];
|
|
164
|
+
export const changeid___wasm_refgen_toChangeId: (a: number) => number;
|
|
165
|
+
export const __wbg_invocation_free: (a: number, b: number) => void;
|
|
168
166
|
export const __wbg_revocation_free: (a: number, b: number) => void;
|
|
169
167
|
export const revocation_subject_id: (a: number) => number;
|
|
170
168
|
export const revocation_revoked: (a: number) => number;
|
|
171
169
|
export const revocation_proof: (a: number) => number;
|
|
172
170
|
export const revocation_after: (a: number) => number;
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
175
|
-
export const
|
|
176
|
-
export const
|
|
177
|
-
export const
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
171
|
+
export const __wbg_signedinvocation_free: (a: number, b: number) => void;
|
|
172
|
+
export const __wbg_capability_free: (a: number, b: number) => void;
|
|
173
|
+
export const capability_who: (a: number) => number;
|
|
174
|
+
export const capability_can: (a: number) => number;
|
|
175
|
+
export const capability_proof: (a: number) => number;
|
|
176
|
+
export const __wbg_delegation_free: (a: number, b: number) => void;
|
|
177
|
+
export const delegation_delegate: (a: number) => number;
|
|
178
|
+
export const delegation_can: (a: number) => number;
|
|
179
|
+
export const delegation_proof: (a: number) => number;
|
|
180
|
+
export const delegation_after: (a: number) => number;
|
|
181
181
|
export const __wbg_signedcgkaoperation_free: (a: number, b: number) => void;
|
|
182
182
|
export const signedcgkaoperation_verify: (a: number) => number;
|
|
183
183
|
export const signedcgkaoperation_delegation: (a: number) => number;
|
|
@@ -193,17 +193,15 @@ export const signedrevocation_verify: (a: number) => number;
|
|
|
193
193
|
export const signedrevocation_delegation: (a: number) => number;
|
|
194
194
|
export const signedrevocation_verifyingKey: (a: number) => [number, number];
|
|
195
195
|
export const signedrevocation_signature: (a: number) => [number, number];
|
|
196
|
-
export const
|
|
197
|
-
export const
|
|
196
|
+
export const wasm_bindgen__convert__closures_____invoke__h06e685b12973e965: (a: number, b: number, c: any) => void;
|
|
197
|
+
export const wasm_bindgen__closure__destroy__heb938d8490fb5a71: (a: number, b: number) => void;
|
|
198
|
+
export const wasm_bindgen__convert__closures_____invoke__h4666a87517ff844e: (a: number, b: number, c: any, d: any) => void;
|
|
199
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
200
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
198
201
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
199
202
|
export const __externref_table_alloc: () => number;
|
|
200
|
-
export const
|
|
203
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
201
204
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
202
|
-
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
203
|
-
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
204
|
-
export const __wbindgen_export_6: WebAssembly.Table;
|
|
205
205
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
206
206
|
export const __externref_table_dealloc: (a: number) => void;
|
|
207
|
-
export const closure423_externref_shim: (a: number, b: number, c: any) => void;
|
|
208
|
-
export const closure571_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
209
207
|
export const __wbindgen_start: () => void;
|
package/pkg/package.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"collaborators": [
|
|
5
5
|
"Alex Good <alex@memoryandthought.me>",
|
|
6
|
-
"John Mumm",
|
|
6
|
+
"John Mumm <jtfmumm@gmail.com>",
|
|
7
7
|
"Brooklyn Zelenka <hello@brooklynzelenka.com>"
|
|
8
8
|
],
|
|
9
9
|
"description": "WebAssembly wrappers for beehive_core",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.2.0-alpha.3",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
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
|
|
@@ -14,12 +14,6 @@ export class Access {
|
|
|
14
14
|
static tryFromString(s: string): Access | undefined;
|
|
15
15
|
toString(): string;
|
|
16
16
|
}
|
|
17
|
-
export class AddMemberError {
|
|
18
|
-
private constructor();
|
|
19
|
-
free(): void;
|
|
20
|
-
[Symbol.dispose](): void;
|
|
21
|
-
message(): string;
|
|
22
|
-
}
|
|
23
17
|
export class Agent {
|
|
24
18
|
private constructor();
|
|
25
19
|
free(): void;
|
|
@@ -35,7 +29,7 @@ export class Archive {
|
|
|
35
29
|
[Symbol.dispose](): void;
|
|
36
30
|
constructor(bytes: Uint8Array);
|
|
37
31
|
toBytes(): Uint8Array;
|
|
38
|
-
tryToKeyhive(ciphertext_store: CiphertextStore, signer: Signer, event_handler: Function): Keyhive
|
|
32
|
+
tryToKeyhive(ciphertext_store: CiphertextStore, signer: Signer, event_handler: Function): Promise<Keyhive>;
|
|
39
33
|
}
|
|
40
34
|
export class CannotParseEd25519SigningKey {
|
|
41
35
|
private constructor();
|
|
@@ -61,10 +55,14 @@ export class CgkaOperation {
|
|
|
61
55
|
[Symbol.dispose](): void;
|
|
62
56
|
readonly variant: string;
|
|
63
57
|
}
|
|
64
|
-
export class
|
|
58
|
+
export class ChangeId {
|
|
65
59
|
free(): void;
|
|
66
60
|
[Symbol.dispose](): void;
|
|
67
61
|
constructor(bytes: Uint8Array);
|
|
62
|
+
/**
|
|
63
|
+
* r" Upcasts to the JS-import type for [`#ty_ident`].
|
|
64
|
+
*/
|
|
65
|
+
__wasm_refgen_toChangeId(): ChangeId;
|
|
68
66
|
readonly bytes: Uint8Array;
|
|
69
67
|
}
|
|
70
68
|
export class CiphertextStore {
|
|
@@ -79,6 +77,7 @@ export class ContactCard {
|
|
|
79
77
|
free(): void;
|
|
80
78
|
[Symbol.dispose](): void;
|
|
81
79
|
signature(): Uint8Array;
|
|
80
|
+
toAgent(): Agent;
|
|
82
81
|
static fromJson(json: string): ContactCard;
|
|
83
82
|
toJson(): string;
|
|
84
83
|
readonly id: IndividualId;
|
|
@@ -93,18 +92,13 @@ export class Delegation {
|
|
|
93
92
|
readonly proof: SignedDelegation | undefined;
|
|
94
93
|
readonly after: History;
|
|
95
94
|
}
|
|
96
|
-
export class DelegationError {
|
|
97
|
-
private constructor();
|
|
98
|
-
free(): void;
|
|
99
|
-
[Symbol.dispose](): void;
|
|
100
|
-
}
|
|
101
95
|
export class DocContentRefs {
|
|
102
96
|
free(): void;
|
|
103
97
|
[Symbol.dispose](): void;
|
|
104
|
-
constructor(doc_id: DocumentId, change_hashes:
|
|
105
|
-
|
|
98
|
+
constructor(doc_id: DocumentId, change_hashes: ChangeId[]);
|
|
99
|
+
addChangeId(hash: ChangeId): Promise<void>;
|
|
106
100
|
readonly docId: DocumentId;
|
|
107
|
-
readonly change_hashes:
|
|
101
|
+
readonly change_hashes: Promise<ChangeId[]>;
|
|
108
102
|
}
|
|
109
103
|
export class Document {
|
|
110
104
|
private constructor();
|
|
@@ -112,6 +106,11 @@ export class Document {
|
|
|
112
106
|
[Symbol.dispose](): void;
|
|
113
107
|
toPeer(): Peer;
|
|
114
108
|
toAgent(): Agent;
|
|
109
|
+
toMembered(): Membered;
|
|
110
|
+
/**
|
|
111
|
+
* r" Upcasts to the JS-import type for [`#ty_ident`].
|
|
112
|
+
*/
|
|
113
|
+
__wasm_refgen_toDocument(): Document;
|
|
115
114
|
readonly id: Identifier;
|
|
116
115
|
readonly doc_id: DocumentId;
|
|
117
116
|
}
|
|
@@ -119,7 +118,7 @@ export class DocumentId {
|
|
|
119
118
|
free(): void;
|
|
120
119
|
[Symbol.dispose](): void;
|
|
121
120
|
constructor(bytes: Uint8Array);
|
|
122
|
-
|
|
121
|
+
toString(): string;
|
|
123
122
|
toJsValue(): any;
|
|
124
123
|
toBytes(): Uint8Array;
|
|
125
124
|
}
|
|
@@ -147,38 +146,35 @@ export class Event {
|
|
|
147
146
|
[Symbol.dispose](): void;
|
|
148
147
|
tryIntoSignedDelegation(): SignedDelegation | undefined;
|
|
149
148
|
tryIntoSignedRevocation(): SignedRevocation | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Converts the underlying [`Event`] to a [`StaticEvent`] and then
|
|
151
|
+
* serializes it.
|
|
152
|
+
*/
|
|
153
|
+
toBytes(): Uint8Array;
|
|
150
154
|
readonly variant: string;
|
|
151
155
|
readonly isDelegated: boolean;
|
|
152
156
|
readonly isRevoked: boolean;
|
|
153
157
|
}
|
|
154
|
-
export class GenerateDocError {
|
|
155
|
-
private constructor();
|
|
156
|
-
free(): void;
|
|
157
|
-
[Symbol.dispose](): void;
|
|
158
|
-
message(): string;
|
|
159
|
-
}
|
|
160
158
|
export class GenerateWebCryptoError {
|
|
161
159
|
private constructor();
|
|
162
160
|
free(): void;
|
|
163
161
|
[Symbol.dispose](): void;
|
|
164
162
|
message(): string;
|
|
165
163
|
}
|
|
166
|
-
export class GetCiphertextError {
|
|
167
|
-
private constructor();
|
|
168
|
-
free(): void;
|
|
169
|
-
[Symbol.dispose](): void;
|
|
170
|
-
readonly message: string;
|
|
171
|
-
}
|
|
172
164
|
export class Group {
|
|
173
165
|
private constructor();
|
|
174
166
|
free(): void;
|
|
175
167
|
[Symbol.dispose](): void;
|
|
168
|
+
members(): Promise<Capability[]>;
|
|
176
169
|
toPeer(): Peer;
|
|
177
170
|
toAgent(): Agent;
|
|
178
171
|
toMembered(): Membered;
|
|
172
|
+
/**
|
|
173
|
+
* r" Upcasts to the JS-import type for [`#ty_ident`].
|
|
174
|
+
*/
|
|
175
|
+
__wasm_refgen_toGroup(): Group;
|
|
179
176
|
readonly id: Identifier;
|
|
180
177
|
readonly groupId: GroupId;
|
|
181
|
-
readonly members: Capability[];
|
|
182
178
|
}
|
|
183
179
|
export class GroupId {
|
|
184
180
|
private constructor();
|
|
@@ -206,7 +202,7 @@ export class Individual {
|
|
|
206
202
|
[Symbol.dispose](): void;
|
|
207
203
|
toPeer(): Peer;
|
|
208
204
|
toAgent(): Agent;
|
|
209
|
-
pickPrekey(doc_id: DocumentId): ShareKey
|
|
205
|
+
pickPrekey(doc_id: DocumentId): Promise<ShareKey>;
|
|
210
206
|
readonly id: Identifier;
|
|
211
207
|
readonly individualId: IndividualId;
|
|
212
208
|
}
|
|
@@ -221,54 +217,38 @@ export class Invocation {
|
|
|
221
217
|
free(): void;
|
|
222
218
|
[Symbol.dispose](): void;
|
|
223
219
|
}
|
|
224
|
-
export class JsDecryptError {
|
|
225
|
-
private constructor();
|
|
226
|
-
free(): void;
|
|
227
|
-
[Symbol.dispose](): void;
|
|
228
|
-
}
|
|
229
|
-
export class JsEncryptError {
|
|
230
|
-
private constructor();
|
|
231
|
-
free(): void;
|
|
232
|
-
[Symbol.dispose](): void;
|
|
233
|
-
}
|
|
234
|
-
export class JsReceivePreKeyOpError {
|
|
235
|
-
private constructor();
|
|
236
|
-
free(): void;
|
|
237
|
-
[Symbol.dispose](): void;
|
|
238
|
-
}
|
|
239
|
-
export class JsReceiveStaticEventError {
|
|
240
|
-
private constructor();
|
|
241
|
-
free(): void;
|
|
242
|
-
[Symbol.dispose](): void;
|
|
243
|
-
}
|
|
244
220
|
export class Keyhive {
|
|
245
221
|
private constructor();
|
|
246
222
|
free(): void;
|
|
247
223
|
[Symbol.dispose](): void;
|
|
248
224
|
static init(signer: Signer, ciphertext_store: CiphertextStore, event_handler: Function): Promise<Keyhive>;
|
|
249
|
-
generateGroup(
|
|
250
|
-
generateDocument(coparents: Peer[], initial_content_ref_head:
|
|
225
|
+
generateGroup(js_coparents: Peer[]): Promise<Group>;
|
|
226
|
+
generateDocument(coparents: Peer[], initial_content_ref_head: ChangeId, more_initial_content_refs: ChangeId[]): Promise<Document>;
|
|
251
227
|
trySign(data: Uint8Array): Promise<Signed>;
|
|
252
|
-
tryEncrypt(doc: Document, content_ref:
|
|
253
|
-
tryEncryptArchive(doc: Document, content_ref:
|
|
254
|
-
tryDecrypt(doc: Document, encrypted: Encrypted): Uint8Array
|
|
228
|
+
tryEncrypt(doc: Document, content_ref: ChangeId, js_pred_refs: ChangeId[], content: Uint8Array): Promise<EncryptedContentWithUpdate>;
|
|
229
|
+
tryEncryptArchive(doc: Document, content_ref: ChangeId, pred_refs: ChangeId[], content: Uint8Array): Promise<EncryptedContentWithUpdate>;
|
|
230
|
+
tryDecrypt(doc: Document, encrypted: Encrypted): Promise<Uint8Array>;
|
|
255
231
|
addMember(to_add: Agent, membered: Membered, access: Access, other_relevant_docs: Document[]): Promise<SignedDelegation>;
|
|
256
232
|
revokeMember(to_revoke: Agent, retain_all_other_members: boolean, membered: Membered): Promise<SignedRevocation[]>;
|
|
257
|
-
reachableDocs(): Summary[]
|
|
233
|
+
reachableDocs(): Promise<Summary[]>;
|
|
258
234
|
forcePcsUpdate(doc: Document): Promise<void>;
|
|
259
235
|
rotatePrekey(prekey: ShareKey): Promise<ShareKey>;
|
|
260
236
|
expandPrekeys(): Promise<ShareKey>;
|
|
261
237
|
contactCard(): Promise<ContactCard>;
|
|
262
|
-
receiveContactCard(contact_card: ContactCard): Individual
|
|
263
|
-
getAgent(id: Identifier): Agent | undefined
|
|
264
|
-
getGroup(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
238
|
+
receiveContactCard(contact_card: ContactCard): Promise<Individual>;
|
|
239
|
+
getAgent(id: Identifier): Promise<Agent | undefined>;
|
|
240
|
+
getGroup(group_id: GroupId): Promise<Group | undefined>;
|
|
241
|
+
getDocument(doc_id: DocumentId): Promise<Document | undefined>;
|
|
242
|
+
docMemberCapabilities(doc_id: DocumentId): Promise<Membership[]>;
|
|
243
|
+
accessForDoc(id: Identifier, doc_id: DocumentId): Promise<Access | undefined>;
|
|
244
|
+
intoArchive(): Promise<Archive>;
|
|
245
|
+
toArchive(): Promise<Archive>;
|
|
269
246
|
ingestArchive(archive: Archive): Promise<void>;
|
|
247
|
+
ingestEventsBytes(events_bytes_array: Array<any>): Promise<Array<any>>;
|
|
248
|
+
stats(): Promise<Stats>;
|
|
270
249
|
readonly id: IndividualId;
|
|
271
250
|
readonly whoami: IndividualId;
|
|
251
|
+
readonly individual: Promise<Individual>;
|
|
272
252
|
readonly idString: string;
|
|
273
253
|
}
|
|
274
254
|
export class Membered {
|
|
@@ -276,6 +256,13 @@ export class Membered {
|
|
|
276
256
|
free(): void;
|
|
277
257
|
[Symbol.dispose](): void;
|
|
278
258
|
}
|
|
259
|
+
export class Membership {
|
|
260
|
+
private constructor();
|
|
261
|
+
free(): void;
|
|
262
|
+
[Symbol.dispose](): void;
|
|
263
|
+
readonly who: Agent;
|
|
264
|
+
readonly can: Access;
|
|
265
|
+
}
|
|
279
266
|
export class Peer {
|
|
280
267
|
private constructor();
|
|
281
268
|
free(): void;
|
|
@@ -284,11 +271,11 @@ export class Peer {
|
|
|
284
271
|
isIndividual(): boolean;
|
|
285
272
|
isGroup(): boolean;
|
|
286
273
|
isDocument(): boolean;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
274
|
+
/**
|
|
275
|
+
* r" Upcasts to the JS-import type for [`#ty_ident`].
|
|
276
|
+
*/
|
|
277
|
+
__wasm_refgen_toPeer(): Peer;
|
|
278
|
+
readonly id: Identifier;
|
|
292
279
|
}
|
|
293
280
|
export class Revocation {
|
|
294
281
|
private constructor();
|
|
@@ -299,18 +286,6 @@ export class Revocation {
|
|
|
299
286
|
readonly proof: SignedDelegation | undefined;
|
|
300
287
|
readonly after: History;
|
|
301
288
|
}
|
|
302
|
-
export class RevokeMemberError {
|
|
303
|
-
private constructor();
|
|
304
|
-
free(): void;
|
|
305
|
-
[Symbol.dispose](): void;
|
|
306
|
-
readonly message: string;
|
|
307
|
-
}
|
|
308
|
-
export class SerializationError {
|
|
309
|
-
private constructor();
|
|
310
|
-
free(): void;
|
|
311
|
-
[Symbol.dispose](): void;
|
|
312
|
-
toError(): any;
|
|
313
|
-
}
|
|
314
289
|
export class ShareKey {
|
|
315
290
|
private constructor();
|
|
316
291
|
free(): void;
|
|
@@ -373,18 +348,15 @@ export class Signer {
|
|
|
373
348
|
readonly variant: string;
|
|
374
349
|
readonly verifyingKey: Uint8Array;
|
|
375
350
|
}
|
|
376
|
-
export class
|
|
351
|
+
export class Stats {
|
|
377
352
|
private constructor();
|
|
378
353
|
free(): void;
|
|
379
354
|
[Symbol.dispose](): void;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
[Symbol.dispose](): void;
|
|
386
|
-
readonly who: Agent;
|
|
387
|
-
readonly can: Access;
|
|
355
|
+
readonly individuals: bigint;
|
|
356
|
+
readonly groups: bigint;
|
|
357
|
+
readonly docs: bigint;
|
|
358
|
+
readonly delegations: bigint;
|
|
359
|
+
readonly revocations: bigint;
|
|
388
360
|
}
|
|
389
361
|
export class Summary {
|
|
390
362
|
private constructor();
|
|
@@ -393,9 +365,3 @@ export class Summary {
|
|
|
393
365
|
readonly doc: Document;
|
|
394
366
|
readonly access: Access;
|
|
395
367
|
}
|
|
396
|
-
export class TryFromArchiveError {
|
|
397
|
-
private constructor();
|
|
398
|
-
free(): void;
|
|
399
|
-
[Symbol.dispose](): void;
|
|
400
|
-
toError(): any;
|
|
401
|
-
}
|