@xmtp/wasm-bindings 1.2.1 → 1.2.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 +213 -211
- package/dist/bindings_wasm.js +241 -238
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +194 -193
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -216,6 +216,41 @@ function debugString(val) {
|
|
|
216
216
|
return className;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
function _assertClass(instance, klass) {
|
|
220
|
+
if (!(instance instanceof klass)) {
|
|
221
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @param {string} host
|
|
226
|
+
* @param {string} inbox_id
|
|
227
|
+
* @param {Identifier} account_identifier
|
|
228
|
+
* @param {string | null} [db_path]
|
|
229
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
230
|
+
* @param {string | null} [device_sync_server_url]
|
|
231
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
232
|
+
* @param {LogOptions | null} [log_options]
|
|
233
|
+
* @param {boolean | null} [allow_offline]
|
|
234
|
+
* @returns {Promise<Client>}
|
|
235
|
+
*/
|
|
236
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline) {
|
|
237
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
|
+
const len0 = WASM_VECTOR_LEN;
|
|
239
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
240
|
+
const len1 = WASM_VECTOR_LEN;
|
|
241
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
242
|
+
var len2 = WASM_VECTOR_LEN;
|
|
243
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
244
|
+
var len3 = WASM_VECTOR_LEN;
|
|
245
|
+
let ptr4 = 0;
|
|
246
|
+
if (!isLikeNone(log_options)) {
|
|
247
|
+
_assertClass(log_options, LogOptions);
|
|
248
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
249
|
+
}
|
|
250
|
+
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);
|
|
251
|
+
return ret;
|
|
252
|
+
}
|
|
253
|
+
|
|
219
254
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
220
255
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
221
256
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -226,17 +261,25 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
226
261
|
return ptr;
|
|
227
262
|
}
|
|
228
263
|
|
|
229
|
-
function _assertClass(instance, klass) {
|
|
230
|
-
if (!(instance instanceof klass)) {
|
|
231
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
264
|
function takeFromExternrefTable0(idx) {
|
|
236
265
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
237
266
|
wasm.__externref_table_dealloc(idx);
|
|
238
267
|
return value;
|
|
239
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* @param {string} signature_text
|
|
271
|
+
* @param {Uint8Array} signature_bytes
|
|
272
|
+
* @param {Uint8Array} public_key
|
|
273
|
+
*/
|
|
274
|
+
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
275
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
+
const len0 = WASM_VECTOR_LEN;
|
|
277
|
+
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
278
|
+
if (ret[1]) {
|
|
279
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
240
283
|
/**
|
|
241
284
|
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
242
285
|
* @returns {Uint8Array}
|
|
@@ -295,49 +338,6 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
295
338
|
WASM_VECTOR_LEN = arg.length;
|
|
296
339
|
return ptr;
|
|
297
340
|
}
|
|
298
|
-
/**
|
|
299
|
-
* @param {string} signature_text
|
|
300
|
-
* @param {Uint8Array} signature_bytes
|
|
301
|
-
* @param {Uint8Array} public_key
|
|
302
|
-
*/
|
|
303
|
-
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
304
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
305
|
-
const len0 = WASM_VECTOR_LEN;
|
|
306
|
-
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
307
|
-
if (ret[1]) {
|
|
308
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* @param {string} host
|
|
314
|
-
* @param {string} inbox_id
|
|
315
|
-
* @param {Identifier} account_identifier
|
|
316
|
-
* @param {string | null} [db_path]
|
|
317
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
318
|
-
* @param {string | null} [device_sync_server_url]
|
|
319
|
-
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
320
|
-
* @param {LogOptions | null} [log_options]
|
|
321
|
-
* @returns {Promise<Client>}
|
|
322
|
-
*/
|
|
323
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
324
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
325
|
-
const len0 = WASM_VECTOR_LEN;
|
|
326
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
327
|
-
const len1 = WASM_VECTOR_LEN;
|
|
328
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
-
var len2 = WASM_VECTOR_LEN;
|
|
330
|
-
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
|
-
var len3 = WASM_VECTOR_LEN;
|
|
332
|
-
let ptr4 = 0;
|
|
333
|
-
if (!isLikeNone(log_options)) {
|
|
334
|
-
_assertClass(log_options, LogOptions);
|
|
335
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
336
|
-
}
|
|
337
|
-
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);
|
|
338
|
-
return ret;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
341
|
/**
|
|
342
342
|
* @param {string} host
|
|
343
343
|
* @param {Identifier} accountIdentifier
|
|
@@ -382,15 +382,15 @@ function __wbg_adapter_53(arg0, arg1) {
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
385
|
-
wasm.
|
|
385
|
+
wasm.closure4569_externref_shim(arg0, arg1, arg2);
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
function __wbg_adapter_59(arg0, arg1) {
|
|
389
389
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h232599d7dcf89d52(arg0, arg1);
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
function
|
|
393
|
-
wasm.
|
|
392
|
+
function __wbg_adapter_775(arg0, arg1, arg2, arg3) {
|
|
393
|
+
wasm.closure5545_externref_shim(arg0, arg1, arg2, arg3);
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
/**
|
|
@@ -703,125 +703,6 @@ export class Client {
|
|
|
703
703
|
const ptr = this.__destroy_into_raw();
|
|
704
704
|
wasm.__wbg_client_free(ptr, 0);
|
|
705
705
|
}
|
|
706
|
-
/**
|
|
707
|
-
* @returns {string | undefined}
|
|
708
|
-
*/
|
|
709
|
-
createInboxSignatureText() {
|
|
710
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
711
|
-
if (ret[3]) {
|
|
712
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
713
|
-
}
|
|
714
|
-
let v1;
|
|
715
|
-
if (ret[0] !== 0) {
|
|
716
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
717
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
718
|
-
}
|
|
719
|
-
return v1;
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* @param {Identifier} new_identifier
|
|
723
|
-
* @returns {Promise<string>}
|
|
724
|
-
*/
|
|
725
|
-
addWalletSignatureText(new_identifier) {
|
|
726
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
727
|
-
return ret;
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* @param {Identifier} identifier
|
|
731
|
-
* @returns {Promise<string>}
|
|
732
|
-
*/
|
|
733
|
-
revokeWalletSignatureText(identifier) {
|
|
734
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
735
|
-
return ret;
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* @returns {Promise<string>}
|
|
739
|
-
*/
|
|
740
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
741
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
742
|
-
return ret;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* @param {Uint8Array[]} installation_ids
|
|
746
|
-
* @returns {Promise<string>}
|
|
747
|
-
*/
|
|
748
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
749
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
750
|
-
const len0 = WASM_VECTOR_LEN;
|
|
751
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
752
|
-
return ret;
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* @param {Identifier} new_recovery_identifier
|
|
756
|
-
* @returns {Promise<string>}
|
|
757
|
-
*/
|
|
758
|
-
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
759
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
760
|
-
return ret;
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* @param {SignatureRequestType} signature_type
|
|
764
|
-
* @param {Uint8Array} signature_bytes
|
|
765
|
-
* @returns {Promise<void>}
|
|
766
|
-
*/
|
|
767
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
768
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
769
|
-
return ret;
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* @param {SignatureRequestType} signature_type
|
|
773
|
-
* @param {PasskeySignature} signature
|
|
774
|
-
* @returns {Promise<void>}
|
|
775
|
-
*/
|
|
776
|
-
addPasskeySignature(signature_type, signature) {
|
|
777
|
-
_assertClass(signature, PasskeySignature);
|
|
778
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
779
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
780
|
-
return ret;
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* @param {SignatureRequestType} signature_type
|
|
784
|
-
* @param {Uint8Array} signature_bytes
|
|
785
|
-
* @param {bigint} chain_id
|
|
786
|
-
* @param {bigint | null} [block_number]
|
|
787
|
-
* @returns {Promise<void>}
|
|
788
|
-
*/
|
|
789
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
790
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
791
|
-
return ret;
|
|
792
|
-
}
|
|
793
|
-
/**
|
|
794
|
-
* @returns {Promise<void>}
|
|
795
|
-
*/
|
|
796
|
-
applySignatureRequests() {
|
|
797
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
798
|
-
return ret;
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* @param {string} signature_text
|
|
802
|
-
* @returns {Uint8Array}
|
|
803
|
-
*/
|
|
804
|
-
signWithInstallationKey(signature_text) {
|
|
805
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
806
|
-
const len0 = WASM_VECTOR_LEN;
|
|
807
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
808
|
-
if (ret[2]) {
|
|
809
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
810
|
-
}
|
|
811
|
-
return takeFromExternrefTable0(ret[0]);
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* @param {string} signature_text
|
|
815
|
-
* @param {Uint8Array} signature_bytes
|
|
816
|
-
*/
|
|
817
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
818
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
|
-
const len0 = WASM_VECTOR_LEN;
|
|
820
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
821
|
-
if (ret[1]) {
|
|
822
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
706
|
/**
|
|
826
707
|
* @returns {Identifier}
|
|
827
708
|
*/
|
|
@@ -960,6 +841,9 @@ export class Client {
|
|
|
960
841
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
961
842
|
}
|
|
962
843
|
}
|
|
844
|
+
clearAllStatistics() {
|
|
845
|
+
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
846
|
+
}
|
|
963
847
|
/**
|
|
964
848
|
* @param {string} server_url
|
|
965
849
|
* @returns {Promise<string>}
|
|
@@ -970,6 +854,146 @@ export class Client {
|
|
|
970
854
|
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
971
855
|
return ret;
|
|
972
856
|
}
|
|
857
|
+
/**
|
|
858
|
+
* @returns {string | undefined}
|
|
859
|
+
*/
|
|
860
|
+
createInboxSignatureText() {
|
|
861
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
862
|
+
if (ret[3]) {
|
|
863
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
864
|
+
}
|
|
865
|
+
let v1;
|
|
866
|
+
if (ret[0] !== 0) {
|
|
867
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
868
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
869
|
+
}
|
|
870
|
+
return v1;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* @param {Identifier} new_identifier
|
|
874
|
+
* @returns {Promise<string>}
|
|
875
|
+
*/
|
|
876
|
+
addWalletSignatureText(new_identifier) {
|
|
877
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
878
|
+
return ret;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* @param {Identifier} identifier
|
|
882
|
+
* @returns {Promise<string>}
|
|
883
|
+
*/
|
|
884
|
+
revokeWalletSignatureText(identifier) {
|
|
885
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
886
|
+
return ret;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* @returns {Promise<string>}
|
|
890
|
+
*/
|
|
891
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
892
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
893
|
+
return ret;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* @param {Uint8Array[]} installation_ids
|
|
897
|
+
* @returns {Promise<string>}
|
|
898
|
+
*/
|
|
899
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
900
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
901
|
+
const len0 = WASM_VECTOR_LEN;
|
|
902
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
903
|
+
return ret;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* @param {Identifier} new_recovery_identifier
|
|
907
|
+
* @returns {Promise<string>}
|
|
908
|
+
*/
|
|
909
|
+
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
910
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
911
|
+
return ret;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* @param {SignatureRequestType} signature_type
|
|
915
|
+
* @param {Uint8Array} signature_bytes
|
|
916
|
+
* @returns {Promise<void>}
|
|
917
|
+
*/
|
|
918
|
+
addEcdsaSignature(signature_type, signature_bytes) {
|
|
919
|
+
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
920
|
+
return ret;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* @param {SignatureRequestType} signature_type
|
|
924
|
+
* @param {PasskeySignature} signature
|
|
925
|
+
* @returns {Promise<void>}
|
|
926
|
+
*/
|
|
927
|
+
addPasskeySignature(signature_type, signature) {
|
|
928
|
+
_assertClass(signature, PasskeySignature);
|
|
929
|
+
var ptr0 = signature.__destroy_into_raw();
|
|
930
|
+
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
931
|
+
return ret;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* @param {SignatureRequestType} signature_type
|
|
935
|
+
* @param {Uint8Array} signature_bytes
|
|
936
|
+
* @param {bigint} chain_id
|
|
937
|
+
* @param {bigint | null} [block_number]
|
|
938
|
+
* @returns {Promise<void>}
|
|
939
|
+
*/
|
|
940
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
941
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
942
|
+
return ret;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* @returns {Promise<void>}
|
|
946
|
+
*/
|
|
947
|
+
applySignatureRequests() {
|
|
948
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
949
|
+
return ret;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* @param {string} signature_text
|
|
953
|
+
* @returns {Uint8Array}
|
|
954
|
+
*/
|
|
955
|
+
signWithInstallationKey(signature_text) {
|
|
956
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
957
|
+
const len0 = WASM_VECTOR_LEN;
|
|
958
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
959
|
+
if (ret[2]) {
|
|
960
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
961
|
+
}
|
|
962
|
+
return takeFromExternrefTable0(ret[0]);
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* @param {string} signature_text
|
|
966
|
+
* @param {Uint8Array} signature_bytes
|
|
967
|
+
*/
|
|
968
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
969
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
970
|
+
const len0 = WASM_VECTOR_LEN;
|
|
971
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
972
|
+
if (ret[1]) {
|
|
973
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* @param {Consent[]} records
|
|
978
|
+
* @returns {Promise<void>}
|
|
979
|
+
*/
|
|
980
|
+
setConsentStates(records) {
|
|
981
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
982
|
+
const len0 = WASM_VECTOR_LEN;
|
|
983
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
984
|
+
return ret;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* @param {ConsentEntityType} entity_type
|
|
988
|
+
* @param {string} entity
|
|
989
|
+
* @returns {Promise<ConsentState>}
|
|
990
|
+
*/
|
|
991
|
+
getConsentState(entity_type, entity) {
|
|
992
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
993
|
+
const len0 = WASM_VECTOR_LEN;
|
|
994
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
995
|
+
return ret;
|
|
996
|
+
}
|
|
973
997
|
/**
|
|
974
998
|
*
|
|
975
999
|
* * Get the client's inbox state.
|
|
@@ -1009,27 +1033,6 @@ export class Client {
|
|
|
1009
1033
|
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
1010
1034
|
return ret;
|
|
1011
1035
|
}
|
|
1012
|
-
/**
|
|
1013
|
-
* @param {Consent[]} records
|
|
1014
|
-
* @returns {Promise<void>}
|
|
1015
|
-
*/
|
|
1016
|
-
setConsentStates(records) {
|
|
1017
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
1018
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1019
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
1020
|
-
return ret;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* @param {ConsentEntityType} entity_type
|
|
1024
|
-
* @param {string} entity
|
|
1025
|
-
* @returns {Promise<ConsentState>}
|
|
1026
|
-
*/
|
|
1027
|
-
getConsentState(entity_type, entity) {
|
|
1028
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1029
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1030
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
1031
|
-
return ret;
|
|
1032
|
-
}
|
|
1033
1036
|
}
|
|
1034
1037
|
|
|
1035
1038
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1166,7 +1169,7 @@ export class ContentTypeId {
|
|
|
1166
1169
|
set authorityId(arg0) {
|
|
1167
1170
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1168
1171
|
const len0 = WASM_VECTOR_LEN;
|
|
1169
|
-
wasm.
|
|
1172
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
1170
1173
|
}
|
|
1171
1174
|
/**
|
|
1172
1175
|
* @returns {string}
|
|
@@ -1260,6 +1263,25 @@ export class Conversation {
|
|
|
1260
1263
|
const ptr = this.__destroy_into_raw();
|
|
1261
1264
|
wasm.__wbg_conversation_free(ptr, 0);
|
|
1262
1265
|
}
|
|
1266
|
+
/**
|
|
1267
|
+
* @returns {ConsentState}
|
|
1268
|
+
*/
|
|
1269
|
+
consentState() {
|
|
1270
|
+
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1271
|
+
if (ret[2]) {
|
|
1272
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1273
|
+
}
|
|
1274
|
+
return ret[0];
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* @param {ConsentState} state
|
|
1278
|
+
*/
|
|
1279
|
+
updateConsentState(state) {
|
|
1280
|
+
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1281
|
+
if (ret[1]) {
|
|
1282
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1263
1285
|
/**
|
|
1264
1286
|
* @returns {string}
|
|
1265
1287
|
*/
|
|
@@ -1754,25 +1776,6 @@ export class Conversation {
|
|
|
1754
1776
|
const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
|
|
1755
1777
|
return ret;
|
|
1756
1778
|
}
|
|
1757
|
-
/**
|
|
1758
|
-
* @returns {ConsentState}
|
|
1759
|
-
*/
|
|
1760
|
-
consentState() {
|
|
1761
|
-
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1762
|
-
if (ret[2]) {
|
|
1763
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1764
|
-
}
|
|
1765
|
-
return ret[0];
|
|
1766
|
-
}
|
|
1767
|
-
/**
|
|
1768
|
-
* @param {ConsentState} state
|
|
1769
|
-
*/
|
|
1770
|
-
updateConsentState(state) {
|
|
1771
|
-
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1772
|
-
if (ret[1]) {
|
|
1773
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
1779
|
}
|
|
1777
1780
|
|
|
1778
1781
|
const ConversationDebugInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2536,7 +2539,7 @@ export class GroupMember {
|
|
|
2536
2539
|
set inboxId(arg0) {
|
|
2537
2540
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2538
2541
|
const len0 = WASM_VECTOR_LEN;
|
|
2539
|
-
wasm.
|
|
2542
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2540
2543
|
}
|
|
2541
2544
|
/**
|
|
2542
2545
|
* @returns {Identifier[]}
|
|
@@ -2897,7 +2900,7 @@ export class InboxState {
|
|
|
2897
2900
|
set inboxId(arg0) {
|
|
2898
2901
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2899
2902
|
const len0 = WASM_VECTOR_LEN;
|
|
2900
|
-
wasm.
|
|
2903
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2901
2904
|
}
|
|
2902
2905
|
/**
|
|
2903
2906
|
* @returns {Identifier}
|
|
@@ -3229,7 +3232,7 @@ export class KeyPackageStatus {
|
|
|
3229
3232
|
_assertClass(arg0, Lifetime);
|
|
3230
3233
|
ptr0 = arg0.__destroy_into_raw();
|
|
3231
3234
|
}
|
|
3232
|
-
wasm.
|
|
3235
|
+
wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
3233
3236
|
}
|
|
3234
3237
|
/**
|
|
3235
3238
|
* @returns {string | undefined}
|
|
@@ -3282,27 +3285,27 @@ export class Lifetime {
|
|
|
3282
3285
|
* @returns {bigint}
|
|
3283
3286
|
*/
|
|
3284
3287
|
get not_before() {
|
|
3285
|
-
const ret = wasm.
|
|
3288
|
+
const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
|
|
3286
3289
|
return BigInt.asUintN(64, ret);
|
|
3287
3290
|
}
|
|
3288
3291
|
/**
|
|
3289
3292
|
* @param {bigint} arg0
|
|
3290
3293
|
*/
|
|
3291
3294
|
set not_before(arg0) {
|
|
3292
|
-
wasm.
|
|
3295
|
+
wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
|
|
3293
3296
|
}
|
|
3294
3297
|
/**
|
|
3295
3298
|
* @returns {bigint}
|
|
3296
3299
|
*/
|
|
3297
3300
|
get not_after() {
|
|
3298
|
-
const ret = wasm.
|
|
3301
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
3299
3302
|
return BigInt.asUintN(64, ret);
|
|
3300
3303
|
}
|
|
3301
3304
|
/**
|
|
3302
3305
|
* @param {bigint} arg0
|
|
3303
3306
|
*/
|
|
3304
3307
|
set not_after(arg0) {
|
|
3305
|
-
wasm.
|
|
3308
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
3306
3309
|
}
|
|
3307
3310
|
}
|
|
3308
3311
|
|
|
@@ -3367,7 +3370,7 @@ export class ListConversationsOptions {
|
|
|
3367
3370
|
* @param {bigint | null} [arg0]
|
|
3368
3371
|
*/
|
|
3369
3372
|
set createdAfterNs(arg0) {
|
|
3370
|
-
wasm.
|
|
3373
|
+
wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
3371
3374
|
}
|
|
3372
3375
|
/**
|
|
3373
3376
|
* @returns {bigint | undefined}
|
|
@@ -3474,7 +3477,7 @@ export class ListMessagesOptions {
|
|
|
3474
3477
|
* @param {bigint | null} [arg0]
|
|
3475
3478
|
*/
|
|
3476
3479
|
set sentBeforeNs(arg0) {
|
|
3477
|
-
wasm.
|
|
3480
|
+
wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
3478
3481
|
}
|
|
3479
3482
|
/**
|
|
3480
3483
|
* @returns {bigint | undefined}
|
|
@@ -3859,14 +3862,14 @@ export class MessageDisappearingSettings {
|
|
|
3859
3862
|
* @returns {bigint}
|
|
3860
3863
|
*/
|
|
3861
3864
|
get inNs() {
|
|
3862
|
-
const ret = wasm.
|
|
3865
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
3863
3866
|
return ret;
|
|
3864
3867
|
}
|
|
3865
3868
|
/**
|
|
3866
3869
|
* @param {bigint} arg0
|
|
3867
3870
|
*/
|
|
3868
3871
|
set inNs(arg0) {
|
|
3869
|
-
wasm.
|
|
3872
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
3870
3873
|
}
|
|
3871
3874
|
/**
|
|
3872
3875
|
* @param {bigint} from_ns
|
|
@@ -4348,7 +4351,7 @@ export class Reaction {
|
|
|
4348
4351
|
set reference(arg0) {
|
|
4349
4352
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4350
4353
|
const len0 = WASM_VECTOR_LEN;
|
|
4351
|
-
wasm.
|
|
4354
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4352
4355
|
}
|
|
4353
4356
|
/**
|
|
4354
4357
|
* @returns {string}
|
|
@@ -5203,7 +5206,7 @@ function __wbg_get_imports() {
|
|
|
5203
5206
|
const a = state0.a;
|
|
5204
5207
|
state0.a = 0;
|
|
5205
5208
|
try {
|
|
5206
|
-
return
|
|
5209
|
+
return __wbg_adapter_775(a, state0.b, arg0, arg1);
|
|
5207
5210
|
} finally {
|
|
5208
5211
|
state0.a = a;
|
|
5209
5212
|
}
|
|
@@ -5315,19 +5318,19 @@ function __wbg_get_imports() {
|
|
|
5315
5318
|
const ret = arg0.now();
|
|
5316
5319
|
return ret;
|
|
5317
5320
|
};
|
|
5318
|
-
imports.wbg.
|
|
5321
|
+
imports.wbg.__wbg_onconsentupdate_41b7339687cc011c = function(arg0, arg1) {
|
|
5319
5322
|
arg0.on_consent_update(arg1);
|
|
5320
5323
|
};
|
|
5321
|
-
imports.wbg.
|
|
5324
|
+
imports.wbg.__wbg_onconversation_7404b2379eb67834 = function(arg0, arg1) {
|
|
5322
5325
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
5323
5326
|
};
|
|
5324
|
-
imports.wbg.
|
|
5327
|
+
imports.wbg.__wbg_onerror_eb2eb9eb1d76fa24 = function(arg0, arg1) {
|
|
5325
5328
|
arg0.on_error(arg1);
|
|
5326
5329
|
};
|
|
5327
|
-
imports.wbg.
|
|
5330
|
+
imports.wbg.__wbg_onmessage_1ad7dbda90e7e92d = function(arg0, arg1) {
|
|
5328
5331
|
arg0.on_message(Message.__wrap(arg1));
|
|
5329
5332
|
};
|
|
5330
|
-
imports.wbg.
|
|
5333
|
+
imports.wbg.__wbg_onuserpreferenceupdate_71b80aff3461dfa2 = function(arg0, arg1, arg2) {
|
|
5331
5334
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
5332
5335
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
5333
5336
|
arg0.on_user_preference_update(v0);
|
|
@@ -5614,20 +5617,20 @@ function __wbg_get_imports() {
|
|
|
5614
5617
|
const ret = false;
|
|
5615
5618
|
return ret;
|
|
5616
5619
|
};
|
|
5617
|
-
imports.wbg.
|
|
5618
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5620
|
+
imports.wbg.__wbindgen_closure_wrapper17557 = function(arg0, arg1, arg2) {
|
|
5621
|
+
const ret = makeMutClosure(arg0, arg1, 4207, __wbg_adapter_50);
|
|
5619
5622
|
return ret;
|
|
5620
5623
|
};
|
|
5621
|
-
imports.wbg.
|
|
5622
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5624
|
+
imports.wbg.__wbindgen_closure_wrapper17717 = function(arg0, arg1, arg2) {
|
|
5625
|
+
const ret = makeMutClosure(arg0, arg1, 4265, __wbg_adapter_53);
|
|
5623
5626
|
return ret;
|
|
5624
5627
|
};
|
|
5625
|
-
imports.wbg.
|
|
5626
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5628
|
+
imports.wbg.__wbindgen_closure_wrapper20829 = function(arg0, arg1, arg2) {
|
|
5629
|
+
const ret = makeMutClosure(arg0, arg1, 4570, __wbg_adapter_56);
|
|
5627
5630
|
return ret;
|
|
5628
5631
|
};
|
|
5629
|
-
imports.wbg.
|
|
5630
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5632
|
+
imports.wbg.__wbindgen_closure_wrapper20939 = function(arg0, arg1, arg2) {
|
|
5633
|
+
const ret = makeMutClosure(arg0, arg1, 4581, __wbg_adapter_59);
|
|
5631
5634
|
return ret;
|
|
5632
5635
|
};
|
|
5633
5636
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|