@xmtp/wasm-bindings 1.2.0-dev.878fd38 → 1.2.0-dev.b600c5c
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 +237 -237
- package/dist/bindings_wasm.js +209 -210
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +218 -218
- package/dist/version.json +3 -3
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -214,6 +214,39 @@ 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
|
+
|
|
217
250
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
218
251
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
219
252
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -224,25 +257,19 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
224
257
|
return ptr;
|
|
225
258
|
}
|
|
226
259
|
|
|
227
|
-
function _assertClass(instance, klass) {
|
|
228
|
-
if (!(instance instanceof klass)) {
|
|
229
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
260
|
function takeFromExternrefTable0(idx) {
|
|
234
261
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
235
262
|
wasm.__externref_table_dealloc(idx);
|
|
236
263
|
return value;
|
|
237
264
|
}
|
|
238
265
|
/**
|
|
239
|
-
* @param {
|
|
266
|
+
* @param {Reaction} reaction
|
|
240
267
|
* @returns {Uint8Array}
|
|
241
268
|
*/
|
|
242
|
-
export function
|
|
243
|
-
_assertClass(
|
|
244
|
-
var ptr0 =
|
|
245
|
-
const ret = wasm.
|
|
269
|
+
export function encodeReaction(reaction) {
|
|
270
|
+
_assertClass(reaction, Reaction);
|
|
271
|
+
var ptr0 = reaction.__destroy_into_raw();
|
|
272
|
+
const ret = wasm.encodeReaction(ptr0);
|
|
246
273
|
if (ret[2]) {
|
|
247
274
|
throw takeFromExternrefTable0(ret[1]);
|
|
248
275
|
}
|
|
@@ -251,22 +278,16 @@ export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
|
251
278
|
|
|
252
279
|
/**
|
|
253
280
|
* @param {Uint8Array} bytes
|
|
254
|
-
* @returns {
|
|
281
|
+
* @returns {Reaction}
|
|
255
282
|
*/
|
|
256
|
-
export function
|
|
257
|
-
const ret = wasm.
|
|
283
|
+
export function decodeReaction(bytes) {
|
|
284
|
+
const ret = wasm.decodeReaction(bytes);
|
|
258
285
|
if (ret[2]) {
|
|
259
286
|
throw takeFromExternrefTable0(ret[1]);
|
|
260
287
|
}
|
|
261
|
-
return
|
|
288
|
+
return Reaction.__wrap(ret[0]);
|
|
262
289
|
}
|
|
263
290
|
|
|
264
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
265
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
266
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
267
|
-
WASM_VECTOR_LEN = arg.length;
|
|
268
|
-
return ptr;
|
|
269
|
-
}
|
|
270
291
|
/**
|
|
271
292
|
* @param {string} host
|
|
272
293
|
* @param {Identifier} accountIdentifier
|
|
@@ -302,6 +323,12 @@ export function generateInboxId(accountIdentifier) {
|
|
|
302
323
|
}
|
|
303
324
|
}
|
|
304
325
|
|
|
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
|
+
}
|
|
305
332
|
/**
|
|
306
333
|
* @param {string} signature_text
|
|
307
334
|
* @param {Uint8Array} signature_bytes
|
|
@@ -317,41 +344,13 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
317
344
|
}
|
|
318
345
|
|
|
319
346
|
/**
|
|
320
|
-
* @param {
|
|
321
|
-
* @param {string} inbox_id
|
|
322
|
-
* @param {Identifier} account_identifier
|
|
323
|
-
* @param {string | null} [db_path]
|
|
324
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
325
|
-
* @param {string | null} [history_sync_url]
|
|
326
|
-
* @param {LogOptions | null} [log_options]
|
|
327
|
-
* @returns {Promise<Client>}
|
|
328
|
-
*/
|
|
329
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
|
|
330
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
|
-
const len0 = WASM_VECTOR_LEN;
|
|
332
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
|
-
const len1 = WASM_VECTOR_LEN;
|
|
334
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
335
|
-
var len2 = WASM_VECTOR_LEN;
|
|
336
|
-
var ptr3 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
337
|
-
var len3 = WASM_VECTOR_LEN;
|
|
338
|
-
let ptr4 = 0;
|
|
339
|
-
if (!isLikeNone(log_options)) {
|
|
340
|
-
_assertClass(log_options, LogOptions);
|
|
341
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
342
|
-
}
|
|
343
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
344
|
-
return ret;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* @param {Reaction} reaction
|
|
347
|
+
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
349
348
|
* @returns {Uint8Array}
|
|
350
349
|
*/
|
|
351
|
-
export function
|
|
352
|
-
_assertClass(
|
|
353
|
-
var ptr0 =
|
|
354
|
-
const ret = wasm.
|
|
350
|
+
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
351
|
+
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
352
|
+
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
353
|
+
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
355
354
|
if (ret[2]) {
|
|
356
355
|
throw takeFromExternrefTable0(ret[1]);
|
|
357
356
|
}
|
|
@@ -360,14 +359,14 @@ export function encodeReaction(reaction) {
|
|
|
360
359
|
|
|
361
360
|
/**
|
|
362
361
|
* @param {Uint8Array} bytes
|
|
363
|
-
* @returns {
|
|
362
|
+
* @returns {MultiRemoteAttachment}
|
|
364
363
|
*/
|
|
365
|
-
export function
|
|
366
|
-
const ret = wasm.
|
|
364
|
+
export function decodeMultiRemoteAttachment(bytes) {
|
|
365
|
+
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
367
366
|
if (ret[2]) {
|
|
368
367
|
throw takeFromExternrefTable0(ret[1]);
|
|
369
368
|
}
|
|
370
|
-
return
|
|
369
|
+
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
371
370
|
}
|
|
372
371
|
|
|
373
372
|
function __wbg_adapter_50(arg0, arg1) {
|
|
@@ -379,7 +378,7 @@ function __wbg_adapter_53(arg0, arg1) {
|
|
|
379
378
|
}
|
|
380
379
|
|
|
381
380
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
382
|
-
wasm.
|
|
381
|
+
wasm.closure4006_externref_shim(arg0, arg1, arg2);
|
|
383
382
|
}
|
|
384
383
|
|
|
385
384
|
function __wbg_adapter_59(arg0, arg1) {
|
|
@@ -387,12 +386,12 @@ function __wbg_adapter_59(arg0, arg1) {
|
|
|
387
386
|
}
|
|
388
387
|
|
|
389
388
|
function __wbg_adapter_640(arg0, arg1, arg2, arg3, arg4) {
|
|
390
|
-
const ret = wasm.
|
|
389
|
+
const ret = wasm.closure4899_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
391
390
|
return ret !== 0;
|
|
392
391
|
}
|
|
393
392
|
|
|
394
393
|
function __wbg_adapter_741(arg0, arg1, arg2, arg3) {
|
|
395
|
-
wasm.
|
|
394
|
+
wasm.closure4898_externref_shim(arg0, arg1, arg2, arg3);
|
|
396
395
|
}
|
|
397
396
|
|
|
398
397
|
/**
|
|
@@ -571,146 +570,6 @@ export class Client {
|
|
|
571
570
|
const ptr = this.__destroy_into_raw();
|
|
572
571
|
wasm.__wbg_client_free(ptr, 0);
|
|
573
572
|
}
|
|
574
|
-
/**
|
|
575
|
-
* @param {Consent[]} records
|
|
576
|
-
* @returns {Promise<void>}
|
|
577
|
-
*/
|
|
578
|
-
setConsentStates(records) {
|
|
579
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
580
|
-
const len0 = WASM_VECTOR_LEN;
|
|
581
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
582
|
-
return ret;
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* @param {ConsentEntityType} entity_type
|
|
586
|
-
* @param {string} entity
|
|
587
|
-
* @returns {Promise<ConsentState>}
|
|
588
|
-
*/
|
|
589
|
-
getConsentState(entity_type, entity) {
|
|
590
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
591
|
-
const len0 = WASM_VECTOR_LEN;
|
|
592
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
593
|
-
return ret;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* @returns {string | undefined}
|
|
597
|
-
*/
|
|
598
|
-
createInboxSignatureText() {
|
|
599
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
600
|
-
if (ret[3]) {
|
|
601
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
602
|
-
}
|
|
603
|
-
let v1;
|
|
604
|
-
if (ret[0] !== 0) {
|
|
605
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
606
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
607
|
-
}
|
|
608
|
-
return v1;
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* @param {Identifier} new_identifier
|
|
612
|
-
* @returns {Promise<string>}
|
|
613
|
-
*/
|
|
614
|
-
addWalletSignatureText(new_identifier) {
|
|
615
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
|
|
616
|
-
return ret;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* @param {Identifier} identifier
|
|
620
|
-
* @returns {Promise<string>}
|
|
621
|
-
*/
|
|
622
|
-
revokeWalletSignatureText(identifier) {
|
|
623
|
-
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
|
|
624
|
-
return ret;
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* @returns {Promise<string>}
|
|
628
|
-
*/
|
|
629
|
-
revokeAllOtherInstallationsSignatureText() {
|
|
630
|
-
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
631
|
-
return ret;
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* @param {Uint8Array[]} installation_ids
|
|
635
|
-
* @returns {Promise<string>}
|
|
636
|
-
*/
|
|
637
|
-
revokeInstallationsSignatureText(installation_ids) {
|
|
638
|
-
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
639
|
-
const len0 = WASM_VECTOR_LEN;
|
|
640
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
641
|
-
return ret;
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* @param {Identifier} new_recovery_identifier
|
|
645
|
-
* @returns {Promise<string>}
|
|
646
|
-
*/
|
|
647
|
-
changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
|
|
648
|
-
const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
|
|
649
|
-
return ret;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* @param {SignatureRequestType} signature_type
|
|
653
|
-
* @param {Uint8Array} signature_bytes
|
|
654
|
-
* @returns {Promise<void>}
|
|
655
|
-
*/
|
|
656
|
-
addEcdsaSignature(signature_type, signature_bytes) {
|
|
657
|
-
const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
658
|
-
return ret;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* @param {SignatureRequestType} signature_type
|
|
662
|
-
* @param {PasskeySignature} signature
|
|
663
|
-
* @returns {Promise<void>}
|
|
664
|
-
*/
|
|
665
|
-
addPasskeySignature(signature_type, signature) {
|
|
666
|
-
_assertClass(signature, PasskeySignature);
|
|
667
|
-
var ptr0 = signature.__destroy_into_raw();
|
|
668
|
-
const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
|
|
669
|
-
return ret;
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* @param {SignatureRequestType} signature_type
|
|
673
|
-
* @param {Uint8Array} signature_bytes
|
|
674
|
-
* @param {bigint} chain_id
|
|
675
|
-
* @param {bigint | null} [block_number]
|
|
676
|
-
* @returns {Promise<void>}
|
|
677
|
-
*/
|
|
678
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
679
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
680
|
-
return ret;
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* @returns {Promise<void>}
|
|
684
|
-
*/
|
|
685
|
-
applySignatureRequests() {
|
|
686
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
687
|
-
return ret;
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* @param {string} signature_text
|
|
691
|
-
* @returns {Uint8Array}
|
|
692
|
-
*/
|
|
693
|
-
signWithInstallationKey(signature_text) {
|
|
694
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
695
|
-
const len0 = WASM_VECTOR_LEN;
|
|
696
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
697
|
-
if (ret[2]) {
|
|
698
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
699
|
-
}
|
|
700
|
-
return takeFromExternrefTable0(ret[0]);
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* @param {string} signature_text
|
|
704
|
-
* @param {Uint8Array} signature_bytes
|
|
705
|
-
*/
|
|
706
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
707
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
708
|
-
const len0 = WASM_VECTOR_LEN;
|
|
709
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
710
|
-
if (ret[1]) {
|
|
711
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
573
|
/**
|
|
715
574
|
* @returns {Identifier}
|
|
716
575
|
*/
|
|
@@ -859,6 +718,146 @@ export class Client {
|
|
|
859
718
|
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
860
719
|
return ret;
|
|
861
720
|
}
|
|
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
|
+
}
|
|
862
861
|
}
|
|
863
862
|
|
|
864
863
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -995,7 +994,7 @@ export class ContentTypeId {
|
|
|
995
994
|
set authorityId(arg0) {
|
|
996
995
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
997
996
|
const len0 = WASM_VECTOR_LEN;
|
|
998
|
-
wasm.
|
|
997
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
999
998
|
}
|
|
1000
999
|
/**
|
|
1001
1000
|
* @returns {string}
|
|
@@ -5343,20 +5342,20 @@ function __wbg_get_imports() {
|
|
|
5343
5342
|
const ret = false;
|
|
5344
5343
|
return ret;
|
|
5345
5344
|
};
|
|
5346
|
-
imports.wbg.
|
|
5347
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5345
|
+
imports.wbg.__wbindgen_closure_wrapper15299 = function(arg0, arg1, arg2) {
|
|
5346
|
+
const ret = makeMutClosure(arg0, arg1, 3672, __wbg_adapter_50);
|
|
5348
5347
|
return ret;
|
|
5349
5348
|
};
|
|
5350
|
-
imports.wbg.
|
|
5351
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5349
|
+
imports.wbg.__wbindgen_closure_wrapper15441 = function(arg0, arg1, arg2) {
|
|
5350
|
+
const ret = makeMutClosure(arg0, arg1, 3695, __wbg_adapter_53);
|
|
5352
5351
|
return ret;
|
|
5353
5352
|
};
|
|
5354
|
-
imports.wbg.
|
|
5355
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5353
|
+
imports.wbg.__wbindgen_closure_wrapper18450 = function(arg0, arg1, arg2) {
|
|
5354
|
+
const ret = makeMutClosure(arg0, arg1, 4007, __wbg_adapter_56);
|
|
5356
5355
|
return ret;
|
|
5357
5356
|
};
|
|
5358
|
-
imports.wbg.
|
|
5359
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5357
|
+
imports.wbg.__wbindgen_closure_wrapper18569 = function(arg0, arg1, arg2) {
|
|
5358
|
+
const ret = makeMutClosure(arg0, arg1, 4021, __wbg_adapter_59);
|
|
5360
5359
|
return ret;
|
|
5361
5360
|
};
|
|
5362
5361
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|