@xmtp/wasm-bindings 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/bindings_wasm.d.ts +171 -163
- package/dist/bindings_wasm.js +217 -181
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +148 -144
- package/package.json +2 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -200,6 +200,22 @@ function debugString(val) {
|
|
|
200
200
|
return className;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
204
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
205
|
+
for (let i = 0; i < array.length; i++) {
|
|
206
|
+
const add = addToExternrefTable0(array[i]);
|
|
207
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
208
|
+
}
|
|
209
|
+
WASM_VECTOR_LEN = array.length;
|
|
210
|
+
return ptr;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function takeFromExternrefTable0(idx) {
|
|
214
|
+
const value = wasm.__wbindgen_export_5.get(idx);
|
|
215
|
+
wasm.__externref_table_dealloc(idx);
|
|
216
|
+
return value;
|
|
217
|
+
}
|
|
218
|
+
|
|
203
219
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
204
220
|
ptr = ptr >>> 0;
|
|
205
221
|
const mem = getDataViewMemory0();
|
|
@@ -211,39 +227,41 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
211
227
|
return result;
|
|
212
228
|
}
|
|
213
229
|
|
|
214
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
215
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
216
|
-
for (let i = 0; i < array.length; i++) {
|
|
217
|
-
const add = addToExternrefTable0(array[i]);
|
|
218
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
219
|
-
}
|
|
220
|
-
WASM_VECTOR_LEN = array.length;
|
|
221
|
-
return ptr;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
230
|
function _assertClass(instance, klass) {
|
|
225
231
|
if (!(instance instanceof klass)) {
|
|
226
232
|
throw new Error(`expected instance of ${klass.name}`);
|
|
227
233
|
}
|
|
228
234
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
/**
|
|
236
|
+
* @param {string} host
|
|
237
|
+
* @param {string} inbox_id
|
|
238
|
+
* @param {string} account_address
|
|
239
|
+
* @param {string | null} [db_path]
|
|
240
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
241
|
+
* @param {string | null} [history_sync_url]
|
|
242
|
+
* @param {LogOptions | null} [log_options]
|
|
243
|
+
* @returns {Promise<Client>}
|
|
244
|
+
*/
|
|
245
|
+
export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
|
|
246
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
+
const len0 = WASM_VECTOR_LEN;
|
|
248
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
+
const len1 = WASM_VECTOR_LEN;
|
|
250
|
+
const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
+
const len2 = WASM_VECTOR_LEN;
|
|
252
|
+
var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
var len3 = WASM_VECTOR_LEN;
|
|
254
|
+
var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
255
|
+
var len4 = WASM_VECTOR_LEN;
|
|
256
|
+
let ptr5 = 0;
|
|
257
|
+
if (!isLikeNone(log_options)) {
|
|
258
|
+
_assertClass(log_options, LogOptions);
|
|
259
|
+
ptr5 = log_options.__destroy_into_raw();
|
|
260
|
+
}
|
|
261
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
|
|
262
|
+
return ret;
|
|
240
263
|
}
|
|
241
264
|
|
|
242
|
-
function takeFromExternrefTable0(idx) {
|
|
243
|
-
const value = wasm.__wbindgen_export_5.get(idx);
|
|
244
|
-
wasm.__externref_table_dealloc(idx);
|
|
245
|
-
return value;
|
|
246
|
-
}
|
|
247
265
|
/**
|
|
248
266
|
* @param {string} host
|
|
249
267
|
* @param {string} account_address
|
|
@@ -297,46 +315,27 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
297
315
|
}
|
|
298
316
|
}
|
|
299
317
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* @param {string} account_address
|
|
304
|
-
* @param {string | null} [db_path]
|
|
305
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
306
|
-
* @param {string | null} [history_sync_url]
|
|
307
|
-
* @param {LogOptions | null} [log_options]
|
|
308
|
-
* @returns {Promise<Client>}
|
|
309
|
-
*/
|
|
310
|
-
export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
|
|
311
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
312
|
-
const len0 = WASM_VECTOR_LEN;
|
|
313
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
314
|
-
const len1 = WASM_VECTOR_LEN;
|
|
315
|
-
const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
316
|
-
const len2 = WASM_VECTOR_LEN;
|
|
317
|
-
var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
318
|
-
var len3 = WASM_VECTOR_LEN;
|
|
319
|
-
var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
-
var len4 = WASM_VECTOR_LEN;
|
|
321
|
-
let ptr5 = 0;
|
|
322
|
-
if (!isLikeNone(log_options)) {
|
|
323
|
-
_assertClass(log_options, LogOptions);
|
|
324
|
-
ptr5 = log_options.__destroy_into_raw();
|
|
325
|
-
}
|
|
326
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
|
|
327
|
-
return ret;
|
|
318
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
319
|
+
ptr = ptr >>> 0;
|
|
320
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
328
321
|
}
|
|
329
322
|
|
|
323
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
324
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
325
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
326
|
+
WASM_VECTOR_LEN = arg.length;
|
|
327
|
+
return ptr;
|
|
328
|
+
}
|
|
330
329
|
function __wbg_adapter_52(arg0, arg1) {
|
|
331
330
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb21f8cddfb9e179d(arg0, arg1);
|
|
332
331
|
}
|
|
333
332
|
|
|
334
333
|
function __wbg_adapter_55(arg0, arg1, arg2) {
|
|
335
|
-
wasm.
|
|
334
|
+
wasm.closure2991_externref_shim(arg0, arg1, arg2);
|
|
336
335
|
}
|
|
337
336
|
|
|
338
|
-
function
|
|
339
|
-
wasm.
|
|
337
|
+
function __wbg_adapter_650(arg0, arg1, arg2, arg3) {
|
|
338
|
+
wasm.closure4013_externref_shim(arg0, arg1, arg2, arg3);
|
|
340
339
|
}
|
|
341
340
|
|
|
342
341
|
/**
|
|
@@ -484,109 +483,50 @@ export class Client {
|
|
|
484
483
|
wasm.__wbg_client_free(ptr, 0);
|
|
485
484
|
}
|
|
486
485
|
/**
|
|
487
|
-
* @
|
|
488
|
-
|
|
489
|
-
createInboxSignatureText() {
|
|
490
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
491
|
-
if (ret[3]) {
|
|
492
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
493
|
-
}
|
|
494
|
-
let v1;
|
|
495
|
-
if (ret[0] !== 0) {
|
|
496
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
497
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
498
|
-
}
|
|
499
|
-
return v1;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* @param {string} new_wallet_address
|
|
503
|
-
* @returns {Promise<string>}
|
|
486
|
+
* @param {Consent[]} records
|
|
487
|
+
* @returns {Promise<void>}
|
|
504
488
|
*/
|
|
505
|
-
|
|
506
|
-
const ptr0 =
|
|
489
|
+
setConsentStates(records) {
|
|
490
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
507
491
|
const len0 = WASM_VECTOR_LEN;
|
|
508
|
-
const ret = wasm.
|
|
492
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
509
493
|
return ret;
|
|
510
494
|
}
|
|
511
495
|
/**
|
|
512
|
-
* @param {
|
|
513
|
-
* @
|
|
496
|
+
* @param {ConsentEntityType} entity_type
|
|
497
|
+
* @param {string} entity
|
|
498
|
+
* @returns {Promise<ConsentState>}
|
|
514
499
|
*/
|
|
515
|
-
|
|
516
|
-
const ptr0 = passStringToWasm0(
|
|
500
|
+
getConsentState(entity_type, entity) {
|
|
501
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
517
502
|
const len0 = WASM_VECTOR_LEN;
|
|
518
|
-
const ret = wasm.
|
|
503
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
519
504
|
return ret;
|
|
520
505
|
}
|
|
521
506
|
/**
|
|
522
|
-
*
|
|
507
|
+
*
|
|
508
|
+
* * Get the client's inbox state.
|
|
509
|
+
* *
|
|
510
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
511
|
+
* * Otherwise, the state will be read from the local database.
|
|
512
|
+
*
|
|
513
|
+
* @param {boolean} refresh_from_network
|
|
514
|
+
* @returns {Promise<InboxState>}
|
|
523
515
|
*/
|
|
524
|
-
|
|
525
|
-
const ret = wasm.
|
|
516
|
+
inboxState(refresh_from_network) {
|
|
517
|
+
const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
|
|
526
518
|
return ret;
|
|
527
519
|
}
|
|
528
520
|
/**
|
|
529
|
-
* @param {
|
|
530
|
-
* @returns {Promise<
|
|
521
|
+
* @param {string} inbox_id
|
|
522
|
+
* @returns {Promise<InboxState>}
|
|
531
523
|
*/
|
|
532
|
-
|
|
533
|
-
const ptr0 =
|
|
524
|
+
getLatestInboxState(inbox_id) {
|
|
525
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
534
526
|
const len0 = WASM_VECTOR_LEN;
|
|
535
|
-
const ret = wasm.
|
|
536
|
-
return ret;
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* @param {SignatureRequestType} signature_type
|
|
540
|
-
* @param {Uint8Array} signature_bytes
|
|
541
|
-
* @returns {Promise<void>}
|
|
542
|
-
*/
|
|
543
|
-
addSignature(signature_type, signature_bytes) {
|
|
544
|
-
const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
545
|
-
return ret;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* @param {SignatureRequestType} signature_type
|
|
549
|
-
* @param {Uint8Array} signature_bytes
|
|
550
|
-
* @param {bigint} chain_id
|
|
551
|
-
* @param {bigint | null} [block_number]
|
|
552
|
-
* @returns {Promise<void>}
|
|
553
|
-
*/
|
|
554
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
555
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
556
|
-
return ret;
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
|
-
* @returns {Promise<void>}
|
|
560
|
-
*/
|
|
561
|
-
applySignatureRequests() {
|
|
562
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
527
|
+
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
563
528
|
return ret;
|
|
564
529
|
}
|
|
565
|
-
/**
|
|
566
|
-
* @param {string} signature_text
|
|
567
|
-
* @returns {Uint8Array}
|
|
568
|
-
*/
|
|
569
|
-
signWithInstallationKey(signature_text) {
|
|
570
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
571
|
-
const len0 = WASM_VECTOR_LEN;
|
|
572
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
573
|
-
if (ret[2]) {
|
|
574
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
575
|
-
}
|
|
576
|
-
return takeFromExternrefTable0(ret[0]);
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* @param {string} signature_text
|
|
580
|
-
* @param {Uint8Array} signature_bytes
|
|
581
|
-
*/
|
|
582
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
583
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
584
|
-
const len0 = WASM_VECTOR_LEN;
|
|
585
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
586
|
-
if (ret[1]) {
|
|
587
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
530
|
/**
|
|
591
531
|
* @returns {string}
|
|
592
532
|
*/
|
|
@@ -695,50 +635,109 @@ export class Client {
|
|
|
695
635
|
return Conversations.__wrap(ret);
|
|
696
636
|
}
|
|
697
637
|
/**
|
|
698
|
-
* @
|
|
699
|
-
* @returns {Promise<void>}
|
|
638
|
+
* @returns {string | undefined}
|
|
700
639
|
*/
|
|
701
|
-
|
|
702
|
-
const
|
|
640
|
+
createInboxSignatureText() {
|
|
641
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
642
|
+
if (ret[3]) {
|
|
643
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
644
|
+
}
|
|
645
|
+
let v1;
|
|
646
|
+
if (ret[0] !== 0) {
|
|
647
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
648
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
649
|
+
}
|
|
650
|
+
return v1;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* @param {string} new_wallet_address
|
|
654
|
+
* @returns {Promise<string>}
|
|
655
|
+
*/
|
|
656
|
+
addWalletSignatureText(new_wallet_address) {
|
|
657
|
+
const ptr0 = passStringToWasm0(new_wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
703
658
|
const len0 = WASM_VECTOR_LEN;
|
|
704
|
-
const ret = wasm.
|
|
659
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
705
660
|
return ret;
|
|
706
661
|
}
|
|
707
662
|
/**
|
|
708
|
-
* @param {
|
|
709
|
-
* @
|
|
710
|
-
* @returns {Promise<ConsentState>}
|
|
663
|
+
* @param {string} wallet_address
|
|
664
|
+
* @returns {Promise<string>}
|
|
711
665
|
*/
|
|
712
|
-
|
|
713
|
-
const ptr0 = passStringToWasm0(
|
|
666
|
+
revokeWalletSignatureText(wallet_address) {
|
|
667
|
+
const ptr0 = passStringToWasm0(wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
714
668
|
const len0 = WASM_VECTOR_LEN;
|
|
715
|
-
const ret = wasm.
|
|
669
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
716
670
|
return ret;
|
|
717
671
|
}
|
|
718
672
|
/**
|
|
719
|
-
*
|
|
720
|
-
* * Get the client's inbox state.
|
|
721
|
-
* *
|
|
722
|
-
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
723
|
-
* * Otherwise, the state will be read from the local database.
|
|
724
|
-
*
|
|
725
|
-
* @param {boolean} refresh_from_network
|
|
726
|
-
* @returns {Promise<InboxState>}
|
|
673
|
+
* @returns {Promise<string>}
|
|
727
674
|
*/
|
|
728
|
-
|
|
729
|
-
const ret = wasm.
|
|
675
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
676
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
730
677
|
return ret;
|
|
731
678
|
}
|
|
732
679
|
/**
|
|
733
|
-
* @param {
|
|
734
|
-
* @returns {Promise<
|
|
680
|
+
* @param {Uint8Array[]} installation_ids
|
|
681
|
+
* @returns {Promise<string>}
|
|
735
682
|
*/
|
|
736
|
-
|
|
737
|
-
const ptr0 =
|
|
683
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
684
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
738
685
|
const len0 = WASM_VECTOR_LEN;
|
|
739
|
-
const ret = wasm.
|
|
686
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
740
687
|
return ret;
|
|
741
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* @param {SignatureRequestType} signature_type
|
|
691
|
+
* @param {Uint8Array} signature_bytes
|
|
692
|
+
* @returns {Promise<void>}
|
|
693
|
+
*/
|
|
694
|
+
addSignature(signature_type, signature_bytes) {
|
|
695
|
+
const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
696
|
+
return ret;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* @param {SignatureRequestType} signature_type
|
|
700
|
+
* @param {Uint8Array} signature_bytes
|
|
701
|
+
* @param {bigint} chain_id
|
|
702
|
+
* @param {bigint | null} [block_number]
|
|
703
|
+
* @returns {Promise<void>}
|
|
704
|
+
*/
|
|
705
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
706
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
707
|
+
return ret;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* @returns {Promise<void>}
|
|
711
|
+
*/
|
|
712
|
+
applySignatureRequests() {
|
|
713
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
714
|
+
return ret;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* @param {string} signature_text
|
|
718
|
+
* @returns {Uint8Array}
|
|
719
|
+
*/
|
|
720
|
+
signWithInstallationKey(signature_text) {
|
|
721
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
723
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
724
|
+
if (ret[2]) {
|
|
725
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
726
|
+
}
|
|
727
|
+
return takeFromExternrefTable0(ret[0]);
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* @param {string} signature_text
|
|
731
|
+
* @param {Uint8Array} signature_bytes
|
|
732
|
+
*/
|
|
733
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
734
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
735
|
+
const len0 = WASM_VECTOR_LEN;
|
|
736
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
737
|
+
if (ret[1]) {
|
|
738
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
742
741
|
}
|
|
743
742
|
|
|
744
743
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -875,7 +874,7 @@ export class ContentTypeId {
|
|
|
875
874
|
set authorityId(arg0) {
|
|
876
875
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
876
|
const len0 = WASM_VECTOR_LEN;
|
|
878
|
-
wasm.
|
|
877
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
879
878
|
}
|
|
880
879
|
/**
|
|
881
880
|
* @returns {string}
|
|
@@ -1393,6 +1392,43 @@ export class Conversation {
|
|
|
1393
1392
|
const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permission_update_type, permission_policy_option, isLikeNone(metadata_field) ? 5 : metadata_field);
|
|
1394
1393
|
return ret;
|
|
1395
1394
|
}
|
|
1395
|
+
/**
|
|
1396
|
+
* @param {MessageDisappearingSettings} settings
|
|
1397
|
+
* @returns {Promise<void>}
|
|
1398
|
+
*/
|
|
1399
|
+
updateMessageDisappearingSettings(settings) {
|
|
1400
|
+
_assertClass(settings, MessageDisappearingSettings);
|
|
1401
|
+
var ptr0 = settings.__destroy_into_raw();
|
|
1402
|
+
const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
1403
|
+
return ret;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* @returns {Promise<void>}
|
|
1407
|
+
*/
|
|
1408
|
+
removeMessageDisappearingSettings() {
|
|
1409
|
+
const ret = wasm.conversation_removeMessageDisappearingSettings(this.__wbg_ptr);
|
|
1410
|
+
return ret;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* @returns {MessageDisappearingSettings | undefined}
|
|
1414
|
+
*/
|
|
1415
|
+
messageDisappearingSettings() {
|
|
1416
|
+
const ret = wasm.conversation_messageDisappearingSettings(this.__wbg_ptr);
|
|
1417
|
+
if (ret[2]) {
|
|
1418
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1419
|
+
}
|
|
1420
|
+
return ret[0] === 0 ? undefined : MessageDisappearingSettings.__wrap(ret[0]);
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* @returns {boolean}
|
|
1424
|
+
*/
|
|
1425
|
+
isMessageDisappearingEnabled() {
|
|
1426
|
+
const ret = wasm.conversation_isMessageDisappearingEnabled(this.__wbg_ptr);
|
|
1427
|
+
if (ret[2]) {
|
|
1428
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1429
|
+
}
|
|
1430
|
+
return ret[0] !== 0;
|
|
1431
|
+
}
|
|
1396
1432
|
}
|
|
1397
1433
|
|
|
1398
1434
|
const ConversationListItemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2399,7 +2435,7 @@ export class InboxState {
|
|
|
2399
2435
|
set recoveryAddress(arg0) {
|
|
2400
2436
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2401
2437
|
const len0 = WASM_VECTOR_LEN;
|
|
2402
|
-
wasm.
|
|
2438
|
+
wasm.__wbg_set_inboxstate_recoveryAddress(this.__wbg_ptr, ptr0, len0);
|
|
2403
2439
|
}
|
|
2404
2440
|
/**
|
|
2405
2441
|
* @returns {Installation[]}
|
|
@@ -3211,28 +3247,28 @@ export class MessageDisappearingSettings {
|
|
|
3211
3247
|
/**
|
|
3212
3248
|
* @returns {bigint}
|
|
3213
3249
|
*/
|
|
3214
|
-
get
|
|
3250
|
+
get fromNs() {
|
|
3215
3251
|
const ret = wasm.__wbg_get_hmackey_epoch(this.__wbg_ptr);
|
|
3216
3252
|
return ret;
|
|
3217
3253
|
}
|
|
3218
3254
|
/**
|
|
3219
3255
|
* @param {bigint} arg0
|
|
3220
3256
|
*/
|
|
3221
|
-
set
|
|
3257
|
+
set fromNs(arg0) {
|
|
3222
3258
|
wasm.__wbg_set_hmackey_epoch(this.__wbg_ptr, arg0);
|
|
3223
3259
|
}
|
|
3224
3260
|
/**
|
|
3225
3261
|
* @returns {bigint}
|
|
3226
3262
|
*/
|
|
3227
|
-
get
|
|
3228
|
-
const ret = wasm.
|
|
3263
|
+
get inNs() {
|
|
3264
|
+
const ret = wasm.__wbg_get_messagedisappearingsettings_inNs(this.__wbg_ptr);
|
|
3229
3265
|
return ret;
|
|
3230
3266
|
}
|
|
3231
3267
|
/**
|
|
3232
3268
|
* @param {bigint} arg0
|
|
3233
3269
|
*/
|
|
3234
|
-
set
|
|
3235
|
-
wasm.
|
|
3270
|
+
set inNs(arg0) {
|
|
3271
|
+
wasm.__wbg_set_messagedisappearingsettings_inNs(this.__wbg_ptr, arg0);
|
|
3236
3272
|
}
|
|
3237
3273
|
/**
|
|
3238
3274
|
* @param {bigint} from_ns
|
|
@@ -3985,7 +4021,7 @@ function __wbg_get_imports() {
|
|
|
3985
4021
|
const a = state0.a;
|
|
3986
4022
|
state0.a = 0;
|
|
3987
4023
|
try {
|
|
3988
|
-
return
|
|
4024
|
+
return __wbg_adapter_650(a, state0.b, arg0, arg1);
|
|
3989
4025
|
} finally {
|
|
3990
4026
|
state0.a = a;
|
|
3991
4027
|
}
|
|
@@ -4349,12 +4385,12 @@ function __wbg_get_imports() {
|
|
|
4349
4385
|
const ret = false;
|
|
4350
4386
|
return ret;
|
|
4351
4387
|
};
|
|
4352
|
-
imports.wbg.
|
|
4353
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4388
|
+
imports.wbg.__wbindgen_closure_wrapper14119 = function(arg0, arg1, arg2) {
|
|
4389
|
+
const ret = makeMutClosure(arg0, arg1, 2917, __wbg_adapter_52);
|
|
4354
4390
|
return ret;
|
|
4355
4391
|
};
|
|
4356
|
-
imports.wbg.
|
|
4357
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4392
|
+
imports.wbg.__wbindgen_closure_wrapper14403 = function(arg0, arg1, arg2) {
|
|
4393
|
+
const ret = makeMutClosure(arg0, arg1, 2992, __wbg_adapter_55);
|
|
4358
4394
|
return ret;
|
|
4359
4395
|
};
|
|
4360
4396
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|