@xmtp/wasm-bindings 1.5.0-rc2 → 1.6.0-dev.399ac31
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 +212 -200
- package/dist/bindings_wasm.js +406 -285
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +186 -180
- package/dist/version.json +3 -3
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -228,45 +228,6 @@ function debugString(val) {
|
|
|
228
228
|
return className;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
function _assertClass(instance, klass) {
|
|
232
|
-
if (!(instance instanceof klass)) {
|
|
233
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @param {string} host
|
|
238
|
-
* @param {string} inbox_id
|
|
239
|
-
* @param {Identifier} account_identifier
|
|
240
|
-
* @param {string | null} [db_path]
|
|
241
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
242
|
-
* @param {string | null} [device_sync_server_url]
|
|
243
|
-
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
244
|
-
* @param {LogOptions | null} [log_options]
|
|
245
|
-
* @param {boolean | null} [allow_offline]
|
|
246
|
-
* @param {boolean | null} [disable_events]
|
|
247
|
-
* @param {string | null} [app_version]
|
|
248
|
-
* @returns {Promise<Client>}
|
|
249
|
-
*/
|
|
250
|
-
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, app_version) {
|
|
251
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
254
|
-
const len1 = WASM_VECTOR_LEN;
|
|
255
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
256
|
-
var len2 = WASM_VECTOR_LEN;
|
|
257
|
-
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
258
|
-
var len3 = WASM_VECTOR_LEN;
|
|
259
|
-
let ptr4 = 0;
|
|
260
|
-
if (!isLikeNone(log_options)) {
|
|
261
|
-
_assertClass(log_options, LogOptions);
|
|
262
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
263
|
-
}
|
|
264
|
-
var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
-
var len5 = WASM_VECTOR_LEN;
|
|
266
|
-
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, ptr5, len5);
|
|
267
|
-
return ret;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
231
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
271
232
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
272
233
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -282,6 +243,12 @@ function takeFromExternrefTable0(idx) {
|
|
|
282
243
|
wasm.__externref_table_dealloc(idx);
|
|
283
244
|
return value;
|
|
284
245
|
}
|
|
246
|
+
|
|
247
|
+
function _assertClass(instance, klass) {
|
|
248
|
+
if (!(instance instanceof klass)) {
|
|
249
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
285
252
|
/**
|
|
286
253
|
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
287
254
|
* @returns {Uint8Array}
|
|
@@ -308,61 +275,38 @@ export function decodeMultiRemoteAttachment(bytes) {
|
|
|
308
275
|
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
309
276
|
}
|
|
310
277
|
|
|
311
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
312
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
313
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
314
|
-
WASM_VECTOR_LEN = arg.length;
|
|
315
|
-
return ptr;
|
|
316
|
-
}
|
|
317
278
|
/**
|
|
318
|
-
* @param {
|
|
319
|
-
* @
|
|
320
|
-
* @returns {Promise<string | undefined>}
|
|
279
|
+
* @param {Reaction} reaction
|
|
280
|
+
* @returns {Uint8Array}
|
|
321
281
|
*/
|
|
322
|
-
export function
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
const ret = wasm.
|
|
326
|
-
|
|
282
|
+
export function encodeReaction(reaction) {
|
|
283
|
+
_assertClass(reaction, Reaction);
|
|
284
|
+
var ptr0 = reaction.__destroy_into_raw();
|
|
285
|
+
const ret = wasm.encodeReaction(ptr0);
|
|
286
|
+
if (ret[2]) {
|
|
287
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
288
|
+
}
|
|
289
|
+
return takeFromExternrefTable0(ret[0]);
|
|
327
290
|
}
|
|
328
291
|
|
|
329
292
|
/**
|
|
330
|
-
* @param {
|
|
331
|
-
* @returns {
|
|
293
|
+
* @param {Uint8Array} bytes
|
|
294
|
+
* @returns {Reaction}
|
|
332
295
|
*/
|
|
333
|
-
export function
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const ret = wasm.generateInboxId(accountIdentifier);
|
|
338
|
-
var ptr1 = ret[0];
|
|
339
|
-
var len1 = ret[1];
|
|
340
|
-
if (ret[3]) {
|
|
341
|
-
ptr1 = 0; len1 = 0;
|
|
342
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
343
|
-
}
|
|
344
|
-
deferred2_0 = ptr1;
|
|
345
|
-
deferred2_1 = len1;
|
|
346
|
-
return getStringFromWasm0(ptr1, len1);
|
|
347
|
-
} finally {
|
|
348
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
296
|
+
export function decodeReaction(bytes) {
|
|
297
|
+
const ret = wasm.decodeReaction(bytes);
|
|
298
|
+
if (ret[2]) {
|
|
299
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
349
300
|
}
|
|
301
|
+
return Reaction.__wrap(ret[0]);
|
|
350
302
|
}
|
|
351
303
|
|
|
352
|
-
|
|
353
|
-
*
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
export function inboxStateFromInboxIds(host, inbox_ids) {
|
|
358
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
|
-
const len0 = WASM_VECTOR_LEN;
|
|
360
|
-
const ptr1 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
361
|
-
const len1 = WASM_VECTOR_LEN;
|
|
362
|
-
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1);
|
|
363
|
-
return ret;
|
|
304
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
305
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
306
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
307
|
+
WASM_VECTOR_LEN = arg.length;
|
|
308
|
+
return ptr;
|
|
364
309
|
}
|
|
365
|
-
|
|
366
310
|
/**
|
|
367
311
|
* @param {string} signature_text
|
|
368
312
|
* @param {Uint8Array} signature_bytes
|
|
@@ -379,59 +323,131 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
379
323
|
|
|
380
324
|
/**
|
|
381
325
|
* @param {string} host
|
|
326
|
+
* @param {string | null | undefined} payer_host
|
|
382
327
|
* @param {Identifier} recovery_identifier
|
|
383
328
|
* @param {string} inbox_id
|
|
384
329
|
* @param {Uint8Array[]} installation_ids
|
|
385
330
|
* @returns {Promise<SignatureRequestHandle>}
|
|
386
331
|
*/
|
|
387
|
-
export function revokeInstallationsSignatureRequest(host, recovery_identifier, inbox_id, installation_ids) {
|
|
332
|
+
export function revokeInstallationsSignatureRequest(host, payer_host, recovery_identifier, inbox_id, installation_ids) {
|
|
388
333
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
389
334
|
const len0 = WASM_VECTOR_LEN;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
const ptr2 =
|
|
335
|
+
var ptr1 = isLikeNone(payer_host) ? 0 : passStringToWasm0(payer_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
336
|
+
var len1 = WASM_VECTOR_LEN;
|
|
337
|
+
const ptr2 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
393
338
|
const len2 = WASM_VECTOR_LEN;
|
|
394
|
-
const
|
|
339
|
+
const ptr3 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
340
|
+
const len3 = WASM_VECTOR_LEN;
|
|
341
|
+
const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recovery_identifier, ptr2, len2, ptr3, len3);
|
|
395
342
|
return ret;
|
|
396
343
|
}
|
|
397
344
|
|
|
398
345
|
/**
|
|
399
346
|
* @param {string} host
|
|
347
|
+
* @param {string | null | undefined} payer_host
|
|
400
348
|
* @param {SignatureRequestHandle} signature_request
|
|
401
349
|
* @returns {Promise<void>}
|
|
402
350
|
*/
|
|
403
|
-
export function applySignatureRequest(host, signature_request) {
|
|
351
|
+
export function applySignatureRequest(host, payer_host, signature_request) {
|
|
404
352
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
405
353
|
const len0 = WASM_VECTOR_LEN;
|
|
354
|
+
var ptr1 = isLikeNone(payer_host) ? 0 : passStringToWasm0(payer_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
355
|
+
var len1 = WASM_VECTOR_LEN;
|
|
406
356
|
_assertClass(signature_request, SignatureRequestHandle);
|
|
407
|
-
const ret = wasm.applySignatureRequest(ptr0, len0, signature_request.__wbg_ptr);
|
|
357
|
+
const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
|
|
408
358
|
return ret;
|
|
409
359
|
}
|
|
410
360
|
|
|
411
361
|
/**
|
|
412
|
-
* @param {
|
|
413
|
-
* @
|
|
362
|
+
* @param {string} host
|
|
363
|
+
* @param {string} inbox_id
|
|
364
|
+
* @param {Identifier} account_identifier
|
|
365
|
+
* @param {string | null} [db_path]
|
|
366
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
367
|
+
* @param {string | null} [device_sync_server_url]
|
|
368
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
369
|
+
* @param {LogOptions | null} [log_options]
|
|
370
|
+
* @param {boolean | null} [allow_offline]
|
|
371
|
+
* @param {boolean | null} [disable_events]
|
|
372
|
+
* @param {string | null} [app_version]
|
|
373
|
+
* @param {string | null} [payer_host]
|
|
374
|
+
* @returns {Promise<Client>}
|
|
414
375
|
*/
|
|
415
|
-
export function
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
376
|
+
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, app_version, payer_host) {
|
|
377
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
379
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
380
|
+
const len1 = WASM_VECTOR_LEN;
|
|
381
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
382
|
+
var len2 = WASM_VECTOR_LEN;
|
|
383
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
384
|
+
var len3 = WASM_VECTOR_LEN;
|
|
385
|
+
let ptr4 = 0;
|
|
386
|
+
if (!isLikeNone(log_options)) {
|
|
387
|
+
_assertClass(log_options, LogOptions);
|
|
388
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
421
389
|
}
|
|
422
|
-
|
|
390
|
+
var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
391
|
+
var len5 = WASM_VECTOR_LEN;
|
|
392
|
+
var ptr6 = isLikeNone(payer_host) ? 0 : passStringToWasm0(payer_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
393
|
+
var len6 = WASM_VECTOR_LEN;
|
|
394
|
+
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, ptr5, len5, ptr6, len6);
|
|
395
|
+
return ret;
|
|
423
396
|
}
|
|
424
397
|
|
|
425
398
|
/**
|
|
426
|
-
* @param {
|
|
427
|
-
* @
|
|
399
|
+
* @param {string} host
|
|
400
|
+
* @param {string | null | undefined} payer_host
|
|
401
|
+
* @param {Identifier} accountIdentifier
|
|
402
|
+
* @returns {Promise<string | undefined>}
|
|
428
403
|
*/
|
|
429
|
-
export function
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
404
|
+
export function getInboxIdForIdentifier(host, payer_host, accountIdentifier) {
|
|
405
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
var ptr1 = isLikeNone(payer_host) ? 0 : passStringToWasm0(payer_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
408
|
+
var len1 = WASM_VECTOR_LEN;
|
|
409
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
|
|
410
|
+
return ret;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @param {Identifier} accountIdentifier
|
|
415
|
+
* @returns {string}
|
|
416
|
+
*/
|
|
417
|
+
export function generateInboxId(accountIdentifier) {
|
|
418
|
+
let deferred2_0;
|
|
419
|
+
let deferred2_1;
|
|
420
|
+
try {
|
|
421
|
+
const ret = wasm.generateInboxId(accountIdentifier);
|
|
422
|
+
var ptr1 = ret[0];
|
|
423
|
+
var len1 = ret[1];
|
|
424
|
+
if (ret[3]) {
|
|
425
|
+
ptr1 = 0; len1 = 0;
|
|
426
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
427
|
+
}
|
|
428
|
+
deferred2_0 = ptr1;
|
|
429
|
+
deferred2_1 = len1;
|
|
430
|
+
return getStringFromWasm0(ptr1, len1);
|
|
431
|
+
} finally {
|
|
432
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
433
433
|
}
|
|
434
|
-
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @param {string} host
|
|
438
|
+
* @param {string | null | undefined} payer_host
|
|
439
|
+
* @param {string[]} inbox_ids
|
|
440
|
+
* @returns {Promise<InboxState[]>}
|
|
441
|
+
*/
|
|
442
|
+
export function inboxStateFromInboxIds(host, payer_host, inbox_ids) {
|
|
443
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
444
|
+
const len0 = WASM_VECTOR_LEN;
|
|
445
|
+
var ptr1 = isLikeNone(payer_host) ? 0 : passStringToWasm0(payer_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
446
|
+
var len1 = WASM_VECTOR_LEN;
|
|
447
|
+
const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
448
|
+
const len2 = WASM_VECTOR_LEN;
|
|
449
|
+
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
450
|
+
return ret;
|
|
435
451
|
}
|
|
436
452
|
|
|
437
453
|
/**
|
|
@@ -446,19 +462,23 @@ export function task_worker_entry_point(ptr) {
|
|
|
446
462
|
}
|
|
447
463
|
|
|
448
464
|
function __wbg_adapter_48(arg0, arg1) {
|
|
449
|
-
wasm.
|
|
465
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hf1da1e5ad7398b09(arg0, arg1);
|
|
450
466
|
}
|
|
451
467
|
|
|
452
468
|
function __wbg_adapter_51(arg0, arg1) {
|
|
469
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h7637509b4f7e8710(arg0, arg1);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function __wbg_adapter_54(arg0, arg1) {
|
|
453
473
|
wasm.wasm_bindgen__convert__closures_____invoke__hfa5440517c90e88d(arg0, arg1);
|
|
454
474
|
}
|
|
455
475
|
|
|
456
|
-
function
|
|
457
|
-
wasm.
|
|
476
|
+
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
477
|
+
wasm.closure5647_externref_shim(arg0, arg1, arg2);
|
|
458
478
|
}
|
|
459
479
|
|
|
460
|
-
function
|
|
461
|
-
wasm.
|
|
480
|
+
function __wbg_adapter_818(arg0, arg1, arg2, arg3) {
|
|
481
|
+
wasm.closure6618_externref_shim(arg0, arg1, arg2, arg3);
|
|
462
482
|
}
|
|
463
483
|
|
|
464
484
|
/**
|
|
@@ -602,12 +622,16 @@ const __wbindgen_enum_LogLevel = ["off", "error", "warn", "info", "debug", "trac
|
|
|
602
622
|
|
|
603
623
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
604
624
|
|
|
625
|
+
const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
|
|
626
|
+
|
|
605
627
|
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
606
628
|
|
|
607
629
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
608
630
|
|
|
609
631
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
610
632
|
|
|
633
|
+
const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
|
|
634
|
+
|
|
611
635
|
const ApiStatsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
612
636
|
? { register: () => {}, unregister: () => {} }
|
|
613
637
|
: new FinalizationRegistry(ptr => wasm.__wbg_apistats_free(ptr >>> 0, 1));
|
|
@@ -752,17 +776,133 @@ export class Client {
|
|
|
752
776
|
ClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
753
777
|
return obj;
|
|
754
778
|
}
|
|
755
|
-
|
|
756
|
-
__destroy_into_raw() {
|
|
757
|
-
const ptr = this.__wbg_ptr;
|
|
758
|
-
this.__wbg_ptr = 0;
|
|
759
|
-
ClientFinalization.unregister(this);
|
|
760
|
-
return ptr;
|
|
779
|
+
|
|
780
|
+
__destroy_into_raw() {
|
|
781
|
+
const ptr = this.__wbg_ptr;
|
|
782
|
+
this.__wbg_ptr = 0;
|
|
783
|
+
ClientFinalization.unregister(this);
|
|
784
|
+
return ptr;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
free() {
|
|
788
|
+
const ptr = this.__destroy_into_raw();
|
|
789
|
+
wasm.__wbg_client_free(ptr, 0);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* @param {Consent[]} records
|
|
793
|
+
* @returns {Promise<void>}
|
|
794
|
+
*/
|
|
795
|
+
setConsentStates(records) {
|
|
796
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
797
|
+
const len0 = WASM_VECTOR_LEN;
|
|
798
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
799
|
+
return ret;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* @param {ConsentEntityType} entity_type
|
|
803
|
+
* @param {string} entity
|
|
804
|
+
* @returns {Promise<ConsentState>}
|
|
805
|
+
*/
|
|
806
|
+
getConsentState(entity_type, entity) {
|
|
807
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
808
|
+
const len0 = WASM_VECTOR_LEN;
|
|
809
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
810
|
+
return ret;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* @returns {SignatureRequestHandle | undefined}
|
|
814
|
+
*/
|
|
815
|
+
createInboxSignatureRequest() {
|
|
816
|
+
const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
|
|
817
|
+
if (ret[2]) {
|
|
818
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
819
|
+
}
|
|
820
|
+
return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* @param {Identifier} new_identifier
|
|
824
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
825
|
+
*/
|
|
826
|
+
addWalletSignatureRequest(new_identifier) {
|
|
827
|
+
const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
|
|
828
|
+
return ret;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* @param {Identifier} identifier
|
|
832
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
833
|
+
*/
|
|
834
|
+
revokeWalletSignatureRequest(identifier) {
|
|
835
|
+
const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
|
|
836
|
+
return ret;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
840
|
+
*/
|
|
841
|
+
revokeAllOtherInstallationsSignatureRequest() {
|
|
842
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
|
|
843
|
+
return ret;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* @param {Uint8Array[]} installation_ids
|
|
847
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
848
|
+
*/
|
|
849
|
+
revokeInstallationsSignatureRequest(installation_ids) {
|
|
850
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
851
|
+
const len0 = WASM_VECTOR_LEN;
|
|
852
|
+
const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
|
|
853
|
+
return ret;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* @param {Identifier} new_recovery_identifier
|
|
857
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
858
|
+
*/
|
|
859
|
+
changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
|
|
860
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
|
|
861
|
+
return ret;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* @param {SignatureRequestHandle} signature_request
|
|
865
|
+
* @returns {Promise<void>}
|
|
866
|
+
*/
|
|
867
|
+
applySignatureRequest(signature_request) {
|
|
868
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
869
|
+
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
870
|
+
return ret;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* @param {SignatureRequestHandle} signature_request
|
|
874
|
+
* @returns {Promise<void>}
|
|
875
|
+
*/
|
|
876
|
+
registerIdentity(signature_request) {
|
|
877
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
878
|
+
var ptr0 = signature_request.__destroy_into_raw();
|
|
879
|
+
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
880
|
+
return ret;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* @param {string} signature_text
|
|
884
|
+
* @returns {Uint8Array}
|
|
885
|
+
*/
|
|
886
|
+
signWithInstallationKey(signature_text) {
|
|
887
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
888
|
+
const len0 = WASM_VECTOR_LEN;
|
|
889
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
890
|
+
if (ret[2]) {
|
|
891
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
892
|
+
}
|
|
893
|
+
return takeFromExternrefTable0(ret[0]);
|
|
761
894
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
895
|
+
/**
|
|
896
|
+
* @param {string} signature_text
|
|
897
|
+
* @param {Uint8Array} signature_bytes
|
|
898
|
+
*/
|
|
899
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
900
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
901
|
+
const len0 = WASM_VECTOR_LEN;
|
|
902
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
903
|
+
if (ret[1]) {
|
|
904
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
905
|
+
}
|
|
766
906
|
}
|
|
767
907
|
/**
|
|
768
908
|
* @returns {Identifier}
|
|
@@ -938,27 +1078,6 @@ export class Client {
|
|
|
938
1078
|
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
939
1079
|
return ret;
|
|
940
1080
|
}
|
|
941
|
-
/**
|
|
942
|
-
* @param {Consent[]} records
|
|
943
|
-
* @returns {Promise<void>}
|
|
944
|
-
*/
|
|
945
|
-
setConsentStates(records) {
|
|
946
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
947
|
-
const len0 = WASM_VECTOR_LEN;
|
|
948
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
949
|
-
return ret;
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* @param {ConsentEntityType} entity_type
|
|
953
|
-
* @param {string} entity
|
|
954
|
-
* @returns {Promise<ConsentState>}
|
|
955
|
-
*/
|
|
956
|
-
getConsentState(entity_type, entity) {
|
|
957
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
958
|
-
const len0 = WASM_VECTOR_LEN;
|
|
959
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
960
|
-
return ret;
|
|
961
|
-
}
|
|
962
1081
|
/**
|
|
963
1082
|
*
|
|
964
1083
|
* * Get the client's inbox state.
|
|
@@ -998,101 +1117,6 @@ export class Client {
|
|
|
998
1117
|
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
999
1118
|
return ret;
|
|
1000
1119
|
}
|
|
1001
|
-
/**
|
|
1002
|
-
* @returns {SignatureRequestHandle | undefined}
|
|
1003
|
-
*/
|
|
1004
|
-
createInboxSignatureRequest() {
|
|
1005
|
-
const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
|
|
1006
|
-
if (ret[2]) {
|
|
1007
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1008
|
-
}
|
|
1009
|
-
return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
|
|
1010
|
-
}
|
|
1011
|
-
/**
|
|
1012
|
-
* @param {Identifier} new_identifier
|
|
1013
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1014
|
-
*/
|
|
1015
|
-
addWalletSignatureRequest(new_identifier) {
|
|
1016
|
-
const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
|
|
1017
|
-
return ret;
|
|
1018
|
-
}
|
|
1019
|
-
/**
|
|
1020
|
-
* @param {Identifier} identifier
|
|
1021
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1022
|
-
*/
|
|
1023
|
-
revokeWalletSignatureRequest(identifier) {
|
|
1024
|
-
const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
|
|
1025
|
-
return ret;
|
|
1026
|
-
}
|
|
1027
|
-
/**
|
|
1028
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1029
|
-
*/
|
|
1030
|
-
revokeAllOtherInstallationsSignatureRequest() {
|
|
1031
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
|
|
1032
|
-
return ret;
|
|
1033
|
-
}
|
|
1034
|
-
/**
|
|
1035
|
-
* @param {Uint8Array[]} installation_ids
|
|
1036
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1037
|
-
*/
|
|
1038
|
-
revokeInstallationsSignatureRequest(installation_ids) {
|
|
1039
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
1040
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1041
|
-
const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
|
|
1042
|
-
return ret;
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* @param {Identifier} new_recovery_identifier
|
|
1046
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1047
|
-
*/
|
|
1048
|
-
changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
|
|
1049
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
|
|
1050
|
-
return ret;
|
|
1051
|
-
}
|
|
1052
|
-
/**
|
|
1053
|
-
* @param {SignatureRequestHandle} signature_request
|
|
1054
|
-
* @returns {Promise<void>}
|
|
1055
|
-
*/
|
|
1056
|
-
applySignatureRequest(signature_request) {
|
|
1057
|
-
_assertClass(signature_request, SignatureRequestHandle);
|
|
1058
|
-
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
1059
|
-
return ret;
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* @param {SignatureRequestHandle} signature_request
|
|
1063
|
-
* @returns {Promise<void>}
|
|
1064
|
-
*/
|
|
1065
|
-
registerIdentity(signature_request) {
|
|
1066
|
-
_assertClass(signature_request, SignatureRequestHandle);
|
|
1067
|
-
var ptr0 = signature_request.__destroy_into_raw();
|
|
1068
|
-
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
1069
|
-
return ret;
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* @param {string} signature_text
|
|
1073
|
-
* @returns {Uint8Array}
|
|
1074
|
-
*/
|
|
1075
|
-
signWithInstallationKey(signature_text) {
|
|
1076
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1077
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1078
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
1079
|
-
if (ret[2]) {
|
|
1080
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1081
|
-
}
|
|
1082
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* @param {string} signature_text
|
|
1086
|
-
* @param {Uint8Array} signature_bytes
|
|
1087
|
-
*/
|
|
1088
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
1089
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1090
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1091
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
1092
|
-
if (ret[1]) {
|
|
1093
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
1120
|
}
|
|
1097
1121
|
|
|
1098
1122
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1964,17 +1988,21 @@ export class ConversationDebugInfo {
|
|
|
1964
1988
|
wasm.__wbg_set_conversationdebuginfo_remoteCommitLog(this.__wbg_ptr, ptr0, len0);
|
|
1965
1989
|
}
|
|
1966
1990
|
/**
|
|
1967
|
-
* @returns {
|
|
1991
|
+
* @returns {XmtpCursor[]}
|
|
1968
1992
|
*/
|
|
1969
1993
|
get cursor() {
|
|
1970
1994
|
const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
|
|
1971
|
-
|
|
1995
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1996
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1997
|
+
return v1;
|
|
1972
1998
|
}
|
|
1973
1999
|
/**
|
|
1974
|
-
* @param {
|
|
2000
|
+
* @param {XmtpCursor[]} arg0
|
|
1975
2001
|
*/
|
|
1976
2002
|
set cursor(arg0) {
|
|
1977
|
-
|
|
2003
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2004
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2005
|
+
wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, ptr0, len0);
|
|
1978
2006
|
}
|
|
1979
2007
|
}
|
|
1980
2008
|
|
|
@@ -2904,7 +2932,7 @@ export class HmacKey {
|
|
|
2904
2932
|
set key(arg0) {
|
|
2905
2933
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2906
2934
|
const len0 = WASM_VECTOR_LEN;
|
|
2907
|
-
wasm.
|
|
2935
|
+
wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
|
|
2908
2936
|
}
|
|
2909
2937
|
/**
|
|
2910
2938
|
* @returns {bigint}
|
|
@@ -3046,7 +3074,7 @@ export class InboxState {
|
|
|
3046
3074
|
set inboxId(arg0) {
|
|
3047
3075
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3048
3076
|
const len0 = WASM_VECTOR_LEN;
|
|
3049
|
-
wasm.
|
|
3077
|
+
wasm.__wbg_set_inboxstate_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
3050
3078
|
}
|
|
3051
3079
|
/**
|
|
3052
3080
|
* @returns {Identifier}
|
|
@@ -3181,7 +3209,7 @@ export class Installation {
|
|
|
3181
3209
|
set id(arg0) {
|
|
3182
3210
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3183
3211
|
const len0 = WASM_VECTOR_LEN;
|
|
3184
|
-
wasm.
|
|
3212
|
+
wasm.__wbg_set_installation_id(this.__wbg_ptr, ptr0, len0);
|
|
3185
3213
|
}
|
|
3186
3214
|
/**
|
|
3187
3215
|
* @returns {bigint | undefined}
|
|
@@ -3366,7 +3394,7 @@ export class KeyPackageStatus {
|
|
|
3366
3394
|
* @returns {Lifetime | undefined}
|
|
3367
3395
|
*/
|
|
3368
3396
|
get lifetime() {
|
|
3369
|
-
const ret = wasm.
|
|
3397
|
+
const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
|
|
3370
3398
|
return ret === 0 ? undefined : Lifetime.__wrap(ret);
|
|
3371
3399
|
}
|
|
3372
3400
|
/**
|
|
@@ -3378,7 +3406,7 @@ export class KeyPackageStatus {
|
|
|
3378
3406
|
_assertClass(arg0, Lifetime);
|
|
3379
3407
|
ptr0 = arg0.__destroy_into_raw();
|
|
3380
3408
|
}
|
|
3381
|
-
wasm.
|
|
3409
|
+
wasm.__wbg_set_keypackagestatus_lifetime(this.__wbg_ptr, ptr0);
|
|
3382
3410
|
}
|
|
3383
3411
|
/**
|
|
3384
3412
|
* @returns {string | undefined}
|
|
@@ -3431,27 +3459,27 @@ export class Lifetime {
|
|
|
3431
3459
|
* @returns {bigint}
|
|
3432
3460
|
*/
|
|
3433
3461
|
get not_before() {
|
|
3434
|
-
const ret = wasm.
|
|
3462
|
+
const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
|
|
3435
3463
|
return BigInt.asUintN(64, ret);
|
|
3436
3464
|
}
|
|
3437
3465
|
/**
|
|
3438
3466
|
* @param {bigint} arg0
|
|
3439
3467
|
*/
|
|
3440
3468
|
set not_before(arg0) {
|
|
3441
|
-
wasm.
|
|
3469
|
+
wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
|
|
3442
3470
|
}
|
|
3443
3471
|
/**
|
|
3444
3472
|
* @returns {bigint}
|
|
3445
3473
|
*/
|
|
3446
3474
|
get not_after() {
|
|
3447
|
-
const ret = wasm.
|
|
3475
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
3448
3476
|
return BigInt.asUintN(64, ret);
|
|
3449
3477
|
}
|
|
3450
3478
|
/**
|
|
3451
3479
|
* @param {bigint} arg0
|
|
3452
3480
|
*/
|
|
3453
3481
|
set not_after(arg0) {
|
|
3454
|
-
wasm.
|
|
3482
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
3455
3483
|
}
|
|
3456
3484
|
}
|
|
3457
3485
|
|
|
@@ -3516,7 +3544,7 @@ export class ListConversationsOptions {
|
|
|
3516
3544
|
* @param {bigint | null} [arg0]
|
|
3517
3545
|
*/
|
|
3518
3546
|
set createdAfterNs(arg0) {
|
|
3519
|
-
wasm.
|
|
3547
|
+
wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
3520
3548
|
}
|
|
3521
3549
|
/**
|
|
3522
3550
|
* @returns {bigint | undefined}
|
|
@@ -3623,7 +3651,7 @@ export class ListMessagesOptions {
|
|
|
3623
3651
|
* @param {bigint | null} [arg0]
|
|
3624
3652
|
*/
|
|
3625
3653
|
set sentBeforeNs(arg0) {
|
|
3626
|
-
wasm.
|
|
3654
|
+
wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
3627
3655
|
}
|
|
3628
3656
|
/**
|
|
3629
3657
|
* @returns {bigint | undefined}
|
|
@@ -4008,14 +4036,14 @@ export class MessageDisappearingSettings {
|
|
|
4008
4036
|
* @returns {bigint}
|
|
4009
4037
|
*/
|
|
4010
4038
|
get inNs() {
|
|
4011
|
-
const ret = wasm.
|
|
4039
|
+
const ret = wasm.__wbg_get_messagedisappearingsettings_inNs(this.__wbg_ptr);
|
|
4012
4040
|
return ret;
|
|
4013
4041
|
}
|
|
4014
4042
|
/**
|
|
4015
4043
|
* @param {bigint} arg0
|
|
4016
4044
|
*/
|
|
4017
4045
|
set inNs(arg0) {
|
|
4018
|
-
wasm.
|
|
4046
|
+
wasm.__wbg_set_messagedisappearingsettings_inNs(this.__wbg_ptr, arg0);
|
|
4019
4047
|
}
|
|
4020
4048
|
/**
|
|
4021
4049
|
* @param {bigint} from_ns
|
|
@@ -4497,7 +4525,7 @@ export class Reaction {
|
|
|
4497
4525
|
set reference(arg0) {
|
|
4498
4526
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4499
4527
|
const len0 = WASM_VECTOR_LEN;
|
|
4500
|
-
wasm.
|
|
4528
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4501
4529
|
}
|
|
4502
4530
|
/**
|
|
4503
4531
|
* @returns {string}
|
|
@@ -4520,7 +4548,7 @@ export class Reaction {
|
|
|
4520
4548
|
set referenceInboxId(arg0) {
|
|
4521
4549
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4522
4550
|
const len0 = WASM_VECTOR_LEN;
|
|
4523
|
-
wasm.
|
|
4551
|
+
wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
|
|
4524
4552
|
}
|
|
4525
4553
|
/**
|
|
4526
4554
|
* @returns {ReactionAction}
|
|
@@ -4717,7 +4745,7 @@ export class RemoteAttachmentInfo {
|
|
|
4717
4745
|
set url(arg0) {
|
|
4718
4746
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4719
4747
|
const len0 = WASM_VECTOR_LEN;
|
|
4720
|
-
wasm.
|
|
4748
|
+
wasm.__wbg_set_remoteattachmentinfo_url(this.__wbg_ptr, ptr0, len0);
|
|
4721
4749
|
}
|
|
4722
4750
|
/**
|
|
4723
4751
|
* @returns {Uint8Array}
|
|
@@ -4913,6 +4941,66 @@ export class StreamCloser {
|
|
|
4913
4941
|
}
|
|
4914
4942
|
}
|
|
4915
4943
|
|
|
4944
|
+
const XmtpCursorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4945
|
+
? { register: () => {}, unregister: () => {} }
|
|
4946
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_xmtpcursor_free(ptr >>> 0, 1));
|
|
4947
|
+
|
|
4948
|
+
export class XmtpCursor {
|
|
4949
|
+
|
|
4950
|
+
static __wrap(ptr) {
|
|
4951
|
+
ptr = ptr >>> 0;
|
|
4952
|
+
const obj = Object.create(XmtpCursor.prototype);
|
|
4953
|
+
obj.__wbg_ptr = ptr;
|
|
4954
|
+
XmtpCursorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
4955
|
+
return obj;
|
|
4956
|
+
}
|
|
4957
|
+
|
|
4958
|
+
static __unwrap(jsValue) {
|
|
4959
|
+
if (!(jsValue instanceof XmtpCursor)) {
|
|
4960
|
+
return 0;
|
|
4961
|
+
}
|
|
4962
|
+
return jsValue.__destroy_into_raw();
|
|
4963
|
+
}
|
|
4964
|
+
|
|
4965
|
+
__destroy_into_raw() {
|
|
4966
|
+
const ptr = this.__wbg_ptr;
|
|
4967
|
+
this.__wbg_ptr = 0;
|
|
4968
|
+
XmtpCursorFinalization.unregister(this);
|
|
4969
|
+
return ptr;
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4972
|
+
free() {
|
|
4973
|
+
const ptr = this.__destroy_into_raw();
|
|
4974
|
+
wasm.__wbg_xmtpcursor_free(ptr, 0);
|
|
4975
|
+
}
|
|
4976
|
+
/**
|
|
4977
|
+
* @returns {number}
|
|
4978
|
+
*/
|
|
4979
|
+
get originator_id() {
|
|
4980
|
+
const ret = wasm.__wbg_get_xmtpcursor_originator_id(this.__wbg_ptr);
|
|
4981
|
+
return ret >>> 0;
|
|
4982
|
+
}
|
|
4983
|
+
/**
|
|
4984
|
+
* @param {number} arg0
|
|
4985
|
+
*/
|
|
4986
|
+
set originator_id(arg0) {
|
|
4987
|
+
wasm.__wbg_set_xmtpcursor_originator_id(this.__wbg_ptr, arg0);
|
|
4988
|
+
}
|
|
4989
|
+
/**
|
|
4990
|
+
* @returns {bigint}
|
|
4991
|
+
*/
|
|
4992
|
+
get sequence_id() {
|
|
4993
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
4994
|
+
return ret;
|
|
4995
|
+
}
|
|
4996
|
+
/**
|
|
4997
|
+
* @param {bigint} arg0
|
|
4998
|
+
*/
|
|
4999
|
+
set sequence_id(arg0) {
|
|
5000
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
|
|
4916
5004
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
4917
5005
|
|
|
4918
5006
|
async function __wbg_load(module, imports) {
|
|
@@ -5023,6 +5111,10 @@ function __wbg_get_imports() {
|
|
|
5023
5111
|
const ret = clearInterval(arg0);
|
|
5024
5112
|
return ret;
|
|
5025
5113
|
};
|
|
5114
|
+
imports.wbg.__wbg_clearTimeout_2e2c4939388cdfbb = function(arg0) {
|
|
5115
|
+
const ret = clearTimeout(arg0);
|
|
5116
|
+
return ret;
|
|
5117
|
+
};
|
|
5026
5118
|
imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
5027
5119
|
const ret = clearTimeout(arg0);
|
|
5028
5120
|
return ret;
|
|
@@ -5127,6 +5219,14 @@ function __wbg_get_imports() {
|
|
|
5127
5219
|
imports.wbg.__wbg_error_e98c298703cffa97 = function(arg0, arg1) {
|
|
5128
5220
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5129
5221
|
};
|
|
5222
|
+
imports.wbg.__wbg_fetch_53eef7df7b439a49 = function(arg0, arg1) {
|
|
5223
|
+
const ret = fetch(arg0, arg1);
|
|
5224
|
+
return ret;
|
|
5225
|
+
};
|
|
5226
|
+
imports.wbg.__wbg_fetch_571cdc97c8ee46fd = function(arg0, arg1, arg2) {
|
|
5227
|
+
const ret = arg0.fetch(arg1, arg2);
|
|
5228
|
+
return ret;
|
|
5229
|
+
};
|
|
5130
5230
|
imports.wbg.__wbg_fetch_a8e43a4e138dfc93 = function(arg0, arg1) {
|
|
5131
5231
|
const ret = arg0.fetch(arg1);
|
|
5132
5232
|
return ret;
|
|
@@ -5297,16 +5397,6 @@ function __wbg_get_imports() {
|
|
|
5297
5397
|
const ret = result;
|
|
5298
5398
|
return ret;
|
|
5299
5399
|
};
|
|
5300
|
-
imports.wbg.__wbg_instanceof_Performance_7c58d8187744b0a5 = function(arg0) {
|
|
5301
|
-
let result;
|
|
5302
|
-
try {
|
|
5303
|
-
result = arg0 instanceof Performance;
|
|
5304
|
-
} catch (_) {
|
|
5305
|
-
result = false;
|
|
5306
|
-
}
|
|
5307
|
-
const ret = result;
|
|
5308
|
-
return ret;
|
|
5309
|
-
};
|
|
5310
5400
|
imports.wbg.__wbg_instanceof_Response_e80ce8b7a2b968d2 = function(arg0) {
|
|
5311
5401
|
let result;
|
|
5312
5402
|
try {
|
|
@@ -5458,7 +5548,7 @@ function __wbg_get_imports() {
|
|
|
5458
5548
|
const a = state0.a;
|
|
5459
5549
|
state0.a = 0;
|
|
5460
5550
|
try {
|
|
5461
|
-
return
|
|
5551
|
+
return __wbg_adapter_818(a, state0.b, arg0, arg1);
|
|
5462
5552
|
} finally {
|
|
5463
5553
|
state0.a = a;
|
|
5464
5554
|
}
|
|
@@ -5526,30 +5616,26 @@ function __wbg_get_imports() {
|
|
|
5526
5616
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
5527
5617
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
5528
5618
|
};
|
|
5529
|
-
imports.wbg.__wbg_now_7ab37f05ab2d0b81 = function(arg0) {
|
|
5530
|
-
const ret = arg0.now();
|
|
5531
|
-
return ret;
|
|
5532
|
-
};
|
|
5533
5619
|
imports.wbg.__wbg_now_eb0821f3bd9f6529 = function() {
|
|
5534
5620
|
const ret = Date.now();
|
|
5535
5621
|
return ret;
|
|
5536
5622
|
};
|
|
5537
|
-
imports.wbg.
|
|
5623
|
+
imports.wbg.__wbg_onclose_7422fac0d15ba816 = function(arg0) {
|
|
5538
5624
|
arg0.on_close();
|
|
5539
5625
|
};
|
|
5540
|
-
imports.wbg.
|
|
5626
|
+
imports.wbg.__wbg_onconsentupdate_1fde16f03b7fe79d = function(arg0, arg1) {
|
|
5541
5627
|
arg0.on_consent_update(arg1);
|
|
5542
5628
|
};
|
|
5543
|
-
imports.wbg.
|
|
5629
|
+
imports.wbg.__wbg_onconversation_f27f15a5e1859b5c = function(arg0, arg1) {
|
|
5544
5630
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
5545
5631
|
};
|
|
5546
|
-
imports.wbg.
|
|
5632
|
+
imports.wbg.__wbg_onerror_58c8e2443560095b = function(arg0, arg1) {
|
|
5547
5633
|
arg0.on_error(arg1);
|
|
5548
5634
|
};
|
|
5549
|
-
imports.wbg.
|
|
5635
|
+
imports.wbg.__wbg_onmessage_1fceb6d75cf0a1eb = function(arg0, arg1) {
|
|
5550
5636
|
arg0.on_message(Message.__wrap(arg1));
|
|
5551
5637
|
};
|
|
5552
|
-
imports.wbg.
|
|
5638
|
+
imports.wbg.__wbg_onuserpreferenceupdate_5b4ff69de2024e73 = function(arg0, arg1, arg2) {
|
|
5553
5639
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
5554
5640
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
5555
5641
|
arg0.on_user_preference_update(v0);
|
|
@@ -5636,6 +5722,10 @@ function __wbg_get_imports() {
|
|
|
5636
5722
|
imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
|
|
5637
5723
|
globalThis.setTimeout(arg0, arg1);
|
|
5638
5724
|
};
|
|
5725
|
+
imports.wbg.__wbg_setTimeout_929c97a7c0f23d36 = function(arg0, arg1) {
|
|
5726
|
+
const ret = setTimeout(arg0, arg1);
|
|
5727
|
+
return ret;
|
|
5728
|
+
};
|
|
5639
5729
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
5640
5730
|
const ret = setTimeout(arg0, arg1);
|
|
5641
5731
|
return ret;
|
|
@@ -5649,6 +5739,9 @@ function __wbg_get_imports() {
|
|
|
5649
5739
|
imports.wbg.__wbg_set_7422acbe992d64ab = function(arg0, arg1, arg2) {
|
|
5650
5740
|
arg0[arg1 >>> 0] = arg2;
|
|
5651
5741
|
};
|
|
5742
|
+
imports.wbg.__wbg_set_b042eef31c50834d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
5743
|
+
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
5744
|
+
}, arguments) };
|
|
5652
5745
|
imports.wbg.__wbg_set_c43293f93a35998a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5653
5746
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
5654
5747
|
return ret;
|
|
@@ -5684,12 +5777,24 @@ function __wbg_get_imports() {
|
|
|
5684
5777
|
imports.wbg.__wbg_sethighwatermark_3017ad772d071dcb = function(arg0, arg1) {
|
|
5685
5778
|
arg0.highWaterMark = arg1;
|
|
5686
5779
|
};
|
|
5780
|
+
imports.wbg.__wbg_setintegrity_837435fe924a8c3a = function(arg0, arg1, arg2) {
|
|
5781
|
+
arg0.integrity = getStringFromWasm0(arg1, arg2);
|
|
5782
|
+
};
|
|
5687
5783
|
imports.wbg.__wbg_setmethod_8ce1be0b4d701b7c = function(arg0, arg1, arg2) {
|
|
5688
5784
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
5689
5785
|
};
|
|
5690
5786
|
imports.wbg.__wbg_setmode_bd35f026f55b6247 = function(arg0, arg1) {
|
|
5691
5787
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
5692
5788
|
};
|
|
5789
|
+
imports.wbg.__wbg_setredirect_562df6aa76f9dd5a = function(arg0, arg1) {
|
|
5790
|
+
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
5791
|
+
};
|
|
5792
|
+
imports.wbg.__wbg_setreferrer_fa327f33294d371a = function(arg0, arg1, arg2) {
|
|
5793
|
+
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
5794
|
+
};
|
|
5795
|
+
imports.wbg.__wbg_setreferrerpolicy_537ff1407c81391d = function(arg0, arg1) {
|
|
5796
|
+
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
5797
|
+
};
|
|
5693
5798
|
imports.wbg.__wbg_setsignal_8e72abfe7ee03c97 = function(arg0, arg1) {
|
|
5694
5799
|
arg0.signal = arg1;
|
|
5695
5800
|
};
|
|
@@ -5760,6 +5865,10 @@ function __wbg_get_imports() {
|
|
|
5760
5865
|
const ret = arg0.then(arg1);
|
|
5761
5866
|
return ret;
|
|
5762
5867
|
};
|
|
5868
|
+
imports.wbg.__wbg_toString_bc7a05a172b5cf14 = function(arg0) {
|
|
5869
|
+
const ret = arg0.toString();
|
|
5870
|
+
return ret;
|
|
5871
|
+
};
|
|
5763
5872
|
imports.wbg.__wbg_toString_e2fd3ab0d7a3919b = function() { return handleError(function (arg0, arg1) {
|
|
5764
5873
|
const ret = arg0.toString(arg1);
|
|
5765
5874
|
return ret;
|
|
@@ -5809,6 +5918,14 @@ function __wbg_get_imports() {
|
|
|
5809
5918
|
const ret = arg0.write(getArrayU8FromWasm0(arg1, arg2), arg3);
|
|
5810
5919
|
return ret;
|
|
5811
5920
|
}, arguments) };
|
|
5921
|
+
imports.wbg.__wbg_xmtpcursor_new = function(arg0) {
|
|
5922
|
+
const ret = XmtpCursor.__wrap(arg0);
|
|
5923
|
+
return ret;
|
|
5924
|
+
};
|
|
5925
|
+
imports.wbg.__wbg_xmtpcursor_unwrap = function(arg0) {
|
|
5926
|
+
const ret = XmtpCursor.__unwrap(arg0);
|
|
5927
|
+
return ret;
|
|
5928
|
+
};
|
|
5812
5929
|
imports.wbg.__wbindgen_array_new = function() {
|
|
5813
5930
|
const ret = [];
|
|
5814
5931
|
return ret;
|
|
@@ -5838,16 +5955,20 @@ function __wbg_get_imports() {
|
|
|
5838
5955
|
const ret = false;
|
|
5839
5956
|
return ret;
|
|
5840
5957
|
};
|
|
5841
|
-
imports.wbg.
|
|
5842
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5958
|
+
imports.wbg.__wbindgen_closure_wrapper20276 = function(arg0, arg1, arg2) {
|
|
5959
|
+
const ret = makeMutClosure(arg0, arg1, 5024, __wbg_adapter_48);
|
|
5960
|
+
return ret;
|
|
5961
|
+
};
|
|
5962
|
+
imports.wbg.__wbindgen_closure_wrapper22060 = function(arg0, arg1, arg2) {
|
|
5963
|
+
const ret = makeMutClosure(arg0, arg1, 5395, __wbg_adapter_51);
|
|
5843
5964
|
return ret;
|
|
5844
5965
|
};
|
|
5845
|
-
imports.wbg.
|
|
5846
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5966
|
+
imports.wbg.__wbindgen_closure_wrapper24195 = function(arg0, arg1, arg2) {
|
|
5967
|
+
const ret = makeMutClosure(arg0, arg1, 5633, __wbg_adapter_54);
|
|
5847
5968
|
return ret;
|
|
5848
5969
|
};
|
|
5849
|
-
imports.wbg.
|
|
5850
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5970
|
+
imports.wbg.__wbindgen_closure_wrapper24841 = function(arg0, arg1, arg2) {
|
|
5971
|
+
const ret = makeMutClosure(arg0, arg1, 5646, __wbg_adapter_57);
|
|
5851
5972
|
return ret;
|
|
5852
5973
|
};
|
|
5853
5974
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|