@xmtp/wasm-bindings 1.2.0-rc4 → 1.2.0
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 +207 -207
- package/dist/bindings_wasm.js +210 -208
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +191 -191
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -216,40 +216,6 @@ 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
|
-
* @returns {Promise<Client>}
|
|
234
|
-
*/
|
|
235
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
236
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
237
|
-
const len0 = WASM_VECTOR_LEN;
|
|
238
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
|
-
const len1 = WASM_VECTOR_LEN;
|
|
240
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
241
|
-
var len2 = WASM_VECTOR_LEN;
|
|
242
|
-
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
|
-
var len3 = WASM_VECTOR_LEN;
|
|
244
|
-
let ptr4 = 0;
|
|
245
|
-
if (!isLikeNone(log_options)) {
|
|
246
|
-
_assertClass(log_options, LogOptions);
|
|
247
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
248
|
-
}
|
|
249
|
-
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);
|
|
250
|
-
return ret;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
219
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
254
220
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
255
221
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -265,17 +231,10 @@ function takeFromExternrefTable0(idx) {
|
|
|
265
231
|
wasm.__externref_table_dealloc(idx);
|
|
266
232
|
return value;
|
|
267
233
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*/
|
|
273
|
-
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
274
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
275
|
-
const len0 = WASM_VECTOR_LEN;
|
|
276
|
-
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
277
|
-
if (ret[1]) {
|
|
278
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
234
|
+
|
|
235
|
+
function _assertClass(instance, klass) {
|
|
236
|
+
if (!(instance instanceof klass)) {
|
|
237
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
279
238
|
}
|
|
280
239
|
}
|
|
281
240
|
|
|
@@ -337,6 +296,49 @@ export function decodeReaction(bytes) {
|
|
|
337
296
|
return Reaction.__wrap(ret[0]);
|
|
338
297
|
}
|
|
339
298
|
|
|
299
|
+
/**
|
|
300
|
+
* @param {string} signature_text
|
|
301
|
+
* @param {Uint8Array} signature_bytes
|
|
302
|
+
* @param {Uint8Array} public_key
|
|
303
|
+
*/
|
|
304
|
+
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
305
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
const len0 = WASM_VECTOR_LEN;
|
|
307
|
+
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
308
|
+
if (ret[1]) {
|
|
309
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @param {string} host
|
|
315
|
+
* @param {string} inbox_id
|
|
316
|
+
* @param {Identifier} account_identifier
|
|
317
|
+
* @param {string | null} [db_path]
|
|
318
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
319
|
+
* @param {string | null} [device_sync_server_url]
|
|
320
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
321
|
+
* @param {LogOptions | null} [log_options]
|
|
322
|
+
* @returns {Promise<Client>}
|
|
323
|
+
*/
|
|
324
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
325
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
326
|
+
const len0 = WASM_VECTOR_LEN;
|
|
327
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
328
|
+
const len1 = WASM_VECTOR_LEN;
|
|
329
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
330
|
+
var len2 = WASM_VECTOR_LEN;
|
|
331
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
332
|
+
var len3 = WASM_VECTOR_LEN;
|
|
333
|
+
let ptr4 = 0;
|
|
334
|
+
if (!isLikeNone(log_options)) {
|
|
335
|
+
_assertClass(log_options, LogOptions);
|
|
336
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
337
|
+
}
|
|
338
|
+
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);
|
|
339
|
+
return ret;
|
|
340
|
+
}
|
|
341
|
+
|
|
340
342
|
/**
|
|
341
343
|
* @param {string} host
|
|
342
344
|
* @param {Identifier} accountIdentifier
|
|
@@ -381,7 +383,7 @@ function __wbg_adapter_53(arg0, arg1) {
|
|
|
381
383
|
}
|
|
382
384
|
|
|
383
385
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
384
|
-
wasm.
|
|
386
|
+
wasm.closure4498_externref_shim(arg0, arg1, arg2);
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
function __wbg_adapter_59(arg0, arg1) {
|
|
@@ -389,7 +391,7 @@ function __wbg_adapter_59(arg0, arg1) {
|
|
|
389
391
|
}
|
|
390
392
|
|
|
391
393
|
function __wbg_adapter_769(arg0, arg1, arg2, arg3) {
|
|
392
|
-
wasm.
|
|
394
|
+
wasm.closure5469_externref_shim(arg0, arg1, arg2, arg3);
|
|
393
395
|
}
|
|
394
396
|
|
|
395
397
|
/**
|
|
@@ -702,6 +704,146 @@ export class Client {
|
|
|
702
704
|
const ptr = this.__destroy_into_raw();
|
|
703
705
|
wasm.__wbg_client_free(ptr, 0);
|
|
704
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
* @param {Consent[]} records
|
|
709
|
+
* @returns {Promise<void>}
|
|
710
|
+
*/
|
|
711
|
+
setConsentStates(records) {
|
|
712
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
713
|
+
const len0 = WASM_VECTOR_LEN;
|
|
714
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
715
|
+
return ret;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* @param {ConsentEntityType} entity_type
|
|
719
|
+
* @param {string} entity
|
|
720
|
+
* @returns {Promise<ConsentState>}
|
|
721
|
+
*/
|
|
722
|
+
getConsentState(entity_type, entity) {
|
|
723
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
724
|
+
const len0 = WASM_VECTOR_LEN;
|
|
725
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
726
|
+
return ret;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @returns {string | undefined}
|
|
730
|
+
*/
|
|
731
|
+
createInboxSignatureText() {
|
|
732
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
733
|
+
if (ret[3]) {
|
|
734
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
735
|
+
}
|
|
736
|
+
let v1;
|
|
737
|
+
if (ret[0] !== 0) {
|
|
738
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
739
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
740
|
+
}
|
|
741
|
+
return v1;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @param {Identifier} new_identifier
|
|
745
|
+
* @returns {Promise<string>}
|
|
746
|
+
*/
|
|
747
|
+
addWalletSignatureText(new_identifier) {
|
|
748
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
749
|
+
return ret;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* @param {Identifier} identifier
|
|
753
|
+
* @returns {Promise<string>}
|
|
754
|
+
*/
|
|
755
|
+
revokeWalletSignatureText(identifier) {
|
|
756
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
757
|
+
return ret;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* @returns {Promise<string>}
|
|
761
|
+
*/
|
|
762
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
763
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
764
|
+
return ret;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* @param {Uint8Array[]} installation_ids
|
|
768
|
+
* @returns {Promise<string>}
|
|
769
|
+
*/
|
|
770
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
771
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
772
|
+
const len0 = WASM_VECTOR_LEN;
|
|
773
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
774
|
+
return ret;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* @param {Identifier} new_recovery_identifier
|
|
778
|
+
* @returns {Promise<string>}
|
|
779
|
+
*/
|
|
780
|
+
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
781
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
782
|
+
return ret;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* @param {SignatureRequestType} signature_type
|
|
786
|
+
* @param {Uint8Array} signature_bytes
|
|
787
|
+
* @returns {Promise<void>}
|
|
788
|
+
*/
|
|
789
|
+
addEcdsaSignature(signature_type, signature_bytes) {
|
|
790
|
+
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
791
|
+
return ret;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* @param {SignatureRequestType} signature_type
|
|
795
|
+
* @param {PasskeySignature} signature
|
|
796
|
+
* @returns {Promise<void>}
|
|
797
|
+
*/
|
|
798
|
+
addPasskeySignature(signature_type, signature) {
|
|
799
|
+
_assertClass(signature, PasskeySignature);
|
|
800
|
+
var ptr0 = signature.__destroy_into_raw();
|
|
801
|
+
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
802
|
+
return ret;
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* @param {SignatureRequestType} signature_type
|
|
806
|
+
* @param {Uint8Array} signature_bytes
|
|
807
|
+
* @param {bigint} chain_id
|
|
808
|
+
* @param {bigint | null} [block_number]
|
|
809
|
+
* @returns {Promise<void>}
|
|
810
|
+
*/
|
|
811
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
812
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
813
|
+
return ret;
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* @returns {Promise<void>}
|
|
817
|
+
*/
|
|
818
|
+
applySignatureRequests() {
|
|
819
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
820
|
+
return ret;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* @param {string} signature_text
|
|
824
|
+
* @returns {Uint8Array}
|
|
825
|
+
*/
|
|
826
|
+
signWithInstallationKey(signature_text) {
|
|
827
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
828
|
+
const len0 = WASM_VECTOR_LEN;
|
|
829
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
830
|
+
if (ret[2]) {
|
|
831
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
832
|
+
}
|
|
833
|
+
return takeFromExternrefTable0(ret[0]);
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* @param {string} signature_text
|
|
837
|
+
* @param {Uint8Array} signature_bytes
|
|
838
|
+
*/
|
|
839
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
840
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
841
|
+
const len0 = WASM_VECTOR_LEN;
|
|
842
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
843
|
+
if (ret[1]) {
|
|
844
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
705
847
|
/**
|
|
706
848
|
* @returns {Identifier}
|
|
707
849
|
*/
|
|
@@ -850,146 +992,6 @@ export class Client {
|
|
|
850
992
|
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
851
993
|
return ret;
|
|
852
994
|
}
|
|
853
|
-
/**
|
|
854
|
-
* @returns {string | undefined}
|
|
855
|
-
*/
|
|
856
|
-
createInboxSignatureText() {
|
|
857
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
858
|
-
if (ret[3]) {
|
|
859
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
860
|
-
}
|
|
861
|
-
let v1;
|
|
862
|
-
if (ret[0] !== 0) {
|
|
863
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
864
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
865
|
-
}
|
|
866
|
-
return v1;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* @param {Identifier} new_identifier
|
|
870
|
-
* @returns {Promise<string>}
|
|
871
|
-
*/
|
|
872
|
-
addWalletSignatureText(new_identifier) {
|
|
873
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
874
|
-
return ret;
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* @param {Identifier} identifier
|
|
878
|
-
* @returns {Promise<string>}
|
|
879
|
-
*/
|
|
880
|
-
revokeWalletSignatureText(identifier) {
|
|
881
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
882
|
-
return ret;
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* @returns {Promise<string>}
|
|
886
|
-
*/
|
|
887
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
888
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
889
|
-
return ret;
|
|
890
|
-
}
|
|
891
|
-
/**
|
|
892
|
-
* @param {Uint8Array[]} installation_ids
|
|
893
|
-
* @returns {Promise<string>}
|
|
894
|
-
*/
|
|
895
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
896
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
897
|
-
const len0 = WASM_VECTOR_LEN;
|
|
898
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
899
|
-
return ret;
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* @param {Identifier} new_recovery_identifier
|
|
903
|
-
* @returns {Promise<string>}
|
|
904
|
-
*/
|
|
905
|
-
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
906
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
907
|
-
return ret;
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* @param {SignatureRequestType} signature_type
|
|
911
|
-
* @param {Uint8Array} signature_bytes
|
|
912
|
-
* @returns {Promise<void>}
|
|
913
|
-
*/
|
|
914
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
915
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
916
|
-
return ret;
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* @param {SignatureRequestType} signature_type
|
|
920
|
-
* @param {PasskeySignature} signature
|
|
921
|
-
* @returns {Promise<void>}
|
|
922
|
-
*/
|
|
923
|
-
addPasskeySignature(signature_type, signature) {
|
|
924
|
-
_assertClass(signature, PasskeySignature);
|
|
925
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
926
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
927
|
-
return ret;
|
|
928
|
-
}
|
|
929
|
-
/**
|
|
930
|
-
* @param {SignatureRequestType} signature_type
|
|
931
|
-
* @param {Uint8Array} signature_bytes
|
|
932
|
-
* @param {bigint} chain_id
|
|
933
|
-
* @param {bigint | null} [block_number]
|
|
934
|
-
* @returns {Promise<void>}
|
|
935
|
-
*/
|
|
936
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
937
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
938
|
-
return ret;
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* @returns {Promise<void>}
|
|
942
|
-
*/
|
|
943
|
-
applySignatureRequests() {
|
|
944
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
945
|
-
return ret;
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* @param {string} signature_text
|
|
949
|
-
* @returns {Uint8Array}
|
|
950
|
-
*/
|
|
951
|
-
signWithInstallationKey(signature_text) {
|
|
952
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
953
|
-
const len0 = WASM_VECTOR_LEN;
|
|
954
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
955
|
-
if (ret[2]) {
|
|
956
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
957
|
-
}
|
|
958
|
-
return takeFromExternrefTable0(ret[0]);
|
|
959
|
-
}
|
|
960
|
-
/**
|
|
961
|
-
* @param {string} signature_text
|
|
962
|
-
* @param {Uint8Array} signature_bytes
|
|
963
|
-
*/
|
|
964
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
965
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
966
|
-
const len0 = WASM_VECTOR_LEN;
|
|
967
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
968
|
-
if (ret[1]) {
|
|
969
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* @param {Consent[]} records
|
|
974
|
-
* @returns {Promise<void>}
|
|
975
|
-
*/
|
|
976
|
-
setConsentStates(records) {
|
|
977
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
978
|
-
const len0 = WASM_VECTOR_LEN;
|
|
979
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
980
|
-
return ret;
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* @param {ConsentEntityType} entity_type
|
|
984
|
-
* @param {string} entity
|
|
985
|
-
* @returns {Promise<ConsentState>}
|
|
986
|
-
*/
|
|
987
|
-
getConsentState(entity_type, entity) {
|
|
988
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
989
|
-
const len0 = WASM_VECTOR_LEN;
|
|
990
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
991
|
-
return ret;
|
|
992
|
-
}
|
|
993
995
|
/**
|
|
994
996
|
*
|
|
995
997
|
* * Get the client's inbox state.
|
|
@@ -1165,7 +1167,7 @@ export class ContentTypeId {
|
|
|
1165
1167
|
set authorityId(arg0) {
|
|
1166
1168
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1167
1169
|
const len0 = WASM_VECTOR_LEN;
|
|
1168
|
-
wasm.
|
|
1170
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
1169
1171
|
}
|
|
1170
1172
|
/**
|
|
1171
1173
|
* @returns {string}
|
|
@@ -2526,7 +2528,7 @@ export class GroupMember {
|
|
|
2526
2528
|
set inboxId(arg0) {
|
|
2527
2529
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2528
2530
|
const len0 = WASM_VECTOR_LEN;
|
|
2529
|
-
wasm.
|
|
2531
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
2530
2532
|
}
|
|
2531
2533
|
/**
|
|
2532
2534
|
* @returns {Identifier[]}
|
|
@@ -3264,27 +3266,27 @@ export class Lifetime {
|
|
|
3264
3266
|
* @returns {bigint}
|
|
3265
3267
|
*/
|
|
3266
3268
|
get not_before() {
|
|
3267
|
-
const ret = wasm.
|
|
3269
|
+
const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
|
|
3268
3270
|
return BigInt.asUintN(64, ret);
|
|
3269
3271
|
}
|
|
3270
3272
|
/**
|
|
3271
3273
|
* @param {bigint} arg0
|
|
3272
3274
|
*/
|
|
3273
3275
|
set not_before(arg0) {
|
|
3274
|
-
wasm.
|
|
3276
|
+
wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
|
|
3275
3277
|
}
|
|
3276
3278
|
/**
|
|
3277
3279
|
* @returns {bigint}
|
|
3278
3280
|
*/
|
|
3279
3281
|
get not_after() {
|
|
3280
|
-
const ret = wasm.
|
|
3282
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
3281
3283
|
return BigInt.asUintN(64, ret);
|
|
3282
3284
|
}
|
|
3283
3285
|
/**
|
|
3284
3286
|
* @param {bigint} arg0
|
|
3285
3287
|
*/
|
|
3286
3288
|
set not_after(arg0) {
|
|
3287
|
-
wasm.
|
|
3289
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
3288
3290
|
}
|
|
3289
3291
|
}
|
|
3290
3292
|
|
|
@@ -4330,7 +4332,7 @@ export class Reaction {
|
|
|
4330
4332
|
set reference(arg0) {
|
|
4331
4333
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4332
4334
|
const len0 = WASM_VECTOR_LEN;
|
|
4333
|
-
wasm.
|
|
4335
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
4334
4336
|
}
|
|
4335
4337
|
/**
|
|
4336
4338
|
* @returns {string}
|
|
@@ -4353,7 +4355,7 @@ export class Reaction {
|
|
|
4353
4355
|
set referenceInboxId(arg0) {
|
|
4354
4356
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4355
4357
|
const len0 = WASM_VECTOR_LEN;
|
|
4356
|
-
wasm.
|
|
4358
|
+
wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
|
|
4357
4359
|
}
|
|
4358
4360
|
/**
|
|
4359
4361
|
* @returns {ReactionAction}
|
|
@@ -5293,19 +5295,19 @@ function __wbg_get_imports() {
|
|
|
5293
5295
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
5294
5296
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
5295
5297
|
};
|
|
5296
|
-
imports.wbg.
|
|
5298
|
+
imports.wbg.__wbg_onconsentupdate_4ebce420dd750015 = function(arg0, arg1) {
|
|
5297
5299
|
arg0.on_consent_update(arg1);
|
|
5298
5300
|
};
|
|
5299
|
-
imports.wbg.
|
|
5301
|
+
imports.wbg.__wbg_onconversation_d02cc6bfbd88fd53 = function(arg0, arg1) {
|
|
5300
5302
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
5301
5303
|
};
|
|
5302
|
-
imports.wbg.
|
|
5304
|
+
imports.wbg.__wbg_onerror_f3e1a36a1ede5da1 = function(arg0, arg1) {
|
|
5303
5305
|
arg0.on_error(arg1);
|
|
5304
5306
|
};
|
|
5305
|
-
imports.wbg.
|
|
5307
|
+
imports.wbg.__wbg_onmessage_22d2ba08549735ae = function(arg0, arg1) {
|
|
5306
5308
|
arg0.on_message(Message.__wrap(arg1));
|
|
5307
5309
|
};
|
|
5308
|
-
imports.wbg.
|
|
5310
|
+
imports.wbg.__wbg_onuserpreferenceupdate_f4de4f7a41787ae5 = function(arg0, arg1, arg2) {
|
|
5309
5311
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
5310
5312
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
5311
5313
|
arg0.on_user_preference_update(v0);
|
|
@@ -5589,20 +5591,20 @@ function __wbg_get_imports() {
|
|
|
5589
5591
|
const ret = false;
|
|
5590
5592
|
return ret;
|
|
5591
5593
|
};
|
|
5592
|
-
imports.wbg.
|
|
5593
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5594
|
+
imports.wbg.__wbindgen_closure_wrapper16573 = function(arg0, arg1, arg2) {
|
|
5595
|
+
const ret = makeMutClosure(arg0, arg1, 4141, __wbg_adapter_50);
|
|
5594
5596
|
return ret;
|
|
5595
5597
|
};
|
|
5596
|
-
imports.wbg.
|
|
5597
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5598
|
+
imports.wbg.__wbindgen_closure_wrapper16715 = function(arg0, arg1, arg2) {
|
|
5599
|
+
const ret = makeMutClosure(arg0, arg1, 4195, __wbg_adapter_53);
|
|
5598
5600
|
return ret;
|
|
5599
5601
|
};
|
|
5600
|
-
imports.wbg.
|
|
5601
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5602
|
+
imports.wbg.__wbindgen_closure_wrapper19817 = function(arg0, arg1, arg2) {
|
|
5603
|
+
const ret = makeMutClosure(arg0, arg1, 4499, __wbg_adapter_56);
|
|
5602
5604
|
return ret;
|
|
5603
5605
|
};
|
|
5604
|
-
imports.wbg.
|
|
5605
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5606
|
+
imports.wbg.__wbindgen_closure_wrapper19925 = function(arg0, arg1, arg2) {
|
|
5607
|
+
const ret = makeMutClosure(arg0, arg1, 4508, __wbg_adapter_59);
|
|
5606
5608
|
return ret;
|
|
5607
5609
|
};
|
|
5608
5610
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|