@keyhive/keyhive 0.0.0-alpha.56c → 0.0.0-alpha.58
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/LICENSE +201 -0
- package/package.json +1 -1
- package/pkg/.gitignore +0 -1
- package/pkg/README.md +0 -29
- package/pkg/keyhive_wasm.d.ts +0 -474
- package/pkg/keyhive_wasm.js +0 -9
- package/pkg/keyhive_wasm_bg.js +0 -3460
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +0 -247
- package/pkg/package.json +0 -28
- package/pkg-node/.gitignore +0 -1
- package/pkg-node/README.md +0 -29
- package/pkg-node/keyhive_wasm.d.ts +0 -474
- package/pkg-node/keyhive_wasm.js +0 -3506
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +0 -247
- package/pkg-node/package.json +0 -22
- package/pkg-slim/.gitignore +0 -1
- package/pkg-slim/README.md +0 -29
- package/pkg-slim/index.d.ts +0 -2
- package/pkg-slim/index.js +0 -12
- package/pkg-slim/index.ts +0 -15
- package/pkg-slim/keyhive_wasm.d.ts +0 -746
- package/pkg-slim/keyhive_wasm.js +0 -3560
- package/pkg-slim/keyhive_wasm_bg.wasm +0 -0
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.d.ts +0 -4
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.js +0 -2
- package/pkg-slim/keyhive_wasm_bg.wasm.d.ts +0 -247
- package/pkg-slim/package.json +0 -26
package/pkg-slim/keyhive_wasm.js
DELETED
|
@@ -1,3560 +0,0 @@
|
|
|
1
|
-
/* @ts-self-types="./keyhive_wasm.d.ts" */
|
|
2
|
-
|
|
3
|
-
export class Access {
|
|
4
|
-
static __wrap(ptr) {
|
|
5
|
-
ptr = ptr >>> 0;
|
|
6
|
-
const obj = Object.create(Access.prototype);
|
|
7
|
-
obj.__wbg_ptr = ptr;
|
|
8
|
-
AccessFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
9
|
-
return obj;
|
|
10
|
-
}
|
|
11
|
-
__destroy_into_raw() {
|
|
12
|
-
const ptr = this.__wbg_ptr;
|
|
13
|
-
this.__wbg_ptr = 0;
|
|
14
|
-
AccessFinalization.unregister(this);
|
|
15
|
-
return ptr;
|
|
16
|
-
}
|
|
17
|
-
free() {
|
|
18
|
-
const ptr = this.__destroy_into_raw();
|
|
19
|
-
wasm.__wbg_access_free(ptr, 0);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @returns {string}
|
|
23
|
-
*/
|
|
24
|
-
toString() {
|
|
25
|
-
let deferred1_0;
|
|
26
|
-
let deferred1_1;
|
|
27
|
-
try {
|
|
28
|
-
const ret = wasm.access_toString(this.__wbg_ptr);
|
|
29
|
-
deferred1_0 = ret[0];
|
|
30
|
-
deferred1_1 = ret[1];
|
|
31
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
32
|
-
} finally {
|
|
33
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @param {string} s
|
|
38
|
-
* @returns {Access | undefined}
|
|
39
|
-
*/
|
|
40
|
-
static tryFromString(s) {
|
|
41
|
-
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
42
|
-
const len0 = WASM_VECTOR_LEN;
|
|
43
|
-
const ret = wasm.access_tryFromString(ptr0, len0);
|
|
44
|
-
return ret === 0 ? undefined : Access.__wrap(ret);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (Symbol.dispose) Access.prototype[Symbol.dispose] = Access.prototype.free;
|
|
48
|
-
|
|
49
|
-
export class Agent {
|
|
50
|
-
static __wrap(ptr) {
|
|
51
|
-
ptr = ptr >>> 0;
|
|
52
|
-
const obj = Object.create(Agent.prototype);
|
|
53
|
-
obj.__wbg_ptr = ptr;
|
|
54
|
-
AgentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
__destroy_into_raw() {
|
|
58
|
-
const ptr = this.__wbg_ptr;
|
|
59
|
-
this.__wbg_ptr = 0;
|
|
60
|
-
AgentFinalization.unregister(this);
|
|
61
|
-
return ptr;
|
|
62
|
-
}
|
|
63
|
-
free() {
|
|
64
|
-
const ptr = this.__destroy_into_raw();
|
|
65
|
-
wasm.__wbg_agent_free(ptr, 0);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @returns {Identifier}
|
|
69
|
-
*/
|
|
70
|
-
get id() {
|
|
71
|
-
const ret = wasm.agent_id(this.__wbg_ptr);
|
|
72
|
-
return Identifier.__wrap(ret);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* @returns {boolean}
|
|
76
|
-
*/
|
|
77
|
-
isDocument() {
|
|
78
|
-
const ret = wasm.agent_isDocument(this.__wbg_ptr);
|
|
79
|
-
return ret !== 0;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @returns {boolean}
|
|
83
|
-
*/
|
|
84
|
-
isGroup() {
|
|
85
|
-
const ret = wasm.agent_isGroup(this.__wbg_ptr);
|
|
86
|
-
return ret !== 0;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @returns {boolean}
|
|
90
|
-
*/
|
|
91
|
-
isIndividual() {
|
|
92
|
-
const ret = wasm.agent_isIndividual(this.__wbg_ptr);
|
|
93
|
-
return ret !== 0;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Returns prekey operation hashes for this [`Agent`] as an array of hash bytes.
|
|
97
|
-
* @returns {Promise<Uint8Array[]>}
|
|
98
|
-
*/
|
|
99
|
-
keyOpHashes() {
|
|
100
|
-
const ret = wasm.agent_keyOpHashes(this.__wbg_ptr);
|
|
101
|
-
return ret;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Returns prekey operations for this agent as a Map of hash -> serialized bytes for [`StaticEvent`]
|
|
105
|
-
* @returns {Promise<Map<any, any>>}
|
|
106
|
-
*/
|
|
107
|
-
keyOps() {
|
|
108
|
-
const ret = wasm.agent_keyOps(this.__wbg_ptr);
|
|
109
|
-
return ret;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* @returns {string}
|
|
113
|
-
*/
|
|
114
|
-
toString() {
|
|
115
|
-
let deferred1_0;
|
|
116
|
-
let deferred1_1;
|
|
117
|
-
try {
|
|
118
|
-
const ret = wasm.agent_toString(this.__wbg_ptr);
|
|
119
|
-
deferred1_0 = ret[0];
|
|
120
|
-
deferred1_1 = ret[1];
|
|
121
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
122
|
-
} finally {
|
|
123
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
if (Symbol.dispose) Agent.prototype[Symbol.dispose] = Agent.prototype.free;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Result of [`JsKeyhive::all_agent_events`], containing all events for all agents
|
|
131
|
-
* with deduplicated storage and two-tier indirection for membership, prekey, and CGKA ops.
|
|
132
|
-
*
|
|
133
|
-
* The consumer follows: agent -> source IDs -> hashes -> event bytes.
|
|
134
|
-
*/
|
|
135
|
-
export class AllAgentEvents {
|
|
136
|
-
static __wrap(ptr) {
|
|
137
|
-
ptr = ptr >>> 0;
|
|
138
|
-
const obj = Object.create(AllAgentEvents.prototype);
|
|
139
|
-
obj.__wbg_ptr = ptr;
|
|
140
|
-
AllAgentEventsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
141
|
-
return obj;
|
|
142
|
-
}
|
|
143
|
-
__destroy_into_raw() {
|
|
144
|
-
const ptr = this.__wbg_ptr;
|
|
145
|
-
this.__wbg_ptr = 0;
|
|
146
|
-
AllAgentEventsFinalization.unregister(this);
|
|
147
|
-
return ptr;
|
|
148
|
-
}
|
|
149
|
-
free() {
|
|
150
|
-
const ptr = this.__destroy_into_raw();
|
|
151
|
-
wasm.__wbg_allagentevents_free(ptr, 0);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @returns {Map<any, any>}
|
|
155
|
-
*/
|
|
156
|
-
get agentCgkaSources() {
|
|
157
|
-
const ret = wasm.allagentevents_agentCgkaSources(this.__wbg_ptr);
|
|
158
|
-
return ret;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* @returns {Map<any, any>}
|
|
162
|
-
*/
|
|
163
|
-
get agentMembershipSources() {
|
|
164
|
-
const ret = wasm.allagentevents_agentMembershipSources(this.__wbg_ptr);
|
|
165
|
-
return ret;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* @returns {Map<any, any>}
|
|
169
|
-
*/
|
|
170
|
-
get agentPrekeySources() {
|
|
171
|
-
const ret = wasm.allagentevents_agentPrekeySources(this.__wbg_ptr);
|
|
172
|
-
return ret;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* @returns {Map<any, any>}
|
|
176
|
-
*/
|
|
177
|
-
get cgkaSources() {
|
|
178
|
-
const ret = wasm.allagentevents_cgkaSources(this.__wbg_ptr);
|
|
179
|
-
return ret;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* @returns {Map<any, any>}
|
|
183
|
-
*/
|
|
184
|
-
get events() {
|
|
185
|
-
const ret = wasm.allagentevents_events(this.__wbg_ptr);
|
|
186
|
-
return ret;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* @returns {Map<any, any>}
|
|
190
|
-
*/
|
|
191
|
-
get membershipSources() {
|
|
192
|
-
const ret = wasm.allagentevents_membershipSources(this.__wbg_ptr);
|
|
193
|
-
return ret;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* @returns {Map<any, any>}
|
|
197
|
-
*/
|
|
198
|
-
get prekeySources() {
|
|
199
|
-
const ret = wasm.allagentevents_prekeySources(this.__wbg_ptr);
|
|
200
|
-
return ret;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
if (Symbol.dispose) AllAgentEvents.prototype[Symbol.dispose] = AllAgentEvents.prototype.free;
|
|
204
|
-
|
|
205
|
-
export class Archive {
|
|
206
|
-
static __wrap(ptr) {
|
|
207
|
-
ptr = ptr >>> 0;
|
|
208
|
-
const obj = Object.create(Archive.prototype);
|
|
209
|
-
obj.__wbg_ptr = ptr;
|
|
210
|
-
ArchiveFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
211
|
-
return obj;
|
|
212
|
-
}
|
|
213
|
-
__destroy_into_raw() {
|
|
214
|
-
const ptr = this.__wbg_ptr;
|
|
215
|
-
this.__wbg_ptr = 0;
|
|
216
|
-
ArchiveFinalization.unregister(this);
|
|
217
|
-
return ptr;
|
|
218
|
-
}
|
|
219
|
-
free() {
|
|
220
|
-
const ptr = this.__destroy_into_raw();
|
|
221
|
-
wasm.__wbg_archive_free(ptr, 0);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* @returns {Uint8Array}
|
|
225
|
-
*/
|
|
226
|
-
toBytes() {
|
|
227
|
-
const ret = wasm.archive_toBytes(this.__wbg_ptr);
|
|
228
|
-
if (ret[3]) {
|
|
229
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
230
|
-
}
|
|
231
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
232
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
233
|
-
return v1;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @param {CiphertextStore} ciphertext_store
|
|
237
|
-
* @param {Signer} signer
|
|
238
|
-
* @param {Function} event_handler
|
|
239
|
-
* @returns {Promise<Keyhive>}
|
|
240
|
-
*/
|
|
241
|
-
tryToKeyhive(ciphertext_store, signer, event_handler) {
|
|
242
|
-
_assertClass(ciphertext_store, CiphertextStore);
|
|
243
|
-
var ptr0 = ciphertext_store.__destroy_into_raw();
|
|
244
|
-
_assertClass(signer, Signer);
|
|
245
|
-
const ret = wasm.archive_tryToKeyhive(this.__wbg_ptr, ptr0, signer.__wbg_ptr, event_handler);
|
|
246
|
-
return ret;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* @param {Uint8Array} bytes
|
|
250
|
-
*/
|
|
251
|
-
constructor(bytes) {
|
|
252
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
253
|
-
const len0 = WASM_VECTOR_LEN;
|
|
254
|
-
const ret = wasm.archive_try_from_bytes(ptr0, len0);
|
|
255
|
-
if (ret[2]) {
|
|
256
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
257
|
-
}
|
|
258
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
259
|
-
ArchiveFinalization.register(this, this.__wbg_ptr, this);
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
if (Symbol.dispose) Archive.prototype[Symbol.dispose] = Archive.prototype.free;
|
|
264
|
-
|
|
265
|
-
export class CannotParseEd25519SigningKey {
|
|
266
|
-
static __wrap(ptr) {
|
|
267
|
-
ptr = ptr >>> 0;
|
|
268
|
-
const obj = Object.create(CannotParseEd25519SigningKey.prototype);
|
|
269
|
-
obj.__wbg_ptr = ptr;
|
|
270
|
-
CannotParseEd25519SigningKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
271
|
-
return obj;
|
|
272
|
-
}
|
|
273
|
-
__destroy_into_raw() {
|
|
274
|
-
const ptr = this.__wbg_ptr;
|
|
275
|
-
this.__wbg_ptr = 0;
|
|
276
|
-
CannotParseEd25519SigningKeyFinalization.unregister(this);
|
|
277
|
-
return ptr;
|
|
278
|
-
}
|
|
279
|
-
free() {
|
|
280
|
-
const ptr = this.__destroy_into_raw();
|
|
281
|
-
wasm.__wbg_cannotparseed25519signingkey_free(ptr, 0);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if (Symbol.dispose) CannotParseEd25519SigningKey.prototype[Symbol.dispose] = CannotParseEd25519SigningKey.prototype.free;
|
|
285
|
-
|
|
286
|
-
export class CannotParseIdentifier {
|
|
287
|
-
static __wrap(ptr) {
|
|
288
|
-
ptr = ptr >>> 0;
|
|
289
|
-
const obj = Object.create(CannotParseIdentifier.prototype);
|
|
290
|
-
obj.__wbg_ptr = ptr;
|
|
291
|
-
CannotParseIdentifierFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
292
|
-
return obj;
|
|
293
|
-
}
|
|
294
|
-
__destroy_into_raw() {
|
|
295
|
-
const ptr = this.__wbg_ptr;
|
|
296
|
-
this.__wbg_ptr = 0;
|
|
297
|
-
CannotParseIdentifierFinalization.unregister(this);
|
|
298
|
-
return ptr;
|
|
299
|
-
}
|
|
300
|
-
free() {
|
|
301
|
-
const ptr = this.__destroy_into_raw();
|
|
302
|
-
wasm.__wbg_cannotparseidentifier_free(ptr, 0);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
if (Symbol.dispose) CannotParseIdentifier.prototype[Symbol.dispose] = CannotParseIdentifier.prototype.free;
|
|
306
|
-
|
|
307
|
-
export class Capability {
|
|
308
|
-
static __wrap(ptr) {
|
|
309
|
-
ptr = ptr >>> 0;
|
|
310
|
-
const obj = Object.create(Capability.prototype);
|
|
311
|
-
obj.__wbg_ptr = ptr;
|
|
312
|
-
CapabilityFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
313
|
-
return obj;
|
|
314
|
-
}
|
|
315
|
-
__destroy_into_raw() {
|
|
316
|
-
const ptr = this.__wbg_ptr;
|
|
317
|
-
this.__wbg_ptr = 0;
|
|
318
|
-
CapabilityFinalization.unregister(this);
|
|
319
|
-
return ptr;
|
|
320
|
-
}
|
|
321
|
-
free() {
|
|
322
|
-
const ptr = this.__destroy_into_raw();
|
|
323
|
-
wasm.__wbg_capability_free(ptr, 0);
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* @returns {Access}
|
|
327
|
-
*/
|
|
328
|
-
get can() {
|
|
329
|
-
const ret = wasm.capability_can(this.__wbg_ptr);
|
|
330
|
-
return Access.__wrap(ret);
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* @returns {SignedDelegation}
|
|
334
|
-
*/
|
|
335
|
-
get proof() {
|
|
336
|
-
const ret = wasm.capability_proof(this.__wbg_ptr);
|
|
337
|
-
return SignedDelegation.__wrap(ret);
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* @returns {Agent}
|
|
341
|
-
*/
|
|
342
|
-
get who() {
|
|
343
|
-
const ret = wasm.capability_who(this.__wbg_ptr);
|
|
344
|
-
return Agent.__wrap(ret);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (Symbol.dispose) Capability.prototype[Symbol.dispose] = Capability.prototype.free;
|
|
348
|
-
|
|
349
|
-
export class CgkaOperation {
|
|
350
|
-
static __wrap(ptr) {
|
|
351
|
-
ptr = ptr >>> 0;
|
|
352
|
-
const obj = Object.create(CgkaOperation.prototype);
|
|
353
|
-
obj.__wbg_ptr = ptr;
|
|
354
|
-
CgkaOperationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
355
|
-
return obj;
|
|
356
|
-
}
|
|
357
|
-
__destroy_into_raw() {
|
|
358
|
-
const ptr = this.__wbg_ptr;
|
|
359
|
-
this.__wbg_ptr = 0;
|
|
360
|
-
CgkaOperationFinalization.unregister(this);
|
|
361
|
-
return ptr;
|
|
362
|
-
}
|
|
363
|
-
free() {
|
|
364
|
-
const ptr = this.__destroy_into_raw();
|
|
365
|
-
wasm.__wbg_cgkaoperation_free(ptr, 0);
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* @returns {string}
|
|
369
|
-
*/
|
|
370
|
-
get variant() {
|
|
371
|
-
let deferred1_0;
|
|
372
|
-
let deferred1_1;
|
|
373
|
-
try {
|
|
374
|
-
const ret = wasm.cgkaoperation_variant(this.__wbg_ptr);
|
|
375
|
-
deferred1_0 = ret[0];
|
|
376
|
-
deferred1_1 = ret[1];
|
|
377
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
378
|
-
} finally {
|
|
379
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (Symbol.dispose) CgkaOperation.prototype[Symbol.dispose] = CgkaOperation.prototype.free;
|
|
384
|
-
|
|
385
|
-
export class ChangeId {
|
|
386
|
-
static __wrap(ptr) {
|
|
387
|
-
ptr = ptr >>> 0;
|
|
388
|
-
const obj = Object.create(ChangeId.prototype);
|
|
389
|
-
obj.__wbg_ptr = ptr;
|
|
390
|
-
ChangeIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
391
|
-
return obj;
|
|
392
|
-
}
|
|
393
|
-
static __unwrap(jsValue) {
|
|
394
|
-
if (!(jsValue instanceof ChangeId)) {
|
|
395
|
-
return 0;
|
|
396
|
-
}
|
|
397
|
-
return jsValue.__destroy_into_raw();
|
|
398
|
-
}
|
|
399
|
-
__destroy_into_raw() {
|
|
400
|
-
const ptr = this.__wbg_ptr;
|
|
401
|
-
this.__wbg_ptr = 0;
|
|
402
|
-
ChangeIdFinalization.unregister(this);
|
|
403
|
-
return ptr;
|
|
404
|
-
}
|
|
405
|
-
free() {
|
|
406
|
-
const ptr = this.__destroy_into_raw();
|
|
407
|
-
wasm.__wbg_changeid_free(ptr, 0);
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Upcasts; to the JS-import type for [`JsChangeId`].
|
|
411
|
-
* @returns {ChangeId}
|
|
412
|
-
*/
|
|
413
|
-
__wasm_refgen_toJsChangeId() {
|
|
414
|
-
const ret = wasm.changeid___wasm_refgen_toJsChangeId(this.__wbg_ptr);
|
|
415
|
-
return ChangeId.__wrap(ret);
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* @returns {Uint8Array}
|
|
419
|
-
*/
|
|
420
|
-
get bytes() {
|
|
421
|
-
const ret = wasm.changeid_bytes(this.__wbg_ptr);
|
|
422
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
423
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
424
|
-
return v1;
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* @param {Uint8Array} bytes
|
|
428
|
-
*/
|
|
429
|
-
constructor(bytes) {
|
|
430
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
431
|
-
const len0 = WASM_VECTOR_LEN;
|
|
432
|
-
const ret = wasm.changeid_new(ptr0, len0);
|
|
433
|
-
this.__wbg_ptr = ret >>> 0;
|
|
434
|
-
ChangeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
435
|
-
return this;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
if (Symbol.dispose) ChangeId.prototype[Symbol.dispose] = ChangeId.prototype.free;
|
|
439
|
-
|
|
440
|
-
export class CiphertextStore {
|
|
441
|
-
static __wrap(ptr) {
|
|
442
|
-
ptr = ptr >>> 0;
|
|
443
|
-
const obj = Object.create(CiphertextStore.prototype);
|
|
444
|
-
obj.__wbg_ptr = ptr;
|
|
445
|
-
CiphertextStoreFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
446
|
-
return obj;
|
|
447
|
-
}
|
|
448
|
-
__destroy_into_raw() {
|
|
449
|
-
const ptr = this.__wbg_ptr;
|
|
450
|
-
this.__wbg_ptr = 0;
|
|
451
|
-
CiphertextStoreFinalization.unregister(this);
|
|
452
|
-
return ptr;
|
|
453
|
-
}
|
|
454
|
-
free() {
|
|
455
|
-
const ptr = this.__destroy_into_raw();
|
|
456
|
-
wasm.__wbg_ciphertextstore_free(ptr, 0);
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* @param {Storage} storage
|
|
460
|
-
* @returns {CiphertextStore}
|
|
461
|
-
*/
|
|
462
|
-
static newFromWebStorage(storage) {
|
|
463
|
-
const ret = wasm.ciphertextstore_newFromWebStorage(storage);
|
|
464
|
-
return CiphertextStore.__wrap(ret);
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* @returns {CiphertextStore}
|
|
468
|
-
*/
|
|
469
|
-
static newInMemory() {
|
|
470
|
-
const ret = wasm.ciphertextstore_newInMemory();
|
|
471
|
-
return CiphertextStore.__wrap(ret);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
if (Symbol.dispose) CiphertextStore.prototype[Symbol.dispose] = CiphertextStore.prototype.free;
|
|
475
|
-
|
|
476
|
-
export class ContactCard {
|
|
477
|
-
static __wrap(ptr) {
|
|
478
|
-
ptr = ptr >>> 0;
|
|
479
|
-
const obj = Object.create(ContactCard.prototype);
|
|
480
|
-
obj.__wbg_ptr = ptr;
|
|
481
|
-
ContactCardFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
482
|
-
return obj;
|
|
483
|
-
}
|
|
484
|
-
__destroy_into_raw() {
|
|
485
|
-
const ptr = this.__wbg_ptr;
|
|
486
|
-
this.__wbg_ptr = 0;
|
|
487
|
-
ContactCardFinalization.unregister(this);
|
|
488
|
-
return ptr;
|
|
489
|
-
}
|
|
490
|
-
free() {
|
|
491
|
-
const ptr = this.__destroy_into_raw();
|
|
492
|
-
wasm.__wbg_contactcard_free(ptr, 0);
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* @param {string} json
|
|
496
|
-
* @returns {ContactCard}
|
|
497
|
-
*/
|
|
498
|
-
static fromJson(json) {
|
|
499
|
-
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
500
|
-
const len0 = WASM_VECTOR_LEN;
|
|
501
|
-
const ret = wasm.contactcard_fromJson(ptr0, len0);
|
|
502
|
-
if (ret[2]) {
|
|
503
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
504
|
-
}
|
|
505
|
-
return ContactCard.__wrap(ret[0]);
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* @returns {Identifier}
|
|
509
|
-
*/
|
|
510
|
-
get id() {
|
|
511
|
-
const ret = wasm.contactcard_id(this.__wbg_ptr);
|
|
512
|
-
return Identifier.__wrap(ret);
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* @returns {IndividualId}
|
|
516
|
-
*/
|
|
517
|
-
get individualId() {
|
|
518
|
-
const ret = wasm.contactcard_individualId(this.__wbg_ptr);
|
|
519
|
-
return IndividualId.__wrap(ret);
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* @returns {Event}
|
|
523
|
-
*/
|
|
524
|
-
get op() {
|
|
525
|
-
const ret = wasm.contactcard_op(this.__wbg_ptr);
|
|
526
|
-
return Event.__wrap(ret);
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* @returns {ShareKey}
|
|
530
|
-
*/
|
|
531
|
-
get shareKey() {
|
|
532
|
-
const ret = wasm.contactcard_shareKey(this.__wbg_ptr);
|
|
533
|
-
return ShareKey.__wrap(ret);
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* @returns {Uint8Array}
|
|
537
|
-
*/
|
|
538
|
-
signature() {
|
|
539
|
-
const ret = wasm.contactcard_signature(this.__wbg_ptr);
|
|
540
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
541
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
542
|
-
return v1;
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* @returns {string}
|
|
546
|
-
*/
|
|
547
|
-
toJson() {
|
|
548
|
-
let deferred2_0;
|
|
549
|
-
let deferred2_1;
|
|
550
|
-
try {
|
|
551
|
-
const ret = wasm.contactcard_toJson(this.__wbg_ptr);
|
|
552
|
-
var ptr1 = ret[0];
|
|
553
|
-
var len1 = ret[1];
|
|
554
|
-
if (ret[3]) {
|
|
555
|
-
ptr1 = 0; len1 = 0;
|
|
556
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
557
|
-
}
|
|
558
|
-
deferred2_0 = ptr1;
|
|
559
|
-
deferred2_1 = len1;
|
|
560
|
-
return getStringFromWasm0(ptr1, len1);
|
|
561
|
-
} finally {
|
|
562
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
if (Symbol.dispose) ContactCard.prototype[Symbol.dispose] = ContactCard.prototype.free;
|
|
567
|
-
|
|
568
|
-
export class Delegation {
|
|
569
|
-
static __wrap(ptr) {
|
|
570
|
-
ptr = ptr >>> 0;
|
|
571
|
-
const obj = Object.create(Delegation.prototype);
|
|
572
|
-
obj.__wbg_ptr = ptr;
|
|
573
|
-
DelegationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
574
|
-
return obj;
|
|
575
|
-
}
|
|
576
|
-
__destroy_into_raw() {
|
|
577
|
-
const ptr = this.__wbg_ptr;
|
|
578
|
-
this.__wbg_ptr = 0;
|
|
579
|
-
DelegationFinalization.unregister(this);
|
|
580
|
-
return ptr;
|
|
581
|
-
}
|
|
582
|
-
free() {
|
|
583
|
-
const ptr = this.__destroy_into_raw();
|
|
584
|
-
wasm.__wbg_delegation_free(ptr, 0);
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* @returns {History}
|
|
588
|
-
*/
|
|
589
|
-
get after() {
|
|
590
|
-
const ret = wasm.delegation_after(this.__wbg_ptr);
|
|
591
|
-
return History.__wrap(ret);
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* @returns {Access}
|
|
595
|
-
*/
|
|
596
|
-
get can() {
|
|
597
|
-
const ret = wasm.delegation_can(this.__wbg_ptr);
|
|
598
|
-
return Access.__wrap(ret);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* @returns {Agent}
|
|
602
|
-
*/
|
|
603
|
-
get delegate() {
|
|
604
|
-
const ret = wasm.delegation_delegate(this.__wbg_ptr);
|
|
605
|
-
return Agent.__wrap(ret);
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* @returns {SignedDelegation | undefined}
|
|
609
|
-
*/
|
|
610
|
-
get proof() {
|
|
611
|
-
const ret = wasm.delegation_proof(this.__wbg_ptr);
|
|
612
|
-
return ret === 0 ? undefined : SignedDelegation.__wrap(ret);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
if (Symbol.dispose) Delegation.prototype[Symbol.dispose] = Delegation.prototype.free;
|
|
616
|
-
|
|
617
|
-
export class DocContentRefs {
|
|
618
|
-
static __wrap(ptr) {
|
|
619
|
-
ptr = ptr >>> 0;
|
|
620
|
-
const obj = Object.create(DocContentRefs.prototype);
|
|
621
|
-
obj.__wbg_ptr = ptr;
|
|
622
|
-
DocContentRefsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
623
|
-
return obj;
|
|
624
|
-
}
|
|
625
|
-
__destroy_into_raw() {
|
|
626
|
-
const ptr = this.__wbg_ptr;
|
|
627
|
-
this.__wbg_ptr = 0;
|
|
628
|
-
DocContentRefsFinalization.unregister(this);
|
|
629
|
-
return ptr;
|
|
630
|
-
}
|
|
631
|
-
free() {
|
|
632
|
-
const ptr = this.__destroy_into_raw();
|
|
633
|
-
wasm.__wbg_doccontentrefs_free(ptr, 0);
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* @param {ChangeId} hash
|
|
637
|
-
* @returns {Promise<void>}
|
|
638
|
-
*/
|
|
639
|
-
addChangeId(hash) {
|
|
640
|
-
_assertClass(hash, ChangeId);
|
|
641
|
-
var ptr0 = hash.__destroy_into_raw();
|
|
642
|
-
const ret = wasm.doccontentrefs_addChangeId(this.__wbg_ptr, ptr0);
|
|
643
|
-
return ret;
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* @returns {Promise<ChangeId[]>}
|
|
647
|
-
*/
|
|
648
|
-
get change_hashes() {
|
|
649
|
-
const ret = wasm.doccontentrefs_change_hashes(this.__wbg_ptr);
|
|
650
|
-
return ret;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* @returns {DocumentId}
|
|
654
|
-
*/
|
|
655
|
-
get docId() {
|
|
656
|
-
const ret = wasm.doccontentrefs_docId(this.__wbg_ptr);
|
|
657
|
-
return DocumentId.__wrap(ret);
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* @param {DocumentId} doc_id
|
|
661
|
-
* @param {ChangeId[]} change_hashes
|
|
662
|
-
*/
|
|
663
|
-
constructor(doc_id, change_hashes) {
|
|
664
|
-
_assertClass(doc_id, DocumentId);
|
|
665
|
-
var ptr0 = doc_id.__destroy_into_raw();
|
|
666
|
-
const ptr1 = passArrayJsValueToWasm0(change_hashes, wasm.__wbindgen_malloc);
|
|
667
|
-
const len1 = WASM_VECTOR_LEN;
|
|
668
|
-
const ret = wasm.doccontentrefs_new(ptr0, ptr1, len1);
|
|
669
|
-
if (ret[2]) {
|
|
670
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
671
|
-
}
|
|
672
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
673
|
-
DocContentRefsFinalization.register(this, this.__wbg_ptr, this);
|
|
674
|
-
return this;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
if (Symbol.dispose) DocContentRefs.prototype[Symbol.dispose] = DocContentRefs.prototype.free;
|
|
678
|
-
|
|
679
|
-
export class Document {
|
|
680
|
-
static __wrap(ptr) {
|
|
681
|
-
ptr = ptr >>> 0;
|
|
682
|
-
const obj = Object.create(Document.prototype);
|
|
683
|
-
obj.__wbg_ptr = ptr;
|
|
684
|
-
DocumentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
685
|
-
return obj;
|
|
686
|
-
}
|
|
687
|
-
__destroy_into_raw() {
|
|
688
|
-
const ptr = this.__wbg_ptr;
|
|
689
|
-
this.__wbg_ptr = 0;
|
|
690
|
-
DocumentFinalization.unregister(this);
|
|
691
|
-
return ptr;
|
|
692
|
-
}
|
|
693
|
-
free() {
|
|
694
|
-
const ptr = this.__destroy_into_raw();
|
|
695
|
-
wasm.__wbg_document_free(ptr, 0);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Upcasts; to the JS-import type for [`JsDocument`].
|
|
699
|
-
* @returns {Document}
|
|
700
|
-
*/
|
|
701
|
-
__wasm_refgen_toJsDocument() {
|
|
702
|
-
const ret = wasm.document___wasm_refgen_toJsDocument(this.__wbg_ptr);
|
|
703
|
-
return Document.__wrap(ret);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* @returns {DocumentId}
|
|
707
|
-
*/
|
|
708
|
-
get doc_id() {
|
|
709
|
-
const ret = wasm.document_doc_id(this.__wbg_ptr);
|
|
710
|
-
return DocumentId.__wrap(ret);
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* @returns {Identifier}
|
|
714
|
-
*/
|
|
715
|
-
get id() {
|
|
716
|
-
const ret = wasm.document_id(this.__wbg_ptr);
|
|
717
|
-
return Identifier.__wrap(ret);
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* @returns {Promise<Capability[]>}
|
|
721
|
-
*/
|
|
722
|
-
members() {
|
|
723
|
-
const ret = wasm.document_members(this.__wbg_ptr);
|
|
724
|
-
return ret;
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* @returns {Agent}
|
|
728
|
-
*/
|
|
729
|
-
toAgent() {
|
|
730
|
-
const ret = wasm.document_toAgent(this.__wbg_ptr);
|
|
731
|
-
return Agent.__wrap(ret);
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* @returns {Membered}
|
|
735
|
-
*/
|
|
736
|
-
toMembered() {
|
|
737
|
-
const ret = wasm.document_toMembered(this.__wbg_ptr);
|
|
738
|
-
return Membered.__wrap(ret);
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* @returns {Peer}
|
|
742
|
-
*/
|
|
743
|
-
toPeer() {
|
|
744
|
-
const ret = wasm.document_toPeer(this.__wbg_ptr);
|
|
745
|
-
return Peer.__wrap(ret);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
if (Symbol.dispose) Document.prototype[Symbol.dispose] = Document.prototype.free;
|
|
749
|
-
|
|
750
|
-
export class DocumentId {
|
|
751
|
-
static __wrap(ptr) {
|
|
752
|
-
ptr = ptr >>> 0;
|
|
753
|
-
const obj = Object.create(DocumentId.prototype);
|
|
754
|
-
obj.__wbg_ptr = ptr;
|
|
755
|
-
DocumentIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
756
|
-
return obj;
|
|
757
|
-
}
|
|
758
|
-
__destroy_into_raw() {
|
|
759
|
-
const ptr = this.__wbg_ptr;
|
|
760
|
-
this.__wbg_ptr = 0;
|
|
761
|
-
DocumentIdFinalization.unregister(this);
|
|
762
|
-
return ptr;
|
|
763
|
-
}
|
|
764
|
-
free() {
|
|
765
|
-
const ptr = this.__destroy_into_raw();
|
|
766
|
-
wasm.__wbg_documentid_free(ptr, 0);
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* @param {Uint8Array} bytes
|
|
770
|
-
*/
|
|
771
|
-
constructor(bytes) {
|
|
772
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
773
|
-
const len0 = WASM_VECTOR_LEN;
|
|
774
|
-
const ret = wasm.documentid_new(ptr0, len0);
|
|
775
|
-
if (ret[2]) {
|
|
776
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
777
|
-
}
|
|
778
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
779
|
-
DocumentIdFinalization.register(this, this.__wbg_ptr, this);
|
|
780
|
-
return this;
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* @returns {Uint8Array}
|
|
784
|
-
*/
|
|
785
|
-
toBytes() {
|
|
786
|
-
const ret = wasm.documentid_toBytes(this.__wbg_ptr);
|
|
787
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
788
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
789
|
-
return v1;
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* @returns {any}
|
|
793
|
-
*/
|
|
794
|
-
toJsValue() {
|
|
795
|
-
const ret = wasm.documentid_toJsValue(this.__wbg_ptr);
|
|
796
|
-
return ret;
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* @returns {string}
|
|
800
|
-
*/
|
|
801
|
-
toString() {
|
|
802
|
-
let deferred1_0;
|
|
803
|
-
let deferred1_1;
|
|
804
|
-
try {
|
|
805
|
-
const ret = wasm.documentid_toString(this.__wbg_ptr);
|
|
806
|
-
deferred1_0 = ret[0];
|
|
807
|
-
deferred1_1 = ret[1];
|
|
808
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
809
|
-
} finally {
|
|
810
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
if (Symbol.dispose) DocumentId.prototype[Symbol.dispose] = DocumentId.prototype.free;
|
|
815
|
-
|
|
816
|
-
export class Encrypted {
|
|
817
|
-
static __wrap(ptr) {
|
|
818
|
-
ptr = ptr >>> 0;
|
|
819
|
-
const obj = Object.create(Encrypted.prototype);
|
|
820
|
-
obj.__wbg_ptr = ptr;
|
|
821
|
-
EncryptedFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
822
|
-
return obj;
|
|
823
|
-
}
|
|
824
|
-
__destroy_into_raw() {
|
|
825
|
-
const ptr = this.__wbg_ptr;
|
|
826
|
-
this.__wbg_ptr = 0;
|
|
827
|
-
EncryptedFinalization.unregister(this);
|
|
828
|
-
return ptr;
|
|
829
|
-
}
|
|
830
|
-
free() {
|
|
831
|
-
const ptr = this.__destroy_into_raw();
|
|
832
|
-
wasm.__wbg_encrypted_free(ptr, 0);
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* @returns {Uint8Array}
|
|
836
|
-
*/
|
|
837
|
-
get ciphertext() {
|
|
838
|
-
const ret = wasm.encrypted_ciphertext(this.__wbg_ptr);
|
|
839
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
840
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
841
|
-
return v1;
|
|
842
|
-
}
|
|
843
|
-
/**
|
|
844
|
-
* @returns {Uint8Array}
|
|
845
|
-
*/
|
|
846
|
-
get content_ref() {
|
|
847
|
-
const ret = wasm.encrypted_content_ref(this.__wbg_ptr);
|
|
848
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
849
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
850
|
-
return v1;
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* @returns {Uint8Array}
|
|
854
|
-
*/
|
|
855
|
-
get nonce() {
|
|
856
|
-
const ret = wasm.encrypted_nonce(this.__wbg_ptr);
|
|
857
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
858
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
859
|
-
return v1;
|
|
860
|
-
}
|
|
861
|
-
/**
|
|
862
|
-
* @returns {Uint8Array}
|
|
863
|
-
*/
|
|
864
|
-
get pcs_key_hash() {
|
|
865
|
-
const ret = wasm.encrypted_pcs_key_hash(this.__wbg_ptr);
|
|
866
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
867
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
868
|
-
return v1;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* @returns {Uint8Array}
|
|
872
|
-
*/
|
|
873
|
-
get pred_refs() {
|
|
874
|
-
const ret = wasm.encrypted_pred_refs(this.__wbg_ptr);
|
|
875
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
876
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
877
|
-
return v1;
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* @returns {Uint8Array}
|
|
881
|
-
*/
|
|
882
|
-
toBytes() {
|
|
883
|
-
const ret = wasm.encrypted_toBytes(this.__wbg_ptr);
|
|
884
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
885
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
886
|
-
return v1;
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
if (Symbol.dispose) Encrypted.prototype[Symbol.dispose] = Encrypted.prototype.free;
|
|
890
|
-
|
|
891
|
-
export class EncryptedContentWithUpdate {
|
|
892
|
-
static __wrap(ptr) {
|
|
893
|
-
ptr = ptr >>> 0;
|
|
894
|
-
const obj = Object.create(EncryptedContentWithUpdate.prototype);
|
|
895
|
-
obj.__wbg_ptr = ptr;
|
|
896
|
-
EncryptedContentWithUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
897
|
-
return obj;
|
|
898
|
-
}
|
|
899
|
-
__destroy_into_raw() {
|
|
900
|
-
const ptr = this.__wbg_ptr;
|
|
901
|
-
this.__wbg_ptr = 0;
|
|
902
|
-
EncryptedContentWithUpdateFinalization.unregister(this);
|
|
903
|
-
return ptr;
|
|
904
|
-
}
|
|
905
|
-
free() {
|
|
906
|
-
const ptr = this.__destroy_into_raw();
|
|
907
|
-
wasm.__wbg_encryptedcontentwithupdate_free(ptr, 0);
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* @returns {Encrypted}
|
|
911
|
-
*/
|
|
912
|
-
encrypted_content() {
|
|
913
|
-
const ret = wasm.encryptedcontentwithupdate_encrypted_content(this.__wbg_ptr);
|
|
914
|
-
return Encrypted.__wrap(ret);
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* @returns {SignedCgkaOperation | undefined}
|
|
918
|
-
*/
|
|
919
|
-
update_op() {
|
|
920
|
-
const ret = wasm.encryptedcontentwithupdate_update_op(this.__wbg_ptr);
|
|
921
|
-
return ret === 0 ? undefined : SignedCgkaOperation.__wrap(ret);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
if (Symbol.dispose) EncryptedContentWithUpdate.prototype[Symbol.dispose] = EncryptedContentWithUpdate.prototype.free;
|
|
925
|
-
|
|
926
|
-
export class Event {
|
|
927
|
-
static __wrap(ptr) {
|
|
928
|
-
ptr = ptr >>> 0;
|
|
929
|
-
const obj = Object.create(Event.prototype);
|
|
930
|
-
obj.__wbg_ptr = ptr;
|
|
931
|
-
EventFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
932
|
-
return obj;
|
|
933
|
-
}
|
|
934
|
-
__destroy_into_raw() {
|
|
935
|
-
const ptr = this.__wbg_ptr;
|
|
936
|
-
this.__wbg_ptr = 0;
|
|
937
|
-
EventFinalization.unregister(this);
|
|
938
|
-
return ptr;
|
|
939
|
-
}
|
|
940
|
-
free() {
|
|
941
|
-
const ptr = this.__destroy_into_raw();
|
|
942
|
-
wasm.__wbg_event_free(ptr, 0);
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
* @returns {boolean}
|
|
946
|
-
*/
|
|
947
|
-
get isDelegated() {
|
|
948
|
-
const ret = wasm.event_isDelegated(this.__wbg_ptr);
|
|
949
|
-
return ret !== 0;
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* @returns {boolean}
|
|
953
|
-
*/
|
|
954
|
-
get isRevoked() {
|
|
955
|
-
const ret = wasm.event_isRevoked(this.__wbg_ptr);
|
|
956
|
-
return ret !== 0;
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* Converts the underlying [`Event`] to a [`StaticEvent`] and then
|
|
960
|
-
* serializes it.
|
|
961
|
-
* @returns {Uint8Array}
|
|
962
|
-
*/
|
|
963
|
-
toBytes() {
|
|
964
|
-
const ret = wasm.event_toBytes(this.__wbg_ptr);
|
|
965
|
-
if (ret[3]) {
|
|
966
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
967
|
-
}
|
|
968
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
969
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
970
|
-
return v1;
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* @returns {SignedDelegation | undefined}
|
|
974
|
-
*/
|
|
975
|
-
tryIntoSignedDelegation() {
|
|
976
|
-
const ret = wasm.event_tryIntoSignedDelegation(this.__wbg_ptr);
|
|
977
|
-
return ret === 0 ? undefined : SignedDelegation.__wrap(ret);
|
|
978
|
-
}
|
|
979
|
-
/**
|
|
980
|
-
* @returns {SignedRevocation | undefined}
|
|
981
|
-
*/
|
|
982
|
-
tryIntoSignedRevocation() {
|
|
983
|
-
const ret = wasm.event_tryIntoSignedRevocation(this.__wbg_ptr);
|
|
984
|
-
return ret === 0 ? undefined : SignedRevocation.__wrap(ret);
|
|
985
|
-
}
|
|
986
|
-
/**
|
|
987
|
-
* @returns {string}
|
|
988
|
-
*/
|
|
989
|
-
get variant() {
|
|
990
|
-
let deferred1_0;
|
|
991
|
-
let deferred1_1;
|
|
992
|
-
try {
|
|
993
|
-
const ret = wasm.event_variant(this.__wbg_ptr);
|
|
994
|
-
deferred1_0 = ret[0];
|
|
995
|
-
deferred1_1 = ret[1];
|
|
996
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
997
|
-
} finally {
|
|
998
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
if (Symbol.dispose) Event.prototype[Symbol.dispose] = Event.prototype.free;
|
|
1003
|
-
|
|
1004
|
-
export class GenerateWebCryptoError {
|
|
1005
|
-
static __wrap(ptr) {
|
|
1006
|
-
ptr = ptr >>> 0;
|
|
1007
|
-
const obj = Object.create(GenerateWebCryptoError.prototype);
|
|
1008
|
-
obj.__wbg_ptr = ptr;
|
|
1009
|
-
GenerateWebCryptoErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1010
|
-
return obj;
|
|
1011
|
-
}
|
|
1012
|
-
__destroy_into_raw() {
|
|
1013
|
-
const ptr = this.__wbg_ptr;
|
|
1014
|
-
this.__wbg_ptr = 0;
|
|
1015
|
-
GenerateWebCryptoErrorFinalization.unregister(this);
|
|
1016
|
-
return ptr;
|
|
1017
|
-
}
|
|
1018
|
-
free() {
|
|
1019
|
-
const ptr = this.__destroy_into_raw();
|
|
1020
|
-
wasm.__wbg_generatewebcryptoerror_free(ptr, 0);
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* @returns {string}
|
|
1024
|
-
*/
|
|
1025
|
-
message() {
|
|
1026
|
-
let deferred1_0;
|
|
1027
|
-
let deferred1_1;
|
|
1028
|
-
try {
|
|
1029
|
-
const ret = wasm.generatewebcryptoerror_message(this.__wbg_ptr);
|
|
1030
|
-
deferred1_0 = ret[0];
|
|
1031
|
-
deferred1_1 = ret[1];
|
|
1032
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1033
|
-
} finally {
|
|
1034
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
if (Symbol.dispose) GenerateWebCryptoError.prototype[Symbol.dispose] = GenerateWebCryptoError.prototype.free;
|
|
1039
|
-
|
|
1040
|
-
export class Group {
|
|
1041
|
-
static __wrap(ptr) {
|
|
1042
|
-
ptr = ptr >>> 0;
|
|
1043
|
-
const obj = Object.create(Group.prototype);
|
|
1044
|
-
obj.__wbg_ptr = ptr;
|
|
1045
|
-
GroupFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1046
|
-
return obj;
|
|
1047
|
-
}
|
|
1048
|
-
__destroy_into_raw() {
|
|
1049
|
-
const ptr = this.__wbg_ptr;
|
|
1050
|
-
this.__wbg_ptr = 0;
|
|
1051
|
-
GroupFinalization.unregister(this);
|
|
1052
|
-
return ptr;
|
|
1053
|
-
}
|
|
1054
|
-
free() {
|
|
1055
|
-
const ptr = this.__destroy_into_raw();
|
|
1056
|
-
wasm.__wbg_group_free(ptr, 0);
|
|
1057
|
-
}
|
|
1058
|
-
/**
|
|
1059
|
-
* Upcasts; to the JS-import type for [`JsGroup`].
|
|
1060
|
-
* @returns {Group}
|
|
1061
|
-
*/
|
|
1062
|
-
__wasm_refgen_toJsGroup() {
|
|
1063
|
-
const ret = wasm.group___wasm_refgen_toJsGroup(this.__wbg_ptr);
|
|
1064
|
-
return Group.__wrap(ret);
|
|
1065
|
-
}
|
|
1066
|
-
/**
|
|
1067
|
-
* @returns {GroupId}
|
|
1068
|
-
*/
|
|
1069
|
-
get groupId() {
|
|
1070
|
-
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1071
|
-
return GroupId.__wrap(ret);
|
|
1072
|
-
}
|
|
1073
|
-
/**
|
|
1074
|
-
* @returns {Identifier}
|
|
1075
|
-
*/
|
|
1076
|
-
get id() {
|
|
1077
|
-
const ret = wasm.group_id(this.__wbg_ptr);
|
|
1078
|
-
return Identifier.__wrap(ret);
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* @returns {Promise<Capability[]>}
|
|
1082
|
-
*/
|
|
1083
|
-
members() {
|
|
1084
|
-
const ret = wasm.group_members(this.__wbg_ptr);
|
|
1085
|
-
return ret;
|
|
1086
|
-
}
|
|
1087
|
-
/**
|
|
1088
|
-
* @returns {Agent}
|
|
1089
|
-
*/
|
|
1090
|
-
toAgent() {
|
|
1091
|
-
const ret = wasm.group_toAgent(this.__wbg_ptr);
|
|
1092
|
-
return Agent.__wrap(ret);
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
* @returns {Membered}
|
|
1096
|
-
*/
|
|
1097
|
-
toMembered() {
|
|
1098
|
-
const ret = wasm.group_toMembered(this.__wbg_ptr);
|
|
1099
|
-
return Membered.__wrap(ret);
|
|
1100
|
-
}
|
|
1101
|
-
/**
|
|
1102
|
-
* @returns {Peer}
|
|
1103
|
-
*/
|
|
1104
|
-
toPeer() {
|
|
1105
|
-
const ret = wasm.group_toPeer(this.__wbg_ptr);
|
|
1106
|
-
return Peer.__wrap(ret);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
if (Symbol.dispose) Group.prototype[Symbol.dispose] = Group.prototype.free;
|
|
1110
|
-
|
|
1111
|
-
export class GroupId {
|
|
1112
|
-
static __wrap(ptr) {
|
|
1113
|
-
ptr = ptr >>> 0;
|
|
1114
|
-
const obj = Object.create(GroupId.prototype);
|
|
1115
|
-
obj.__wbg_ptr = ptr;
|
|
1116
|
-
GroupIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1117
|
-
return obj;
|
|
1118
|
-
}
|
|
1119
|
-
__destroy_into_raw() {
|
|
1120
|
-
const ptr = this.__wbg_ptr;
|
|
1121
|
-
this.__wbg_ptr = 0;
|
|
1122
|
-
GroupIdFinalization.unregister(this);
|
|
1123
|
-
return ptr;
|
|
1124
|
-
}
|
|
1125
|
-
free() {
|
|
1126
|
-
const ptr = this.__destroy_into_raw();
|
|
1127
|
-
wasm.__wbg_groupid_free(ptr, 0);
|
|
1128
|
-
}
|
|
1129
|
-
/**
|
|
1130
|
-
* @returns {string}
|
|
1131
|
-
*/
|
|
1132
|
-
toString() {
|
|
1133
|
-
let deferred1_0;
|
|
1134
|
-
let deferred1_1;
|
|
1135
|
-
try {
|
|
1136
|
-
const ret = wasm.groupid_toString(this.__wbg_ptr);
|
|
1137
|
-
deferred1_0 = ret[0];
|
|
1138
|
-
deferred1_1 = ret[1];
|
|
1139
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1140
|
-
} finally {
|
|
1141
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
if (Symbol.dispose) GroupId.prototype[Symbol.dispose] = GroupId.prototype.free;
|
|
1146
|
-
|
|
1147
|
-
export class History {
|
|
1148
|
-
static __wrap(ptr) {
|
|
1149
|
-
ptr = ptr >>> 0;
|
|
1150
|
-
const obj = Object.create(History.prototype);
|
|
1151
|
-
obj.__wbg_ptr = ptr;
|
|
1152
|
-
HistoryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1153
|
-
return obj;
|
|
1154
|
-
}
|
|
1155
|
-
__destroy_into_raw() {
|
|
1156
|
-
const ptr = this.__wbg_ptr;
|
|
1157
|
-
this.__wbg_ptr = 0;
|
|
1158
|
-
HistoryFinalization.unregister(this);
|
|
1159
|
-
return ptr;
|
|
1160
|
-
}
|
|
1161
|
-
free() {
|
|
1162
|
-
const ptr = this.__destroy_into_raw();
|
|
1163
|
-
wasm.__wbg_history_free(ptr, 0);
|
|
1164
|
-
}
|
|
1165
|
-
/**
|
|
1166
|
-
* @returns {DocContentRefs[]}
|
|
1167
|
-
*/
|
|
1168
|
-
contentRefs() {
|
|
1169
|
-
const ret = wasm.history_contentRefs(this.__wbg_ptr);
|
|
1170
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1171
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1172
|
-
return v1;
|
|
1173
|
-
}
|
|
1174
|
-
/**
|
|
1175
|
-
* @returns {SignedDelegation[]}
|
|
1176
|
-
*/
|
|
1177
|
-
delegations() {
|
|
1178
|
-
const ret = wasm.history_delegations(this.__wbg_ptr);
|
|
1179
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1180
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1181
|
-
return v1;
|
|
1182
|
-
}
|
|
1183
|
-
/**
|
|
1184
|
-
* @returns {SignedRevocation[]}
|
|
1185
|
-
*/
|
|
1186
|
-
revocations() {
|
|
1187
|
-
const ret = wasm.history_revocations(this.__wbg_ptr);
|
|
1188
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1189
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1190
|
-
return v1;
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
if (Symbol.dispose) History.prototype[Symbol.dispose] = History.prototype.free;
|
|
1194
|
-
|
|
1195
|
-
export class Identifier {
|
|
1196
|
-
static __wrap(ptr) {
|
|
1197
|
-
ptr = ptr >>> 0;
|
|
1198
|
-
const obj = Object.create(Identifier.prototype);
|
|
1199
|
-
obj.__wbg_ptr = ptr;
|
|
1200
|
-
IdentifierFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1201
|
-
return obj;
|
|
1202
|
-
}
|
|
1203
|
-
__destroy_into_raw() {
|
|
1204
|
-
const ptr = this.__wbg_ptr;
|
|
1205
|
-
this.__wbg_ptr = 0;
|
|
1206
|
-
IdentifierFinalization.unregister(this);
|
|
1207
|
-
return ptr;
|
|
1208
|
-
}
|
|
1209
|
-
free() {
|
|
1210
|
-
const ptr = this.__destroy_into_raw();
|
|
1211
|
-
wasm.__wbg_identifier_free(ptr, 0);
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* @param {Uint8Array} bytes
|
|
1215
|
-
*/
|
|
1216
|
-
constructor(bytes) {
|
|
1217
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1218
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1219
|
-
const ret = wasm.identifier_new(ptr0, len0);
|
|
1220
|
-
if (ret[2]) {
|
|
1221
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1222
|
-
}
|
|
1223
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1224
|
-
IdentifierFinalization.register(this, this.__wbg_ptr, this);
|
|
1225
|
-
return this;
|
|
1226
|
-
}
|
|
1227
|
-
/**
|
|
1228
|
-
* @returns {Identifier}
|
|
1229
|
-
*/
|
|
1230
|
-
static publicId() {
|
|
1231
|
-
const ret = wasm.identifier_publicId();
|
|
1232
|
-
return Identifier.__wrap(ret);
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* @returns {Uint8Array}
|
|
1236
|
-
*/
|
|
1237
|
-
toBytes() {
|
|
1238
|
-
const ret = wasm.identifier_toBytes(this.__wbg_ptr);
|
|
1239
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1240
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1241
|
-
return v1;
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
if (Symbol.dispose) Identifier.prototype[Symbol.dispose] = Identifier.prototype.free;
|
|
1245
|
-
|
|
1246
|
-
export class Individual {
|
|
1247
|
-
static __wrap(ptr) {
|
|
1248
|
-
ptr = ptr >>> 0;
|
|
1249
|
-
const obj = Object.create(Individual.prototype);
|
|
1250
|
-
obj.__wbg_ptr = ptr;
|
|
1251
|
-
IndividualFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1252
|
-
return obj;
|
|
1253
|
-
}
|
|
1254
|
-
__destroy_into_raw() {
|
|
1255
|
-
const ptr = this.__wbg_ptr;
|
|
1256
|
-
this.__wbg_ptr = 0;
|
|
1257
|
-
IndividualFinalization.unregister(this);
|
|
1258
|
-
return ptr;
|
|
1259
|
-
}
|
|
1260
|
-
free() {
|
|
1261
|
-
const ptr = this.__destroy_into_raw();
|
|
1262
|
-
wasm.__wbg_individual_free(ptr, 0);
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* @returns {Identifier}
|
|
1266
|
-
*/
|
|
1267
|
-
get id() {
|
|
1268
|
-
const ret = wasm.individual_id(this.__wbg_ptr);
|
|
1269
|
-
return Identifier.__wrap(ret);
|
|
1270
|
-
}
|
|
1271
|
-
/**
|
|
1272
|
-
* @returns {IndividualId}
|
|
1273
|
-
*/
|
|
1274
|
-
get individualId() {
|
|
1275
|
-
const ret = wasm.individual_individualId(this.__wbg_ptr);
|
|
1276
|
-
return IndividualId.__wrap(ret);
|
|
1277
|
-
}
|
|
1278
|
-
/**
|
|
1279
|
-
* @param {DocumentId} doc_id
|
|
1280
|
-
* @returns {Promise<ShareKey>}
|
|
1281
|
-
*/
|
|
1282
|
-
pickPrekey(doc_id) {
|
|
1283
|
-
_assertClass(doc_id, DocumentId);
|
|
1284
|
-
var ptr0 = doc_id.__destroy_into_raw();
|
|
1285
|
-
const ret = wasm.individual_pickPrekey(this.__wbg_ptr, ptr0);
|
|
1286
|
-
return ret;
|
|
1287
|
-
}
|
|
1288
|
-
/**
|
|
1289
|
-
* @returns {Agent}
|
|
1290
|
-
*/
|
|
1291
|
-
toAgent() {
|
|
1292
|
-
const ret = wasm.individual_toAgent(this.__wbg_ptr);
|
|
1293
|
-
return Agent.__wrap(ret);
|
|
1294
|
-
}
|
|
1295
|
-
/**
|
|
1296
|
-
* @returns {Peer}
|
|
1297
|
-
*/
|
|
1298
|
-
toPeer() {
|
|
1299
|
-
const ret = wasm.individual_toPeer(this.__wbg_ptr);
|
|
1300
|
-
return Peer.__wrap(ret);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
if (Symbol.dispose) Individual.prototype[Symbol.dispose] = Individual.prototype.free;
|
|
1304
|
-
|
|
1305
|
-
export class IndividualId {
|
|
1306
|
-
static __wrap(ptr) {
|
|
1307
|
-
ptr = ptr >>> 0;
|
|
1308
|
-
const obj = Object.create(IndividualId.prototype);
|
|
1309
|
-
obj.__wbg_ptr = ptr;
|
|
1310
|
-
IndividualIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1311
|
-
return obj;
|
|
1312
|
-
}
|
|
1313
|
-
__destroy_into_raw() {
|
|
1314
|
-
const ptr = this.__wbg_ptr;
|
|
1315
|
-
this.__wbg_ptr = 0;
|
|
1316
|
-
IndividualIdFinalization.unregister(this);
|
|
1317
|
-
return ptr;
|
|
1318
|
-
}
|
|
1319
|
-
free() {
|
|
1320
|
-
const ptr = this.__destroy_into_raw();
|
|
1321
|
-
wasm.__wbg_individualid_free(ptr, 0);
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* @returns {Uint8Array}
|
|
1325
|
-
*/
|
|
1326
|
-
get bytes() {
|
|
1327
|
-
const ret = wasm.individualid_bytes(this.__wbg_ptr);
|
|
1328
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1329
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1330
|
-
return v1;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
if (Symbol.dispose) IndividualId.prototype[Symbol.dispose] = IndividualId.prototype.free;
|
|
1334
|
-
|
|
1335
|
-
export class Invocation {
|
|
1336
|
-
__destroy_into_raw() {
|
|
1337
|
-
const ptr = this.__wbg_ptr;
|
|
1338
|
-
this.__wbg_ptr = 0;
|
|
1339
|
-
InvocationFinalization.unregister(this);
|
|
1340
|
-
return ptr;
|
|
1341
|
-
}
|
|
1342
|
-
free() {
|
|
1343
|
-
const ptr = this.__destroy_into_raw();
|
|
1344
|
-
wasm.__wbg_invocation_free(ptr, 0);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
if (Symbol.dispose) Invocation.prototype[Symbol.dispose] = Invocation.prototype.free;
|
|
1348
|
-
|
|
1349
|
-
export class Keyhive {
|
|
1350
|
-
static __wrap(ptr) {
|
|
1351
|
-
ptr = ptr >>> 0;
|
|
1352
|
-
const obj = Object.create(Keyhive.prototype);
|
|
1353
|
-
obj.__wbg_ptr = ptr;
|
|
1354
|
-
KeyhiveFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1355
|
-
return obj;
|
|
1356
|
-
}
|
|
1357
|
-
__destroy_into_raw() {
|
|
1358
|
-
const ptr = this.__wbg_ptr;
|
|
1359
|
-
this.__wbg_ptr = 0;
|
|
1360
|
-
KeyhiveFinalization.unregister(this);
|
|
1361
|
-
return ptr;
|
|
1362
|
-
}
|
|
1363
|
-
free() {
|
|
1364
|
-
const ptr = this.__destroy_into_raw();
|
|
1365
|
-
wasm.__wbg_keyhive_free(ptr, 0);
|
|
1366
|
-
}
|
|
1367
|
-
/**
|
|
1368
|
-
* @param {Identifier} id
|
|
1369
|
-
* @param {DocumentId} doc_id
|
|
1370
|
-
* @returns {Promise<Access | undefined>}
|
|
1371
|
-
*/
|
|
1372
|
-
accessForDoc(id, doc_id) {
|
|
1373
|
-
_assertClass(id, Identifier);
|
|
1374
|
-
_assertClass(doc_id, DocumentId);
|
|
1375
|
-
const ret = wasm.keyhive_accessForDoc(this.__wbg_ptr, id.__wbg_ptr, doc_id.__wbg_ptr);
|
|
1376
|
-
return ret;
|
|
1377
|
-
}
|
|
1378
|
-
/**
|
|
1379
|
-
* @param {Agent} to_add
|
|
1380
|
-
* @param {Membered} membered
|
|
1381
|
-
* @param {Access} access
|
|
1382
|
-
* @param {Document[]} other_relevant_docs
|
|
1383
|
-
* @returns {Promise<SignedDelegation>}
|
|
1384
|
-
*/
|
|
1385
|
-
addMember(to_add, membered, access, other_relevant_docs) {
|
|
1386
|
-
_assertClass(to_add, Agent);
|
|
1387
|
-
_assertClass(membered, Membered);
|
|
1388
|
-
_assertClass(access, Access);
|
|
1389
|
-
var ptr0 = access.__destroy_into_raw();
|
|
1390
|
-
const ptr1 = passArrayJsValueToWasm0(other_relevant_docs, wasm.__wbindgen_malloc);
|
|
1391
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1392
|
-
const ret = wasm.keyhive_addMember(this.__wbg_ptr, to_add.__wbg_ptr, membered.__wbg_ptr, ptr0, ptr1, len1);
|
|
1393
|
-
return ret;
|
|
1394
|
-
}
|
|
1395
|
-
/**
|
|
1396
|
-
* Returns all agent events with deduplicated storage and two-tier indirection
|
|
1397
|
-
* for membership, prekey, and CGKA ops.
|
|
1398
|
-
* @returns {Promise<AllAgentEvents>}
|
|
1399
|
-
*/
|
|
1400
|
-
allAgentEvents() {
|
|
1401
|
-
const ret = wasm.keyhive_allAgentEvents(this.__wbg_ptr);
|
|
1402
|
-
return ret;
|
|
1403
|
-
}
|
|
1404
|
-
/**
|
|
1405
|
-
* @returns {Promise<ContactCard>}
|
|
1406
|
-
*/
|
|
1407
|
-
contactCard() {
|
|
1408
|
-
const ret = wasm.keyhive_contactCard(this.__wbg_ptr);
|
|
1409
|
-
return ret;
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* @param {DocumentId} doc_id
|
|
1413
|
-
* @returns {Promise<Membership[]>}
|
|
1414
|
-
*/
|
|
1415
|
-
docMemberCapabilities(doc_id) {
|
|
1416
|
-
_assertClass(doc_id, DocumentId);
|
|
1417
|
-
const ret = wasm.keyhive_docMemberCapabilities(this.__wbg_ptr, doc_id.__wbg_ptr);
|
|
1418
|
-
return ret;
|
|
1419
|
-
}
|
|
1420
|
-
/**
|
|
1421
|
-
* Returns event hashes for provided [`JsAgent`] as an array of hash bytes.
|
|
1422
|
-
* @param {Agent} agent
|
|
1423
|
-
* @returns {Promise<Array<any>>}
|
|
1424
|
-
*/
|
|
1425
|
-
eventHashesForAgent(agent) {
|
|
1426
|
-
_assertClass(agent, Agent);
|
|
1427
|
-
const ret = wasm.keyhive_eventHashesForAgent(this.__wbg_ptr, agent.__wbg_ptr);
|
|
1428
|
-
return ret;
|
|
1429
|
-
}
|
|
1430
|
-
/**
|
|
1431
|
-
* Returns events for provided [`Agent`] as a map from hash to serialized [`StaticEvent`] bytes.
|
|
1432
|
-
* @param {Agent} agent
|
|
1433
|
-
* @returns {Promise<Map<any, any>>}
|
|
1434
|
-
*/
|
|
1435
|
-
eventsForAgent(agent) {
|
|
1436
|
-
_assertClass(agent, Agent);
|
|
1437
|
-
const ret = wasm.keyhive_eventsForAgent(this.__wbg_ptr, agent.__wbg_ptr);
|
|
1438
|
-
return ret;
|
|
1439
|
-
}
|
|
1440
|
-
/**
|
|
1441
|
-
* @returns {Promise<ShareKey>}
|
|
1442
|
-
*/
|
|
1443
|
-
expandPrekeys() {
|
|
1444
|
-
const ret = wasm.keyhive_expandPrekeys(this.__wbg_ptr);
|
|
1445
|
-
return ret;
|
|
1446
|
-
}
|
|
1447
|
-
/**
|
|
1448
|
-
* @returns {Promise<Uint8Array>}
|
|
1449
|
-
*/
|
|
1450
|
-
exportPrekeySecrets() {
|
|
1451
|
-
const ret = wasm.keyhive_exportPrekeySecrets(this.__wbg_ptr);
|
|
1452
|
-
return ret;
|
|
1453
|
-
}
|
|
1454
|
-
/**
|
|
1455
|
-
* @param {Document} doc
|
|
1456
|
-
* @returns {Promise<void>}
|
|
1457
|
-
*/
|
|
1458
|
-
forcePcsUpdate(doc) {
|
|
1459
|
-
_assertClass(doc, Document);
|
|
1460
|
-
const ret = wasm.keyhive_forcePcsUpdate(this.__wbg_ptr, doc.__wbg_ptr);
|
|
1461
|
-
return ret;
|
|
1462
|
-
}
|
|
1463
|
-
/**
|
|
1464
|
-
* @param {Peer[]} coparents
|
|
1465
|
-
* @param {ChangeId} initial_content_ref_head
|
|
1466
|
-
* @param {ChangeId[]} more_initial_content_refs
|
|
1467
|
-
* @returns {Promise<Document>}
|
|
1468
|
-
*/
|
|
1469
|
-
generateDocument(coparents, initial_content_ref_head, more_initial_content_refs) {
|
|
1470
|
-
const ptr0 = passArrayJsValueToWasm0(coparents, wasm.__wbindgen_malloc);
|
|
1471
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1472
|
-
_assertClass(initial_content_ref_head, ChangeId);
|
|
1473
|
-
var ptr1 = initial_content_ref_head.__destroy_into_raw();
|
|
1474
|
-
const ptr2 = passArrayJsValueToWasm0(more_initial_content_refs, wasm.__wbindgen_malloc);
|
|
1475
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1476
|
-
const ret = wasm.keyhive_generateDocument(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2);
|
|
1477
|
-
return ret;
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* @param {Peer[]} js_coparents
|
|
1481
|
-
* @returns {Promise<Group>}
|
|
1482
|
-
*/
|
|
1483
|
-
generateGroup(js_coparents) {
|
|
1484
|
-
const ptr0 = passArrayJsValueToWasm0(js_coparents, wasm.__wbindgen_malloc);
|
|
1485
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1486
|
-
const ret = wasm.keyhive_generateGroup(this.__wbg_ptr, ptr0, len0);
|
|
1487
|
-
return ret;
|
|
1488
|
-
}
|
|
1489
|
-
/**
|
|
1490
|
-
* @param {Identifier} id
|
|
1491
|
-
* @returns {Promise<Agent | undefined>}
|
|
1492
|
-
*/
|
|
1493
|
-
getAgent(id) {
|
|
1494
|
-
_assertClass(id, Identifier);
|
|
1495
|
-
const ret = wasm.keyhive_getAgent(this.__wbg_ptr, id.__wbg_ptr);
|
|
1496
|
-
return ret;
|
|
1497
|
-
}
|
|
1498
|
-
/**
|
|
1499
|
-
* @param {DocumentId} doc_id
|
|
1500
|
-
* @returns {Promise<Document | undefined>}
|
|
1501
|
-
*/
|
|
1502
|
-
getDocument(doc_id) {
|
|
1503
|
-
_assertClass(doc_id, DocumentId);
|
|
1504
|
-
const ret = wasm.keyhive_getDocument(this.__wbg_ptr, doc_id.__wbg_ptr);
|
|
1505
|
-
return ret;
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* @returns {Promise<ContactCard>}
|
|
1509
|
-
*/
|
|
1510
|
-
getExistingContactCard() {
|
|
1511
|
-
const ret = wasm.keyhive_getExistingContactCard(this.__wbg_ptr);
|
|
1512
|
-
return ret;
|
|
1513
|
-
}
|
|
1514
|
-
/**
|
|
1515
|
-
* @param {GroupId} group_id
|
|
1516
|
-
* @returns {Promise<Group | undefined>}
|
|
1517
|
-
*/
|
|
1518
|
-
getGroup(group_id) {
|
|
1519
|
-
_assertClass(group_id, GroupId);
|
|
1520
|
-
const ret = wasm.keyhive_getGroup(this.__wbg_ptr, group_id.__wbg_ptr);
|
|
1521
|
-
return ret;
|
|
1522
|
-
}
|
|
1523
|
-
/**
|
|
1524
|
-
* @param {IndividualId} id
|
|
1525
|
-
* @returns {Promise<Individual | undefined>}
|
|
1526
|
-
*/
|
|
1527
|
-
getIndividual(id) {
|
|
1528
|
-
_assertClass(id, IndividualId);
|
|
1529
|
-
const ret = wasm.keyhive_getIndividual(this.__wbg_ptr, id.__wbg_ptr);
|
|
1530
|
-
return ret;
|
|
1531
|
-
}
|
|
1532
|
-
/**
|
|
1533
|
-
* @returns {IndividualId}
|
|
1534
|
-
*/
|
|
1535
|
-
get id() {
|
|
1536
|
-
const ret = wasm.keyhive_id(this.__wbg_ptr);
|
|
1537
|
-
return IndividualId.__wrap(ret);
|
|
1538
|
-
}
|
|
1539
|
-
/**
|
|
1540
|
-
* @returns {string}
|
|
1541
|
-
*/
|
|
1542
|
-
get idString() {
|
|
1543
|
-
let deferred1_0;
|
|
1544
|
-
let deferred1_1;
|
|
1545
|
-
try {
|
|
1546
|
-
const ret = wasm.keyhive_idString(this.__wbg_ptr);
|
|
1547
|
-
deferred1_0 = ret[0];
|
|
1548
|
-
deferred1_1 = ret[1];
|
|
1549
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1550
|
-
} finally {
|
|
1551
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
/**
|
|
1555
|
-
* @param {Uint8Array} bytes
|
|
1556
|
-
* @returns {Promise<void>}
|
|
1557
|
-
*/
|
|
1558
|
-
importPrekeySecrets(bytes) {
|
|
1559
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1560
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1561
|
-
const ret = wasm.keyhive_importPrekeySecrets(this.__wbg_ptr, ptr0, len0);
|
|
1562
|
-
return ret;
|
|
1563
|
-
}
|
|
1564
|
-
/**
|
|
1565
|
-
* @returns {Promise<Individual>}
|
|
1566
|
-
*/
|
|
1567
|
-
get individual() {
|
|
1568
|
-
const ret = wasm.keyhive_individual(this.__wbg_ptr);
|
|
1569
|
-
return ret;
|
|
1570
|
-
}
|
|
1571
|
-
/**
|
|
1572
|
-
* @param {Archive} archive
|
|
1573
|
-
* @returns {Promise<void>}
|
|
1574
|
-
*/
|
|
1575
|
-
ingestArchive(archive) {
|
|
1576
|
-
_assertClass(archive, Archive);
|
|
1577
|
-
const ret = wasm.keyhive_ingestArchive(this.__wbg_ptr, archive.__wbg_ptr);
|
|
1578
|
-
return ret;
|
|
1579
|
-
}
|
|
1580
|
-
/**
|
|
1581
|
-
* @param {Array<any>} events_bytes_array
|
|
1582
|
-
* @returns {Promise<Array<any>>}
|
|
1583
|
-
*/
|
|
1584
|
-
ingestEventsBytes(events_bytes_array) {
|
|
1585
|
-
const ret = wasm.keyhive_ingestEventsBytes(this.__wbg_ptr, events_bytes_array);
|
|
1586
|
-
return ret;
|
|
1587
|
-
}
|
|
1588
|
-
/**
|
|
1589
|
-
* @param {Signer} signer
|
|
1590
|
-
* @param {CiphertextStore} ciphertext_store
|
|
1591
|
-
* @param {Function} event_handler
|
|
1592
|
-
* @returns {Promise<Keyhive>}
|
|
1593
|
-
*/
|
|
1594
|
-
static init(signer, ciphertext_store, event_handler) {
|
|
1595
|
-
_assertClass(signer, Signer);
|
|
1596
|
-
_assertClass(ciphertext_store, CiphertextStore);
|
|
1597
|
-
const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler);
|
|
1598
|
-
return ret;
|
|
1599
|
-
}
|
|
1600
|
-
/**
|
|
1601
|
-
* @returns {Promise<Archive>}
|
|
1602
|
-
*/
|
|
1603
|
-
intoArchive() {
|
|
1604
|
-
const ptr = this.__destroy_into_raw();
|
|
1605
|
-
const ret = wasm.keyhive_intoArchive(ptr);
|
|
1606
|
-
return ret;
|
|
1607
|
-
}
|
|
1608
|
-
/**
|
|
1609
|
-
* @param {Agent} agent
|
|
1610
|
-
* @returns {Promise<Map<any, any>>}
|
|
1611
|
-
*/
|
|
1612
|
-
membershipOpsForAgent(agent) {
|
|
1613
|
-
_assertClass(agent, Agent);
|
|
1614
|
-
const ret = wasm.keyhive_membershipOpsForAgent(this.__wbg_ptr, agent.__wbg_ptr);
|
|
1615
|
-
return ret;
|
|
1616
|
-
}
|
|
1617
|
-
/**
|
|
1618
|
-
* @returns {Promise<Set<any>>}
|
|
1619
|
-
*/
|
|
1620
|
-
pendingEventHashes() {
|
|
1621
|
-
const ret = wasm.keyhive_pendingEventHashes(this.__wbg_ptr);
|
|
1622
|
-
return ret;
|
|
1623
|
-
}
|
|
1624
|
-
/**
|
|
1625
|
-
* @returns {Promise<Summary[]>}
|
|
1626
|
-
*/
|
|
1627
|
-
reachableDocs() {
|
|
1628
|
-
const ret = wasm.keyhive_reachableDocs(this.__wbg_ptr);
|
|
1629
|
-
return ret;
|
|
1630
|
-
}
|
|
1631
|
-
/**
|
|
1632
|
-
* @param {ContactCard} contact_card
|
|
1633
|
-
* @returns {Promise<Individual>}
|
|
1634
|
-
*/
|
|
1635
|
-
receiveContactCard(contact_card) {
|
|
1636
|
-
_assertClass(contact_card, ContactCard);
|
|
1637
|
-
const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, contact_card.__wbg_ptr);
|
|
1638
|
-
return ret;
|
|
1639
|
-
}
|
|
1640
|
-
/**
|
|
1641
|
-
* @param {Agent} to_revoke
|
|
1642
|
-
* @param {boolean} retain_all_other_members
|
|
1643
|
-
* @param {Membered} membered
|
|
1644
|
-
* @returns {Promise<SignedRevocation[]>}
|
|
1645
|
-
*/
|
|
1646
|
-
revokeMember(to_revoke, retain_all_other_members, membered) {
|
|
1647
|
-
_assertClass(to_revoke, Agent);
|
|
1648
|
-
_assertClass(membered, Membered);
|
|
1649
|
-
const ret = wasm.keyhive_revokeMember(this.__wbg_ptr, to_revoke.__wbg_ptr, retain_all_other_members, membered.__wbg_ptr);
|
|
1650
|
-
return ret;
|
|
1651
|
-
}
|
|
1652
|
-
/**
|
|
1653
|
-
* @param {DocumentId} doc_id
|
|
1654
|
-
* @returns {Promise<Membership[]>}
|
|
1655
|
-
*/
|
|
1656
|
-
revokedMembersForDoc(doc_id) {
|
|
1657
|
-
_assertClass(doc_id, DocumentId);
|
|
1658
|
-
const ret = wasm.keyhive_revokedMembersForDoc(this.__wbg_ptr, doc_id.__wbg_ptr);
|
|
1659
|
-
return ret;
|
|
1660
|
-
}
|
|
1661
|
-
/**
|
|
1662
|
-
* @param {ShareKey} prekey
|
|
1663
|
-
* @returns {Promise<ShareKey>}
|
|
1664
|
-
*/
|
|
1665
|
-
rotatePrekey(prekey) {
|
|
1666
|
-
_assertClass(prekey, ShareKey);
|
|
1667
|
-
var ptr0 = prekey.__destroy_into_raw();
|
|
1668
|
-
const ret = wasm.keyhive_rotatePrekey(this.__wbg_ptr, ptr0);
|
|
1669
|
-
return ret;
|
|
1670
|
-
}
|
|
1671
|
-
/**
|
|
1672
|
-
* @returns {Promise<Stats>}
|
|
1673
|
-
*/
|
|
1674
|
-
stats() {
|
|
1675
|
-
const ret = wasm.keyhive_stats(this.__wbg_ptr);
|
|
1676
|
-
return ret;
|
|
1677
|
-
}
|
|
1678
|
-
/**
|
|
1679
|
-
* @returns {Promise<Archive>}
|
|
1680
|
-
*/
|
|
1681
|
-
toArchive() {
|
|
1682
|
-
const ret = wasm.keyhive_toArchive(this.__wbg_ptr);
|
|
1683
|
-
return ret;
|
|
1684
|
-
}
|
|
1685
|
-
/**
|
|
1686
|
-
* @param {Document} doc
|
|
1687
|
-
* @param {Encrypted} encrypted
|
|
1688
|
-
* @returns {Promise<Uint8Array>}
|
|
1689
|
-
*/
|
|
1690
|
-
tryDecrypt(doc, encrypted) {
|
|
1691
|
-
_assertClass(doc, Document);
|
|
1692
|
-
_assertClass(encrypted, Encrypted);
|
|
1693
|
-
const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
|
|
1694
|
-
return ret;
|
|
1695
|
-
}
|
|
1696
|
-
/**
|
|
1697
|
-
* @param {Document} doc
|
|
1698
|
-
* @param {ChangeId} content_ref
|
|
1699
|
-
* @param {ChangeId[]} js_pred_refs
|
|
1700
|
-
* @param {Uint8Array} content
|
|
1701
|
-
* @returns {Promise<EncryptedContentWithUpdate>}
|
|
1702
|
-
*/
|
|
1703
|
-
tryEncrypt(doc, content_ref, js_pred_refs, content) {
|
|
1704
|
-
_assertClass(doc, Document);
|
|
1705
|
-
var ptr0 = doc.__destroy_into_raw();
|
|
1706
|
-
_assertClass(content_ref, ChangeId);
|
|
1707
|
-
var ptr1 = content_ref.__destroy_into_raw();
|
|
1708
|
-
const ptr2 = passArrayJsValueToWasm0(js_pred_refs, wasm.__wbindgen_malloc);
|
|
1709
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1710
|
-
const ptr3 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
1711
|
-
const len3 = WASM_VECTOR_LEN;
|
|
1712
|
-
const ret = wasm.keyhive_tryEncrypt(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
|
|
1713
|
-
return ret;
|
|
1714
|
-
}
|
|
1715
|
-
/**
|
|
1716
|
-
* @param {Document} doc
|
|
1717
|
-
* @param {ChangeId} content_ref
|
|
1718
|
-
* @param {ChangeId[]} pred_refs
|
|
1719
|
-
* @param {Uint8Array} content
|
|
1720
|
-
* @returns {Promise<EncryptedContentWithUpdate>}
|
|
1721
|
-
*/
|
|
1722
|
-
tryEncryptArchive(doc, content_ref, pred_refs, content) {
|
|
1723
|
-
_assertClass(doc, Document);
|
|
1724
|
-
_assertClass(content_ref, ChangeId);
|
|
1725
|
-
const ptr0 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
|
|
1726
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1727
|
-
const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
1728
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1729
|
-
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1730
|
-
return ret;
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* @param {Uint8Array} data
|
|
1734
|
-
* @returns {Promise<Signed>}
|
|
1735
|
-
*/
|
|
1736
|
-
trySign(data) {
|
|
1737
|
-
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1738
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1739
|
-
const ret = wasm.keyhive_trySign(this.__wbg_ptr, ptr0, len0);
|
|
1740
|
-
return ret;
|
|
1741
|
-
}
|
|
1742
|
-
/**
|
|
1743
|
-
* @returns {IndividualId}
|
|
1744
|
-
*/
|
|
1745
|
-
get whoami() {
|
|
1746
|
-
const ret = wasm.keyhive_whoami(this.__wbg_ptr);
|
|
1747
|
-
return IndividualId.__wrap(ret);
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
if (Symbol.dispose) Keyhive.prototype[Symbol.dispose] = Keyhive.prototype.free;
|
|
1751
|
-
|
|
1752
|
-
export class Membered {
|
|
1753
|
-
static __wrap(ptr) {
|
|
1754
|
-
ptr = ptr >>> 0;
|
|
1755
|
-
const obj = Object.create(Membered.prototype);
|
|
1756
|
-
obj.__wbg_ptr = ptr;
|
|
1757
|
-
MemberedFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1758
|
-
return obj;
|
|
1759
|
-
}
|
|
1760
|
-
__destroy_into_raw() {
|
|
1761
|
-
const ptr = this.__wbg_ptr;
|
|
1762
|
-
this.__wbg_ptr = 0;
|
|
1763
|
-
MemberedFinalization.unregister(this);
|
|
1764
|
-
return ptr;
|
|
1765
|
-
}
|
|
1766
|
-
free() {
|
|
1767
|
-
const ptr = this.__destroy_into_raw();
|
|
1768
|
-
wasm.__wbg_membered_free(ptr, 0);
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
if (Symbol.dispose) Membered.prototype[Symbol.dispose] = Membered.prototype.free;
|
|
1772
|
-
|
|
1773
|
-
export class Membership {
|
|
1774
|
-
static __wrap(ptr) {
|
|
1775
|
-
ptr = ptr >>> 0;
|
|
1776
|
-
const obj = Object.create(Membership.prototype);
|
|
1777
|
-
obj.__wbg_ptr = ptr;
|
|
1778
|
-
MembershipFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1779
|
-
return obj;
|
|
1780
|
-
}
|
|
1781
|
-
__destroy_into_raw() {
|
|
1782
|
-
const ptr = this.__wbg_ptr;
|
|
1783
|
-
this.__wbg_ptr = 0;
|
|
1784
|
-
MembershipFinalization.unregister(this);
|
|
1785
|
-
return ptr;
|
|
1786
|
-
}
|
|
1787
|
-
free() {
|
|
1788
|
-
const ptr = this.__destroy_into_raw();
|
|
1789
|
-
wasm.__wbg_membership_free(ptr, 0);
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
|
-
* @returns {Access}
|
|
1793
|
-
*/
|
|
1794
|
-
get can() {
|
|
1795
|
-
const ret = wasm.membership_can(this.__wbg_ptr);
|
|
1796
|
-
return Access.__wrap(ret);
|
|
1797
|
-
}
|
|
1798
|
-
/**
|
|
1799
|
-
* @returns {Agent}
|
|
1800
|
-
*/
|
|
1801
|
-
get who() {
|
|
1802
|
-
const ret = wasm.membership_who(this.__wbg_ptr);
|
|
1803
|
-
return Agent.__wrap(ret);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
if (Symbol.dispose) Membership.prototype[Symbol.dispose] = Membership.prototype.free;
|
|
1807
|
-
|
|
1808
|
-
export class Peer {
|
|
1809
|
-
static __wrap(ptr) {
|
|
1810
|
-
ptr = ptr >>> 0;
|
|
1811
|
-
const obj = Object.create(Peer.prototype);
|
|
1812
|
-
obj.__wbg_ptr = ptr;
|
|
1813
|
-
PeerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1814
|
-
return obj;
|
|
1815
|
-
}
|
|
1816
|
-
__destroy_into_raw() {
|
|
1817
|
-
const ptr = this.__wbg_ptr;
|
|
1818
|
-
this.__wbg_ptr = 0;
|
|
1819
|
-
PeerFinalization.unregister(this);
|
|
1820
|
-
return ptr;
|
|
1821
|
-
}
|
|
1822
|
-
free() {
|
|
1823
|
-
const ptr = this.__destroy_into_raw();
|
|
1824
|
-
wasm.__wbg_peer_free(ptr, 0);
|
|
1825
|
-
}
|
|
1826
|
-
/**
|
|
1827
|
-
* Upcasts; to the JS-import type for [`JsPeer`].
|
|
1828
|
-
* @returns {Peer}
|
|
1829
|
-
*/
|
|
1830
|
-
__wasm_refgen_toJsPeer() {
|
|
1831
|
-
const ret = wasm.peer___wasm_refgen_toJsPeer(this.__wbg_ptr);
|
|
1832
|
-
return Peer.__wrap(ret);
|
|
1833
|
-
}
|
|
1834
|
-
/**
|
|
1835
|
-
* @returns {Identifier}
|
|
1836
|
-
*/
|
|
1837
|
-
get id() {
|
|
1838
|
-
const ret = wasm.peer_id(this.__wbg_ptr);
|
|
1839
|
-
return Identifier.__wrap(ret);
|
|
1840
|
-
}
|
|
1841
|
-
/**
|
|
1842
|
-
* @returns {boolean}
|
|
1843
|
-
*/
|
|
1844
|
-
isDocument() {
|
|
1845
|
-
const ret = wasm.peer_isDocument(this.__wbg_ptr);
|
|
1846
|
-
return ret !== 0;
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* @returns {boolean}
|
|
1850
|
-
*/
|
|
1851
|
-
isGroup() {
|
|
1852
|
-
const ret = wasm.peer_isGroup(this.__wbg_ptr);
|
|
1853
|
-
return ret !== 0;
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* @returns {boolean}
|
|
1857
|
-
*/
|
|
1858
|
-
isIndividual() {
|
|
1859
|
-
const ret = wasm.peer_isIndividual(this.__wbg_ptr);
|
|
1860
|
-
return ret !== 0;
|
|
1861
|
-
}
|
|
1862
|
-
/**
|
|
1863
|
-
* @returns {string}
|
|
1864
|
-
*/
|
|
1865
|
-
toString() {
|
|
1866
|
-
let deferred1_0;
|
|
1867
|
-
let deferred1_1;
|
|
1868
|
-
try {
|
|
1869
|
-
const ret = wasm.peer_toString(this.__wbg_ptr);
|
|
1870
|
-
deferred1_0 = ret[0];
|
|
1871
|
-
deferred1_1 = ret[1];
|
|
1872
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1873
|
-
} finally {
|
|
1874
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
if (Symbol.dispose) Peer.prototype[Symbol.dispose] = Peer.prototype.free;
|
|
1879
|
-
|
|
1880
|
-
export class Revocation {
|
|
1881
|
-
static __wrap(ptr) {
|
|
1882
|
-
ptr = ptr >>> 0;
|
|
1883
|
-
const obj = Object.create(Revocation.prototype);
|
|
1884
|
-
obj.__wbg_ptr = ptr;
|
|
1885
|
-
RevocationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1886
|
-
return obj;
|
|
1887
|
-
}
|
|
1888
|
-
__destroy_into_raw() {
|
|
1889
|
-
const ptr = this.__wbg_ptr;
|
|
1890
|
-
this.__wbg_ptr = 0;
|
|
1891
|
-
RevocationFinalization.unregister(this);
|
|
1892
|
-
return ptr;
|
|
1893
|
-
}
|
|
1894
|
-
free() {
|
|
1895
|
-
const ptr = this.__destroy_into_raw();
|
|
1896
|
-
wasm.__wbg_revocation_free(ptr, 0);
|
|
1897
|
-
}
|
|
1898
|
-
/**
|
|
1899
|
-
* @returns {History}
|
|
1900
|
-
*/
|
|
1901
|
-
get after() {
|
|
1902
|
-
const ret = wasm.revocation_after(this.__wbg_ptr);
|
|
1903
|
-
return History.__wrap(ret);
|
|
1904
|
-
}
|
|
1905
|
-
/**
|
|
1906
|
-
* @returns {SignedDelegation | undefined}
|
|
1907
|
-
*/
|
|
1908
|
-
get proof() {
|
|
1909
|
-
const ret = wasm.revocation_proof(this.__wbg_ptr);
|
|
1910
|
-
return ret === 0 ? undefined : SignedDelegation.__wrap(ret);
|
|
1911
|
-
}
|
|
1912
|
-
/**
|
|
1913
|
-
* @returns {SignedDelegation}
|
|
1914
|
-
*/
|
|
1915
|
-
get revoked() {
|
|
1916
|
-
const ret = wasm.revocation_revoked(this.__wbg_ptr);
|
|
1917
|
-
return SignedDelegation.__wrap(ret);
|
|
1918
|
-
}
|
|
1919
|
-
/**
|
|
1920
|
-
* @returns {Identifier}
|
|
1921
|
-
*/
|
|
1922
|
-
get subject_id() {
|
|
1923
|
-
const ret = wasm.revocation_subject_id(this.__wbg_ptr);
|
|
1924
|
-
return Identifier.__wrap(ret);
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
if (Symbol.dispose) Revocation.prototype[Symbol.dispose] = Revocation.prototype.free;
|
|
1928
|
-
|
|
1929
|
-
export class ShareKey {
|
|
1930
|
-
static __wrap(ptr) {
|
|
1931
|
-
ptr = ptr >>> 0;
|
|
1932
|
-
const obj = Object.create(ShareKey.prototype);
|
|
1933
|
-
obj.__wbg_ptr = ptr;
|
|
1934
|
-
ShareKeyFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1935
|
-
return obj;
|
|
1936
|
-
}
|
|
1937
|
-
__destroy_into_raw() {
|
|
1938
|
-
const ptr = this.__wbg_ptr;
|
|
1939
|
-
this.__wbg_ptr = 0;
|
|
1940
|
-
ShareKeyFinalization.unregister(this);
|
|
1941
|
-
return ptr;
|
|
1942
|
-
}
|
|
1943
|
-
free() {
|
|
1944
|
-
const ptr = this.__destroy_into_raw();
|
|
1945
|
-
wasm.__wbg_sharekey_free(ptr, 0);
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
if (Symbol.dispose) ShareKey.prototype[Symbol.dispose] = ShareKey.prototype.free;
|
|
1949
|
-
|
|
1950
|
-
export class Signed {
|
|
1951
|
-
static __wrap(ptr) {
|
|
1952
|
-
ptr = ptr >>> 0;
|
|
1953
|
-
const obj = Object.create(Signed.prototype);
|
|
1954
|
-
obj.__wbg_ptr = ptr;
|
|
1955
|
-
SignedFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1956
|
-
return obj;
|
|
1957
|
-
}
|
|
1958
|
-
__destroy_into_raw() {
|
|
1959
|
-
const ptr = this.__wbg_ptr;
|
|
1960
|
-
this.__wbg_ptr = 0;
|
|
1961
|
-
SignedFinalization.unregister(this);
|
|
1962
|
-
return ptr;
|
|
1963
|
-
}
|
|
1964
|
-
free() {
|
|
1965
|
-
const ptr = this.__destroy_into_raw();
|
|
1966
|
-
wasm.__wbg_signed_free(ptr, 0);
|
|
1967
|
-
}
|
|
1968
|
-
/**
|
|
1969
|
-
* @param {Uint8Array} bytes
|
|
1970
|
-
* @returns {Signed}
|
|
1971
|
-
*/
|
|
1972
|
-
static fromBytes(bytes) {
|
|
1973
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1974
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1975
|
-
const ret = wasm.signed_fromBytes(ptr0, len0);
|
|
1976
|
-
if (ret[2]) {
|
|
1977
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1978
|
-
}
|
|
1979
|
-
return Signed.__wrap(ret[0]);
|
|
1980
|
-
}
|
|
1981
|
-
/**
|
|
1982
|
-
* @returns {Uint8Array}
|
|
1983
|
-
*/
|
|
1984
|
-
get payload() {
|
|
1985
|
-
const ret = wasm.signed_payload(this.__wbg_ptr);
|
|
1986
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1987
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1988
|
-
return v1;
|
|
1989
|
-
}
|
|
1990
|
-
/**
|
|
1991
|
-
* @returns {Uint8Array}
|
|
1992
|
-
*/
|
|
1993
|
-
get signature() {
|
|
1994
|
-
const ret = wasm.signed_signature(this.__wbg_ptr);
|
|
1995
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1996
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1997
|
-
return v1;
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* @returns {Uint8Array}
|
|
2001
|
-
*/
|
|
2002
|
-
toBytes() {
|
|
2003
|
-
const ret = wasm.signed_toBytes(this.__wbg_ptr);
|
|
2004
|
-
if (ret[3]) {
|
|
2005
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
2006
|
-
}
|
|
2007
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2008
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2009
|
-
return v1;
|
|
2010
|
-
}
|
|
2011
|
-
/**
|
|
2012
|
-
* @returns {boolean}
|
|
2013
|
-
*/
|
|
2014
|
-
verify() {
|
|
2015
|
-
const ret = wasm.signed_verify(this.__wbg_ptr);
|
|
2016
|
-
return ret !== 0;
|
|
2017
|
-
}
|
|
2018
|
-
/**
|
|
2019
|
-
* @returns {Uint8Array}
|
|
2020
|
-
*/
|
|
2021
|
-
get verifyingKey() {
|
|
2022
|
-
const ret = wasm.signed_verifyingKey(this.__wbg_ptr);
|
|
2023
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2024
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2025
|
-
return v1;
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
if (Symbol.dispose) Signed.prototype[Symbol.dispose] = Signed.prototype.free;
|
|
2029
|
-
|
|
2030
|
-
export class SignedCgkaOperation {
|
|
2031
|
-
static __wrap(ptr) {
|
|
2032
|
-
ptr = ptr >>> 0;
|
|
2033
|
-
const obj = Object.create(SignedCgkaOperation.prototype);
|
|
2034
|
-
obj.__wbg_ptr = ptr;
|
|
2035
|
-
SignedCgkaOperationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2036
|
-
return obj;
|
|
2037
|
-
}
|
|
2038
|
-
__destroy_into_raw() {
|
|
2039
|
-
const ptr = this.__wbg_ptr;
|
|
2040
|
-
this.__wbg_ptr = 0;
|
|
2041
|
-
SignedCgkaOperationFinalization.unregister(this);
|
|
2042
|
-
return ptr;
|
|
2043
|
-
}
|
|
2044
|
-
free() {
|
|
2045
|
-
const ptr = this.__destroy_into_raw();
|
|
2046
|
-
wasm.__wbg_signedcgkaoperation_free(ptr, 0);
|
|
2047
|
-
}
|
|
2048
|
-
/**
|
|
2049
|
-
* @returns {CgkaOperation}
|
|
2050
|
-
*/
|
|
2051
|
-
get delegation() {
|
|
2052
|
-
const ret = wasm.signedcgkaoperation_delegation(this.__wbg_ptr);
|
|
2053
|
-
return CgkaOperation.__wrap(ret);
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* @returns {Uint8Array}
|
|
2057
|
-
*/
|
|
2058
|
-
get signature() {
|
|
2059
|
-
const ret = wasm.signedcgkaoperation_signature(this.__wbg_ptr);
|
|
2060
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2061
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2062
|
-
return v1;
|
|
2063
|
-
}
|
|
2064
|
-
/**
|
|
2065
|
-
* @returns {boolean}
|
|
2066
|
-
*/
|
|
2067
|
-
verify() {
|
|
2068
|
-
const ret = wasm.signedcgkaoperation_verify(this.__wbg_ptr);
|
|
2069
|
-
return ret !== 0;
|
|
2070
|
-
}
|
|
2071
|
-
/**
|
|
2072
|
-
* @returns {Uint8Array}
|
|
2073
|
-
*/
|
|
2074
|
-
get verifyingKey() {
|
|
2075
|
-
const ret = wasm.signedcgkaoperation_verifyingKey(this.__wbg_ptr);
|
|
2076
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2077
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2078
|
-
return v1;
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
if (Symbol.dispose) SignedCgkaOperation.prototype[Symbol.dispose] = SignedCgkaOperation.prototype.free;
|
|
2082
|
-
|
|
2083
|
-
export class SignedDelegation {
|
|
2084
|
-
static __wrap(ptr) {
|
|
2085
|
-
ptr = ptr >>> 0;
|
|
2086
|
-
const obj = Object.create(SignedDelegation.prototype);
|
|
2087
|
-
obj.__wbg_ptr = ptr;
|
|
2088
|
-
SignedDelegationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2089
|
-
return obj;
|
|
2090
|
-
}
|
|
2091
|
-
__destroy_into_raw() {
|
|
2092
|
-
const ptr = this.__wbg_ptr;
|
|
2093
|
-
this.__wbg_ptr = 0;
|
|
2094
|
-
SignedDelegationFinalization.unregister(this);
|
|
2095
|
-
return ptr;
|
|
2096
|
-
}
|
|
2097
|
-
free() {
|
|
2098
|
-
const ptr = this.__destroy_into_raw();
|
|
2099
|
-
wasm.__wbg_signeddelegation_free(ptr, 0);
|
|
2100
|
-
}
|
|
2101
|
-
/**
|
|
2102
|
-
* @returns {Delegation}
|
|
2103
|
-
*/
|
|
2104
|
-
get delegation() {
|
|
2105
|
-
const ret = wasm.signeddelegation_delegation(this.__wbg_ptr);
|
|
2106
|
-
return Delegation.__wrap(ret);
|
|
2107
|
-
}
|
|
2108
|
-
/**
|
|
2109
|
-
* @returns {Uint8Array}
|
|
2110
|
-
*/
|
|
2111
|
-
get signature() {
|
|
2112
|
-
const ret = wasm.signeddelegation_signature(this.__wbg_ptr);
|
|
2113
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2114
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2115
|
-
return v1;
|
|
2116
|
-
}
|
|
2117
|
-
/**
|
|
2118
|
-
* @returns {Identifier}
|
|
2119
|
-
*/
|
|
2120
|
-
get subjectId() {
|
|
2121
|
-
const ret = wasm.signeddelegation_subjectId(this.__wbg_ptr);
|
|
2122
|
-
return Identifier.__wrap(ret);
|
|
2123
|
-
}
|
|
2124
|
-
/**
|
|
2125
|
-
* @returns {boolean}
|
|
2126
|
-
*/
|
|
2127
|
-
verify() {
|
|
2128
|
-
const ret = wasm.signeddelegation_verify(this.__wbg_ptr);
|
|
2129
|
-
return ret !== 0;
|
|
2130
|
-
}
|
|
2131
|
-
/**
|
|
2132
|
-
* @returns {Uint8Array}
|
|
2133
|
-
*/
|
|
2134
|
-
get verifyingKey() {
|
|
2135
|
-
const ret = wasm.signeddelegation_verifyingKey(this.__wbg_ptr);
|
|
2136
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2137
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2138
|
-
return v1;
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
if (Symbol.dispose) SignedDelegation.prototype[Symbol.dispose] = SignedDelegation.prototype.free;
|
|
2142
|
-
|
|
2143
|
-
export class SignedInvocation {
|
|
2144
|
-
__destroy_into_raw() {
|
|
2145
|
-
const ptr = this.__wbg_ptr;
|
|
2146
|
-
this.__wbg_ptr = 0;
|
|
2147
|
-
SignedInvocationFinalization.unregister(this);
|
|
2148
|
-
return ptr;
|
|
2149
|
-
}
|
|
2150
|
-
free() {
|
|
2151
|
-
const ptr = this.__destroy_into_raw();
|
|
2152
|
-
wasm.__wbg_signedinvocation_free(ptr, 0);
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
if (Symbol.dispose) SignedInvocation.prototype[Symbol.dispose] = SignedInvocation.prototype.free;
|
|
2156
|
-
|
|
2157
|
-
export class SignedRevocation {
|
|
2158
|
-
static __wrap(ptr) {
|
|
2159
|
-
ptr = ptr >>> 0;
|
|
2160
|
-
const obj = Object.create(SignedRevocation.prototype);
|
|
2161
|
-
obj.__wbg_ptr = ptr;
|
|
2162
|
-
SignedRevocationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2163
|
-
return obj;
|
|
2164
|
-
}
|
|
2165
|
-
__destroy_into_raw() {
|
|
2166
|
-
const ptr = this.__wbg_ptr;
|
|
2167
|
-
this.__wbg_ptr = 0;
|
|
2168
|
-
SignedRevocationFinalization.unregister(this);
|
|
2169
|
-
return ptr;
|
|
2170
|
-
}
|
|
2171
|
-
free() {
|
|
2172
|
-
const ptr = this.__destroy_into_raw();
|
|
2173
|
-
wasm.__wbg_signedrevocation_free(ptr, 0);
|
|
2174
|
-
}
|
|
2175
|
-
/**
|
|
2176
|
-
* @returns {Revocation}
|
|
2177
|
-
*/
|
|
2178
|
-
get delegation() {
|
|
2179
|
-
const ret = wasm.signedrevocation_delegation(this.__wbg_ptr);
|
|
2180
|
-
return Revocation.__wrap(ret);
|
|
2181
|
-
}
|
|
2182
|
-
/**
|
|
2183
|
-
* @returns {Uint8Array}
|
|
2184
|
-
*/
|
|
2185
|
-
get signature() {
|
|
2186
|
-
const ret = wasm.signedrevocation_signature(this.__wbg_ptr);
|
|
2187
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2188
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2189
|
-
return v1;
|
|
2190
|
-
}
|
|
2191
|
-
/**
|
|
2192
|
-
* @returns {boolean}
|
|
2193
|
-
*/
|
|
2194
|
-
verify() {
|
|
2195
|
-
const ret = wasm.signedrevocation_verify(this.__wbg_ptr);
|
|
2196
|
-
return ret !== 0;
|
|
2197
|
-
}
|
|
2198
|
-
/**
|
|
2199
|
-
* @returns {Uint8Array}
|
|
2200
|
-
*/
|
|
2201
|
-
get verifyingKey() {
|
|
2202
|
-
const ret = wasm.signedrevocation_verifyingKey(this.__wbg_ptr);
|
|
2203
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2204
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2205
|
-
return v1;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
if (Symbol.dispose) SignedRevocation.prototype[Symbol.dispose] = SignedRevocation.prototype.free;
|
|
2209
|
-
|
|
2210
|
-
export class Signer {
|
|
2211
|
-
static __wrap(ptr) {
|
|
2212
|
-
ptr = ptr >>> 0;
|
|
2213
|
-
const obj = Object.create(Signer.prototype);
|
|
2214
|
-
obj.__wbg_ptr = ptr;
|
|
2215
|
-
SignerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2216
|
-
return obj;
|
|
2217
|
-
}
|
|
2218
|
-
__destroy_into_raw() {
|
|
2219
|
-
const ptr = this.__wbg_ptr;
|
|
2220
|
-
this.__wbg_ptr = 0;
|
|
2221
|
-
SignerFinalization.unregister(this);
|
|
2222
|
-
return ptr;
|
|
2223
|
-
}
|
|
2224
|
-
free() {
|
|
2225
|
-
const ptr = this.__destroy_into_raw();
|
|
2226
|
-
wasm.__wbg_signer_free(ptr, 0);
|
|
2227
|
-
}
|
|
2228
|
-
/**
|
|
2229
|
-
* @returns {Signer}
|
|
2230
|
-
*/
|
|
2231
|
-
clone() {
|
|
2232
|
-
const ret = wasm.signer_clone(this.__wbg_ptr);
|
|
2233
|
-
return Signer.__wrap(ret);
|
|
2234
|
-
}
|
|
2235
|
-
/**
|
|
2236
|
-
* @returns {Promise<Signer>}
|
|
2237
|
-
*/
|
|
2238
|
-
static generate() {
|
|
2239
|
-
const ret = wasm.signer_generate();
|
|
2240
|
-
return ret;
|
|
2241
|
-
}
|
|
2242
|
-
/**
|
|
2243
|
-
* @returns {Signer}
|
|
2244
|
-
*/
|
|
2245
|
-
static generateMemory() {
|
|
2246
|
-
const ret = wasm.signer_generateMemory();
|
|
2247
|
-
return Signer.__wrap(ret);
|
|
2248
|
-
}
|
|
2249
|
-
/**
|
|
2250
|
-
* @returns {Promise<Signer>}
|
|
2251
|
-
*/
|
|
2252
|
-
static generateWebCrypto() {
|
|
2253
|
-
const ret = wasm.signer_generateWebCrypto();
|
|
2254
|
-
return ret;
|
|
2255
|
-
}
|
|
2256
|
-
/**
|
|
2257
|
-
* @param {Uint8Array} bytes
|
|
2258
|
-
* @returns {Signer}
|
|
2259
|
-
*/
|
|
2260
|
-
static memorySignerFromBytes(bytes) {
|
|
2261
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2262
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2263
|
-
const ret = wasm.signer_memorySignerFromBytes(ptr0, len0);
|
|
2264
|
-
if (ret[2]) {
|
|
2265
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2266
|
-
}
|
|
2267
|
-
return Signer.__wrap(ret[0]);
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* @param {Uint8Array} bytes
|
|
2271
|
-
* @returns {Promise<Signed>}
|
|
2272
|
-
*/
|
|
2273
|
-
trySign(bytes) {
|
|
2274
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2275
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2276
|
-
const ret = wasm.signer_trySign(this.__wbg_ptr, ptr0, len0);
|
|
2277
|
-
return ret;
|
|
2278
|
-
}
|
|
2279
|
-
/**
|
|
2280
|
-
* @returns {string}
|
|
2281
|
-
*/
|
|
2282
|
-
get variant() {
|
|
2283
|
-
let deferred1_0;
|
|
2284
|
-
let deferred1_1;
|
|
2285
|
-
try {
|
|
2286
|
-
const ret = wasm.signer_variant(this.__wbg_ptr);
|
|
2287
|
-
deferred1_0 = ret[0];
|
|
2288
|
-
deferred1_1 = ret[1];
|
|
2289
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
2290
|
-
} finally {
|
|
2291
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
/**
|
|
2295
|
-
* @returns {Uint8Array}
|
|
2296
|
-
*/
|
|
2297
|
-
get verifyingKey() {
|
|
2298
|
-
const ret = wasm.signer_verifyingKey(this.__wbg_ptr);
|
|
2299
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2300
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2301
|
-
return v1;
|
|
2302
|
-
}
|
|
2303
|
-
/**
|
|
2304
|
-
* @param {any} keypair
|
|
2305
|
-
* @returns {Promise<Signer>}
|
|
2306
|
-
*/
|
|
2307
|
-
static webCryptoSigner(keypair) {
|
|
2308
|
-
const ret = wasm.signer_webCryptoSigner(keypair);
|
|
2309
|
-
return ret;
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
2313
|
-
|
|
2314
|
-
export class Stats {
|
|
2315
|
-
static __wrap(ptr) {
|
|
2316
|
-
ptr = ptr >>> 0;
|
|
2317
|
-
const obj = Object.create(Stats.prototype);
|
|
2318
|
-
obj.__wbg_ptr = ptr;
|
|
2319
|
-
StatsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2320
|
-
return obj;
|
|
2321
|
-
}
|
|
2322
|
-
__destroy_into_raw() {
|
|
2323
|
-
const ptr = this.__wbg_ptr;
|
|
2324
|
-
this.__wbg_ptr = 0;
|
|
2325
|
-
StatsFinalization.unregister(this);
|
|
2326
|
-
return ptr;
|
|
2327
|
-
}
|
|
2328
|
-
free() {
|
|
2329
|
-
const ptr = this.__destroy_into_raw();
|
|
2330
|
-
wasm.__wbg_stats_free(ptr, 0);
|
|
2331
|
-
}
|
|
2332
|
-
/**
|
|
2333
|
-
* @returns {bigint}
|
|
2334
|
-
*/
|
|
2335
|
-
get activePrekeyCount() {
|
|
2336
|
-
const ret = wasm.stats_activePrekeyCount(this.__wbg_ptr);
|
|
2337
|
-
return BigInt.asUintN(64, ret);
|
|
2338
|
-
}
|
|
2339
|
-
/**
|
|
2340
|
-
* @returns {bigint}
|
|
2341
|
-
*/
|
|
2342
|
-
get cgkaOperations() {
|
|
2343
|
-
const ret = wasm.stats_cgkaOperations(this.__wbg_ptr);
|
|
2344
|
-
return BigInt.asUintN(64, ret);
|
|
2345
|
-
}
|
|
2346
|
-
/**
|
|
2347
|
-
* @returns {bigint}
|
|
2348
|
-
*/
|
|
2349
|
-
get delegations() {
|
|
2350
|
-
const ret = wasm.stats_delegations(this.__wbg_ptr);
|
|
2351
|
-
return BigInt.asUintN(64, ret);
|
|
2352
|
-
}
|
|
2353
|
-
/**
|
|
2354
|
-
* @returns {bigint}
|
|
2355
|
-
*/
|
|
2356
|
-
get docs() {
|
|
2357
|
-
const ret = wasm.stats_docs(this.__wbg_ptr);
|
|
2358
|
-
return BigInt.asUintN(64, ret);
|
|
2359
|
-
}
|
|
2360
|
-
/**
|
|
2361
|
-
* @returns {bigint}
|
|
2362
|
-
*/
|
|
2363
|
-
get groups() {
|
|
2364
|
-
const ret = wasm.stats_groups(this.__wbg_ptr);
|
|
2365
|
-
return BigInt.asUintN(64, ret);
|
|
2366
|
-
}
|
|
2367
|
-
/**
|
|
2368
|
-
* @returns {bigint}
|
|
2369
|
-
*/
|
|
2370
|
-
get individuals() {
|
|
2371
|
-
const ret = wasm.stats_individuals(this.__wbg_ptr);
|
|
2372
|
-
return BigInt.asUintN(64, ret);
|
|
2373
|
-
}
|
|
2374
|
-
/**
|
|
2375
|
-
* @returns {bigint}
|
|
2376
|
-
*/
|
|
2377
|
-
get pendingCgkaOperation() {
|
|
2378
|
-
const ret = wasm.stats_pendingCgkaOperation(this.__wbg_ptr);
|
|
2379
|
-
return BigInt.asUintN(64, ret);
|
|
2380
|
-
}
|
|
2381
|
-
/**
|
|
2382
|
-
* @returns {bigint}
|
|
2383
|
-
*/
|
|
2384
|
-
get pendingCgkaOperationByActive() {
|
|
2385
|
-
const ret = wasm.stats_pendingCgkaOperationByActive(this.__wbg_ptr);
|
|
2386
|
-
return BigInt.asUintN(64, ret);
|
|
2387
|
-
}
|
|
2388
|
-
/**
|
|
2389
|
-
* @returns {bigint}
|
|
2390
|
-
*/
|
|
2391
|
-
get pendingDelegated() {
|
|
2392
|
-
const ret = wasm.stats_pendingDelegated(this.__wbg_ptr);
|
|
2393
|
-
return BigInt.asUintN(64, ret);
|
|
2394
|
-
}
|
|
2395
|
-
/**
|
|
2396
|
-
* @returns {bigint}
|
|
2397
|
-
*/
|
|
2398
|
-
get pendingDelegatedByActive() {
|
|
2399
|
-
const ret = wasm.stats_pendingDelegatedByActive(this.__wbg_ptr);
|
|
2400
|
-
return BigInt.asUintN(64, ret);
|
|
2401
|
-
}
|
|
2402
|
-
/**
|
|
2403
|
-
* @returns {bigint}
|
|
2404
|
-
*/
|
|
2405
|
-
get pendingPrekeyRotated() {
|
|
2406
|
-
const ret = wasm.stats_pendingPrekeyRotated(this.__wbg_ptr);
|
|
2407
|
-
return BigInt.asUintN(64, ret);
|
|
2408
|
-
}
|
|
2409
|
-
/**
|
|
2410
|
-
* @returns {bigint}
|
|
2411
|
-
*/
|
|
2412
|
-
get pendingPrekeyRotatedByActive() {
|
|
2413
|
-
const ret = wasm.stats_pendingPrekeyRotatedByActive(this.__wbg_ptr);
|
|
2414
|
-
return BigInt.asUintN(64, ret);
|
|
2415
|
-
}
|
|
2416
|
-
/**
|
|
2417
|
-
* @returns {bigint}
|
|
2418
|
-
*/
|
|
2419
|
-
get pendingPrekeysExpanded() {
|
|
2420
|
-
const ret = wasm.stats_pendingPrekeysExpanded(this.__wbg_ptr);
|
|
2421
|
-
return BigInt.asUintN(64, ret);
|
|
2422
|
-
}
|
|
2423
|
-
/**
|
|
2424
|
-
* @returns {bigint}
|
|
2425
|
-
*/
|
|
2426
|
-
get pendingPrekeysExpandedByActive() {
|
|
2427
|
-
const ret = wasm.stats_pendingPrekeysExpandedByActive(this.__wbg_ptr);
|
|
2428
|
-
return BigInt.asUintN(64, ret);
|
|
2429
|
-
}
|
|
2430
|
-
/**
|
|
2431
|
-
* @returns {bigint}
|
|
2432
|
-
*/
|
|
2433
|
-
get pendingRevoked() {
|
|
2434
|
-
const ret = wasm.stats_pendingRevoked(this.__wbg_ptr);
|
|
2435
|
-
return BigInt.asUintN(64, ret);
|
|
2436
|
-
}
|
|
2437
|
-
/**
|
|
2438
|
-
* @returns {bigint}
|
|
2439
|
-
*/
|
|
2440
|
-
get pendingRevokedByActive() {
|
|
2441
|
-
const ret = wasm.stats_pendingRevokedByActive(this.__wbg_ptr);
|
|
2442
|
-
return BigInt.asUintN(64, ret);
|
|
2443
|
-
}
|
|
2444
|
-
/**
|
|
2445
|
-
* @returns {bigint}
|
|
2446
|
-
*/
|
|
2447
|
-
get prekeyRotations() {
|
|
2448
|
-
const ret = wasm.stats_prekeyRotations(this.__wbg_ptr);
|
|
2449
|
-
return BigInt.asUintN(64, ret);
|
|
2450
|
-
}
|
|
2451
|
-
/**
|
|
2452
|
-
* @returns {bigint}
|
|
2453
|
-
*/
|
|
2454
|
-
get prekeysExpanded() {
|
|
2455
|
-
const ret = wasm.stats_prekeysExpanded(this.__wbg_ptr);
|
|
2456
|
-
return BigInt.asUintN(64, ret);
|
|
2457
|
-
}
|
|
2458
|
-
/**
|
|
2459
|
-
* @returns {bigint}
|
|
2460
|
-
*/
|
|
2461
|
-
get revocations() {
|
|
2462
|
-
const ret = wasm.stats_revocations(this.__wbg_ptr);
|
|
2463
|
-
return BigInt.asUintN(64, ret);
|
|
2464
|
-
}
|
|
2465
|
-
/**
|
|
2466
|
-
* @returns {bigint}
|
|
2467
|
-
*/
|
|
2468
|
-
get totalOps() {
|
|
2469
|
-
const ret = wasm.stats_totalOps(this.__wbg_ptr);
|
|
2470
|
-
return BigInt.asUintN(64, ret);
|
|
2471
|
-
}
|
|
2472
|
-
/**
|
|
2473
|
-
* @returns {bigint}
|
|
2474
|
-
*/
|
|
2475
|
-
get totalPendingOps() {
|
|
2476
|
-
const ret = wasm.stats_totalPendingOps(this.__wbg_ptr);
|
|
2477
|
-
return BigInt.asUintN(64, ret);
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
if (Symbol.dispose) Stats.prototype[Symbol.dispose] = Stats.prototype.free;
|
|
2481
|
-
|
|
2482
|
-
export class Summary {
|
|
2483
|
-
static __wrap(ptr) {
|
|
2484
|
-
ptr = ptr >>> 0;
|
|
2485
|
-
const obj = Object.create(Summary.prototype);
|
|
2486
|
-
obj.__wbg_ptr = ptr;
|
|
2487
|
-
SummaryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2488
|
-
return obj;
|
|
2489
|
-
}
|
|
2490
|
-
__destroy_into_raw() {
|
|
2491
|
-
const ptr = this.__wbg_ptr;
|
|
2492
|
-
this.__wbg_ptr = 0;
|
|
2493
|
-
SummaryFinalization.unregister(this);
|
|
2494
|
-
return ptr;
|
|
2495
|
-
}
|
|
2496
|
-
free() {
|
|
2497
|
-
const ptr = this.__destroy_into_raw();
|
|
2498
|
-
wasm.__wbg_summary_free(ptr, 0);
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* @returns {Access}
|
|
2502
|
-
*/
|
|
2503
|
-
get access() {
|
|
2504
|
-
const ret = wasm.summary_access(this.__wbg_ptr);
|
|
2505
|
-
return Access.__wrap(ret);
|
|
2506
|
-
}
|
|
2507
|
-
/**
|
|
2508
|
-
* @returns {Document}
|
|
2509
|
-
*/
|
|
2510
|
-
get doc() {
|
|
2511
|
-
const ret = wasm.summary_doc(this.__wbg_ptr);
|
|
2512
|
-
return Document.__wrap(ret);
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
if (Symbol.dispose) Summary.prototype[Symbol.dispose] = Summary.prototype.free;
|
|
2516
|
-
|
|
2517
|
-
/**
|
|
2518
|
-
* Panic hook lets us get better error messages if our Rust code ever panics.
|
|
2519
|
-
*
|
|
2520
|
-
* This function needs to be called at least once during initialisation.
|
|
2521
|
-
* https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/template-deep-dive/src-utils-rs.html#2-what-is-console_error_panic_hook
|
|
2522
|
-
*/
|
|
2523
|
-
export function setPanicHook() {
|
|
2524
|
-
wasm.setPanicHook();
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
function __wbg_get_imports() {
|
|
2528
|
-
const import0 = {
|
|
2529
|
-
__proto__: null,
|
|
2530
|
-
__wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
|
|
2531
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2532
|
-
return ret;
|
|
2533
|
-
},
|
|
2534
|
-
__wbg___wasm_refgen_toJsChangeId_6ccc69ca295f07d8: function(arg0) {
|
|
2535
|
-
const ret = arg0.__wasm_refgen_toJsChangeId();
|
|
2536
|
-
_assertClass(ret, ChangeId);
|
|
2537
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
2538
|
-
return ptr1;
|
|
2539
|
-
},
|
|
2540
|
-
__wbg___wasm_refgen_toJsDocument_403a685db7b2e2de: function(arg0) {
|
|
2541
|
-
const ret = arg0.__wasm_refgen_toJsDocument();
|
|
2542
|
-
_assertClass(ret, Document);
|
|
2543
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
2544
|
-
return ptr1;
|
|
2545
|
-
},
|
|
2546
|
-
__wbg___wasm_refgen_toJsPeer_4156830842f18fa5: function(arg0) {
|
|
2547
|
-
const ret = arg0.__wasm_refgen_toJsPeer();
|
|
2548
|
-
_assertClass(ret, Peer);
|
|
2549
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
2550
|
-
return ptr1;
|
|
2551
|
-
},
|
|
2552
|
-
__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
|
|
2553
|
-
const ret = debugString(arg1);
|
|
2554
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2555
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2556
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2557
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2558
|
-
},
|
|
2559
|
-
__wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
|
|
2560
|
-
const ret = typeof(arg0) === 'function';
|
|
2561
|
-
return ret;
|
|
2562
|
-
},
|
|
2563
|
-
__wbg___wbindgen_is_object_40c5a80572e8f9d3: function(arg0) {
|
|
2564
|
-
const val = arg0;
|
|
2565
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2566
|
-
return ret;
|
|
2567
|
-
},
|
|
2568
|
-
__wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
|
|
2569
|
-
const ret = typeof(arg0) === 'string';
|
|
2570
|
-
return ret;
|
|
2571
|
-
},
|
|
2572
|
-
__wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
|
|
2573
|
-
const ret = arg0 === undefined;
|
|
2574
|
-
return ret;
|
|
2575
|
-
},
|
|
2576
|
-
__wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
|
|
2577
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2578
|
-
},
|
|
2579
|
-
__wbg__wbg_cb_unref_3c3b4f651835fbcb: function(arg0) {
|
|
2580
|
-
arg0._wbg_cb_unref();
|
|
2581
|
-
},
|
|
2582
|
-
__wbg_access_new: function(arg0) {
|
|
2583
|
-
const ret = Access.__wrap(arg0);
|
|
2584
|
-
return ret;
|
|
2585
|
-
},
|
|
2586
|
-
__wbg_add_f56ec7ea7f056912: function(arg0, arg1) {
|
|
2587
|
-
const ret = arg0.add(arg1);
|
|
2588
|
-
return ret;
|
|
2589
|
-
},
|
|
2590
|
-
__wbg_agent_new: function(arg0) {
|
|
2591
|
-
const ret = Agent.__wrap(arg0);
|
|
2592
|
-
return ret;
|
|
2593
|
-
},
|
|
2594
|
-
__wbg_allagentevents_new: function(arg0) {
|
|
2595
|
-
const ret = AllAgentEvents.__wrap(arg0);
|
|
2596
|
-
return ret;
|
|
2597
|
-
},
|
|
2598
|
-
__wbg_archive_new: function(arg0) {
|
|
2599
|
-
const ret = Archive.__wrap(arg0);
|
|
2600
|
-
return ret;
|
|
2601
|
-
},
|
|
2602
|
-
__wbg_call_d578befcc3145dee: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2603
|
-
const ret = arg0.call(arg1, arg2);
|
|
2604
|
-
return ret;
|
|
2605
|
-
}, arguments); },
|
|
2606
|
-
__wbg_cannotparseed25519signingkey_new: function(arg0) {
|
|
2607
|
-
const ret = CannotParseEd25519SigningKey.__wrap(arg0);
|
|
2608
|
-
return ret;
|
|
2609
|
-
},
|
|
2610
|
-
__wbg_cannotparseidentifier_new: function(arg0) {
|
|
2611
|
-
const ret = CannotParseIdentifier.__wrap(arg0);
|
|
2612
|
-
return ret;
|
|
2613
|
-
},
|
|
2614
|
-
__wbg_capability_new: function(arg0) {
|
|
2615
|
-
const ret = Capability.__wrap(arg0);
|
|
2616
|
-
return ret;
|
|
2617
|
-
},
|
|
2618
|
-
__wbg_changeid_new: function(arg0) {
|
|
2619
|
-
const ret = ChangeId.__wrap(arg0);
|
|
2620
|
-
return ret;
|
|
2621
|
-
},
|
|
2622
|
-
__wbg_changeid_unwrap: function(arg0) {
|
|
2623
|
-
const ret = ChangeId.__unwrap(arg0);
|
|
2624
|
-
return ret;
|
|
2625
|
-
},
|
|
2626
|
-
__wbg_contactcard_new: function(arg0) {
|
|
2627
|
-
const ret = ContactCard.__wrap(arg0);
|
|
2628
|
-
return ret;
|
|
2629
|
-
},
|
|
2630
|
-
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
2631
|
-
const ret = arg0.crypto;
|
|
2632
|
-
return ret;
|
|
2633
|
-
},
|
|
2634
|
-
__wbg_debug_1995429f18ef72ac: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2635
|
-
let deferred0_0;
|
|
2636
|
-
let deferred0_1;
|
|
2637
|
-
try {
|
|
2638
|
-
deferred0_0 = arg0;
|
|
2639
|
-
deferred0_1 = arg1;
|
|
2640
|
-
console.debug(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2641
|
-
} finally {
|
|
2642
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2643
|
-
}
|
|
2644
|
-
},
|
|
2645
|
-
__wbg_debug_3003e89da631cad7: function(arg0, arg1) {
|
|
2646
|
-
let deferred0_0;
|
|
2647
|
-
let deferred0_1;
|
|
2648
|
-
try {
|
|
2649
|
-
deferred0_0 = arg0;
|
|
2650
|
-
deferred0_1 = arg1;
|
|
2651
|
-
console.debug(getStringFromWasm0(arg0, arg1));
|
|
2652
|
-
} finally {
|
|
2653
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2654
|
-
}
|
|
2655
|
-
},
|
|
2656
|
-
__wbg_doccontentrefs_new: function(arg0) {
|
|
2657
|
-
const ret = DocContentRefs.__wrap(arg0);
|
|
2658
|
-
return ret;
|
|
2659
|
-
},
|
|
2660
|
-
__wbg_document_new: function(arg0) {
|
|
2661
|
-
const ret = Document.__wrap(arg0);
|
|
2662
|
-
return ret;
|
|
2663
|
-
},
|
|
2664
|
-
__wbg_encryptedcontentwithupdate_new: function(arg0) {
|
|
2665
|
-
const ret = EncryptedContentWithUpdate.__wrap(arg0);
|
|
2666
|
-
return ret;
|
|
2667
|
-
},
|
|
2668
|
-
__wbg_error_8b62d3db440cf4a8: function(arg0, arg1) {
|
|
2669
|
-
let deferred0_0;
|
|
2670
|
-
let deferred0_1;
|
|
2671
|
-
try {
|
|
2672
|
-
deferred0_0 = arg0;
|
|
2673
|
-
deferred0_1 = arg1;
|
|
2674
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
2675
|
-
} finally {
|
|
2676
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2677
|
-
}
|
|
2678
|
-
},
|
|
2679
|
-
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
2680
|
-
let deferred0_0;
|
|
2681
|
-
let deferred0_1;
|
|
2682
|
-
try {
|
|
2683
|
-
deferred0_0 = arg0;
|
|
2684
|
-
deferred0_1 = arg1;
|
|
2685
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
2686
|
-
} finally {
|
|
2687
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2688
|
-
}
|
|
2689
|
-
},
|
|
2690
|
-
__wbg_error_c90492381694a8af: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2691
|
-
let deferred0_0;
|
|
2692
|
-
let deferred0_1;
|
|
2693
|
-
try {
|
|
2694
|
-
deferred0_0 = arg0;
|
|
2695
|
-
deferred0_1 = arg1;
|
|
2696
|
-
console.error(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2697
|
-
} finally {
|
|
2698
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2699
|
-
}
|
|
2700
|
-
},
|
|
2701
|
-
__wbg_event_new: function(arg0) {
|
|
2702
|
-
const ret = Event.__wrap(arg0);
|
|
2703
|
-
return ret;
|
|
2704
|
-
},
|
|
2705
|
-
__wbg_exportKey_99bb9b98984e3a4e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2706
|
-
const ret = arg0.exportKey(getStringFromWasm0(arg1, arg2), arg3);
|
|
2707
|
-
return ret;
|
|
2708
|
-
}, arguments); },
|
|
2709
|
-
__wbg_generateKey_2d4760a0496c6109: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2710
|
-
const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
|
|
2711
|
-
return ret;
|
|
2712
|
-
}, arguments); },
|
|
2713
|
-
__wbg_generatewebcryptoerror_new: function(arg0) {
|
|
2714
|
-
const ret = GenerateWebCryptoError.__wrap(arg0);
|
|
2715
|
-
return ret;
|
|
2716
|
-
},
|
|
2717
|
-
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
2718
|
-
arg0.getRandomValues(arg1);
|
|
2719
|
-
}, arguments); },
|
|
2720
|
-
__wbg_get_4848e350b40afc16: function(arg0, arg1) {
|
|
2721
|
-
const ret = arg0[arg1 >>> 0];
|
|
2722
|
-
return ret;
|
|
2723
|
-
},
|
|
2724
|
-
__wbg_get_f96702c6245e4ef9: function() { return handleError(function (arg0, arg1) {
|
|
2725
|
-
const ret = Reflect.get(arg0, arg1);
|
|
2726
|
-
return ret;
|
|
2727
|
-
}, arguments); },
|
|
2728
|
-
__wbg_get_private_key_eba5c3b94a6582ab: function(arg0) {
|
|
2729
|
-
const ret = arg0.privateKey;
|
|
2730
|
-
return ret;
|
|
2731
|
-
},
|
|
2732
|
-
__wbg_get_public_key_cce0ab3bb2aaaec4: function(arg0) {
|
|
2733
|
-
const ret = arg0.publicKey;
|
|
2734
|
-
return ret;
|
|
2735
|
-
},
|
|
2736
|
-
__wbg_group_new: function(arg0) {
|
|
2737
|
-
const ret = Group.__wrap(arg0);
|
|
2738
|
-
return ret;
|
|
2739
|
-
},
|
|
2740
|
-
__wbg_individual_new: function(arg0) {
|
|
2741
|
-
const ret = Individual.__wrap(arg0);
|
|
2742
|
-
return ret;
|
|
2743
|
-
},
|
|
2744
|
-
__wbg_instanceof_Crypto_f4b23f832118da8c: function(arg0) {
|
|
2745
|
-
let result;
|
|
2746
|
-
try {
|
|
2747
|
-
result = arg0 instanceof Crypto;
|
|
2748
|
-
} catch (_) {
|
|
2749
|
-
result = false;
|
|
2750
|
-
}
|
|
2751
|
-
const ret = result;
|
|
2752
|
-
return ret;
|
|
2753
|
-
},
|
|
2754
|
-
__wbg_keyhive_new: function(arg0) {
|
|
2755
|
-
const ret = Keyhive.__wrap(arg0);
|
|
2756
|
-
return ret;
|
|
2757
|
-
},
|
|
2758
|
-
__wbg_length_0c32cb8543c8e4c8: function(arg0) {
|
|
2759
|
-
const ret = arg0.length;
|
|
2760
|
-
return ret;
|
|
2761
|
-
},
|
|
2762
|
-
__wbg_length_6e821edde497a532: function(arg0) {
|
|
2763
|
-
const ret = arg0.length;
|
|
2764
|
-
return ret;
|
|
2765
|
-
},
|
|
2766
|
-
__wbg_log_17a3e9a5cbb91ef7: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2767
|
-
let deferred0_0;
|
|
2768
|
-
let deferred0_1;
|
|
2769
|
-
try {
|
|
2770
|
-
deferred0_0 = arg0;
|
|
2771
|
-
deferred0_1 = arg1;
|
|
2772
|
-
console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2773
|
-
} finally {
|
|
2774
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2775
|
-
}
|
|
2776
|
-
},
|
|
2777
|
-
__wbg_log_e885b89e7e480a2f: function(arg0, arg1) {
|
|
2778
|
-
let deferred0_0;
|
|
2779
|
-
let deferred0_1;
|
|
2780
|
-
try {
|
|
2781
|
-
deferred0_0 = arg0;
|
|
2782
|
-
deferred0_1 = arg1;
|
|
2783
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
2784
|
-
} finally {
|
|
2785
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2786
|
-
}
|
|
2787
|
-
},
|
|
2788
|
-
__wbg_mark_0279c5d75168b5b8: function(arg0, arg1) {
|
|
2789
|
-
performance.mark(getStringFromWasm0(arg0, arg1));
|
|
2790
|
-
},
|
|
2791
|
-
__wbg_measure_c9b58ac538b3e2f7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2792
|
-
let deferred0_0;
|
|
2793
|
-
let deferred0_1;
|
|
2794
|
-
let deferred1_0;
|
|
2795
|
-
let deferred1_1;
|
|
2796
|
-
try {
|
|
2797
|
-
deferred0_0 = arg0;
|
|
2798
|
-
deferred0_1 = arg1;
|
|
2799
|
-
deferred1_0 = arg2;
|
|
2800
|
-
deferred1_1 = arg3;
|
|
2801
|
-
performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
2802
|
-
} finally {
|
|
2803
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2804
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2805
|
-
}
|
|
2806
|
-
}, arguments); },
|
|
2807
|
-
__wbg_membership_new: function(arg0) {
|
|
2808
|
-
const ret = Membership.__wrap(arg0);
|
|
2809
|
-
return ret;
|
|
2810
|
-
},
|
|
2811
|
-
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
2812
|
-
const ret = arg0.msCrypto;
|
|
2813
|
-
return ret;
|
|
2814
|
-
},
|
|
2815
|
-
__wbg_new_227d7c05414eb861: function() {
|
|
2816
|
-
const ret = new Error();
|
|
2817
|
-
return ret;
|
|
2818
|
-
},
|
|
2819
|
-
__wbg_new_44794e13e79fc463: function(arg0) {
|
|
2820
|
-
const ret = new Set(arg0);
|
|
2821
|
-
return ret;
|
|
2822
|
-
},
|
|
2823
|
-
__wbg_new_99cabae501c0a8a0: function() {
|
|
2824
|
-
const ret = new Map();
|
|
2825
|
-
return ret;
|
|
2826
|
-
},
|
|
2827
|
-
__wbg_new_a560378ea1240b14: function(arg0) {
|
|
2828
|
-
const ret = new Uint8Array(arg0);
|
|
2829
|
-
return ret;
|
|
2830
|
-
},
|
|
2831
|
-
__wbg_new_e3b04b4d53d1b593: function(arg0, arg1) {
|
|
2832
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2833
|
-
return ret;
|
|
2834
|
-
},
|
|
2835
|
-
__wbg_new_f3c9df4f38f3f798: function() {
|
|
2836
|
-
const ret = new Array();
|
|
2837
|
-
return ret;
|
|
2838
|
-
},
|
|
2839
|
-
__wbg_new_from_slice_2580ff33d0d10520: function(arg0, arg1) {
|
|
2840
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2841
|
-
return ret;
|
|
2842
|
-
},
|
|
2843
|
-
__wbg_new_typed_14d7cc391ce53d2c: function(arg0, arg1) {
|
|
2844
|
-
try {
|
|
2845
|
-
var state0 = {a: arg0, b: arg1};
|
|
2846
|
-
var cb0 = (arg0, arg1) => {
|
|
2847
|
-
const a = state0.a;
|
|
2848
|
-
state0.a = 0;
|
|
2849
|
-
try {
|
|
2850
|
-
return wasm_bindgen__convert__closures_____invoke__hed1b57a71ca47f43(a, state0.b, arg0, arg1);
|
|
2851
|
-
} finally {
|
|
2852
|
-
state0.a = a;
|
|
2853
|
-
}
|
|
2854
|
-
};
|
|
2855
|
-
const ret = new Promise(cb0);
|
|
2856
|
-
return ret;
|
|
2857
|
-
} finally {
|
|
2858
|
-
state0.a = 0;
|
|
2859
|
-
}
|
|
2860
|
-
},
|
|
2861
|
-
__wbg_new_with_length_9cedd08484b73942: function(arg0) {
|
|
2862
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
2863
|
-
return ret;
|
|
2864
|
-
},
|
|
2865
|
-
__wbg_node_84ea875411254db1: function(arg0) {
|
|
2866
|
-
const ret = arg0.node;
|
|
2867
|
-
return ret;
|
|
2868
|
-
},
|
|
2869
|
-
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
2870
|
-
const ret = arg0.process;
|
|
2871
|
-
return ret;
|
|
2872
|
-
},
|
|
2873
|
-
__wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
|
|
2874
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2875
|
-
},
|
|
2876
|
-
__wbg_push_6bdbc990be5ac37b: function(arg0, arg1) {
|
|
2877
|
-
const ret = arg0.push(arg1);
|
|
2878
|
-
return ret;
|
|
2879
|
-
},
|
|
2880
|
-
__wbg_queueMicrotask_abaf92f0bd4e80a4: function(arg0) {
|
|
2881
|
-
const ret = arg0.queueMicrotask;
|
|
2882
|
-
return ret;
|
|
2883
|
-
},
|
|
2884
|
-
__wbg_queueMicrotask_df5a6dac26d818f3: function(arg0) {
|
|
2885
|
-
queueMicrotask(arg0);
|
|
2886
|
-
},
|
|
2887
|
-
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
2888
|
-
arg0.randomFillSync(arg1);
|
|
2889
|
-
}, arguments); },
|
|
2890
|
-
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
2891
|
-
const ret = module.require;
|
|
2892
|
-
return ret;
|
|
2893
|
-
}, arguments); },
|
|
2894
|
-
__wbg_resolve_0a79de24e9d2267b: function(arg0) {
|
|
2895
|
-
const ret = Promise.resolve(arg0);
|
|
2896
|
-
return ret;
|
|
2897
|
-
},
|
|
2898
|
-
__wbg_set_08463b1df38a7e29: function(arg0, arg1, arg2) {
|
|
2899
|
-
const ret = arg0.set(arg1, arg2);
|
|
2900
|
-
return ret;
|
|
2901
|
-
},
|
|
2902
|
-
__wbg_set_name_ab9c98596fd7310a: function(arg0, arg1, arg2) {
|
|
2903
|
-
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
2904
|
-
},
|
|
2905
|
-
__wbg_sharekey_new: function(arg0) {
|
|
2906
|
-
const ret = ShareKey.__wrap(arg0);
|
|
2907
|
-
return ret;
|
|
2908
|
-
},
|
|
2909
|
-
__wbg_sign_f4e7637ee82f1e2b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2910
|
-
const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
|
|
2911
|
-
return ret;
|
|
2912
|
-
}, arguments); },
|
|
2913
|
-
__wbg_signed_new: function(arg0) {
|
|
2914
|
-
const ret = Signed.__wrap(arg0);
|
|
2915
|
-
return ret;
|
|
2916
|
-
},
|
|
2917
|
-
__wbg_signeddelegation_new: function(arg0) {
|
|
2918
|
-
const ret = SignedDelegation.__wrap(arg0);
|
|
2919
|
-
return ret;
|
|
2920
|
-
},
|
|
2921
|
-
__wbg_signedrevocation_new: function(arg0) {
|
|
2922
|
-
const ret = SignedRevocation.__wrap(arg0);
|
|
2923
|
-
return ret;
|
|
2924
|
-
},
|
|
2925
|
-
__wbg_signer_new: function(arg0) {
|
|
2926
|
-
const ret = Signer.__wrap(arg0);
|
|
2927
|
-
return ret;
|
|
2928
|
-
},
|
|
2929
|
-
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
2930
|
-
const ret = arg1.stack;
|
|
2931
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2932
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2933
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2934
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2935
|
-
},
|
|
2936
|
-
__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
|
|
2937
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2938
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2939
|
-
},
|
|
2940
|
-
__wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
|
|
2941
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2942
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2943
|
-
},
|
|
2944
|
-
__wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
|
|
2945
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
2946
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2947
|
-
},
|
|
2948
|
-
__wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
|
|
2949
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
2950
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2951
|
-
},
|
|
2952
|
-
__wbg_stats_new: function(arg0) {
|
|
2953
|
-
const ret = Stats.__wrap(arg0);
|
|
2954
|
-
return ret;
|
|
2955
|
-
},
|
|
2956
|
-
__wbg_subarray_0f98d3fb634508ad: function(arg0, arg1, arg2) {
|
|
2957
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2958
|
-
return ret;
|
|
2959
|
-
},
|
|
2960
|
-
__wbg_subtle_6b7d3b117f3b8d57: function(arg0) {
|
|
2961
|
-
const ret = arg0.subtle;
|
|
2962
|
-
return ret;
|
|
2963
|
-
},
|
|
2964
|
-
__wbg_summary_new: function(arg0) {
|
|
2965
|
-
const ret = Summary.__wrap(arg0);
|
|
2966
|
-
return ret;
|
|
2967
|
-
},
|
|
2968
|
-
__wbg_then_00eed3ac0b8e82cb: function(arg0, arg1, arg2) {
|
|
2969
|
-
const ret = arg0.then(arg1, arg2);
|
|
2970
|
-
return ret;
|
|
2971
|
-
},
|
|
2972
|
-
__wbg_then_a0c8db0381c8994c: function(arg0, arg1) {
|
|
2973
|
-
const ret = arg0.then(arg1);
|
|
2974
|
-
return ret;
|
|
2975
|
-
},
|
|
2976
|
-
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
2977
|
-
const ret = arg0.versions;
|
|
2978
|
-
return ret;
|
|
2979
|
-
},
|
|
2980
|
-
__wbg_warn_2a49b47d25e1e018: function(arg0, arg1) {
|
|
2981
|
-
let deferred0_0;
|
|
2982
|
-
let deferred0_1;
|
|
2983
|
-
try {
|
|
2984
|
-
deferred0_0 = arg0;
|
|
2985
|
-
deferred0_1 = arg1;
|
|
2986
|
-
console.warn(getStringFromWasm0(arg0, arg1));
|
|
2987
|
-
} finally {
|
|
2988
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2989
|
-
}
|
|
2990
|
-
},
|
|
2991
|
-
__wbg_warn_9d7408e9659996aa: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2992
|
-
let deferred0_0;
|
|
2993
|
-
let deferred0_1;
|
|
2994
|
-
try {
|
|
2995
|
-
deferred0_0 = arg0;
|
|
2996
|
-
deferred0_1 = arg1;
|
|
2997
|
-
console.warn(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2998
|
-
} finally {
|
|
2999
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3000
|
-
}
|
|
3001
|
-
},
|
|
3002
|
-
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3003
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 704, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3004
|
-
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3280982d348b8ce7);
|
|
3005
|
-
return ret;
|
|
3006
|
-
},
|
|
3007
|
-
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3008
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3009
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3010
|
-
return ret;
|
|
3011
|
-
},
|
|
3012
|
-
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3013
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3014
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
3015
|
-
return ret;
|
|
3016
|
-
},
|
|
3017
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3018
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3019
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3020
|
-
// Cast intrinsic for `Vector(NamedExternref("Capability")) -> Externref`.
|
|
3021
|
-
const ret = v0;
|
|
3022
|
-
return ret;
|
|
3023
|
-
},
|
|
3024
|
-
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3025
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3026
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3027
|
-
// Cast intrinsic for `Vector(NamedExternref("ChangeId")) -> Externref`.
|
|
3028
|
-
const ret = v0;
|
|
3029
|
-
return ret;
|
|
3030
|
-
},
|
|
3031
|
-
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3032
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3033
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3034
|
-
// Cast intrinsic for `Vector(NamedExternref("Membership")) -> Externref`.
|
|
3035
|
-
const ret = v0;
|
|
3036
|
-
return ret;
|
|
3037
|
-
},
|
|
3038
|
-
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3039
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3040
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3041
|
-
// Cast intrinsic for `Vector(NamedExternref("SignedRevocation")) -> Externref`.
|
|
3042
|
-
const ret = v0;
|
|
3043
|
-
return ret;
|
|
3044
|
-
},
|
|
3045
|
-
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3046
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3047
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3048
|
-
// Cast intrinsic for `Vector(NamedExternref("Summary")) -> Externref`.
|
|
3049
|
-
const ret = v0;
|
|
3050
|
-
return ret;
|
|
3051
|
-
},
|
|
3052
|
-
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3053
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3054
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3055
|
-
// Cast intrinsic for `Vector(NamedExternref("Uint8Array")) -> Externref`.
|
|
3056
|
-
const ret = v0;
|
|
3057
|
-
return ret;
|
|
3058
|
-
},
|
|
3059
|
-
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
3060
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3061
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3062
|
-
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
3063
|
-
const ret = v0;
|
|
3064
|
-
return ret;
|
|
3065
|
-
},
|
|
3066
|
-
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
3067
|
-
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
3068
|
-
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
3069
|
-
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
3070
|
-
const ret = v0;
|
|
3071
|
-
return ret;
|
|
3072
|
-
},
|
|
3073
|
-
__wbindgen_init_externref_table: function() {
|
|
3074
|
-
const table = wasm.__wbindgen_externrefs;
|
|
3075
|
-
const offset = table.grow(4);
|
|
3076
|
-
table.set(0, undefined);
|
|
3077
|
-
table.set(offset + 0, undefined);
|
|
3078
|
-
table.set(offset + 1, null);
|
|
3079
|
-
table.set(offset + 2, true);
|
|
3080
|
-
table.set(offset + 3, false);
|
|
3081
|
-
},
|
|
3082
|
-
};
|
|
3083
|
-
return {
|
|
3084
|
-
__proto__: null,
|
|
3085
|
-
"./keyhive_wasm_bg.js": import0,
|
|
3086
|
-
};
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
function wasm_bindgen__convert__closures_____invoke__h3280982d348b8ce7(arg0, arg1, arg2) {
|
|
3090
|
-
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h3280982d348b8ce7(arg0, arg1, arg2);
|
|
3091
|
-
if (ret[1]) {
|
|
3092
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
3093
|
-
}
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
|
-
function wasm_bindgen__convert__closures_____invoke__hed1b57a71ca47f43(arg0, arg1, arg2, arg3) {
|
|
3097
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hed1b57a71ca47f43(arg0, arg1, arg2, arg3);
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
const CannotParseEd25519SigningKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3101
|
-
? { register: () => {}, unregister: () => {} }
|
|
3102
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cannotparseed25519signingkey_free(ptr >>> 0, 1));
|
|
3103
|
-
const CannotParseIdentifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3104
|
-
? { register: () => {}, unregister: () => {} }
|
|
3105
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cannotparseidentifier_free(ptr >>> 0, 1));
|
|
3106
|
-
const CapabilityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3107
|
-
? { register: () => {}, unregister: () => {} }
|
|
3108
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_capability_free(ptr >>> 0, 1));
|
|
3109
|
-
const DocContentRefsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3110
|
-
? { register: () => {}, unregister: () => {} }
|
|
3111
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_doccontentrefs_free(ptr >>> 0, 1));
|
|
3112
|
-
const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3113
|
-
? { register: () => {}, unregister: () => {} }
|
|
3114
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_access_free(ptr >>> 0, 1));
|
|
3115
|
-
const AgentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3116
|
-
? { register: () => {}, unregister: () => {} }
|
|
3117
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_agent_free(ptr >>> 0, 1));
|
|
3118
|
-
const AllAgentEventsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3119
|
-
? { register: () => {}, unregister: () => {} }
|
|
3120
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_allagentevents_free(ptr >>> 0, 1));
|
|
3121
|
-
const ArchiveFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3122
|
-
? { register: () => {}, unregister: () => {} }
|
|
3123
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_archive_free(ptr >>> 0, 1));
|
|
3124
|
-
const CgkaOperationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3125
|
-
? { register: () => {}, unregister: () => {} }
|
|
3126
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cgkaoperation_free(ptr >>> 0, 1));
|
|
3127
|
-
const ChangeIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3128
|
-
? { register: () => {}, unregister: () => {} }
|
|
3129
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_changeid_free(ptr >>> 0, 1));
|
|
3130
|
-
const CiphertextStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3131
|
-
? { register: () => {}, unregister: () => {} }
|
|
3132
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertextstore_free(ptr >>> 0, 1));
|
|
3133
|
-
const ContactCardFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3134
|
-
? { register: () => {}, unregister: () => {} }
|
|
3135
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_contactcard_free(ptr >>> 0, 1));
|
|
3136
|
-
const DelegationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3137
|
-
? { register: () => {}, unregister: () => {} }
|
|
3138
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_delegation_free(ptr >>> 0, 1));
|
|
3139
|
-
const DocumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3140
|
-
? { register: () => {}, unregister: () => {} }
|
|
3141
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_document_free(ptr >>> 0, 1));
|
|
3142
|
-
const DocumentIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3143
|
-
? { register: () => {}, unregister: () => {} }
|
|
3144
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_documentid_free(ptr >>> 0, 1));
|
|
3145
|
-
const EncryptedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3146
|
-
? { register: () => {}, unregister: () => {} }
|
|
3147
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_encrypted_free(ptr >>> 0, 1));
|
|
3148
|
-
const EncryptedContentWithUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3149
|
-
? { register: () => {}, unregister: () => {} }
|
|
3150
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_encryptedcontentwithupdate_free(ptr >>> 0, 1));
|
|
3151
|
-
const EventFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3152
|
-
? { register: () => {}, unregister: () => {} }
|
|
3153
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr >>> 0, 1));
|
|
3154
|
-
const GenerateWebCryptoErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3155
|
-
? { register: () => {}, unregister: () => {} }
|
|
3156
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_generatewebcryptoerror_free(ptr >>> 0, 1));
|
|
3157
|
-
const GroupFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3158
|
-
? { register: () => {}, unregister: () => {} }
|
|
3159
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_group_free(ptr >>> 0, 1));
|
|
3160
|
-
const GroupIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3161
|
-
? { register: () => {}, unregister: () => {} }
|
|
3162
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_groupid_free(ptr >>> 0, 1));
|
|
3163
|
-
const HistoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3164
|
-
? { register: () => {}, unregister: () => {} }
|
|
3165
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_history_free(ptr >>> 0, 1));
|
|
3166
|
-
const IdentifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3167
|
-
? { register: () => {}, unregister: () => {} }
|
|
3168
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_identifier_free(ptr >>> 0, 1));
|
|
3169
|
-
const IndividualFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3170
|
-
? { register: () => {}, unregister: () => {} }
|
|
3171
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_individual_free(ptr >>> 0, 1));
|
|
3172
|
-
const IndividualIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3173
|
-
? { register: () => {}, unregister: () => {} }
|
|
3174
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_individualid_free(ptr >>> 0, 1));
|
|
3175
|
-
const InvocationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3176
|
-
? { register: () => {}, unregister: () => {} }
|
|
3177
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_invocation_free(ptr >>> 0, 1));
|
|
3178
|
-
const KeyhiveFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3179
|
-
? { register: () => {}, unregister: () => {} }
|
|
3180
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_keyhive_free(ptr >>> 0, 1));
|
|
3181
|
-
const MemberedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3182
|
-
? { register: () => {}, unregister: () => {} }
|
|
3183
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_membered_free(ptr >>> 0, 1));
|
|
3184
|
-
const PeerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3185
|
-
? { register: () => {}, unregister: () => {} }
|
|
3186
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_peer_free(ptr >>> 0, 1));
|
|
3187
|
-
const RevocationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3188
|
-
? { register: () => {}, unregister: () => {} }
|
|
3189
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_revocation_free(ptr >>> 0, 1));
|
|
3190
|
-
const ShareKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3191
|
-
? { register: () => {}, unregister: () => {} }
|
|
3192
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_sharekey_free(ptr >>> 0, 1));
|
|
3193
|
-
const SignedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3194
|
-
? { register: () => {}, unregister: () => {} }
|
|
3195
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signed_free(ptr >>> 0, 1));
|
|
3196
|
-
const SignedCgkaOperationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3197
|
-
? { register: () => {}, unregister: () => {} }
|
|
3198
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signedcgkaoperation_free(ptr >>> 0, 1));
|
|
3199
|
-
const SignedDelegationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3200
|
-
? { register: () => {}, unregister: () => {} }
|
|
3201
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signeddelegation_free(ptr >>> 0, 1));
|
|
3202
|
-
const SignedInvocationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3203
|
-
? { register: () => {}, unregister: () => {} }
|
|
3204
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signedinvocation_free(ptr >>> 0, 1));
|
|
3205
|
-
const SignedRevocationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3206
|
-
? { register: () => {}, unregister: () => {} }
|
|
3207
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signedrevocation_free(ptr >>> 0, 1));
|
|
3208
|
-
const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3209
|
-
? { register: () => {}, unregister: () => {} }
|
|
3210
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_signer_free(ptr >>> 0, 1));
|
|
3211
|
-
const StatsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3212
|
-
? { register: () => {}, unregister: () => {} }
|
|
3213
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_stats_free(ptr >>> 0, 1));
|
|
3214
|
-
const MembershipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3215
|
-
? { register: () => {}, unregister: () => {} }
|
|
3216
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_membership_free(ptr >>> 0, 1));
|
|
3217
|
-
const SummaryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3218
|
-
? { register: () => {}, unregister: () => {} }
|
|
3219
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_summary_free(ptr >>> 0, 1));
|
|
3220
|
-
|
|
3221
|
-
function addToExternrefTable0(obj) {
|
|
3222
|
-
const idx = wasm.__externref_table_alloc();
|
|
3223
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
3224
|
-
return idx;
|
|
3225
|
-
}
|
|
3226
|
-
|
|
3227
|
-
function _assertClass(instance, klass) {
|
|
3228
|
-
if (!(instance instanceof klass)) {
|
|
3229
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
|
|
3233
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
3234
|
-
? { register: () => {}, unregister: () => {} }
|
|
3235
|
-
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
3236
|
-
|
|
3237
|
-
function debugString(val) {
|
|
3238
|
-
// primitive types
|
|
3239
|
-
const type = typeof val;
|
|
3240
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
3241
|
-
return `${val}`;
|
|
3242
|
-
}
|
|
3243
|
-
if (type == 'string') {
|
|
3244
|
-
return `"${val}"`;
|
|
3245
|
-
}
|
|
3246
|
-
if (type == 'symbol') {
|
|
3247
|
-
const description = val.description;
|
|
3248
|
-
if (description == null) {
|
|
3249
|
-
return 'Symbol';
|
|
3250
|
-
} else {
|
|
3251
|
-
return `Symbol(${description})`;
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
if (type == 'function') {
|
|
3255
|
-
const name = val.name;
|
|
3256
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
3257
|
-
return `Function(${name})`;
|
|
3258
|
-
} else {
|
|
3259
|
-
return 'Function';
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
// objects
|
|
3263
|
-
if (Array.isArray(val)) {
|
|
3264
|
-
const length = val.length;
|
|
3265
|
-
let debug = '[';
|
|
3266
|
-
if (length > 0) {
|
|
3267
|
-
debug += debugString(val[0]);
|
|
3268
|
-
}
|
|
3269
|
-
for(let i = 1; i < length; i++) {
|
|
3270
|
-
debug += ', ' + debugString(val[i]);
|
|
3271
|
-
}
|
|
3272
|
-
debug += ']';
|
|
3273
|
-
return debug;
|
|
3274
|
-
}
|
|
3275
|
-
// Test for built-in
|
|
3276
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
3277
|
-
let className;
|
|
3278
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
3279
|
-
className = builtInMatches[1];
|
|
3280
|
-
} else {
|
|
3281
|
-
// Failed to match the standard '[object ClassName]'
|
|
3282
|
-
return toString.call(val);
|
|
3283
|
-
}
|
|
3284
|
-
if (className == 'Object') {
|
|
3285
|
-
// we're a user defined class or Object
|
|
3286
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
3287
|
-
// easier than looping through ownProperties of `val`.
|
|
3288
|
-
try {
|
|
3289
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
3290
|
-
} catch (_) {
|
|
3291
|
-
return 'Object';
|
|
3292
|
-
}
|
|
3293
|
-
}
|
|
3294
|
-
// errors
|
|
3295
|
-
if (val instanceof Error) {
|
|
3296
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
3297
|
-
}
|
|
3298
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
3299
|
-
return className;
|
|
3300
|
-
}
|
|
3301
|
-
|
|
3302
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
3303
|
-
ptr = ptr >>> 0;
|
|
3304
|
-
const mem = getDataViewMemory0();
|
|
3305
|
-
const result = [];
|
|
3306
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
3307
|
-
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
3308
|
-
}
|
|
3309
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
3310
|
-
return result;
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
3314
|
-
ptr = ptr >>> 0;
|
|
3315
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3318
|
-
let cachedDataViewMemory0 = null;
|
|
3319
|
-
function getDataViewMemory0() {
|
|
3320
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
3321
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
3322
|
-
}
|
|
3323
|
-
return cachedDataViewMemory0;
|
|
3324
|
-
}
|
|
3325
|
-
|
|
3326
|
-
function getStringFromWasm0(ptr, len) {
|
|
3327
|
-
ptr = ptr >>> 0;
|
|
3328
|
-
return decodeText(ptr, len);
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
let cachedUint8ArrayMemory0 = null;
|
|
3332
|
-
function getUint8ArrayMemory0() {
|
|
3333
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
3334
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
3335
|
-
}
|
|
3336
|
-
return cachedUint8ArrayMemory0;
|
|
3337
|
-
}
|
|
3338
|
-
|
|
3339
|
-
function handleError(f, args) {
|
|
3340
|
-
try {
|
|
3341
|
-
return f.apply(this, args);
|
|
3342
|
-
} catch (e) {
|
|
3343
|
-
const idx = addToExternrefTable0(e);
|
|
3344
|
-
wasm.__wbindgen_exn_store(idx);
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
function isLikeNone(x) {
|
|
3349
|
-
return x === undefined || x === null;
|
|
3350
|
-
}
|
|
3351
|
-
|
|
3352
|
-
function makeMutClosure(arg0, arg1, f) {
|
|
3353
|
-
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
3354
|
-
const real = (...args) => {
|
|
3355
|
-
|
|
3356
|
-
// First up with a closure we increment the internal reference
|
|
3357
|
-
// count. This ensures that the Rust closure environment won't
|
|
3358
|
-
// be deallocated while we're invoking it.
|
|
3359
|
-
state.cnt++;
|
|
3360
|
-
const a = state.a;
|
|
3361
|
-
state.a = 0;
|
|
3362
|
-
try {
|
|
3363
|
-
return f(a, state.b, ...args);
|
|
3364
|
-
} finally {
|
|
3365
|
-
state.a = a;
|
|
3366
|
-
real._wbg_cb_unref();
|
|
3367
|
-
}
|
|
3368
|
-
};
|
|
3369
|
-
real._wbg_cb_unref = () => {
|
|
3370
|
-
if (--state.cnt === 0) {
|
|
3371
|
-
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
3372
|
-
state.a = 0;
|
|
3373
|
-
CLOSURE_DTORS.unregister(state);
|
|
3374
|
-
}
|
|
3375
|
-
};
|
|
3376
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
3377
|
-
return real;
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3380
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
3381
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
3382
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
3383
|
-
WASM_VECTOR_LEN = arg.length;
|
|
3384
|
-
return ptr;
|
|
3385
|
-
}
|
|
3386
|
-
|
|
3387
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
3388
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
3389
|
-
for (let i = 0; i < array.length; i++) {
|
|
3390
|
-
const add = addToExternrefTable0(array[i]);
|
|
3391
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
3392
|
-
}
|
|
3393
|
-
WASM_VECTOR_LEN = array.length;
|
|
3394
|
-
return ptr;
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
3398
|
-
if (realloc === undefined) {
|
|
3399
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
3400
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
3401
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
3402
|
-
WASM_VECTOR_LEN = buf.length;
|
|
3403
|
-
return ptr;
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
let len = arg.length;
|
|
3407
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
3408
|
-
|
|
3409
|
-
const mem = getUint8ArrayMemory0();
|
|
3410
|
-
|
|
3411
|
-
let offset = 0;
|
|
3412
|
-
|
|
3413
|
-
for (; offset < len; offset++) {
|
|
3414
|
-
const code = arg.charCodeAt(offset);
|
|
3415
|
-
if (code > 0x7F) break;
|
|
3416
|
-
mem[ptr + offset] = code;
|
|
3417
|
-
}
|
|
3418
|
-
if (offset !== len) {
|
|
3419
|
-
if (offset !== 0) {
|
|
3420
|
-
arg = arg.slice(offset);
|
|
3421
|
-
}
|
|
3422
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
3423
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
3424
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
3425
|
-
|
|
3426
|
-
offset += ret.written;
|
|
3427
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
WASM_VECTOR_LEN = offset;
|
|
3431
|
-
return ptr;
|
|
3432
|
-
}
|
|
3433
|
-
|
|
3434
|
-
function takeFromExternrefTable0(idx) {
|
|
3435
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
3436
|
-
wasm.__externref_table_dealloc(idx);
|
|
3437
|
-
return value;
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
3441
|
-
cachedTextDecoder.decode();
|
|
3442
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
3443
|
-
let numBytesDecoded = 0;
|
|
3444
|
-
function decodeText(ptr, len) {
|
|
3445
|
-
numBytesDecoded += len;
|
|
3446
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
3447
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
3448
|
-
cachedTextDecoder.decode();
|
|
3449
|
-
numBytesDecoded = len;
|
|
3450
|
-
}
|
|
3451
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
3452
|
-
}
|
|
3453
|
-
|
|
3454
|
-
const cachedTextEncoder = new TextEncoder();
|
|
3455
|
-
|
|
3456
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
3457
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
3458
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
3459
|
-
view.set(buf);
|
|
3460
|
-
return {
|
|
3461
|
-
read: arg.length,
|
|
3462
|
-
written: buf.length
|
|
3463
|
-
};
|
|
3464
|
-
};
|
|
3465
|
-
}
|
|
3466
|
-
|
|
3467
|
-
let WASM_VECTOR_LEN = 0;
|
|
3468
|
-
|
|
3469
|
-
let wasmModule, wasm;
|
|
3470
|
-
function __wbg_finalize_init(instance, module) {
|
|
3471
|
-
wasm = instance.exports;
|
|
3472
|
-
wasmModule = module;
|
|
3473
|
-
cachedDataViewMemory0 = null;
|
|
3474
|
-
cachedUint8ArrayMemory0 = null;
|
|
3475
|
-
wasm.__wbindgen_start();
|
|
3476
|
-
return wasm;
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
async function __wbg_load(module, imports) {
|
|
3480
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
3481
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
3482
|
-
try {
|
|
3483
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
3484
|
-
} catch (e) {
|
|
3485
|
-
const validResponse = module.ok && expectedResponseType(module.type);
|
|
3486
|
-
|
|
3487
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
3488
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
3489
|
-
|
|
3490
|
-
} else { throw e; }
|
|
3491
|
-
}
|
|
3492
|
-
}
|
|
3493
|
-
|
|
3494
|
-
const bytes = await module.arrayBuffer();
|
|
3495
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
3496
|
-
} else {
|
|
3497
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
3498
|
-
|
|
3499
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
3500
|
-
return { instance, module };
|
|
3501
|
-
} else {
|
|
3502
|
-
return instance;
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
function expectedResponseType(type) {
|
|
3507
|
-
switch (type) {
|
|
3508
|
-
case 'basic': case 'cors': case 'default': return true;
|
|
3509
|
-
}
|
|
3510
|
-
return false;
|
|
3511
|
-
}
|
|
3512
|
-
}
|
|
3513
|
-
|
|
3514
|
-
function initSync(module) {
|
|
3515
|
-
if (wasm !== undefined) return wasm;
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
if (module !== undefined) {
|
|
3519
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
3520
|
-
({module} = module)
|
|
3521
|
-
} else {
|
|
3522
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
3523
|
-
}
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
const imports = __wbg_get_imports();
|
|
3527
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
3528
|
-
module = new WebAssembly.Module(module);
|
|
3529
|
-
}
|
|
3530
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
3531
|
-
return __wbg_finalize_init(instance, module);
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
|
-
async function __wbg_init(module_or_path) {
|
|
3535
|
-
if (wasm !== undefined) return wasm;
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
if (module_or_path !== undefined) {
|
|
3539
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
3540
|
-
({module_or_path} = module_or_path)
|
|
3541
|
-
} else {
|
|
3542
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
3543
|
-
}
|
|
3544
|
-
}
|
|
3545
|
-
|
|
3546
|
-
if (module_or_path === undefined) {
|
|
3547
|
-
module_or_path = new URL('keyhive_wasm_bg.wasm', import.meta.url);
|
|
3548
|
-
}
|
|
3549
|
-
const imports = __wbg_get_imports();
|
|
3550
|
-
|
|
3551
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
3552
|
-
module_or_path = fetch(module_or_path);
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
3556
|
-
|
|
3557
|
-
return __wbg_finalize_init(instance, module);
|
|
3558
|
-
}
|
|
3559
|
-
|
|
3560
|
-
export { initSync, __wbg_init as default };
|