@xmtp/wasm-bindings 1.3.1 → 1.3.2
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 +172 -167
- package/dist/bindings_wasm.js +277 -257
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +151 -150
- package/dist/version.json +3 -3
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -216,48 +216,6 @@ function debugString(val) {
|
|
|
216
216
|
return className;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
function takeFromExternrefTable0(idx) {
|
|
220
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
221
|
-
wasm.__externref_table_dealloc(idx);
|
|
222
|
-
return value;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function _assertClass(instance, klass) {
|
|
226
|
-
if (!(instance instanceof klass)) {
|
|
227
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* @param {string} host
|
|
232
|
-
* @param {string} inbox_id
|
|
233
|
-
* @param {Identifier} account_identifier
|
|
234
|
-
* @param {string | null} [db_path]
|
|
235
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
236
|
-
* @param {string | null} [device_sync_server_url]
|
|
237
|
-
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
238
|
-
* @param {LogOptions | null} [log_options]
|
|
239
|
-
* @param {boolean | null} [allow_offline]
|
|
240
|
-
* @param {boolean | null} [disable_events]
|
|
241
|
-
* @returns {Promise<Client>}
|
|
242
|
-
*/
|
|
243
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline, disable_events) {
|
|
244
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
-
const len0 = WASM_VECTOR_LEN;
|
|
246
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
-
const len1 = WASM_VECTOR_LEN;
|
|
248
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
-
var len2 = WASM_VECTOR_LEN;
|
|
250
|
-
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
-
var len3 = WASM_VECTOR_LEN;
|
|
252
|
-
let ptr4 = 0;
|
|
253
|
-
if (!isLikeNone(log_options)) {
|
|
254
|
-
_assertClass(log_options, LogOptions);
|
|
255
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
256
|
-
}
|
|
257
|
-
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, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0);
|
|
258
|
-
return ret;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
219
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
262
220
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
263
221
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -268,38 +226,17 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
268
226
|
return ptr;
|
|
269
227
|
}
|
|
270
228
|
|
|
271
|
-
function
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
return ptr;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
279
|
-
* @returns {Uint8Array}
|
|
280
|
-
*/
|
|
281
|
-
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
282
|
-
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
283
|
-
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
284
|
-
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
285
|
-
if (ret[2]) {
|
|
286
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
287
|
-
}
|
|
288
|
-
return takeFromExternrefTable0(ret[0]);
|
|
229
|
+
function takeFromExternrefTable0(idx) {
|
|
230
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
231
|
+
wasm.__externref_table_dealloc(idx);
|
|
232
|
+
return value;
|
|
289
233
|
}
|
|
290
234
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
*/
|
|
295
|
-
export function decodeMultiRemoteAttachment(bytes) {
|
|
296
|
-
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
297
|
-
if (ret[2]) {
|
|
298
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
235
|
+
function _assertClass(instance, klass) {
|
|
236
|
+
if (!(instance instanceof klass)) {
|
|
237
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
299
238
|
}
|
|
300
|
-
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
301
239
|
}
|
|
302
|
-
|
|
303
240
|
/**
|
|
304
241
|
* @param {Reaction} reaction
|
|
305
242
|
* @returns {Uint8Array}
|
|
@@ -326,6 +263,12 @@ export function decodeReaction(bytes) {
|
|
|
326
263
|
return Reaction.__wrap(ret[0]);
|
|
327
264
|
}
|
|
328
265
|
|
|
266
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
267
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
268
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
269
|
+
WASM_VECTOR_LEN = arg.length;
|
|
270
|
+
return ptr;
|
|
271
|
+
}
|
|
329
272
|
/**
|
|
330
273
|
* @param {string} host
|
|
331
274
|
* @param {Identifier} accountIdentifier
|
|
@@ -420,20 +363,88 @@ export function applySignatureRequest(host, signature_request) {
|
|
|
420
363
|
return ret;
|
|
421
364
|
}
|
|
422
365
|
|
|
423
|
-
|
|
424
|
-
|
|
366
|
+
/**
|
|
367
|
+
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
368
|
+
* @returns {Uint8Array}
|
|
369
|
+
*/
|
|
370
|
+
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
371
|
+
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
372
|
+
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
373
|
+
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
374
|
+
if (ret[2]) {
|
|
375
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
376
|
+
}
|
|
377
|
+
return takeFromExternrefTable0(ret[0]);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @param {Uint8Array} bytes
|
|
382
|
+
* @returns {MultiRemoteAttachment}
|
|
383
|
+
*/
|
|
384
|
+
export function decodeMultiRemoteAttachment(bytes) {
|
|
385
|
+
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
386
|
+
if (ret[2]) {
|
|
387
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
388
|
+
}
|
|
389
|
+
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @param {string} host
|
|
394
|
+
* @param {string} inbox_id
|
|
395
|
+
* @param {Identifier} account_identifier
|
|
396
|
+
* @param {string | null} [db_path]
|
|
397
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
398
|
+
* @param {string | null} [device_sync_server_url]
|
|
399
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
400
|
+
* @param {LogOptions | null} [log_options]
|
|
401
|
+
* @param {boolean | null} [allow_offline]
|
|
402
|
+
* @param {boolean | null} [disable_events]
|
|
403
|
+
* @returns {Promise<Client>}
|
|
404
|
+
*/
|
|
405
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline, disable_events) {
|
|
406
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len0 = WASM_VECTOR_LEN;
|
|
408
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
409
|
+
const len1 = WASM_VECTOR_LEN;
|
|
410
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
411
|
+
var len2 = WASM_VECTOR_LEN;
|
|
412
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
var len3 = WASM_VECTOR_LEN;
|
|
414
|
+
let ptr4 = 0;
|
|
415
|
+
if (!isLikeNone(log_options)) {
|
|
416
|
+
_assertClass(log_options, LogOptions);
|
|
417
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
418
|
+
}
|
|
419
|
+
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, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0);
|
|
420
|
+
return ret;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Entry point invoked by JavaScript in a worker.
|
|
425
|
+
* @param {number} ptr
|
|
426
|
+
*/
|
|
427
|
+
export function task_worker_entry_point(ptr) {
|
|
428
|
+
const ret = wasm.task_worker_entry_point(ptr);
|
|
429
|
+
if (ret[1]) {
|
|
430
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
431
|
+
}
|
|
425
432
|
}
|
|
426
433
|
|
|
427
|
-
function
|
|
428
|
-
wasm.
|
|
434
|
+
function __wbg_adapter_50(arg0, arg1) {
|
|
435
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h42782d8d6f6b94ef(arg0, arg1);
|
|
429
436
|
}
|
|
430
437
|
|
|
431
|
-
function
|
|
438
|
+
function __wbg_adapter_53(arg0, arg1) {
|
|
432
439
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h912129f7a2cf8b7b(arg0, arg1);
|
|
433
440
|
}
|
|
434
441
|
|
|
435
|
-
function
|
|
436
|
-
wasm.
|
|
442
|
+
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
443
|
+
wasm.closure5017_externref_shim(arg0, arg1, arg2);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function __wbg_adapter_787(arg0, arg1, arg2, arg3) {
|
|
447
|
+
wasm.closure5960_externref_shim(arg0, arg1, arg2, arg3);
|
|
437
448
|
}
|
|
438
449
|
|
|
439
450
|
/**
|
|
@@ -736,150 +747,6 @@ export class Client {
|
|
|
736
747
|
const ptr = this.__destroy_into_raw();
|
|
737
748
|
wasm.__wbg_client_free(ptr, 0);
|
|
738
749
|
}
|
|
739
|
-
/**
|
|
740
|
-
* @returns {Identifier}
|
|
741
|
-
*/
|
|
742
|
-
get accountIdentifier() {
|
|
743
|
-
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
744
|
-
return ret;
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* @returns {string}
|
|
748
|
-
*/
|
|
749
|
-
get inboxId() {
|
|
750
|
-
let deferred1_0;
|
|
751
|
-
let deferred1_1;
|
|
752
|
-
try {
|
|
753
|
-
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
754
|
-
deferred1_0 = ret[0];
|
|
755
|
-
deferred1_1 = ret[1];
|
|
756
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
757
|
-
} finally {
|
|
758
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* @returns {boolean}
|
|
763
|
-
*/
|
|
764
|
-
get isRegistered() {
|
|
765
|
-
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
766
|
-
return ret !== 0;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* @returns {string}
|
|
770
|
-
*/
|
|
771
|
-
get installationId() {
|
|
772
|
-
let deferred1_0;
|
|
773
|
-
let deferred1_1;
|
|
774
|
-
try {
|
|
775
|
-
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
776
|
-
deferred1_0 = ret[0];
|
|
777
|
-
deferred1_1 = ret[1];
|
|
778
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
779
|
-
} finally {
|
|
780
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
/**
|
|
784
|
-
* @returns {Uint8Array}
|
|
785
|
-
*/
|
|
786
|
-
get installationIdBytes() {
|
|
787
|
-
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
788
|
-
return ret;
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* Output booleans should be zipped with the index of input identifiers
|
|
792
|
-
* @param {Identifier[]} account_identifiers
|
|
793
|
-
* @returns {Promise<any>}
|
|
794
|
-
*/
|
|
795
|
-
canMessage(account_identifiers) {
|
|
796
|
-
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
797
|
-
const len0 = WASM_VECTOR_LEN;
|
|
798
|
-
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
799
|
-
return ret;
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* @returns {Promise<void>}
|
|
803
|
-
*/
|
|
804
|
-
sendSyncRequest() {
|
|
805
|
-
const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
|
|
806
|
-
return ret;
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* @param {Identifier} identifier
|
|
810
|
-
* @returns {Promise<string | undefined>}
|
|
811
|
-
*/
|
|
812
|
-
findInboxIdByIdentifier(identifier) {
|
|
813
|
-
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
814
|
-
return ret;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* @param {string[]} inbox_ids
|
|
818
|
-
* @param {boolean} refresh_from_network
|
|
819
|
-
* @returns {Promise<InboxState[]>}
|
|
820
|
-
*/
|
|
821
|
-
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
822
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
823
|
-
const len0 = WASM_VECTOR_LEN;
|
|
824
|
-
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
825
|
-
return ret;
|
|
826
|
-
}
|
|
827
|
-
/**
|
|
828
|
-
* @returns {Conversations}
|
|
829
|
-
*/
|
|
830
|
-
conversations() {
|
|
831
|
-
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
832
|
-
return Conversations.__wrap(ret);
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* @returns {Promise<number>}
|
|
836
|
-
*/
|
|
837
|
-
syncPreferences() {
|
|
838
|
-
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
839
|
-
return ret;
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* @returns {ApiStats}
|
|
843
|
-
*/
|
|
844
|
-
apiStatistics() {
|
|
845
|
-
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
846
|
-
return ApiStats.__wrap(ret);
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* @returns {IdentityStats}
|
|
850
|
-
*/
|
|
851
|
-
apiIdentityStatistics() {
|
|
852
|
-
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
853
|
-
return IdentityStats.__wrap(ret);
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
* @returns {string}
|
|
857
|
-
*/
|
|
858
|
-
apiAggregateStatistics() {
|
|
859
|
-
let deferred1_0;
|
|
860
|
-
let deferred1_1;
|
|
861
|
-
try {
|
|
862
|
-
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
863
|
-
deferred1_0 = ret[0];
|
|
864
|
-
deferred1_1 = ret[1];
|
|
865
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
866
|
-
} finally {
|
|
867
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
clearAllStatistics() {
|
|
871
|
-
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
872
|
-
}
|
|
873
|
-
/**
|
|
874
|
-
* @param {string} server_url
|
|
875
|
-
* @returns {Promise<string>}
|
|
876
|
-
*/
|
|
877
|
-
uploadDebugArchive(server_url) {
|
|
878
|
-
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
879
|
-
const len0 = WASM_VECTOR_LEN;
|
|
880
|
-
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
881
|
-
return ret;
|
|
882
|
-
}
|
|
883
750
|
/**
|
|
884
751
|
* @param {Consent[]} records
|
|
885
752
|
* @returns {Promise<void>}
|
|
@@ -1035,6 +902,150 @@ export class Client {
|
|
|
1035
902
|
throw takeFromExternrefTable0(ret[0]);
|
|
1036
903
|
}
|
|
1037
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* @returns {Identifier}
|
|
907
|
+
*/
|
|
908
|
+
get accountIdentifier() {
|
|
909
|
+
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
910
|
+
return ret;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* @returns {string}
|
|
914
|
+
*/
|
|
915
|
+
get inboxId() {
|
|
916
|
+
let deferred1_0;
|
|
917
|
+
let deferred1_1;
|
|
918
|
+
try {
|
|
919
|
+
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
920
|
+
deferred1_0 = ret[0];
|
|
921
|
+
deferred1_1 = ret[1];
|
|
922
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
923
|
+
} finally {
|
|
924
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* @returns {boolean}
|
|
929
|
+
*/
|
|
930
|
+
get isRegistered() {
|
|
931
|
+
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
932
|
+
return ret !== 0;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* @returns {string}
|
|
936
|
+
*/
|
|
937
|
+
get installationId() {
|
|
938
|
+
let deferred1_0;
|
|
939
|
+
let deferred1_1;
|
|
940
|
+
try {
|
|
941
|
+
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
942
|
+
deferred1_0 = ret[0];
|
|
943
|
+
deferred1_1 = ret[1];
|
|
944
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
945
|
+
} finally {
|
|
946
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* @returns {Uint8Array}
|
|
951
|
+
*/
|
|
952
|
+
get installationIdBytes() {
|
|
953
|
+
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
954
|
+
return ret;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Output booleans should be zipped with the index of input identifiers
|
|
958
|
+
* @param {Identifier[]} account_identifiers
|
|
959
|
+
* @returns {Promise<any>}
|
|
960
|
+
*/
|
|
961
|
+
canMessage(account_identifiers) {
|
|
962
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
963
|
+
const len0 = WASM_VECTOR_LEN;
|
|
964
|
+
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
965
|
+
return ret;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* @returns {Promise<void>}
|
|
969
|
+
*/
|
|
970
|
+
sendSyncRequest() {
|
|
971
|
+
const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
|
|
972
|
+
return ret;
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* @param {Identifier} identifier
|
|
976
|
+
* @returns {Promise<string | undefined>}
|
|
977
|
+
*/
|
|
978
|
+
findInboxIdByIdentifier(identifier) {
|
|
979
|
+
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
980
|
+
return ret;
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* @param {string[]} inbox_ids
|
|
984
|
+
* @param {boolean} refresh_from_network
|
|
985
|
+
* @returns {Promise<InboxState[]>}
|
|
986
|
+
*/
|
|
987
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
988
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
989
|
+
const len0 = WASM_VECTOR_LEN;
|
|
990
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
991
|
+
return ret;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* @returns {Conversations}
|
|
995
|
+
*/
|
|
996
|
+
conversations() {
|
|
997
|
+
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
998
|
+
return Conversations.__wrap(ret);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* @returns {Promise<number>}
|
|
1002
|
+
*/
|
|
1003
|
+
syncPreferences() {
|
|
1004
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
1005
|
+
return ret;
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* @returns {ApiStats}
|
|
1009
|
+
*/
|
|
1010
|
+
apiStatistics() {
|
|
1011
|
+
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
1012
|
+
return ApiStats.__wrap(ret);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* @returns {IdentityStats}
|
|
1016
|
+
*/
|
|
1017
|
+
apiIdentityStatistics() {
|
|
1018
|
+
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
1019
|
+
return IdentityStats.__wrap(ret);
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* @returns {string}
|
|
1023
|
+
*/
|
|
1024
|
+
apiAggregateStatistics() {
|
|
1025
|
+
let deferred1_0;
|
|
1026
|
+
let deferred1_1;
|
|
1027
|
+
try {
|
|
1028
|
+
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
1029
|
+
deferred1_0 = ret[0];
|
|
1030
|
+
deferred1_1 = ret[1];
|
|
1031
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1032
|
+
} finally {
|
|
1033
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
clearAllStatistics() {
|
|
1037
|
+
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* @param {string} server_url
|
|
1041
|
+
* @returns {Promise<string>}
|
|
1042
|
+
*/
|
|
1043
|
+
uploadDebugArchive(server_url) {
|
|
1044
|
+
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1045
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1046
|
+
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
1047
|
+
return ret;
|
|
1048
|
+
}
|
|
1038
1049
|
}
|
|
1039
1050
|
|
|
1040
1051
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1171,7 +1182,7 @@ export class ContentTypeId {
|
|
|
1171
1182
|
set authorityId(arg0) {
|
|
1172
1183
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1173
1184
|
const len0 = WASM_VECTOR_LEN;
|
|
1174
|
-
wasm.
|
|
1185
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
1175
1186
|
}
|
|
1176
1187
|
/**
|
|
1177
1188
|
* @returns {string}
|
|
@@ -1801,14 +1812,14 @@ export class ConversationDebugInfo {
|
|
|
1801
1812
|
* @returns {bigint}
|
|
1802
1813
|
*/
|
|
1803
1814
|
get epoch() {
|
|
1804
|
-
const ret = wasm.
|
|
1815
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
1805
1816
|
return BigInt.asUintN(64, ret);
|
|
1806
1817
|
}
|
|
1807
1818
|
/**
|
|
1808
1819
|
* @param {bigint} arg0
|
|
1809
1820
|
*/
|
|
1810
1821
|
set epoch(arg0) {
|
|
1811
|
-
wasm.
|
|
1822
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
1812
1823
|
}
|
|
1813
1824
|
/**
|
|
1814
1825
|
* @returns {boolean}
|
|
@@ -1873,14 +1884,14 @@ export class ConversationDebugInfo {
|
|
|
1873
1884
|
* @returns {bigint}
|
|
1874
1885
|
*/
|
|
1875
1886
|
get cursor() {
|
|
1876
|
-
const ret = wasm.
|
|
1887
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
|
|
1877
1888
|
return ret;
|
|
1878
1889
|
}
|
|
1879
1890
|
/**
|
|
1880
1891
|
* @param {bigint} arg0
|
|
1881
1892
|
*/
|
|
1882
1893
|
set cursor(arg0) {
|
|
1883
|
-
wasm.
|
|
1894
|
+
wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, arg0);
|
|
1884
1895
|
}
|
|
1885
1896
|
}
|
|
1886
1897
|
|
|
@@ -2577,7 +2588,7 @@ export class GroupMember {
|
|
|
2577
2588
|
set inboxId(arg0) {
|
|
2578
2589
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2579
2590
|
const len0 = WASM_VECTOR_LEN;
|
|
2580
|
-
wasm.
|
|
2591
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2581
2592
|
}
|
|
2582
2593
|
/**
|
|
2583
2594
|
* @returns {Identifier[]}
|
|
@@ -2802,14 +2813,14 @@ export class HmacKey {
|
|
|
2802
2813
|
* @returns {bigint}
|
|
2803
2814
|
*/
|
|
2804
2815
|
get epoch() {
|
|
2805
|
-
const ret = wasm.
|
|
2816
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
2806
2817
|
return ret;
|
|
2807
2818
|
}
|
|
2808
2819
|
/**
|
|
2809
2820
|
* @param {bigint} arg0
|
|
2810
2821
|
*/
|
|
2811
2822
|
set epoch(arg0) {
|
|
2812
|
-
wasm.
|
|
2823
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
2813
2824
|
}
|
|
2814
2825
|
}
|
|
2815
2826
|
|
|
@@ -2938,7 +2949,7 @@ export class InboxState {
|
|
|
2938
2949
|
set inboxId(arg0) {
|
|
2939
2950
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2940
2951
|
const len0 = WASM_VECTOR_LEN;
|
|
2941
|
-
wasm.
|
|
2952
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2942
2953
|
}
|
|
2943
2954
|
/**
|
|
2944
2955
|
* @returns {Identifier}
|
|
@@ -3258,7 +3269,7 @@ export class KeyPackageStatus {
|
|
|
3258
3269
|
* @returns {Lifetime | undefined}
|
|
3259
3270
|
*/
|
|
3260
3271
|
get lifetime() {
|
|
3261
|
-
const ret = wasm.
|
|
3272
|
+
const ret = wasm.__wbg_get_createdmoptions_messageDisappearingSettings(this.__wbg_ptr);
|
|
3262
3273
|
return ret === 0 ? undefined : Lifetime.__wrap(ret);
|
|
3263
3274
|
}
|
|
3264
3275
|
/**
|
|
@@ -3323,27 +3334,27 @@ export class Lifetime {
|
|
|
3323
3334
|
* @returns {bigint}
|
|
3324
3335
|
*/
|
|
3325
3336
|
get not_before() {
|
|
3326
|
-
const ret = wasm.
|
|
3337
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
3327
3338
|
return BigInt.asUintN(64, ret);
|
|
3328
3339
|
}
|
|
3329
3340
|
/**
|
|
3330
3341
|
* @param {bigint} arg0
|
|
3331
3342
|
*/
|
|
3332
3343
|
set not_before(arg0) {
|
|
3333
|
-
wasm.
|
|
3344
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
3334
3345
|
}
|
|
3335
3346
|
/**
|
|
3336
3347
|
* @returns {bigint}
|
|
3337
3348
|
*/
|
|
3338
3349
|
get not_after() {
|
|
3339
|
-
const ret = wasm.
|
|
3350
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
|
|
3340
3351
|
return BigInt.asUintN(64, ret);
|
|
3341
3352
|
}
|
|
3342
3353
|
/**
|
|
3343
3354
|
* @param {bigint} arg0
|
|
3344
3355
|
*/
|
|
3345
3356
|
set not_after(arg0) {
|
|
3346
|
-
wasm.
|
|
3357
|
+
wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, arg0);
|
|
3347
3358
|
}
|
|
3348
3359
|
}
|
|
3349
3360
|
|
|
@@ -3737,14 +3748,14 @@ export class Message {
|
|
|
3737
3748
|
* @returns {bigint}
|
|
3738
3749
|
*/
|
|
3739
3750
|
get sentAtNs() {
|
|
3740
|
-
const ret = wasm.
|
|
3751
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
3741
3752
|
return ret;
|
|
3742
3753
|
}
|
|
3743
3754
|
/**
|
|
3744
3755
|
* @param {bigint} arg0
|
|
3745
3756
|
*/
|
|
3746
3757
|
set sentAtNs(arg0) {
|
|
3747
|
-
wasm.
|
|
3758
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
3748
3759
|
}
|
|
3749
3760
|
/**
|
|
3750
3761
|
* @returns {string}
|
|
@@ -3887,27 +3898,27 @@ export class MessageDisappearingSettings {
|
|
|
3887
3898
|
* @returns {bigint}
|
|
3888
3899
|
*/
|
|
3889
3900
|
get fromNs() {
|
|
3890
|
-
const ret = wasm.
|
|
3901
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
3891
3902
|
return ret;
|
|
3892
3903
|
}
|
|
3893
3904
|
/**
|
|
3894
3905
|
* @param {bigint} arg0
|
|
3895
3906
|
*/
|
|
3896
3907
|
set fromNs(arg0) {
|
|
3897
|
-
wasm.
|
|
3908
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
3898
3909
|
}
|
|
3899
3910
|
/**
|
|
3900
3911
|
* @returns {bigint}
|
|
3901
3912
|
*/
|
|
3902
3913
|
get inNs() {
|
|
3903
|
-
const ret = wasm.
|
|
3914
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
|
|
3904
3915
|
return ret;
|
|
3905
3916
|
}
|
|
3906
3917
|
/**
|
|
3907
3918
|
* @param {bigint} arg0
|
|
3908
3919
|
*/
|
|
3909
3920
|
set inNs(arg0) {
|
|
3910
|
-
wasm.
|
|
3921
|
+
wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, arg0);
|
|
3911
3922
|
}
|
|
3912
3923
|
/**
|
|
3913
3924
|
* @param {bigint} from_ns
|
|
@@ -4389,7 +4400,7 @@ export class Reaction {
|
|
|
4389
4400
|
set reference(arg0) {
|
|
4390
4401
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4391
4402
|
const len0 = WASM_VECTOR_LEN;
|
|
4392
|
-
wasm.
|
|
4403
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4393
4404
|
}
|
|
4394
4405
|
/**
|
|
4395
4406
|
* @returns {string}
|
|
@@ -4412,7 +4423,7 @@ export class Reaction {
|
|
|
4412
4423
|
set referenceInboxId(arg0) {
|
|
4413
4424
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4414
4425
|
const len0 = WASM_VECTOR_LEN;
|
|
4415
|
-
wasm.
|
|
4426
|
+
wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
|
|
4416
4427
|
}
|
|
4417
4428
|
/**
|
|
4418
4429
|
* @returns {ReactionAction}
|
|
@@ -4609,7 +4620,7 @@ export class RemoteAttachmentInfo {
|
|
|
4609
4620
|
set url(arg0) {
|
|
4610
4621
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4611
4622
|
const len0 = WASM_VECTOR_LEN;
|
|
4612
|
-
wasm.
|
|
4623
|
+
wasm.__wbg_set_remoteattachmentinfo_url(this.__wbg_ptr, ptr0, len0);
|
|
4613
4624
|
}
|
|
4614
4625
|
/**
|
|
4615
4626
|
* @returns {Uint8Array}
|
|
@@ -5008,6 +5019,9 @@ function __wbg_get_imports() {
|
|
|
5008
5019
|
imports.wbg.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
|
|
5009
5020
|
console.error(arg0, arg1, arg2, arg3);
|
|
5010
5021
|
};
|
|
5022
|
+
imports.wbg.__wbg_error_e98c298703cffa97 = function(arg0, arg1) {
|
|
5023
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
5024
|
+
};
|
|
5011
5025
|
imports.wbg.__wbg_fetch_43e69ddf509149f8 = function(arg0) {
|
|
5012
5026
|
const ret = fetch(arg0);
|
|
5013
5027
|
return ret;
|
|
@@ -5303,7 +5317,7 @@ function __wbg_get_imports() {
|
|
|
5303
5317
|
const a = state0.a;
|
|
5304
5318
|
state0.a = 0;
|
|
5305
5319
|
try {
|
|
5306
|
-
return
|
|
5320
|
+
return __wbg_adapter_787(a, state0.b, arg0, arg1);
|
|
5307
5321
|
} finally {
|
|
5308
5322
|
state0.a = a;
|
|
5309
5323
|
}
|
|
@@ -5415,22 +5429,22 @@ function __wbg_get_imports() {
|
|
|
5415
5429
|
const ret = arg0.now();
|
|
5416
5430
|
return ret;
|
|
5417
5431
|
};
|
|
5418
|
-
imports.wbg.
|
|
5432
|
+
imports.wbg.__wbg_onclose_062bd3a6cae3cf8f = function(arg0) {
|
|
5419
5433
|
arg0.on_close();
|
|
5420
5434
|
};
|
|
5421
|
-
imports.wbg.
|
|
5435
|
+
imports.wbg.__wbg_onconsentupdate_701b96066499a018 = function(arg0, arg1) {
|
|
5422
5436
|
arg0.on_consent_update(arg1);
|
|
5423
5437
|
};
|
|
5424
|
-
imports.wbg.
|
|
5438
|
+
imports.wbg.__wbg_onconversation_fcbaacc0885798c6 = function(arg0, arg1) {
|
|
5425
5439
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
5426
5440
|
};
|
|
5427
|
-
imports.wbg.
|
|
5441
|
+
imports.wbg.__wbg_onerror_822cbf1c3e630713 = function(arg0, arg1) {
|
|
5428
5442
|
arg0.on_error(arg1);
|
|
5429
5443
|
};
|
|
5430
|
-
imports.wbg.
|
|
5444
|
+
imports.wbg.__wbg_onmessage_d8c556344cbe2d24 = function(arg0, arg1) {
|
|
5431
5445
|
arg0.on_message(Message.__wrap(arg1));
|
|
5432
5446
|
};
|
|
5433
|
-
imports.wbg.
|
|
5447
|
+
imports.wbg.__wbg_onuserpreferenceupdate_8e302f867edad38d = function(arg0, arg1, arg2) {
|
|
5434
5448
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
5435
5449
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
5436
5450
|
arg0.on_user_preference_update(v0);
|
|
@@ -5450,6 +5464,9 @@ function __wbg_get_imports() {
|
|
|
5450
5464
|
const ret = arg0.performance;
|
|
5451
5465
|
return ret;
|
|
5452
5466
|
};
|
|
5467
|
+
imports.wbg.__wbg_postMessage_83a8d58d3fcb6c13 = function() { return handleError(function (arg0, arg1) {
|
|
5468
|
+
arg0.postMessage(arg1);
|
|
5469
|
+
}, arguments) };
|
|
5453
5470
|
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
5454
5471
|
const ret = arg0.process;
|
|
5455
5472
|
return ret;
|
|
@@ -5514,6 +5531,9 @@ function __wbg_get_imports() {
|
|
|
5514
5531
|
const ret = setInterval(arg0, arg1);
|
|
5515
5532
|
return ret;
|
|
5516
5533
|
}, arguments) };
|
|
5534
|
+
imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
|
|
5535
|
+
globalThis.setTimeout(arg0, arg1);
|
|
5536
|
+
};
|
|
5517
5537
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
5518
5538
|
const ret = setTimeout(arg0, arg1);
|
|
5519
5539
|
return ret;
|
|
@@ -5717,16 +5737,16 @@ function __wbg_get_imports() {
|
|
|
5717
5737
|
const ret = false;
|
|
5718
5738
|
return ret;
|
|
5719
5739
|
};
|
|
5720
|
-
imports.wbg.
|
|
5721
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5740
|
+
imports.wbg.__wbindgen_closure_wrapper18880 = function(arg0, arg1, arg2) {
|
|
5741
|
+
const ret = makeMutClosure(arg0, arg1, 4661, __wbg_adapter_50);
|
|
5722
5742
|
return ret;
|
|
5723
5743
|
};
|
|
5724
|
-
imports.wbg.
|
|
5725
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5744
|
+
imports.wbg.__wbindgen_closure_wrapper21474 = function(arg0, arg1, arg2) {
|
|
5745
|
+
const ret = makeMutClosure(arg0, arg1, 4994, __wbg_adapter_53);
|
|
5726
5746
|
return ret;
|
|
5727
5747
|
};
|
|
5728
|
-
imports.wbg.
|
|
5729
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5748
|
+
imports.wbg.__wbindgen_closure_wrapper22201 = function(arg0, arg1, arg2) {
|
|
5749
|
+
const ret = makeMutClosure(arg0, arg1, 5018, __wbg_adapter_56);
|
|
5730
5750
|
return ret;
|
|
5731
5751
|
};
|
|
5732
5752
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|