@xmtp/wasm-bindings 1.1.3 → 1.2.0-dev.4ba3b55
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/dist/bindings_wasm.d.ts +290 -247
- package/dist/bindings_wasm.js +501 -269
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +247 -231
- package/dist/version.json +5 -0
- package/package.json +7 -4
package/dist/bindings_wasm.js
CHANGED
|
@@ -102,6 +102,11 @@ function isLikeNone(x) {
|
|
|
102
102
|
return x === undefined || x === null;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
106
|
+
ptr = ptr >>> 0;
|
|
107
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
108
|
+
}
|
|
109
|
+
|
|
105
110
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
106
111
|
ptr = ptr >>> 0;
|
|
107
112
|
const mem = getDataViewMemory0();
|
|
@@ -113,11 +118,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
113
118
|
return result;
|
|
114
119
|
}
|
|
115
120
|
|
|
116
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
117
|
-
ptr = ptr >>> 0;
|
|
118
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
121
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
122
122
|
? { register: () => {}, unregister: () => {} }
|
|
123
123
|
: new FinalizationRegistry(state => {
|
|
@@ -230,11 +230,82 @@ function _assertClass(instance, klass) {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
234
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
235
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
236
|
+
WASM_VECTOR_LEN = arg.length;
|
|
237
|
+
return ptr;
|
|
238
|
+
}
|
|
239
|
+
|
|
233
240
|
function takeFromExternrefTable0(idx) {
|
|
234
241
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
235
242
|
wasm.__externref_table_dealloc(idx);
|
|
236
243
|
return value;
|
|
237
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* @param {string} host
|
|
247
|
+
* @param {string} inbox_id
|
|
248
|
+
* @param {Identifier} account_identifier
|
|
249
|
+
* @param {string | null} [db_path]
|
|
250
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
251
|
+
* @param {string | null} [device_sync_server_url]
|
|
252
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
253
|
+
* @param {LogOptions | null} [log_options]
|
|
254
|
+
* @returns {Promise<Client>}
|
|
255
|
+
*/
|
|
256
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
257
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
258
|
+
const len0 = WASM_VECTOR_LEN;
|
|
259
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
260
|
+
const len1 = WASM_VECTOR_LEN;
|
|
261
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
+
var len2 = WASM_VECTOR_LEN;
|
|
263
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
264
|
+
var len3 = WASM_VECTOR_LEN;
|
|
265
|
+
let ptr4 = 0;
|
|
266
|
+
if (!isLikeNone(log_options)) {
|
|
267
|
+
_assertClass(log_options, LogOptions);
|
|
268
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
269
|
+
}
|
|
270
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4);
|
|
271
|
+
return ret;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @param {string} host
|
|
276
|
+
* @param {Identifier} accountIdentifier
|
|
277
|
+
* @returns {Promise<string | undefined>}
|
|
278
|
+
*/
|
|
279
|
+
export function getInboxIdForIdentifier(host, accountIdentifier) {
|
|
280
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
|
|
283
|
+
return ret;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @param {Identifier} accountIdentifier
|
|
288
|
+
* @returns {string}
|
|
289
|
+
*/
|
|
290
|
+
export function generateInboxId(accountIdentifier) {
|
|
291
|
+
let deferred2_0;
|
|
292
|
+
let deferred2_1;
|
|
293
|
+
try {
|
|
294
|
+
const ret = wasm.generateInboxId(accountIdentifier);
|
|
295
|
+
var ptr1 = ret[0];
|
|
296
|
+
var len1 = ret[1];
|
|
297
|
+
if (ret[3]) {
|
|
298
|
+
ptr1 = 0; len1 = 0;
|
|
299
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
300
|
+
}
|
|
301
|
+
deferred2_0 = ptr1;
|
|
302
|
+
deferred2_1 = len1;
|
|
303
|
+
return getStringFromWasm0(ptr1, len1);
|
|
304
|
+
} finally {
|
|
305
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
238
309
|
/**
|
|
239
310
|
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
240
311
|
* @returns {Uint8Array}
|
|
@@ -301,90 +372,29 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
301
372
|
}
|
|
302
373
|
}
|
|
303
374
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
* @param {string} inbox_id
|
|
307
|
-
* @param {Identifier} account_identifier
|
|
308
|
-
* @param {string | null} [db_path]
|
|
309
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
310
|
-
* @param {string | null} [history_sync_url]
|
|
311
|
-
* @param {LogOptions | null} [log_options]
|
|
312
|
-
* @returns {Promise<Client>}
|
|
313
|
-
*/
|
|
314
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
|
|
315
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
316
|
-
const len0 = WASM_VECTOR_LEN;
|
|
317
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
318
|
-
const len1 = WASM_VECTOR_LEN;
|
|
319
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
-
var len2 = WASM_VECTOR_LEN;
|
|
321
|
-
var ptr3 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
-
var len3 = WASM_VECTOR_LEN;
|
|
323
|
-
let ptr4 = 0;
|
|
324
|
-
if (!isLikeNone(log_options)) {
|
|
325
|
-
_assertClass(log_options, LogOptions);
|
|
326
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
327
|
-
}
|
|
328
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
329
|
-
return ret;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
333
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
334
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
335
|
-
WASM_VECTOR_LEN = arg.length;
|
|
336
|
-
return ptr;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* @param {string} host
|
|
340
|
-
* @param {Identifier} accountIdentifier
|
|
341
|
-
* @returns {Promise<string | undefined>}
|
|
342
|
-
*/
|
|
343
|
-
export function getInboxIdForIdentifier(host, accountIdentifier) {
|
|
344
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
345
|
-
const len0 = WASM_VECTOR_LEN;
|
|
346
|
-
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
|
|
347
|
-
return ret;
|
|
375
|
+
function __wbg_adapter_50(arg0, arg1) {
|
|
376
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6040dd5f55152215(arg0, arg1);
|
|
348
377
|
}
|
|
349
378
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
* @returns {string}
|
|
353
|
-
*/
|
|
354
|
-
export function generateInboxId(accountIdentifier) {
|
|
355
|
-
let deferred2_0;
|
|
356
|
-
let deferred2_1;
|
|
357
|
-
try {
|
|
358
|
-
const ret = wasm.generateInboxId(accountIdentifier);
|
|
359
|
-
var ptr1 = ret[0];
|
|
360
|
-
var len1 = ret[1];
|
|
361
|
-
if (ret[3]) {
|
|
362
|
-
ptr1 = 0; len1 = 0;
|
|
363
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
364
|
-
}
|
|
365
|
-
deferred2_0 = ptr1;
|
|
366
|
-
deferred2_1 = len1;
|
|
367
|
-
return getStringFromWasm0(ptr1, len1);
|
|
368
|
-
} finally {
|
|
369
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
370
|
-
}
|
|
379
|
+
function __wbg_adapter_53(arg0, arg1) {
|
|
380
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h89dafc0baf46c12b(arg0, arg1);
|
|
371
381
|
}
|
|
372
382
|
|
|
373
|
-
function
|
|
374
|
-
wasm.
|
|
383
|
+
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
384
|
+
wasm.closure3982_externref_shim(arg0, arg1, arg2);
|
|
375
385
|
}
|
|
376
386
|
|
|
377
|
-
function
|
|
378
|
-
wasm.
|
|
387
|
+
function __wbg_adapter_59(arg0, arg1) {
|
|
388
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f45197f24caef5a(arg0, arg1);
|
|
379
389
|
}
|
|
380
390
|
|
|
381
|
-
function
|
|
382
|
-
const ret = wasm.
|
|
391
|
+
function __wbg_adapter_641(arg0, arg1, arg2, arg3, arg4) {
|
|
392
|
+
const ret = wasm.closure5013_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
383
393
|
return ret !== 0;
|
|
384
394
|
}
|
|
385
395
|
|
|
386
|
-
function
|
|
387
|
-
wasm.
|
|
396
|
+
function __wbg_adapter_742(arg0, arg1, arg2, arg3) {
|
|
397
|
+
wasm.closure5012_externref_shim(arg0, arg1, arg2, arg3);
|
|
388
398
|
}
|
|
389
399
|
|
|
390
400
|
/**
|
|
@@ -513,13 +523,14 @@ export const ReactionSchema = Object.freeze({
|
|
|
513
523
|
Custom: 3, "3": "Custom",
|
|
514
524
|
});
|
|
515
525
|
/**
|
|
516
|
-
* @enum {0 | 1 | 2 | 3}
|
|
526
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
517
527
|
*/
|
|
518
528
|
export const SignatureRequestType = Object.freeze({
|
|
519
529
|
AddWallet: 0, "0": "AddWallet",
|
|
520
530
|
CreateInbox: 1, "1": "CreateInbox",
|
|
521
531
|
RevokeWallet: 2, "2": "RevokeWallet",
|
|
522
532
|
RevokeInstallations: 3, "3": "RevokeInstallations",
|
|
533
|
+
ChangeRecoveryIdentifier: 4, "4": "ChangeRecoveryIdentifier",
|
|
523
534
|
});
|
|
524
535
|
/**
|
|
525
536
|
* @enum {0 | 1}
|
|
@@ -529,6 +540,8 @@ export const SortDirection = Object.freeze({
|
|
|
529
540
|
Descending: 1, "1": "Descending",
|
|
530
541
|
});
|
|
531
542
|
|
|
543
|
+
const __wbindgen_enum_DeviceSyncWorkerMode = ["enabled", "disabled"];
|
|
544
|
+
|
|
532
545
|
const __wbindgen_enum_LogLevel = ["off", "error", "warn", "info", "debug", "trace"];
|
|
533
546
|
|
|
534
547
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -562,117 +575,6 @@ export class Client {
|
|
|
562
575
|
const ptr = this.__destroy_into_raw();
|
|
563
576
|
wasm.__wbg_client_free(ptr, 0);
|
|
564
577
|
}
|
|
565
|
-
/**
|
|
566
|
-
* @returns {string | undefined}
|
|
567
|
-
*/
|
|
568
|
-
createInboxSignatureText() {
|
|
569
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
570
|
-
if (ret[3]) {
|
|
571
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
572
|
-
}
|
|
573
|
-
let v1;
|
|
574
|
-
if (ret[0] !== 0) {
|
|
575
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
576
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
577
|
-
}
|
|
578
|
-
return v1;
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* @param {Identifier} new_identifier
|
|
582
|
-
* @returns {Promise<string>}
|
|
583
|
-
*/
|
|
584
|
-
addWalletSignatureText(new_identifier) {
|
|
585
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
586
|
-
return ret;
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* @param {Identifier} identifier
|
|
590
|
-
* @returns {Promise<string>}
|
|
591
|
-
*/
|
|
592
|
-
revokeWalletSignatureText(identifier) {
|
|
593
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
594
|
-
return ret;
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* @returns {Promise<string>}
|
|
598
|
-
*/
|
|
599
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
600
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
601
|
-
return ret;
|
|
602
|
-
}
|
|
603
|
-
/**
|
|
604
|
-
* @param {Uint8Array[]} installation_ids
|
|
605
|
-
* @returns {Promise<string>}
|
|
606
|
-
*/
|
|
607
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
608
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
609
|
-
const len0 = WASM_VECTOR_LEN;
|
|
610
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
611
|
-
return ret;
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* @param {SignatureRequestType} signature_type
|
|
615
|
-
* @param {Uint8Array} signature_bytes
|
|
616
|
-
* @returns {Promise<void>}
|
|
617
|
-
*/
|
|
618
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
619
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
620
|
-
return ret;
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* @param {SignatureRequestType} signature_type
|
|
624
|
-
* @param {PasskeySignature} signature
|
|
625
|
-
* @returns {Promise<void>}
|
|
626
|
-
*/
|
|
627
|
-
addPasskeySignature(signature_type, signature) {
|
|
628
|
-
_assertClass(signature, PasskeySignature);
|
|
629
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
630
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
631
|
-
return ret;
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* @param {SignatureRequestType} signature_type
|
|
635
|
-
* @param {Uint8Array} signature_bytes
|
|
636
|
-
* @param {bigint} chain_id
|
|
637
|
-
* @param {bigint | null} [block_number]
|
|
638
|
-
* @returns {Promise<void>}
|
|
639
|
-
*/
|
|
640
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
641
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
642
|
-
return ret;
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* @returns {Promise<void>}
|
|
646
|
-
*/
|
|
647
|
-
applySignatureRequests() {
|
|
648
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
649
|
-
return ret;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* @param {string} signature_text
|
|
653
|
-
* @returns {Uint8Array}
|
|
654
|
-
*/
|
|
655
|
-
signWithInstallationKey(signature_text) {
|
|
656
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
657
|
-
const len0 = WASM_VECTOR_LEN;
|
|
658
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
659
|
-
if (ret[2]) {
|
|
660
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
661
|
-
}
|
|
662
|
-
return takeFromExternrefTable0(ret[0]);
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* @param {string} signature_text
|
|
666
|
-
* @param {Uint8Array} signature_bytes
|
|
667
|
-
*/
|
|
668
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
669
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
670
|
-
const len0 = WASM_VECTOR_LEN;
|
|
671
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
672
|
-
if (ret[1]) {
|
|
673
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
578
|
/**
|
|
677
579
|
* @returns {Identifier}
|
|
678
580
|
*/
|
|
@@ -765,67 +667,208 @@ export class Client {
|
|
|
765
667
|
return ret;
|
|
766
668
|
}
|
|
767
669
|
/**
|
|
768
|
-
* @param {string[]} inbox_ids
|
|
769
|
-
* @param {boolean} refresh_from_network
|
|
770
|
-
* @returns {Promise<InboxState[]>}
|
|
670
|
+
* @param {string[]} inbox_ids
|
|
671
|
+
* @param {boolean} refresh_from_network
|
|
672
|
+
* @returns {Promise<InboxState[]>}
|
|
673
|
+
*/
|
|
674
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
675
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
676
|
+
const len0 = WASM_VECTOR_LEN;
|
|
677
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
678
|
+
return ret;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* @returns {Conversations}
|
|
682
|
+
*/
|
|
683
|
+
conversations() {
|
|
684
|
+
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
685
|
+
return Conversations.__wrap(ret);
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* @returns {Promise<number>}
|
|
689
|
+
*/
|
|
690
|
+
syncPreferences() {
|
|
691
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
692
|
+
return ret;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
* * Get the client's inbox state.
|
|
697
|
+
* *
|
|
698
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
699
|
+
* * Otherwise, the state will be read from the local database.
|
|
700
|
+
*
|
|
701
|
+
* @param {boolean} refresh_from_network
|
|
702
|
+
* @returns {Promise<InboxState>}
|
|
703
|
+
*/
|
|
704
|
+
inboxState(refresh_from_network) {
|
|
705
|
+
const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
|
|
706
|
+
return ret;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* @param {string} inbox_id
|
|
710
|
+
* @returns {Promise<InboxState>}
|
|
711
|
+
*/
|
|
712
|
+
getLatestInboxState(inbox_id) {
|
|
713
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
714
|
+
const len0 = WASM_VECTOR_LEN;
|
|
715
|
+
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
716
|
+
return ret;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
*
|
|
720
|
+
* * Get key package statuses for a list of installation IDs.
|
|
721
|
+
* *
|
|
722
|
+
* * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
|
|
723
|
+
*
|
|
724
|
+
* @param {string[]} installation_ids
|
|
725
|
+
* @returns {Promise<any>}
|
|
726
|
+
*/
|
|
727
|
+
getKeyPackageStatusesForInstallationIds(installation_ids) {
|
|
728
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
729
|
+
const len0 = WASM_VECTOR_LEN;
|
|
730
|
+
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
731
|
+
return ret;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* @param {Consent[]} records
|
|
735
|
+
* @returns {Promise<void>}
|
|
736
|
+
*/
|
|
737
|
+
setConsentStates(records) {
|
|
738
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
739
|
+
const len0 = WASM_VECTOR_LEN;
|
|
740
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
741
|
+
return ret;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @param {ConsentEntityType} entity_type
|
|
745
|
+
* @param {string} entity
|
|
746
|
+
* @returns {Promise<ConsentState>}
|
|
747
|
+
*/
|
|
748
|
+
getConsentState(entity_type, entity) {
|
|
749
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
750
|
+
const len0 = WASM_VECTOR_LEN;
|
|
751
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
752
|
+
return ret;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* @returns {string | undefined}
|
|
756
|
+
*/
|
|
757
|
+
createInboxSignatureText() {
|
|
758
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
759
|
+
if (ret[3]) {
|
|
760
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
761
|
+
}
|
|
762
|
+
let v1;
|
|
763
|
+
if (ret[0] !== 0) {
|
|
764
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
765
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
766
|
+
}
|
|
767
|
+
return v1;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* @param {Identifier} new_identifier
|
|
771
|
+
* @returns {Promise<string>}
|
|
772
|
+
*/
|
|
773
|
+
addWalletSignatureText(new_identifier) {
|
|
774
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
775
|
+
return ret;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* @param {Identifier} identifier
|
|
779
|
+
* @returns {Promise<string>}
|
|
780
|
+
*/
|
|
781
|
+
revokeWalletSignatureText(identifier) {
|
|
782
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
783
|
+
return ret;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* @returns {Promise<string>}
|
|
787
|
+
*/
|
|
788
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
789
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
790
|
+
return ret;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* @param {Uint8Array[]} installation_ids
|
|
794
|
+
* @returns {Promise<string>}
|
|
795
|
+
*/
|
|
796
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
797
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
798
|
+
const len0 = WASM_VECTOR_LEN;
|
|
799
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
800
|
+
return ret;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* @param {Identifier} new_recovery_identifier
|
|
804
|
+
* @returns {Promise<string>}
|
|
805
|
+
*/
|
|
806
|
+
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
807
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
808
|
+
return ret;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* @param {SignatureRequestType} signature_type
|
|
812
|
+
* @param {Uint8Array} signature_bytes
|
|
813
|
+
* @returns {Promise<void>}
|
|
771
814
|
*/
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
const len0 = WASM_VECTOR_LEN;
|
|
775
|
-
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
815
|
+
addEcdsaSignature(signature_type, signature_bytes) {
|
|
816
|
+
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
776
817
|
return ret;
|
|
777
818
|
}
|
|
778
819
|
/**
|
|
779
|
-
* @
|
|
820
|
+
* @param {SignatureRequestType} signature_type
|
|
821
|
+
* @param {PasskeySignature} signature
|
|
822
|
+
* @returns {Promise<void>}
|
|
780
823
|
*/
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
824
|
+
addPasskeySignature(signature_type, signature) {
|
|
825
|
+
_assertClass(signature, PasskeySignature);
|
|
826
|
+
var ptr0 = signature.__destroy_into_raw();
|
|
827
|
+
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
828
|
+
return ret;
|
|
784
829
|
}
|
|
785
830
|
/**
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* @param {boolean} refresh_from_network
|
|
793
|
-
* @returns {Promise<InboxState>}
|
|
831
|
+
* @param {SignatureRequestType} signature_type
|
|
832
|
+
* @param {Uint8Array} signature_bytes
|
|
833
|
+
* @param {bigint} chain_id
|
|
834
|
+
* @param {bigint | null} [block_number]
|
|
835
|
+
* @returns {Promise<void>}
|
|
794
836
|
*/
|
|
795
|
-
|
|
796
|
-
const ret = wasm.
|
|
837
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
838
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
797
839
|
return ret;
|
|
798
840
|
}
|
|
799
841
|
/**
|
|
800
|
-
* @
|
|
801
|
-
* @returns {Promise<InboxState>}
|
|
842
|
+
* @returns {Promise<void>}
|
|
802
843
|
*/
|
|
803
|
-
|
|
804
|
-
const
|
|
805
|
-
const len0 = WASM_VECTOR_LEN;
|
|
806
|
-
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
844
|
+
applySignatureRequests() {
|
|
845
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
807
846
|
return ret;
|
|
808
847
|
}
|
|
809
848
|
/**
|
|
810
|
-
* @param {
|
|
811
|
-
* @returns {
|
|
849
|
+
* @param {string} signature_text
|
|
850
|
+
* @returns {Uint8Array}
|
|
812
851
|
*/
|
|
813
|
-
|
|
814
|
-
const ptr0 =
|
|
852
|
+
signWithInstallationKey(signature_text) {
|
|
853
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
815
854
|
const len0 = WASM_VECTOR_LEN;
|
|
816
|
-
const ret = wasm.
|
|
817
|
-
|
|
855
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
856
|
+
if (ret[2]) {
|
|
857
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
858
|
+
}
|
|
859
|
+
return takeFromExternrefTable0(ret[0]);
|
|
818
860
|
}
|
|
819
861
|
/**
|
|
820
|
-
* @param {
|
|
821
|
-
* @param {
|
|
822
|
-
* @returns {Promise<ConsentState>}
|
|
862
|
+
* @param {string} signature_text
|
|
863
|
+
* @param {Uint8Array} signature_bytes
|
|
823
864
|
*/
|
|
824
|
-
|
|
825
|
-
const ptr0 = passStringToWasm0(
|
|
865
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
866
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
826
867
|
const len0 = WASM_VECTOR_LEN;
|
|
827
|
-
const ret = wasm.
|
|
828
|
-
|
|
868
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
869
|
+
if (ret[1]) {
|
|
870
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
871
|
+
}
|
|
829
872
|
}
|
|
830
873
|
}
|
|
831
874
|
|
|
@@ -963,7 +1006,7 @@ export class ContentTypeId {
|
|
|
963
1006
|
set authorityId(arg0) {
|
|
964
1007
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
965
1008
|
const len0 = WASM_VECTOR_LEN;
|
|
966
|
-
wasm.
|
|
1009
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
967
1010
|
}
|
|
968
1011
|
/**
|
|
969
1012
|
* @returns {string}
|
|
@@ -1057,6 +1100,25 @@ export class Conversation {
|
|
|
1057
1100
|
const ptr = this.__destroy_into_raw();
|
|
1058
1101
|
wasm.__wbg_conversation_free(ptr, 0);
|
|
1059
1102
|
}
|
|
1103
|
+
/**
|
|
1104
|
+
* @returns {ConsentState}
|
|
1105
|
+
*/
|
|
1106
|
+
consentState() {
|
|
1107
|
+
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1108
|
+
if (ret[2]) {
|
|
1109
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1110
|
+
}
|
|
1111
|
+
return ret[0];
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* @param {ConsentState} state
|
|
1115
|
+
*/
|
|
1116
|
+
updateConsentState(state) {
|
|
1117
|
+
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1118
|
+
if (ret[1]) {
|
|
1119
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1060
1122
|
/**
|
|
1061
1123
|
* @returns {string}
|
|
1062
1124
|
*/
|
|
@@ -1537,25 +1599,6 @@ export class Conversation {
|
|
|
1537
1599
|
}
|
|
1538
1600
|
return takeFromExternrefTable0(ret[0]);
|
|
1539
1601
|
}
|
|
1540
|
-
/**
|
|
1541
|
-
* @returns {ConsentState}
|
|
1542
|
-
*/
|
|
1543
|
-
consentState() {
|
|
1544
|
-
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1545
|
-
if (ret[2]) {
|
|
1546
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1547
|
-
}
|
|
1548
|
-
return ret[0];
|
|
1549
|
-
}
|
|
1550
|
-
/**
|
|
1551
|
-
* @param {ConsentState} state
|
|
1552
|
-
*/
|
|
1553
|
-
updateConsentState(state) {
|
|
1554
|
-
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1555
|
-
if (ret[1]) {
|
|
1556
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
1602
|
}
|
|
1560
1603
|
|
|
1561
1604
|
const ConversationListItemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2277,7 +2320,7 @@ export class GroupMember {
|
|
|
2277
2320
|
set inboxId(arg0) {
|
|
2278
2321
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2279
2322
|
const len0 = WASM_VECTOR_LEN;
|
|
2280
|
-
wasm.
|
|
2323
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2281
2324
|
}
|
|
2282
2325
|
/**
|
|
2283
2326
|
* @returns {Identifier[]}
|
|
@@ -2559,7 +2602,7 @@ export class InboxState {
|
|
|
2559
2602
|
set inboxId(arg0) {
|
|
2560
2603
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2561
2604
|
const len0 = WASM_VECTOR_LEN;
|
|
2562
|
-
wasm.
|
|
2605
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
2563
2606
|
}
|
|
2564
2607
|
/**
|
|
2565
2608
|
* @returns {Identifier}
|
|
@@ -2850,6 +2893,116 @@ export class IntoUnderlyingSource {
|
|
|
2850
2893
|
}
|
|
2851
2894
|
}
|
|
2852
2895
|
|
|
2896
|
+
const KeyPackageStatusFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2897
|
+
? { register: () => {}, unregister: () => {} }
|
|
2898
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keypackagestatus_free(ptr >>> 0, 1));
|
|
2899
|
+
|
|
2900
|
+
export class KeyPackageStatus {
|
|
2901
|
+
|
|
2902
|
+
__destroy_into_raw() {
|
|
2903
|
+
const ptr = this.__wbg_ptr;
|
|
2904
|
+
this.__wbg_ptr = 0;
|
|
2905
|
+
KeyPackageStatusFinalization.unregister(this);
|
|
2906
|
+
return ptr;
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
free() {
|
|
2910
|
+
const ptr = this.__destroy_into_raw();
|
|
2911
|
+
wasm.__wbg_keypackagestatus_free(ptr, 0);
|
|
2912
|
+
}
|
|
2913
|
+
/**
|
|
2914
|
+
* @returns {Lifetime | undefined}
|
|
2915
|
+
*/
|
|
2916
|
+
get lifetime() {
|
|
2917
|
+
const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
|
|
2918
|
+
return ret === 0 ? undefined : Lifetime.__wrap(ret);
|
|
2919
|
+
}
|
|
2920
|
+
/**
|
|
2921
|
+
* @param {Lifetime | null} [arg0]
|
|
2922
|
+
*/
|
|
2923
|
+
set lifetime(arg0) {
|
|
2924
|
+
let ptr0 = 0;
|
|
2925
|
+
if (!isLikeNone(arg0)) {
|
|
2926
|
+
_assertClass(arg0, Lifetime);
|
|
2927
|
+
ptr0 = arg0.__destroy_into_raw();
|
|
2928
|
+
}
|
|
2929
|
+
wasm.__wbg_set_keypackagestatus_lifetime(this.__wbg_ptr, ptr0);
|
|
2930
|
+
}
|
|
2931
|
+
/**
|
|
2932
|
+
* @returns {string | undefined}
|
|
2933
|
+
*/
|
|
2934
|
+
get validationError() {
|
|
2935
|
+
const ret = wasm.__wbg_get_keypackagestatus_validationError(this.__wbg_ptr);
|
|
2936
|
+
let v1;
|
|
2937
|
+
if (ret[0] !== 0) {
|
|
2938
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
2939
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2940
|
+
}
|
|
2941
|
+
return v1;
|
|
2942
|
+
}
|
|
2943
|
+
/**
|
|
2944
|
+
* @param {string | null} [arg0]
|
|
2945
|
+
*/
|
|
2946
|
+
set validationError(arg0) {
|
|
2947
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2948
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2949
|
+
wasm.__wbg_set_keypackagestatus_validationError(this.__wbg_ptr, ptr0, len0);
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
const LifetimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2954
|
+
? { register: () => {}, unregister: () => {} }
|
|
2955
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_lifetime_free(ptr >>> 0, 1));
|
|
2956
|
+
|
|
2957
|
+
export class Lifetime {
|
|
2958
|
+
|
|
2959
|
+
static __wrap(ptr) {
|
|
2960
|
+
ptr = ptr >>> 0;
|
|
2961
|
+
const obj = Object.create(Lifetime.prototype);
|
|
2962
|
+
obj.__wbg_ptr = ptr;
|
|
2963
|
+
LifetimeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2964
|
+
return obj;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
__destroy_into_raw() {
|
|
2968
|
+
const ptr = this.__wbg_ptr;
|
|
2969
|
+
this.__wbg_ptr = 0;
|
|
2970
|
+
LifetimeFinalization.unregister(this);
|
|
2971
|
+
return ptr;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
free() {
|
|
2975
|
+
const ptr = this.__destroy_into_raw();
|
|
2976
|
+
wasm.__wbg_lifetime_free(ptr, 0);
|
|
2977
|
+
}
|
|
2978
|
+
/**
|
|
2979
|
+
* @returns {bigint}
|
|
2980
|
+
*/
|
|
2981
|
+
get not_before() {
|
|
2982
|
+
const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
|
|
2983
|
+
return BigInt.asUintN(64, ret);
|
|
2984
|
+
}
|
|
2985
|
+
/**
|
|
2986
|
+
* @param {bigint} arg0
|
|
2987
|
+
*/
|
|
2988
|
+
set not_before(arg0) {
|
|
2989
|
+
wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
|
|
2990
|
+
}
|
|
2991
|
+
/**
|
|
2992
|
+
* @returns {bigint}
|
|
2993
|
+
*/
|
|
2994
|
+
get not_after() {
|
|
2995
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
2996
|
+
return BigInt.asUintN(64, ret);
|
|
2997
|
+
}
|
|
2998
|
+
/**
|
|
2999
|
+
* @param {bigint} arg0
|
|
3000
|
+
*/
|
|
3001
|
+
set not_after(arg0) {
|
|
3002
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
|
|
2853
3006
|
const ListConversationsOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2854
3007
|
? { register: () => {}, unregister: () => {} }
|
|
2855
3008
|
: new FinalizationRegistry(ptr => wasm.__wbg_listconversationsoptions_free(ptr >>> 0, 1));
|
|
@@ -3527,6 +3680,13 @@ export class Opfs {
|
|
|
3527
3680
|
const ptr = this.__destroy_into_raw();
|
|
3528
3681
|
wasm.__wbg_opfs_free(ptr, 0);
|
|
3529
3682
|
}
|
|
3683
|
+
/**
|
|
3684
|
+
* @returns {Promise<void>}
|
|
3685
|
+
*/
|
|
3686
|
+
static init_sqlite_opfs() {
|
|
3687
|
+
const ret = wasm.opfs_init_sqlite_opfs();
|
|
3688
|
+
return ret;
|
|
3689
|
+
}
|
|
3530
3690
|
/**
|
|
3531
3691
|
* Check if the global OPFS object has been initialized
|
|
3532
3692
|
* @returns {boolean}
|
|
@@ -3857,7 +4017,7 @@ export class Reaction {
|
|
|
3857
4017
|
set reference(arg0) {
|
|
3858
4018
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3859
4019
|
const len0 = WASM_VECTOR_LEN;
|
|
3860
|
-
wasm.
|
|
4020
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
3861
4021
|
}
|
|
3862
4022
|
/**
|
|
3863
4023
|
* @returns {string}
|
|
@@ -4251,6 +4411,9 @@ function __wbg_get_imports() {
|
|
|
4251
4411
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4252
4412
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4253
4413
|
};
|
|
4414
|
+
imports.wbg.__wbg_abort_410ec47a64ac6117 = function(arg0, arg1) {
|
|
4415
|
+
arg0.abort(arg1);
|
|
4416
|
+
};
|
|
4254
4417
|
imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
4255
4418
|
arg0.abort();
|
|
4256
4419
|
};
|
|
@@ -4313,6 +4476,14 @@ function __wbg_get_imports() {
|
|
|
4313
4476
|
const ret = clearTimeout(arg0);
|
|
4314
4477
|
return ret;
|
|
4315
4478
|
};
|
|
4479
|
+
imports.wbg.__wbg_clearTimeout_86721db0036bea98 = function(arg0) {
|
|
4480
|
+
const ret = clearTimeout(arg0);
|
|
4481
|
+
return ret;
|
|
4482
|
+
};
|
|
4483
|
+
imports.wbg.__wbg_clearTimeout_96804de0ab838f26 = function(arg0) {
|
|
4484
|
+
const ret = clearTimeout(arg0);
|
|
4485
|
+
return ret;
|
|
4486
|
+
};
|
|
4316
4487
|
imports.wbg.__wbg_clear_1f96150ecf4061a6 = function(arg0) {
|
|
4317
4488
|
arg0.clear();
|
|
4318
4489
|
};
|
|
@@ -4332,6 +4503,10 @@ function __wbg_get_imports() {
|
|
|
4332
4503
|
imports.wbg.__wbg_close_a17af48266bd9942 = function(arg0) {
|
|
4333
4504
|
arg0.close();
|
|
4334
4505
|
};
|
|
4506
|
+
imports.wbg.__wbg_code_cfd8f6868bdaed9b = function(arg0) {
|
|
4507
|
+
const ret = arg0.code;
|
|
4508
|
+
return ret;
|
|
4509
|
+
};
|
|
4335
4510
|
imports.wbg.__wbg_consent_unwrap = function(arg0) {
|
|
4336
4511
|
const ret = Consent.__unwrap(arg0);
|
|
4337
4512
|
return ret;
|
|
@@ -4409,7 +4584,7 @@ function __wbg_get_imports() {
|
|
|
4409
4584
|
const a = state0.a;
|
|
4410
4585
|
state0.a = 0;
|
|
4411
4586
|
try {
|
|
4412
|
-
return
|
|
4587
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4413
4588
|
} finally {
|
|
4414
4589
|
state0.a = a;
|
|
4415
4590
|
}
|
|
@@ -4420,14 +4595,14 @@ function __wbg_get_imports() {
|
|
|
4420
4595
|
state0.a = state0.b = 0;
|
|
4421
4596
|
}
|
|
4422
4597
|
};
|
|
4423
|
-
imports.wbg.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
|
|
4424
|
-
const ret = fetch(arg0);
|
|
4425
|
-
return ret;
|
|
4426
|
-
};
|
|
4427
4598
|
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
4428
4599
|
const ret = arg0.fetch(arg1);
|
|
4429
4600
|
return ret;
|
|
4430
4601
|
};
|
|
4602
|
+
imports.wbg.__wbg_fetch_d36a73832f0a45e8 = function(arg0) {
|
|
4603
|
+
const ret = fetch(arg0);
|
|
4604
|
+
return ret;
|
|
4605
|
+
};
|
|
4431
4606
|
imports.wbg.__wbg_fill_3311db9cdf18c6c4 = function(arg0, arg1, arg2, arg3) {
|
|
4432
4607
|
const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
4433
4608
|
return ret;
|
|
@@ -4439,7 +4614,7 @@ function __wbg_get_imports() {
|
|
|
4439
4614
|
const a = state0.a;
|
|
4440
4615
|
state0.a = 0;
|
|
4441
4616
|
try {
|
|
4442
|
-
return
|
|
4617
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4443
4618
|
} finally {
|
|
4444
4619
|
state0.a = a;
|
|
4445
4620
|
}
|
|
@@ -4493,6 +4668,9 @@ function __wbg_get_imports() {
|
|
|
4493
4668
|
const ret = arg0.getMonth();
|
|
4494
4669
|
return ret;
|
|
4495
4670
|
};
|
|
4671
|
+
imports.wbg.__wbg_getRandomValues_21a0191e74d0e1d3 = function() { return handleError(function (arg0, arg1) {
|
|
4672
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
4673
|
+
}, arguments) };
|
|
4496
4674
|
imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
|
|
4497
4675
|
arg0.getRandomValues(arg1);
|
|
4498
4676
|
}, arguments) };
|
|
@@ -4596,6 +4774,26 @@ function __wbg_get_imports() {
|
|
|
4596
4774
|
const ret = result;
|
|
4597
4775
|
return ret;
|
|
4598
4776
|
};
|
|
4777
|
+
imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function(arg0) {
|
|
4778
|
+
let result;
|
|
4779
|
+
try {
|
|
4780
|
+
result = arg0 instanceof DOMException;
|
|
4781
|
+
} catch (_) {
|
|
4782
|
+
result = false;
|
|
4783
|
+
}
|
|
4784
|
+
const ret = result;
|
|
4785
|
+
return ret;
|
|
4786
|
+
};
|
|
4787
|
+
imports.wbg.__wbg_instanceof_Performance_0ac1286c87171f57 = function(arg0) {
|
|
4788
|
+
let result;
|
|
4789
|
+
try {
|
|
4790
|
+
result = arg0 instanceof Performance;
|
|
4791
|
+
} catch (_) {
|
|
4792
|
+
result = false;
|
|
4793
|
+
}
|
|
4794
|
+
const ret = result;
|
|
4795
|
+
return ret;
|
|
4796
|
+
};
|
|
4599
4797
|
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
4600
4798
|
let result;
|
|
4601
4799
|
try {
|
|
@@ -4692,6 +4890,13 @@ function __wbg_get_imports() {
|
|
|
4692
4890
|
imports.wbg.__wbg_measure_7728846525e2cced = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4693
4891
|
arg0.measure(getStringFromWasm0(arg1, arg2), arg3);
|
|
4694
4892
|
}, arguments) };
|
|
4893
|
+
imports.wbg.__wbg_message_5c5d919204d42400 = function(arg0, arg1) {
|
|
4894
|
+
const ret = arg1.message;
|
|
4895
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4896
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4897
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4898
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4899
|
+
};
|
|
4695
4900
|
imports.wbg.__wbg_message_new = function(arg0) {
|
|
4696
4901
|
const ret = Message.__wrap(arg0);
|
|
4697
4902
|
return ret;
|
|
@@ -4708,6 +4913,13 @@ function __wbg_get_imports() {
|
|
|
4708
4913
|
const ret = arg0.msCrypto;
|
|
4709
4914
|
return ret;
|
|
4710
4915
|
};
|
|
4916
|
+
imports.wbg.__wbg_name_f2d27098bfd843e7 = function(arg0, arg1) {
|
|
4917
|
+
const ret = arg1.name;
|
|
4918
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4919
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4920
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4921
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4922
|
+
};
|
|
4711
4923
|
imports.wbg.__wbg_navigator_0a9bf1120e24fec2 = function(arg0) {
|
|
4712
4924
|
const ret = arg0.navigator;
|
|
4713
4925
|
return ret;
|
|
@@ -4727,7 +4939,7 @@ function __wbg_get_imports() {
|
|
|
4727
4939
|
const a = state0.a;
|
|
4728
4940
|
state0.a = 0;
|
|
4729
4941
|
try {
|
|
4730
|
-
return
|
|
4942
|
+
return __wbg_adapter_742(a, state0.b, arg0, arg1);
|
|
4731
4943
|
} finally {
|
|
4732
4944
|
state0.a = a;
|
|
4733
4945
|
}
|
|
@@ -4834,19 +5046,19 @@ function __wbg_get_imports() {
|
|
|
4834
5046
|
const ret = arg0.now();
|
|
4835
5047
|
return ret;
|
|
4836
5048
|
};
|
|
4837
|
-
imports.wbg.
|
|
5049
|
+
imports.wbg.__wbg_onconsentupdate_4c6fac1d9f867a49 = function(arg0, arg1) {
|
|
4838
5050
|
arg0.on_consent_update(arg1);
|
|
4839
5051
|
};
|
|
4840
|
-
imports.wbg.
|
|
5052
|
+
imports.wbg.__wbg_onconversation_53ee00b78b2567f0 = function(arg0, arg1) {
|
|
4841
5053
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
4842
5054
|
};
|
|
4843
|
-
imports.wbg.
|
|
5055
|
+
imports.wbg.__wbg_onerror_f83f69679f719d45 = function(arg0, arg1) {
|
|
4844
5056
|
arg0.on_error(arg1);
|
|
4845
5057
|
};
|
|
4846
|
-
imports.wbg.
|
|
5058
|
+
imports.wbg.__wbg_onmessage_9af0c0b07630e1bb = function(arg0, arg1) {
|
|
4847
5059
|
arg0.on_message(Message.__wrap(arg1));
|
|
4848
5060
|
};
|
|
4849
|
-
imports.wbg.
|
|
5061
|
+
imports.wbg.__wbg_onuserpreferenceupdate_0a3e44916ebf35a2 = function(arg0, arg1, arg2) {
|
|
4850
5062
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
4851
5063
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
4852
5064
|
arg0.on_user_preference_update(v0);
|
|
@@ -4938,10 +5150,18 @@ function __wbg_get_imports() {
|
|
|
4938
5150
|
const ret = setInterval(arg0, arg1);
|
|
4939
5151
|
return ret;
|
|
4940
5152
|
}, arguments) };
|
|
5153
|
+
imports.wbg.__wbg_setTimeout_2e707715f8cc9497 = function(arg0, arg1) {
|
|
5154
|
+
const ret = setTimeout(arg0, arg1);
|
|
5155
|
+
return ret;
|
|
5156
|
+
};
|
|
4941
5157
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
4942
5158
|
const ret = setTimeout(arg0, arg1);
|
|
4943
5159
|
return ret;
|
|
4944
5160
|
}, arguments) };
|
|
5161
|
+
imports.wbg.__wbg_setTimeout_eefe7f4c234b0c6b = function() { return handleError(function (arg0, arg1) {
|
|
5162
|
+
const ret = setTimeout(arg0, arg1);
|
|
5163
|
+
return ret;
|
|
5164
|
+
}, arguments) };
|
|
4945
5165
|
imports.wbg.__wbg_setUint32_ad8826b8caeaf63d = function(arg0, arg1, arg2) {
|
|
4946
5166
|
arg0.setUint32(arg1 >>> 0, arg2 >>> 0);
|
|
4947
5167
|
};
|
|
@@ -5116,6 +5336,10 @@ function __wbg_get_imports() {
|
|
|
5116
5336
|
const ret = arg0;
|
|
5117
5337
|
return ret;
|
|
5118
5338
|
};
|
|
5339
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
5340
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
5341
|
+
return ret;
|
|
5342
|
+
};
|
|
5119
5343
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
5120
5344
|
const v = arg0;
|
|
5121
5345
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -5130,12 +5354,20 @@ function __wbg_get_imports() {
|
|
|
5130
5354
|
const ret = false;
|
|
5131
5355
|
return ret;
|
|
5132
5356
|
};
|
|
5133
|
-
imports.wbg.
|
|
5134
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5357
|
+
imports.wbg.__wbindgen_closure_wrapper15262 = function(arg0, arg1, arg2) {
|
|
5358
|
+
const ret = makeMutClosure(arg0, arg1, 3671, __wbg_adapter_50);
|
|
5359
|
+
return ret;
|
|
5360
|
+
};
|
|
5361
|
+
imports.wbg.__wbindgen_closure_wrapper15306 = function(arg0, arg1, arg2) {
|
|
5362
|
+
const ret = makeMutClosure(arg0, arg1, 3681, __wbg_adapter_53);
|
|
5363
|
+
return ret;
|
|
5364
|
+
};
|
|
5365
|
+
imports.wbg.__wbindgen_closure_wrapper18371 = function(arg0, arg1, arg2) {
|
|
5366
|
+
const ret = makeMutClosure(arg0, arg1, 3983, __wbg_adapter_56);
|
|
5135
5367
|
return ret;
|
|
5136
5368
|
};
|
|
5137
|
-
imports.wbg.
|
|
5138
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5369
|
+
imports.wbg.__wbindgen_closure_wrapper18491 = function(arg0, arg1, arg2) {
|
|
5370
|
+
const ret = makeMutClosure(arg0, arg1, 3997, __wbg_adapter_59);
|
|
5139
5371
|
return ret;
|
|
5140
5372
|
};
|
|
5141
5373
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|