@xmtp/wasm-bindings 1.2.0-dev.b600c5c → 1.2.0-dev.cae98b4
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 +261 -258
- package/dist/bindings_wasm.js +251 -239
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +241 -240
- package/dist/version.json +3 -3
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -214,39 +214,6 @@ function debugString(val) {
|
|
|
214
214
|
return className;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function _assertClass(instance, klass) {
|
|
218
|
-
if (!(instance instanceof klass)) {
|
|
219
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* @param {string} host
|
|
224
|
-
* @param {string} inbox_id
|
|
225
|
-
* @param {Identifier} account_identifier
|
|
226
|
-
* @param {string | null} [db_path]
|
|
227
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
228
|
-
* @param {string | null} [history_sync_url]
|
|
229
|
-
* @param {LogOptions | null} [log_options]
|
|
230
|
-
* @returns {Promise<Client>}
|
|
231
|
-
*/
|
|
232
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
|
|
233
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
-
const len0 = WASM_VECTOR_LEN;
|
|
235
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
236
|
-
const len1 = WASM_VECTOR_LEN;
|
|
237
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
|
-
var len2 = WASM_VECTOR_LEN;
|
|
239
|
-
var ptr3 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
240
|
-
var len3 = WASM_VECTOR_LEN;
|
|
241
|
-
let ptr4 = 0;
|
|
242
|
-
if (!isLikeNone(log_options)) {
|
|
243
|
-
_assertClass(log_options, LogOptions);
|
|
244
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
245
|
-
}
|
|
246
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
247
|
-
return ret;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
217
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
251
218
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
252
219
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -257,11 +224,50 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
257
224
|
return ptr;
|
|
258
225
|
}
|
|
259
226
|
|
|
227
|
+
function _assertClass(instance, klass) {
|
|
228
|
+
if (!(instance instanceof klass)) {
|
|
229
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
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;
|
|
238
|
+
}
|
|
239
|
+
|
|
260
240
|
function takeFromExternrefTable0(idx) {
|
|
261
241
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
262
242
|
wasm.__externref_table_dealloc(idx);
|
|
263
243
|
return value;
|
|
264
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
247
|
+
* @returns {Uint8Array}
|
|
248
|
+
*/
|
|
249
|
+
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
250
|
+
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
251
|
+
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
252
|
+
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
253
|
+
if (ret[2]) {
|
|
254
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
255
|
+
}
|
|
256
|
+
return takeFromExternrefTable0(ret[0]);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @param {Uint8Array} bytes
|
|
261
|
+
* @returns {MultiRemoteAttachment}
|
|
262
|
+
*/
|
|
263
|
+
export function decodeMultiRemoteAttachment(bytes) {
|
|
264
|
+
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
265
|
+
if (ret[2]) {
|
|
266
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
267
|
+
}
|
|
268
|
+
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
269
|
+
}
|
|
270
|
+
|
|
265
271
|
/**
|
|
266
272
|
* @param {Reaction} reaction
|
|
267
273
|
* @returns {Uint8Array}
|
|
@@ -288,6 +294,49 @@ export function decodeReaction(bytes) {
|
|
|
288
294
|
return Reaction.__wrap(ret[0]);
|
|
289
295
|
}
|
|
290
296
|
|
|
297
|
+
/**
|
|
298
|
+
* @param {string} signature_text
|
|
299
|
+
* @param {Uint8Array} signature_bytes
|
|
300
|
+
* @param {Uint8Array} public_key
|
|
301
|
+
*/
|
|
302
|
+
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
303
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
305
|
+
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
306
|
+
if (ret[1]) {
|
|
307
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @param {string} host
|
|
313
|
+
* @param {string} inbox_id
|
|
314
|
+
* @param {Identifier} account_identifier
|
|
315
|
+
* @param {string | null} [db_path]
|
|
316
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
317
|
+
* @param {string | null} [device_sync_server_url]
|
|
318
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
319
|
+
* @param {LogOptions | null} [log_options]
|
|
320
|
+
* @returns {Promise<Client>}
|
|
321
|
+
*/
|
|
322
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
|
|
323
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
324
|
+
const len0 = WASM_VECTOR_LEN;
|
|
325
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
326
|
+
const len1 = WASM_VECTOR_LEN;
|
|
327
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
328
|
+
var len2 = WASM_VECTOR_LEN;
|
|
329
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
330
|
+
var len3 = WASM_VECTOR_LEN;
|
|
331
|
+
let ptr4 = 0;
|
|
332
|
+
if (!isLikeNone(log_options)) {
|
|
333
|
+
_assertClass(log_options, LogOptions);
|
|
334
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
335
|
+
}
|
|
336
|
+
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);
|
|
337
|
+
return ret;
|
|
338
|
+
}
|
|
339
|
+
|
|
291
340
|
/**
|
|
292
341
|
* @param {string} host
|
|
293
342
|
* @param {Identifier} accountIdentifier
|
|
@@ -323,75 +372,29 @@ export function generateInboxId(accountIdentifier) {
|
|
|
323
372
|
}
|
|
324
373
|
}
|
|
325
374
|
|
|
326
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
327
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
328
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
329
|
-
WASM_VECTOR_LEN = arg.length;
|
|
330
|
-
return ptr;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* @param {string} signature_text
|
|
334
|
-
* @param {Uint8Array} signature_bytes
|
|
335
|
-
* @param {Uint8Array} public_key
|
|
336
|
-
*/
|
|
337
|
-
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
338
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
339
|
-
const len0 = WASM_VECTOR_LEN;
|
|
340
|
-
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
341
|
-
if (ret[1]) {
|
|
342
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
348
|
-
* @returns {Uint8Array}
|
|
349
|
-
*/
|
|
350
|
-
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
351
|
-
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
352
|
-
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
353
|
-
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
354
|
-
if (ret[2]) {
|
|
355
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
356
|
-
}
|
|
357
|
-
return takeFromExternrefTable0(ret[0]);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* @param {Uint8Array} bytes
|
|
362
|
-
* @returns {MultiRemoteAttachment}
|
|
363
|
-
*/
|
|
364
|
-
export function decodeMultiRemoteAttachment(bytes) {
|
|
365
|
-
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
366
|
-
if (ret[2]) {
|
|
367
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
368
|
-
}
|
|
369
|
-
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
375
|
function __wbg_adapter_50(arg0, arg1) {
|
|
373
376
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6040dd5f55152215(arg0, arg1);
|
|
374
377
|
}
|
|
375
378
|
|
|
376
379
|
function __wbg_adapter_53(arg0, arg1) {
|
|
377
|
-
wasm.
|
|
380
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h89dafc0baf46c12b(arg0, arg1);
|
|
378
381
|
}
|
|
379
382
|
|
|
380
383
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
381
|
-
wasm.
|
|
384
|
+
wasm.closure3980_externref_shim(arg0, arg1, arg2);
|
|
382
385
|
}
|
|
383
386
|
|
|
384
387
|
function __wbg_adapter_59(arg0, arg1) {
|
|
385
388
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f45197f24caef5a(arg0, arg1);
|
|
386
389
|
}
|
|
387
390
|
|
|
388
|
-
function
|
|
389
|
-
const ret = wasm.
|
|
391
|
+
function __wbg_adapter_641(arg0, arg1, arg2, arg3, arg4) {
|
|
392
|
+
const ret = wasm.closure5011_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
390
393
|
return ret !== 0;
|
|
391
394
|
}
|
|
392
395
|
|
|
393
|
-
function
|
|
394
|
-
wasm.
|
|
396
|
+
function __wbg_adapter_742(arg0, arg1, arg2, arg3) {
|
|
397
|
+
wasm.closure5010_externref_shim(arg0, arg1, arg2, arg3);
|
|
395
398
|
}
|
|
396
399
|
|
|
397
400
|
/**
|
|
@@ -537,6 +540,8 @@ export const SortDirection = Object.freeze({
|
|
|
537
540
|
Descending: 1, "1": "Descending",
|
|
538
541
|
});
|
|
539
542
|
|
|
543
|
+
const __wbindgen_enum_DeviceSyncWorkerMode = ["enabled", "disabled"];
|
|
544
|
+
|
|
540
545
|
const __wbindgen_enum_LogLevel = ["off", "error", "warn", "info", "debug", "trace"];
|
|
541
546
|
|
|
542
547
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -570,6 +575,146 @@ export class Client {
|
|
|
570
575
|
const ptr = this.__destroy_into_raw();
|
|
571
576
|
wasm.__wbg_client_free(ptr, 0);
|
|
572
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* @param {Consent[]} records
|
|
580
|
+
* @returns {Promise<void>}
|
|
581
|
+
*/
|
|
582
|
+
setConsentStates(records) {
|
|
583
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
584
|
+
const len0 = WASM_VECTOR_LEN;
|
|
585
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
586
|
+
return ret;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* @param {ConsentEntityType} entity_type
|
|
590
|
+
* @param {string} entity
|
|
591
|
+
* @returns {Promise<ConsentState>}
|
|
592
|
+
*/
|
|
593
|
+
getConsentState(entity_type, entity) {
|
|
594
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
595
|
+
const len0 = WASM_VECTOR_LEN;
|
|
596
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
597
|
+
return ret;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* @returns {string | undefined}
|
|
601
|
+
*/
|
|
602
|
+
createInboxSignatureText() {
|
|
603
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
604
|
+
if (ret[3]) {
|
|
605
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
606
|
+
}
|
|
607
|
+
let v1;
|
|
608
|
+
if (ret[0] !== 0) {
|
|
609
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
610
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
611
|
+
}
|
|
612
|
+
return v1;
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* @param {Identifier} new_identifier
|
|
616
|
+
* @returns {Promise<string>}
|
|
617
|
+
*/
|
|
618
|
+
addWalletSignatureText(new_identifier) {
|
|
619
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
620
|
+
return ret;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* @param {Identifier} identifier
|
|
624
|
+
* @returns {Promise<string>}
|
|
625
|
+
*/
|
|
626
|
+
revokeWalletSignatureText(identifier) {
|
|
627
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
628
|
+
return ret;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* @returns {Promise<string>}
|
|
632
|
+
*/
|
|
633
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
634
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
635
|
+
return ret;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* @param {Uint8Array[]} installation_ids
|
|
639
|
+
* @returns {Promise<string>}
|
|
640
|
+
*/
|
|
641
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
642
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
643
|
+
const len0 = WASM_VECTOR_LEN;
|
|
644
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
645
|
+
return ret;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* @param {Identifier} new_recovery_identifier
|
|
649
|
+
* @returns {Promise<string>}
|
|
650
|
+
*/
|
|
651
|
+
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
652
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
653
|
+
return ret;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* @param {SignatureRequestType} signature_type
|
|
657
|
+
* @param {Uint8Array} signature_bytes
|
|
658
|
+
* @returns {Promise<void>}
|
|
659
|
+
*/
|
|
660
|
+
addEcdsaSignature(signature_type, signature_bytes) {
|
|
661
|
+
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
662
|
+
return ret;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* @param {SignatureRequestType} signature_type
|
|
666
|
+
* @param {PasskeySignature} signature
|
|
667
|
+
* @returns {Promise<void>}
|
|
668
|
+
*/
|
|
669
|
+
addPasskeySignature(signature_type, signature) {
|
|
670
|
+
_assertClass(signature, PasskeySignature);
|
|
671
|
+
var ptr0 = signature.__destroy_into_raw();
|
|
672
|
+
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
673
|
+
return ret;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* @param {SignatureRequestType} signature_type
|
|
677
|
+
* @param {Uint8Array} signature_bytes
|
|
678
|
+
* @param {bigint} chain_id
|
|
679
|
+
* @param {bigint | null} [block_number]
|
|
680
|
+
* @returns {Promise<void>}
|
|
681
|
+
*/
|
|
682
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
683
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
684
|
+
return ret;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* @returns {Promise<void>}
|
|
688
|
+
*/
|
|
689
|
+
applySignatureRequests() {
|
|
690
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
691
|
+
return ret;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* @param {string} signature_text
|
|
695
|
+
* @returns {Uint8Array}
|
|
696
|
+
*/
|
|
697
|
+
signWithInstallationKey(signature_text) {
|
|
698
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
700
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
701
|
+
if (ret[2]) {
|
|
702
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
703
|
+
}
|
|
704
|
+
return takeFromExternrefTable0(ret[0]);
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* @param {string} signature_text
|
|
708
|
+
* @param {Uint8Array} signature_bytes
|
|
709
|
+
*/
|
|
710
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
711
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
712
|
+
const len0 = WASM_VECTOR_LEN;
|
|
713
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
714
|
+
if (ret[1]) {
|
|
715
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
573
718
|
/**
|
|
574
719
|
* @returns {Identifier}
|
|
575
720
|
*/
|
|
@@ -679,6 +824,13 @@ export class Client {
|
|
|
679
824
|
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
680
825
|
return Conversations.__wrap(ret);
|
|
681
826
|
}
|
|
827
|
+
/**
|
|
828
|
+
* @returns {Promise<number>}
|
|
829
|
+
*/
|
|
830
|
+
syncPreferences() {
|
|
831
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
832
|
+
return ret;
|
|
833
|
+
}
|
|
682
834
|
/**
|
|
683
835
|
*
|
|
684
836
|
* * Get the client's inbox state.
|
|
@@ -718,146 +870,6 @@ export class Client {
|
|
|
718
870
|
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
719
871
|
return ret;
|
|
720
872
|
}
|
|
721
|
-
/**
|
|
722
|
-
* @param {Consent[]} records
|
|
723
|
-
* @returns {Promise<void>}
|
|
724
|
-
*/
|
|
725
|
-
setConsentStates(records) {
|
|
726
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
727
|
-
const len0 = WASM_VECTOR_LEN;
|
|
728
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
729
|
-
return ret;
|
|
730
|
-
}
|
|
731
|
-
/**
|
|
732
|
-
* @param {ConsentEntityType} entity_type
|
|
733
|
-
* @param {string} entity
|
|
734
|
-
* @returns {Promise<ConsentState>}
|
|
735
|
-
*/
|
|
736
|
-
getConsentState(entity_type, entity) {
|
|
737
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
738
|
-
const len0 = WASM_VECTOR_LEN;
|
|
739
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
740
|
-
return ret;
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* @returns {string | undefined}
|
|
744
|
-
*/
|
|
745
|
-
createInboxSignatureText() {
|
|
746
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
747
|
-
if (ret[3]) {
|
|
748
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
749
|
-
}
|
|
750
|
-
let v1;
|
|
751
|
-
if (ret[0] !== 0) {
|
|
752
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
753
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
754
|
-
}
|
|
755
|
-
return v1;
|
|
756
|
-
}
|
|
757
|
-
/**
|
|
758
|
-
* @param {Identifier} new_identifier
|
|
759
|
-
* @returns {Promise<string>}
|
|
760
|
-
*/
|
|
761
|
-
addWalletSignatureText(new_identifier) {
|
|
762
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
763
|
-
return ret;
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* @param {Identifier} identifier
|
|
767
|
-
* @returns {Promise<string>}
|
|
768
|
-
*/
|
|
769
|
-
revokeWalletSignatureText(identifier) {
|
|
770
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
771
|
-
return ret;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* @returns {Promise<string>}
|
|
775
|
-
*/
|
|
776
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
777
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
778
|
-
return ret;
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* @param {Uint8Array[]} installation_ids
|
|
782
|
-
* @returns {Promise<string>}
|
|
783
|
-
*/
|
|
784
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
785
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
786
|
-
const len0 = WASM_VECTOR_LEN;
|
|
787
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
788
|
-
return ret;
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* @param {Identifier} new_recovery_identifier
|
|
792
|
-
* @returns {Promise<string>}
|
|
793
|
-
*/
|
|
794
|
-
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
795
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
796
|
-
return ret;
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* @param {SignatureRequestType} signature_type
|
|
800
|
-
* @param {Uint8Array} signature_bytes
|
|
801
|
-
* @returns {Promise<void>}
|
|
802
|
-
*/
|
|
803
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
804
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
805
|
-
return ret;
|
|
806
|
-
}
|
|
807
|
-
/**
|
|
808
|
-
* @param {SignatureRequestType} signature_type
|
|
809
|
-
* @param {PasskeySignature} signature
|
|
810
|
-
* @returns {Promise<void>}
|
|
811
|
-
*/
|
|
812
|
-
addPasskeySignature(signature_type, signature) {
|
|
813
|
-
_assertClass(signature, PasskeySignature);
|
|
814
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
815
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
816
|
-
return ret;
|
|
817
|
-
}
|
|
818
|
-
/**
|
|
819
|
-
* @param {SignatureRequestType} signature_type
|
|
820
|
-
* @param {Uint8Array} signature_bytes
|
|
821
|
-
* @param {bigint} chain_id
|
|
822
|
-
* @param {bigint | null} [block_number]
|
|
823
|
-
* @returns {Promise<void>}
|
|
824
|
-
*/
|
|
825
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
826
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
827
|
-
return ret;
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* @returns {Promise<void>}
|
|
831
|
-
*/
|
|
832
|
-
applySignatureRequests() {
|
|
833
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
834
|
-
return ret;
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* @param {string} signature_text
|
|
838
|
-
* @returns {Uint8Array}
|
|
839
|
-
*/
|
|
840
|
-
signWithInstallationKey(signature_text) {
|
|
841
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
842
|
-
const len0 = WASM_VECTOR_LEN;
|
|
843
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
844
|
-
if (ret[2]) {
|
|
845
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
846
|
-
}
|
|
847
|
-
return takeFromExternrefTable0(ret[0]);
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* @param {string} signature_text
|
|
851
|
-
* @param {Uint8Array} signature_bytes
|
|
852
|
-
*/
|
|
853
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
854
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
855
|
-
const len0 = WASM_VECTOR_LEN;
|
|
856
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
857
|
-
if (ret[1]) {
|
|
858
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
873
|
}
|
|
862
874
|
|
|
863
875
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -994,7 +1006,7 @@ export class ContentTypeId {
|
|
|
994
1006
|
set authorityId(arg0) {
|
|
995
1007
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
996
1008
|
const len0 = WASM_VECTOR_LEN;
|
|
997
|
-
wasm.
|
|
1009
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
998
1010
|
}
|
|
999
1011
|
/**
|
|
1000
1012
|
* @returns {string}
|
|
@@ -2590,7 +2602,7 @@ export class InboxState {
|
|
|
2590
2602
|
set inboxId(arg0) {
|
|
2591
2603
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2592
2604
|
const len0 = WASM_VECTOR_LEN;
|
|
2593
|
-
wasm.
|
|
2605
|
+
wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
|
|
2594
2606
|
}
|
|
2595
2607
|
/**
|
|
2596
2608
|
* @returns {Identifier}
|
|
@@ -4005,7 +4017,7 @@ export class Reaction {
|
|
|
4005
4017
|
set reference(arg0) {
|
|
4006
4018
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4007
4019
|
const len0 = WASM_VECTOR_LEN;
|
|
4008
|
-
wasm.
|
|
4020
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4009
4021
|
}
|
|
4010
4022
|
/**
|
|
4011
4023
|
* @returns {string}
|
|
@@ -4572,7 +4584,7 @@ function __wbg_get_imports() {
|
|
|
4572
4584
|
const a = state0.a;
|
|
4573
4585
|
state0.a = 0;
|
|
4574
4586
|
try {
|
|
4575
|
-
return
|
|
4587
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4576
4588
|
} finally {
|
|
4577
4589
|
state0.a = a;
|
|
4578
4590
|
}
|
|
@@ -4602,7 +4614,7 @@ function __wbg_get_imports() {
|
|
|
4602
4614
|
const a = state0.a;
|
|
4603
4615
|
state0.a = 0;
|
|
4604
4616
|
try {
|
|
4605
|
-
return
|
|
4617
|
+
return __wbg_adapter_641(a, state0.b, arg0, arg1, arg2);
|
|
4606
4618
|
} finally {
|
|
4607
4619
|
state0.a = a;
|
|
4608
4620
|
}
|
|
@@ -4927,7 +4939,7 @@ function __wbg_get_imports() {
|
|
|
4927
4939
|
const a = state0.a;
|
|
4928
4940
|
state0.a = 0;
|
|
4929
4941
|
try {
|
|
4930
|
-
return
|
|
4942
|
+
return __wbg_adapter_742(a, state0.b, arg0, arg1);
|
|
4931
4943
|
} finally {
|
|
4932
4944
|
state0.a = a;
|
|
4933
4945
|
}
|
|
@@ -5342,20 +5354,20 @@ function __wbg_get_imports() {
|
|
|
5342
5354
|
const ret = false;
|
|
5343
5355
|
return ret;
|
|
5344
5356
|
};
|
|
5345
|
-
imports.wbg.
|
|
5346
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5357
|
+
imports.wbg.__wbindgen_closure_wrapper15185 = function(arg0, arg1, arg2) {
|
|
5358
|
+
const ret = makeMutClosure(arg0, arg1, 3669, __wbg_adapter_50);
|
|
5347
5359
|
return ret;
|
|
5348
5360
|
};
|
|
5349
|
-
imports.wbg.
|
|
5350
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5361
|
+
imports.wbg.__wbindgen_closure_wrapper15229 = function(arg0, arg1, arg2) {
|
|
5362
|
+
const ret = makeMutClosure(arg0, arg1, 3679, __wbg_adapter_53);
|
|
5351
5363
|
return ret;
|
|
5352
5364
|
};
|
|
5353
|
-
imports.wbg.
|
|
5354
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5365
|
+
imports.wbg.__wbindgen_closure_wrapper18294 = function(arg0, arg1, arg2) {
|
|
5366
|
+
const ret = makeMutClosure(arg0, arg1, 3981, __wbg_adapter_56);
|
|
5355
5367
|
return ret;
|
|
5356
5368
|
};
|
|
5357
|
-
imports.wbg.
|
|
5358
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5369
|
+
imports.wbg.__wbindgen_closure_wrapper18414 = function(arg0, arg1, arg2) {
|
|
5370
|
+
const ret = makeMutClosure(arg0, arg1, 3995, __wbg_adapter_59);
|
|
5359
5371
|
return ret;
|
|
5360
5372
|
};
|
|
5361
5373
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|