@xmtp/wasm-bindings 1.2.0-dev.125e5bf → 1.2.0-dev.4ba3b55
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 +263 -258
- package/dist/bindings_wasm.js +281 -222
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +243 -240
- package/dist/version.json +2 -2
- package/package.json +2 -2
package/dist/bindings_wasm.js
CHANGED
|
@@ -102,6 +102,11 @@ function isLikeNone(x) {
|
|
|
102
102
|
return x === undefined || x === null;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
106
|
+
ptr = ptr >>> 0;
|
|
107
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
108
|
+
}
|
|
109
|
+
|
|
105
110
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
106
111
|
ptr = ptr >>> 0;
|
|
107
112
|
const mem = getDataViewMemory0();
|
|
@@ -113,11 +118,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
113
118
|
return result;
|
|
114
119
|
}
|
|
115
120
|
|
|
116
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
117
|
-
ptr = ptr >>> 0;
|
|
118
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
121
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
122
122
|
? { register: () => {}, unregister: () => {} }
|
|
123
123
|
: new FinalizationRegistry(state => {
|
|
@@ -224,59 +224,88 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
224
224
|
return ptr;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function takeFromExternrefTable0(idx) {
|
|
228
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
229
|
-
wasm.__externref_table_dealloc(idx);
|
|
230
|
-
return value;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
227
|
function _assertClass(instance, klass) {
|
|
234
228
|
if (!(instance instanceof klass)) {
|
|
235
229
|
throw new Error(`expected instance of ${klass.name}`);
|
|
236
230
|
}
|
|
237
231
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
-
const len0 = WASM_VECTOR_LEN;
|
|
246
|
-
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
247
|
-
if (ret[1]) {
|
|
248
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
249
|
-
}
|
|
232
|
+
|
|
233
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
234
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
235
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
236
|
+
WASM_VECTOR_LEN = arg.length;
|
|
237
|
+
return ptr;
|
|
250
238
|
}
|
|
251
239
|
|
|
240
|
+
function takeFromExternrefTable0(idx) {
|
|
241
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
242
|
+
wasm.__externref_table_dealloc(idx);
|
|
243
|
+
return value;
|
|
244
|
+
}
|
|
252
245
|
/**
|
|
253
246
|
* @param {string} host
|
|
254
247
|
* @param {string} inbox_id
|
|
255
248
|
* @param {Identifier} account_identifier
|
|
256
249
|
* @param {string | null} [db_path]
|
|
257
250
|
* @param {Uint8Array | null} [encryption_key]
|
|
258
|
-
* @param {string | null} [
|
|
251
|
+
* @param {string | null} [device_sync_server_url]
|
|
252
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
259
253
|
* @param {LogOptions | null} [log_options]
|
|
260
254
|
* @returns {Promise<Client>}
|
|
261
255
|
*/
|
|
262
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key,
|
|
256
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
263
257
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
264
258
|
const len0 = WASM_VECTOR_LEN;
|
|
265
259
|
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
260
|
const len1 = WASM_VECTOR_LEN;
|
|
267
261
|
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
262
|
var len2 = WASM_VECTOR_LEN;
|
|
269
|
-
var ptr3 = isLikeNone(
|
|
263
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
270
264
|
var len3 = WASM_VECTOR_LEN;
|
|
271
265
|
let ptr4 = 0;
|
|
272
266
|
if (!isLikeNone(log_options)) {
|
|
273
267
|
_assertClass(log_options, LogOptions);
|
|
274
268
|
ptr4 = log_options.__destroy_into_raw();
|
|
275
269
|
}
|
|
276
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
270
|
+
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);
|
|
271
|
+
return ret;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @param {string} host
|
|
276
|
+
* @param {Identifier} accountIdentifier
|
|
277
|
+
* @returns {Promise<string | undefined>}
|
|
278
|
+
*/
|
|
279
|
+
export function getInboxIdForIdentifier(host, accountIdentifier) {
|
|
280
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
|
|
277
283
|
return ret;
|
|
278
284
|
}
|
|
279
285
|
|
|
286
|
+
/**
|
|
287
|
+
* @param {Identifier} accountIdentifier
|
|
288
|
+
* @returns {string}
|
|
289
|
+
*/
|
|
290
|
+
export function generateInboxId(accountIdentifier) {
|
|
291
|
+
let deferred2_0;
|
|
292
|
+
let deferred2_1;
|
|
293
|
+
try {
|
|
294
|
+
const ret = wasm.generateInboxId(accountIdentifier);
|
|
295
|
+
var ptr1 = ret[0];
|
|
296
|
+
var len1 = ret[1];
|
|
297
|
+
if (ret[3]) {
|
|
298
|
+
ptr1 = 0; len1 = 0;
|
|
299
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
300
|
+
}
|
|
301
|
+
deferred2_0 = ptr1;
|
|
302
|
+
deferred2_1 = len1;
|
|
303
|
+
return getStringFromWasm0(ptr1, len1);
|
|
304
|
+
} finally {
|
|
305
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
280
309
|
/**
|
|
281
310
|
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
282
311
|
* @returns {Uint8Array}
|
|
@@ -329,62 +358,43 @@ export function decodeReaction(bytes) {
|
|
|
329
358
|
return Reaction.__wrap(ret[0]);
|
|
330
359
|
}
|
|
331
360
|
|
|
332
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
333
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
334
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
335
|
-
WASM_VECTOR_LEN = arg.length;
|
|
336
|
-
return ptr;
|
|
337
|
-
}
|
|
338
361
|
/**
|
|
339
|
-
* @param {string}
|
|
340
|
-
* @param {
|
|
341
|
-
* @
|
|
362
|
+
* @param {string} signature_text
|
|
363
|
+
* @param {Uint8Array} signature_bytes
|
|
364
|
+
* @param {Uint8Array} public_key
|
|
342
365
|
*/
|
|
343
|
-
export function
|
|
344
|
-
const ptr0 = passStringToWasm0(
|
|
366
|
+
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
367
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
345
368
|
const len0 = WASM_VECTOR_LEN;
|
|
346
|
-
const ret = wasm.
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* @param {Identifier} accountIdentifier
|
|
352
|
-
* @returns {string}
|
|
353
|
-
*/
|
|
354
|
-
export function generateInboxId(accountIdentifier) {
|
|
355
|
-
let deferred2_0;
|
|
356
|
-
let deferred2_1;
|
|
357
|
-
try {
|
|
358
|
-
const ret = wasm.generateInboxId(accountIdentifier);
|
|
359
|
-
var ptr1 = ret[0];
|
|
360
|
-
var len1 = ret[1];
|
|
361
|
-
if (ret[3]) {
|
|
362
|
-
ptr1 = 0; len1 = 0;
|
|
363
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
364
|
-
}
|
|
365
|
-
deferred2_0 = ptr1;
|
|
366
|
-
deferred2_1 = len1;
|
|
367
|
-
return getStringFromWasm0(ptr1, len1);
|
|
368
|
-
} finally {
|
|
369
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
369
|
+
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
370
|
+
if (ret[1]) {
|
|
371
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
370
372
|
}
|
|
371
373
|
}
|
|
372
374
|
|
|
373
375
|
function __wbg_adapter_50(arg0, arg1) {
|
|
374
|
-
wasm.
|
|
376
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6040dd5f55152215(arg0, arg1);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function __wbg_adapter_53(arg0, arg1) {
|
|
380
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h89dafc0baf46c12b(arg0, arg1);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
384
|
+
wasm.closure3982_externref_shim(arg0, arg1, arg2);
|
|
375
385
|
}
|
|
376
386
|
|
|
377
|
-
function
|
|
378
|
-
wasm.
|
|
387
|
+
function __wbg_adapter_59(arg0, arg1) {
|
|
388
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f45197f24caef5a(arg0, arg1);
|
|
379
389
|
}
|
|
380
390
|
|
|
381
|
-
function
|
|
382
|
-
const ret = wasm.
|
|
391
|
+
function __wbg_adapter_641(arg0, arg1, arg2, arg3, arg4) {
|
|
392
|
+
const ret = wasm.closure5013_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
383
393
|
return ret !== 0;
|
|
384
394
|
}
|
|
385
395
|
|
|
386
|
-
function
|
|
387
|
-
wasm.
|
|
396
|
+
function __wbg_adapter_742(arg0, arg1, arg2, arg3) {
|
|
397
|
+
wasm.closure5012_externref_shim(arg0, arg1, arg2, arg3);
|
|
388
398
|
}
|
|
389
399
|
|
|
390
400
|
/**
|
|
@@ -530,6 +540,8 @@ export const SortDirection = Object.freeze({
|
|
|
530
540
|
Descending: 1, "1": "Descending",
|
|
531
541
|
});
|
|
532
542
|
|
|
543
|
+
const __wbindgen_enum_DeviceSyncWorkerMode = ["enabled", "disabled"];
|
|
544
|
+
|
|
533
545
|
const __wbindgen_enum_LogLevel = ["off", "error", "warn", "info", "debug", "trace"];
|
|
534
546
|
|
|
535
547
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -563,146 +575,6 @@ export class Client {
|
|
|
563
575
|
const ptr = this.__destroy_into_raw();
|
|
564
576
|
wasm.__wbg_client_free(ptr, 0);
|
|
565
577
|
}
|
|
566
|
-
/**
|
|
567
|
-
* @param {Consent[]} records
|
|
568
|
-
* @returns {Promise<void>}
|
|
569
|
-
*/
|
|
570
|
-
setConsentStates(records) {
|
|
571
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
572
|
-
const len0 = WASM_VECTOR_LEN;
|
|
573
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
574
|
-
return ret;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* @param {ConsentEntityType} entity_type
|
|
578
|
-
* @param {string} entity
|
|
579
|
-
* @returns {Promise<ConsentState>}
|
|
580
|
-
*/
|
|
581
|
-
getConsentState(entity_type, entity) {
|
|
582
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
583
|
-
const len0 = WASM_VECTOR_LEN;
|
|
584
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
585
|
-
return ret;
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* @returns {string | undefined}
|
|
589
|
-
*/
|
|
590
|
-
createInboxSignatureText() {
|
|
591
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
592
|
-
if (ret[3]) {
|
|
593
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
594
|
-
}
|
|
595
|
-
let v1;
|
|
596
|
-
if (ret[0] !== 0) {
|
|
597
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
598
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
599
|
-
}
|
|
600
|
-
return v1;
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* @param {Identifier} new_identifier
|
|
604
|
-
* @returns {Promise<string>}
|
|
605
|
-
*/
|
|
606
|
-
addWalletSignatureText(new_identifier) {
|
|
607
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
608
|
-
return ret;
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* @param {Identifier} identifier
|
|
612
|
-
* @returns {Promise<string>}
|
|
613
|
-
*/
|
|
614
|
-
revokeWalletSignatureText(identifier) {
|
|
615
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
616
|
-
return ret;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* @returns {Promise<string>}
|
|
620
|
-
*/
|
|
621
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
622
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
623
|
-
return ret;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* @param {Uint8Array[]} installation_ids
|
|
627
|
-
* @returns {Promise<string>}
|
|
628
|
-
*/
|
|
629
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
630
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
631
|
-
const len0 = WASM_VECTOR_LEN;
|
|
632
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
633
|
-
return ret;
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* @param {Identifier} new_recovery_identifier
|
|
637
|
-
* @returns {Promise<string>}
|
|
638
|
-
*/
|
|
639
|
-
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
640
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
641
|
-
return ret;
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* @param {SignatureRequestType} signature_type
|
|
645
|
-
* @param {Uint8Array} signature_bytes
|
|
646
|
-
* @returns {Promise<void>}
|
|
647
|
-
*/
|
|
648
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
649
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
650
|
-
return ret;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* @param {SignatureRequestType} signature_type
|
|
654
|
-
* @param {PasskeySignature} signature
|
|
655
|
-
* @returns {Promise<void>}
|
|
656
|
-
*/
|
|
657
|
-
addPasskeySignature(signature_type, signature) {
|
|
658
|
-
_assertClass(signature, PasskeySignature);
|
|
659
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
660
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
661
|
-
return ret;
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* @param {SignatureRequestType} signature_type
|
|
665
|
-
* @param {Uint8Array} signature_bytes
|
|
666
|
-
* @param {bigint} chain_id
|
|
667
|
-
* @param {bigint | null} [block_number]
|
|
668
|
-
* @returns {Promise<void>}
|
|
669
|
-
*/
|
|
670
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
671
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
672
|
-
return ret;
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* @returns {Promise<void>}
|
|
676
|
-
*/
|
|
677
|
-
applySignatureRequests() {
|
|
678
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
679
|
-
return ret;
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* @param {string} signature_text
|
|
683
|
-
* @returns {Uint8Array}
|
|
684
|
-
*/
|
|
685
|
-
signWithInstallationKey(signature_text) {
|
|
686
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
|
-
const len0 = WASM_VECTOR_LEN;
|
|
688
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
689
|
-
if (ret[2]) {
|
|
690
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
691
|
-
}
|
|
692
|
-
return takeFromExternrefTable0(ret[0]);
|
|
693
|
-
}
|
|
694
|
-
/**
|
|
695
|
-
* @param {string} signature_text
|
|
696
|
-
* @param {Uint8Array} signature_bytes
|
|
697
|
-
*/
|
|
698
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
699
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
700
|
-
const len0 = WASM_VECTOR_LEN;
|
|
701
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
702
|
-
if (ret[1]) {
|
|
703
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
578
|
/**
|
|
707
579
|
* @returns {Identifier}
|
|
708
580
|
*/
|
|
@@ -812,6 +684,13 @@ export class Client {
|
|
|
812
684
|
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
813
685
|
return Conversations.__wrap(ret);
|
|
814
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* @returns {Promise<number>}
|
|
689
|
+
*/
|
|
690
|
+
syncPreferences() {
|
|
691
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
692
|
+
return ret;
|
|
693
|
+
}
|
|
815
694
|
/**
|
|
816
695
|
*
|
|
817
696
|
* * Get the client's inbox state.
|
|
@@ -851,6 +730,146 @@ export class Client {
|
|
|
851
730
|
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
852
731
|
return ret;
|
|
853
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* @param {Consent[]} records
|
|
735
|
+
* @returns {Promise<void>}
|
|
736
|
+
*/
|
|
737
|
+
setConsentStates(records) {
|
|
738
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
739
|
+
const len0 = WASM_VECTOR_LEN;
|
|
740
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
741
|
+
return ret;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @param {ConsentEntityType} entity_type
|
|
745
|
+
* @param {string} entity
|
|
746
|
+
* @returns {Promise<ConsentState>}
|
|
747
|
+
*/
|
|
748
|
+
getConsentState(entity_type, entity) {
|
|
749
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
750
|
+
const len0 = WASM_VECTOR_LEN;
|
|
751
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
752
|
+
return ret;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* @returns {string | undefined}
|
|
756
|
+
*/
|
|
757
|
+
createInboxSignatureText() {
|
|
758
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
759
|
+
if (ret[3]) {
|
|
760
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
761
|
+
}
|
|
762
|
+
let v1;
|
|
763
|
+
if (ret[0] !== 0) {
|
|
764
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
765
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
766
|
+
}
|
|
767
|
+
return v1;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* @param {Identifier} new_identifier
|
|
771
|
+
* @returns {Promise<string>}
|
|
772
|
+
*/
|
|
773
|
+
addWalletSignatureText(new_identifier) {
|
|
774
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
775
|
+
return ret;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* @param {Identifier} identifier
|
|
779
|
+
* @returns {Promise<string>}
|
|
780
|
+
*/
|
|
781
|
+
revokeWalletSignatureText(identifier) {
|
|
782
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
783
|
+
return ret;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* @returns {Promise<string>}
|
|
787
|
+
*/
|
|
788
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
789
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
790
|
+
return ret;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* @param {Uint8Array[]} installation_ids
|
|
794
|
+
* @returns {Promise<string>}
|
|
795
|
+
*/
|
|
796
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
797
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
798
|
+
const len0 = WASM_VECTOR_LEN;
|
|
799
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
800
|
+
return ret;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* @param {Identifier} new_recovery_identifier
|
|
804
|
+
* @returns {Promise<string>}
|
|
805
|
+
*/
|
|
806
|
+
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
807
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
808
|
+
return ret;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* @param {SignatureRequestType} signature_type
|
|
812
|
+
* @param {Uint8Array} signature_bytes
|
|
813
|
+
* @returns {Promise<void>}
|
|
814
|
+
*/
|
|
815
|
+
addEcdsaSignature(signature_type, signature_bytes) {
|
|
816
|
+
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
817
|
+
return ret;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* @param {SignatureRequestType} signature_type
|
|
821
|
+
* @param {PasskeySignature} signature
|
|
822
|
+
* @returns {Promise<void>}
|
|
823
|
+
*/
|
|
824
|
+
addPasskeySignature(signature_type, signature) {
|
|
825
|
+
_assertClass(signature, PasskeySignature);
|
|
826
|
+
var ptr0 = signature.__destroy_into_raw();
|
|
827
|
+
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
828
|
+
return ret;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* @param {SignatureRequestType} signature_type
|
|
832
|
+
* @param {Uint8Array} signature_bytes
|
|
833
|
+
* @param {bigint} chain_id
|
|
834
|
+
* @param {bigint | null} [block_number]
|
|
835
|
+
* @returns {Promise<void>}
|
|
836
|
+
*/
|
|
837
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
838
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
839
|
+
return ret;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* @returns {Promise<void>}
|
|
843
|
+
*/
|
|
844
|
+
applySignatureRequests() {
|
|
845
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
846
|
+
return ret;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* @param {string} signature_text
|
|
850
|
+
* @returns {Uint8Array}
|
|
851
|
+
*/
|
|
852
|
+
signWithInstallationKey(signature_text) {
|
|
853
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
854
|
+
const len0 = WASM_VECTOR_LEN;
|
|
855
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
856
|
+
if (ret[2]) {
|
|
857
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
858
|
+
}
|
|
859
|
+
return takeFromExternrefTable0(ret[0]);
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* @param {string} signature_text
|
|
863
|
+
* @param {Uint8Array} signature_bytes
|
|
864
|
+
*/
|
|
865
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
866
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
867
|
+
const len0 = WASM_VECTOR_LEN;
|
|
868
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
869
|
+
if (ret[1]) {
|
|
870
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
854
873
|
}
|
|
855
874
|
|
|
856
875
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2583,7 +2602,7 @@ export class InboxState {
|
|
|
2583
2602
|
set inboxId(arg0) {
|
|
2584
2603
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2585
2604
|
const len0 = WASM_VECTOR_LEN;
|
|
2586
|
-
wasm.
|
|
2605
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
2587
2606
|
}
|
|
2588
2607
|
/**
|
|
2589
2608
|
* @returns {Identifier}
|
|
@@ -3998,7 +4017,7 @@ export class Reaction {
|
|
|
3998
4017
|
set reference(arg0) {
|
|
3999
4018
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4000
4019
|
const len0 = WASM_VECTOR_LEN;
|
|
4001
|
-
wasm.
|
|
4020
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4002
4021
|
}
|
|
4003
4022
|
/**
|
|
4004
4023
|
* @returns {string}
|
|
@@ -4392,6 +4411,9 @@ function __wbg_get_imports() {
|
|
|
4392
4411
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4393
4412
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4394
4413
|
};
|
|
4414
|
+
imports.wbg.__wbg_abort_410ec47a64ac6117 = function(arg0, arg1) {
|
|
4415
|
+
arg0.abort(arg1);
|
|
4416
|
+
};
|
|
4395
4417
|
imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
4396
4418
|
arg0.abort();
|
|
4397
4419
|
};
|
|
@@ -4454,6 +4476,14 @@ function __wbg_get_imports() {
|
|
|
4454
4476
|
const ret = clearTimeout(arg0);
|
|
4455
4477
|
return ret;
|
|
4456
4478
|
};
|
|
4479
|
+
imports.wbg.__wbg_clearTimeout_86721db0036bea98 = function(arg0) {
|
|
4480
|
+
const ret = clearTimeout(arg0);
|
|
4481
|
+
return ret;
|
|
4482
|
+
};
|
|
4483
|
+
imports.wbg.__wbg_clearTimeout_96804de0ab838f26 = function(arg0) {
|
|
4484
|
+
const ret = clearTimeout(arg0);
|
|
4485
|
+
return ret;
|
|
4486
|
+
};
|
|
4457
4487
|
imports.wbg.__wbg_clear_1f96150ecf4061a6 = function(arg0) {
|
|
4458
4488
|
arg0.clear();
|
|
4459
4489
|
};
|
|
@@ -4554,7 +4584,7 @@ function __wbg_get_imports() {
|
|
|
4554
4584
|
const a = state0.a;
|
|
4555
4585
|
state0.a = 0;
|
|
4556
4586
|
try {
|
|
4557
|
-
return
|
|
4587
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4558
4588
|
} finally {
|
|
4559
4589
|
state0.a = a;
|
|
4560
4590
|
}
|
|
@@ -4565,14 +4595,14 @@ function __wbg_get_imports() {
|
|
|
4565
4595
|
state0.a = state0.b = 0;
|
|
4566
4596
|
}
|
|
4567
4597
|
};
|
|
4568
|
-
imports.wbg.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
|
|
4569
|
-
const ret = fetch(arg0);
|
|
4570
|
-
return ret;
|
|
4571
|
-
};
|
|
4572
4598
|
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
4573
4599
|
const ret = arg0.fetch(arg1);
|
|
4574
4600
|
return ret;
|
|
4575
4601
|
};
|
|
4602
|
+
imports.wbg.__wbg_fetch_d36a73832f0a45e8 = function(arg0) {
|
|
4603
|
+
const ret = fetch(arg0);
|
|
4604
|
+
return ret;
|
|
4605
|
+
};
|
|
4576
4606
|
imports.wbg.__wbg_fill_3311db9cdf18c6c4 = function(arg0, arg1, arg2, arg3) {
|
|
4577
4607
|
const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
4578
4608
|
return ret;
|
|
@@ -4584,7 +4614,7 @@ function __wbg_get_imports() {
|
|
|
4584
4614
|
const a = state0.a;
|
|
4585
4615
|
state0.a = 0;
|
|
4586
4616
|
try {
|
|
4587
|
-
return
|
|
4617
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4588
4618
|
} finally {
|
|
4589
4619
|
state0.a = a;
|
|
4590
4620
|
}
|
|
@@ -4638,6 +4668,9 @@ function __wbg_get_imports() {
|
|
|
4638
4668
|
const ret = arg0.getMonth();
|
|
4639
4669
|
return ret;
|
|
4640
4670
|
};
|
|
4671
|
+
imports.wbg.__wbg_getRandomValues_21a0191e74d0e1d3 = function() { return handleError(function (arg0, arg1) {
|
|
4672
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
4673
|
+
}, arguments) };
|
|
4641
4674
|
imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
|
|
4642
4675
|
arg0.getRandomValues(arg1);
|
|
4643
4676
|
}, arguments) };
|
|
@@ -4751,6 +4784,16 @@ function __wbg_get_imports() {
|
|
|
4751
4784
|
const ret = result;
|
|
4752
4785
|
return ret;
|
|
4753
4786
|
};
|
|
4787
|
+
imports.wbg.__wbg_instanceof_Performance_0ac1286c87171f57 = function(arg0) {
|
|
4788
|
+
let result;
|
|
4789
|
+
try {
|
|
4790
|
+
result = arg0 instanceof Performance;
|
|
4791
|
+
} catch (_) {
|
|
4792
|
+
result = false;
|
|
4793
|
+
}
|
|
4794
|
+
const ret = result;
|
|
4795
|
+
return ret;
|
|
4796
|
+
};
|
|
4754
4797
|
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
4755
4798
|
let result;
|
|
4756
4799
|
try {
|
|
@@ -4896,7 +4939,7 @@ function __wbg_get_imports() {
|
|
|
4896
4939
|
const a = state0.a;
|
|
4897
4940
|
state0.a = 0;
|
|
4898
4941
|
try {
|
|
4899
|
-
return
|
|
4942
|
+
return __wbg_adapter_742(a, state0.b, arg0, arg1);
|
|
4900
4943
|
} finally {
|
|
4901
4944
|
state0.a = a;
|
|
4902
4945
|
}
|
|
@@ -5107,10 +5150,18 @@ function __wbg_get_imports() {
|
|
|
5107
5150
|
const ret = setInterval(arg0, arg1);
|
|
5108
5151
|
return ret;
|
|
5109
5152
|
}, arguments) };
|
|
5153
|
+
imports.wbg.__wbg_setTimeout_2e707715f8cc9497 = function(arg0, arg1) {
|
|
5154
|
+
const ret = setTimeout(arg0, arg1);
|
|
5155
|
+
return ret;
|
|
5156
|
+
};
|
|
5110
5157
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
5111
5158
|
const ret = setTimeout(arg0, arg1);
|
|
5112
5159
|
return ret;
|
|
5113
5160
|
}, arguments) };
|
|
5161
|
+
imports.wbg.__wbg_setTimeout_eefe7f4c234b0c6b = function() { return handleError(function (arg0, arg1) {
|
|
5162
|
+
const ret = setTimeout(arg0, arg1);
|
|
5163
|
+
return ret;
|
|
5164
|
+
}, arguments) };
|
|
5114
5165
|
imports.wbg.__wbg_setUint32_ad8826b8caeaf63d = function(arg0, arg1, arg2) {
|
|
5115
5166
|
arg0.setUint32(arg1 >>> 0, arg2 >>> 0);
|
|
5116
5167
|
};
|
|
@@ -5303,12 +5354,20 @@ function __wbg_get_imports() {
|
|
|
5303
5354
|
const ret = false;
|
|
5304
5355
|
return ret;
|
|
5305
5356
|
};
|
|
5306
|
-
imports.wbg.
|
|
5307
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5357
|
+
imports.wbg.__wbindgen_closure_wrapper15262 = function(arg0, arg1, arg2) {
|
|
5358
|
+
const ret = makeMutClosure(arg0, arg1, 3671, __wbg_adapter_50);
|
|
5359
|
+
return ret;
|
|
5360
|
+
};
|
|
5361
|
+
imports.wbg.__wbindgen_closure_wrapper15306 = function(arg0, arg1, arg2) {
|
|
5362
|
+
const ret = makeMutClosure(arg0, arg1, 3681, __wbg_adapter_53);
|
|
5363
|
+
return ret;
|
|
5364
|
+
};
|
|
5365
|
+
imports.wbg.__wbindgen_closure_wrapper18371 = function(arg0, arg1, arg2) {
|
|
5366
|
+
const ret = makeMutClosure(arg0, arg1, 3983, __wbg_adapter_56);
|
|
5308
5367
|
return ret;
|
|
5309
5368
|
};
|
|
5310
|
-
imports.wbg.
|
|
5311
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5369
|
+
imports.wbg.__wbindgen_closure_wrapper18491 = function(arg0, arg1, arg2) {
|
|
5370
|
+
const ret = makeMutClosure(arg0, arg1, 3997, __wbg_adapter_59);
|
|
5312
5371
|
return ret;
|
|
5313
5372
|
};
|
|
5314
5373
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|