@xmtp/wasm-bindings 0.0.9 → 0.0.11
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 +67 -62
- package/dist/bindings_wasm.js +73 -40
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +54 -51
- package/package.json +2 -2
package/dist/bindings_wasm.d.ts
CHANGED
|
@@ -89,18 +89,13 @@ export class Client {
|
|
|
89
89
|
createInboxSignatureText(): Promise<string | undefined>;
|
|
90
90
|
addWalletSignatureText(new_wallet_address: string): Promise<string>;
|
|
91
91
|
revokeWalletSignatureText(wallet_address: string): Promise<string>;
|
|
92
|
-
|
|
92
|
+
revokeAllOtherInstallationsSignatureText(): Promise<string>;
|
|
93
|
+
revokeInstallationsSignatureText(installation_ids: (Uint8Array)[]): Promise<string>;
|
|
93
94
|
addSignature(signature_type: SignatureRequestType, signature_bytes: Uint8Array): Promise<void>;
|
|
94
95
|
addScwSignature(signature_type: SignatureRequestType, signature_bytes: Uint8Array, chain_id: bigint, block_number?: bigint): Promise<void>;
|
|
95
96
|
applySignatureRequests(): Promise<void>;
|
|
96
97
|
signWithInstallationKey(signature_text: string): Uint8Array;
|
|
97
98
|
verifySignedWithInstallationKey(signature_text: string, signature_bytes: Uint8Array): void;
|
|
98
|
-
canMessage(account_addresses: (string)[]): Promise<any>;
|
|
99
|
-
registerIdentity(): Promise<void>;
|
|
100
|
-
sendHistorySyncRequest(): Promise<void>;
|
|
101
|
-
sendConsentSyncRequest(): Promise<void>;
|
|
102
|
-
findInboxIdByAddress(address: string): Promise<string | undefined>;
|
|
103
|
-
conversations(): Conversations;
|
|
104
99
|
/**
|
|
105
100
|
*
|
|
106
101
|
* * Get the client's inbox state.
|
|
@@ -111,6 +106,12 @@ export class Client {
|
|
|
111
106
|
*/
|
|
112
107
|
inboxState(refresh_from_network: boolean): Promise<InboxState>;
|
|
113
108
|
getLatestInboxState(inbox_id: string): Promise<InboxState>;
|
|
109
|
+
canMessage(account_addresses: (string)[]): Promise<any>;
|
|
110
|
+
registerIdentity(): Promise<void>;
|
|
111
|
+
sendHistorySyncRequest(): Promise<void>;
|
|
112
|
+
sendConsentSyncRequest(): Promise<void>;
|
|
113
|
+
findInboxIdByAddress(address: string): Promise<string | undefined>;
|
|
114
|
+
conversations(): Conversations;
|
|
114
115
|
readonly accountAddress: string;
|
|
115
116
|
readonly inboxId: string;
|
|
116
117
|
readonly isRegistered: boolean;
|
|
@@ -188,9 +189,9 @@ export class Conversations {
|
|
|
188
189
|
findMessageById(message_id: string): Message;
|
|
189
190
|
sync(): Promise<void>;
|
|
190
191
|
syncAllConversations(): Promise<number>;
|
|
191
|
-
list(opts?: ListConversationsOptions):
|
|
192
|
-
listGroups(opts?: ListConversationsOptions):
|
|
193
|
-
listDms(opts?: ListConversationsOptions):
|
|
192
|
+
list(opts?: ListConversationsOptions): Array<any>;
|
|
193
|
+
listGroups(opts?: ListConversationsOptions): Array<any>;
|
|
194
|
+
listDms(opts?: ListConversationsOptions): Array<any>;
|
|
194
195
|
}
|
|
195
196
|
export class CreateGroupOptions {
|
|
196
197
|
free(): void;
|
|
@@ -242,7 +243,8 @@ export class InboxState {
|
|
|
242
243
|
}
|
|
243
244
|
export class Installation {
|
|
244
245
|
free(): void;
|
|
245
|
-
constructor(id: string, client_timestamp_ns?: bigint);
|
|
246
|
+
constructor(bytes: Uint8Array, id: string, client_timestamp_ns?: bigint);
|
|
247
|
+
bytes: Uint8Array;
|
|
246
248
|
id: string;
|
|
247
249
|
clientTimestampNs?: bigint;
|
|
248
250
|
}
|
|
@@ -383,9 +385,9 @@ export interface InitOutput {
|
|
|
383
385
|
readonly conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
384
386
|
readonly conversations_sync: (a: number) => any;
|
|
385
387
|
readonly conversations_syncAllConversations: (a: number) => any;
|
|
386
|
-
readonly conversations_list: (a: number, b: number) =>
|
|
387
|
-
readonly conversations_listGroups: (a: number, b: number) =>
|
|
388
|
-
readonly conversations_listDms: (a: number, b: number) =>
|
|
388
|
+
readonly conversations_list: (a: number, b: number) => [number, number, number];
|
|
389
|
+
readonly conversations_listGroups: (a: number, b: number) => [number, number, number];
|
|
390
|
+
readonly conversations_listDms: (a: number, b: number) => [number, number, number];
|
|
389
391
|
readonly __wbg_contenttypeid_free: (a: number, b: number) => void;
|
|
390
392
|
readonly __wbg_get_contenttypeid_typeId: (a: number) => [number, number];
|
|
391
393
|
readonly __wbg_set_contenttypeid_typeId: (a: number, b: number, c: number) => void;
|
|
@@ -434,41 +436,42 @@ export interface InitOutput {
|
|
|
434
436
|
readonly client_createInboxSignatureText: (a: number) => any;
|
|
435
437
|
readonly client_addWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
436
438
|
readonly client_revokeWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
437
|
-
readonly
|
|
439
|
+
readonly client_revokeAllOtherInstallationsSignatureText: (a: number) => any;
|
|
440
|
+
readonly client_revokeInstallationsSignatureText: (a: number, b: number, c: number) => any;
|
|
438
441
|
readonly client_addSignature: (a: number, b: number, c: any) => any;
|
|
439
442
|
readonly client_addScwSignature: (a: number, b: number, c: any, d: bigint, e: number, f: bigint) => any;
|
|
440
443
|
readonly client_applySignatureRequests: (a: number) => any;
|
|
441
444
|
readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
442
445
|
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
446
|
+
readonly __wbg_set_contenttypeid_authorityId: (a: number, b: number, c: number) => void;
|
|
447
|
+
readonly __wbg_get_contenttypeid_authorityId: (a: number) => [number, number];
|
|
443
448
|
readonly __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
444
449
|
readonly __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
445
450
|
readonly __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
446
451
|
readonly __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
447
452
|
readonly __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
448
453
|
readonly __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
449
|
-
readonly
|
|
450
|
-
readonly
|
|
451
|
-
readonly
|
|
452
|
-
readonly
|
|
453
|
-
readonly
|
|
454
|
-
readonly
|
|
455
|
-
readonly
|
|
456
|
-
readonly
|
|
457
|
-
readonly
|
|
458
|
-
readonly
|
|
459
|
-
readonly
|
|
460
|
-
readonly
|
|
461
|
-
readonly
|
|
462
|
-
readonly
|
|
463
|
-
readonly
|
|
464
|
-
readonly
|
|
465
|
-
readonly
|
|
466
|
-
readonly
|
|
467
|
-
readonly
|
|
468
|
-
readonly
|
|
469
|
-
readonly
|
|
470
|
-
readonly client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
471
|
-
readonly client_conversations: (a: number) => number;
|
|
454
|
+
readonly __wbg_permissionpolicyset_free: (a: number, b: number) => void;
|
|
455
|
+
readonly __wbg_get_permissionpolicyset_addMemberPolicy: (a: number) => number;
|
|
456
|
+
readonly __wbg_set_permissionpolicyset_addMemberPolicy: (a: number, b: number) => void;
|
|
457
|
+
readonly __wbg_get_permissionpolicyset_removeMemberPolicy: (a: number) => number;
|
|
458
|
+
readonly __wbg_set_permissionpolicyset_removeMemberPolicy: (a: number, b: number) => void;
|
|
459
|
+
readonly __wbg_get_permissionpolicyset_addAdminPolicy: (a: number) => number;
|
|
460
|
+
readonly __wbg_set_permissionpolicyset_addAdminPolicy: (a: number, b: number) => void;
|
|
461
|
+
readonly __wbg_get_permissionpolicyset_removeAdminPolicy: (a: number) => number;
|
|
462
|
+
readonly __wbg_set_permissionpolicyset_removeAdminPolicy: (a: number, b: number) => void;
|
|
463
|
+
readonly __wbg_get_permissionpolicyset_updateGroupNamePolicy: (a: number) => number;
|
|
464
|
+
readonly __wbg_set_permissionpolicyset_updateGroupNamePolicy: (a: number, b: number) => void;
|
|
465
|
+
readonly __wbg_get_permissionpolicyset_updateGroupDescriptionPolicy: (a: number) => number;
|
|
466
|
+
readonly __wbg_set_permissionpolicyset_updateGroupDescriptionPolicy: (a: number, b: number) => void;
|
|
467
|
+
readonly __wbg_get_permissionpolicyset_updateGroupImageUrlSquarePolicy: (a: number) => number;
|
|
468
|
+
readonly __wbg_set_permissionpolicyset_updateGroupImageUrlSquarePolicy: (a: number, b: number) => void;
|
|
469
|
+
readonly __wbg_get_permissionpolicyset_updateGroupPinnedFrameUrlPolicy: (a: number) => number;
|
|
470
|
+
readonly __wbg_set_permissionpolicyset_updateGroupPinnedFrameUrlPolicy: (a: number, b: number) => void;
|
|
471
|
+
readonly permissionpolicyset_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
472
|
+
readonly __wbg_grouppermissions_free: (a: number, b: number) => void;
|
|
473
|
+
readonly grouppermissions_policyType: (a: number) => [number, number, number];
|
|
474
|
+
readonly grouppermissions_policySet: (a: number) => [number, number, number];
|
|
472
475
|
readonly __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
473
476
|
readonly groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
474
477
|
readonly groupmetadata_conversationType: (a: number) => [number, number];
|
|
@@ -520,11 +523,13 @@ export interface InitOutput {
|
|
|
520
523
|
readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
521
524
|
readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
522
525
|
readonly __wbg_installation_free: (a: number, b: number) => void;
|
|
526
|
+
readonly __wbg_get_installation_bytes: (a: number) => any;
|
|
527
|
+
readonly __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
523
528
|
readonly __wbg_get_installation_id: (a: number) => [number, number];
|
|
524
529
|
readonly __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
525
530
|
readonly __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
526
531
|
readonly __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
527
|
-
readonly installation_new: (a:
|
|
532
|
+
readonly installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
528
533
|
readonly __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
529
534
|
readonly __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
530
535
|
readonly __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
@@ -537,27 +542,27 @@ export interface InitOutput {
|
|
|
537
542
|
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
538
543
|
readonly __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
539
544
|
readonly __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
540
|
-
readonly
|
|
541
|
-
readonly
|
|
542
|
-
readonly
|
|
543
|
-
readonly
|
|
544
|
-
readonly
|
|
545
|
-
readonly
|
|
546
|
-
readonly
|
|
547
|
-
readonly
|
|
548
|
-
readonly
|
|
549
|
-
readonly
|
|
550
|
-
readonly
|
|
551
|
-
readonly
|
|
552
|
-
readonly
|
|
553
|
-
readonly
|
|
554
|
-
readonly
|
|
555
|
-
readonly
|
|
556
|
-
readonly
|
|
557
|
-
readonly
|
|
558
|
-
readonly
|
|
559
|
-
readonly
|
|
560
|
-
readonly
|
|
545
|
+
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
546
|
+
readonly __wbg_logoptions_free: (a: number, b: number) => void;
|
|
547
|
+
readonly __wbg_get_logoptions_structured: (a: number) => number;
|
|
548
|
+
readonly __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
549
|
+
readonly __wbg_get_logoptions_performance: (a: number) => number;
|
|
550
|
+
readonly __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
551
|
+
readonly __wbg_get_logoptions_level: (a: number) => number;
|
|
552
|
+
readonly __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
553
|
+
readonly logoptions_new: (a: number, b: number, c: number) => number;
|
|
554
|
+
readonly createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
555
|
+
readonly client_accountAddress: (a: number) => [number, number];
|
|
556
|
+
readonly client_inboxId: (a: number) => [number, number];
|
|
557
|
+
readonly client_isRegistered: (a: number) => number;
|
|
558
|
+
readonly client_installationId: (a: number) => [number, number];
|
|
559
|
+
readonly client_installationIdBytes: (a: number) => any;
|
|
560
|
+
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
561
|
+
readonly client_registerIdentity: (a: number) => any;
|
|
562
|
+
readonly client_sendHistorySyncRequest: (a: number) => any;
|
|
563
|
+
readonly client_sendConsentSyncRequest: (a: number) => any;
|
|
564
|
+
readonly client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
565
|
+
readonly client_conversations: (a: number) => number;
|
|
561
566
|
readonly __wbg_version_free: (a: number, b: number) => void;
|
|
562
567
|
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
563
568
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
@@ -581,8 +586,8 @@ export interface InitOutput {
|
|
|
581
586
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
582
587
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
583
588
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
584
|
-
readonly
|
|
585
|
-
readonly
|
|
589
|
+
readonly closure2584_externref_shim: (a: number, b: number, c: any) => void;
|
|
590
|
+
readonly closure3678_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
586
591
|
readonly __wbindgen_start: () => void;
|
|
587
592
|
}
|
|
588
593
|
|
package/dist/bindings_wasm.js
CHANGED
|
@@ -316,11 +316,11 @@ export function createClient(host, inbox_id, account_address, db_path, encryptio
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
319
|
-
wasm.
|
|
319
|
+
wasm.closure2584_externref_shim(arg0, arg1, arg2);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
function
|
|
323
|
-
wasm.
|
|
322
|
+
function __wbg_adapter_578(arg0, arg1, arg2, arg3) {
|
|
323
|
+
wasm.closure3678_externref_shim(arg0, arg1, arg2, arg3);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
/**
|
|
@@ -517,8 +517,18 @@ export class Client {
|
|
|
517
517
|
/**
|
|
518
518
|
* @returns {Promise<string>}
|
|
519
519
|
*/
|
|
520
|
-
|
|
521
|
-
const ret = wasm.
|
|
520
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
521
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
522
|
+
return ret;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @param {(Uint8Array)[]} installation_ids
|
|
526
|
+
* @returns {Promise<string>}
|
|
527
|
+
*/
|
|
528
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
529
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
530
|
+
const len0 = WASM_VECTOR_LEN;
|
|
531
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
522
532
|
return ret;
|
|
523
533
|
}
|
|
524
534
|
/**
|
|
@@ -573,6 +583,30 @@ export class Client {
|
|
|
573
583
|
throw takeFromExternrefTable0(ret[0]);
|
|
574
584
|
}
|
|
575
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
*
|
|
588
|
+
* * Get the client's inbox state.
|
|
589
|
+
* *
|
|
590
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
591
|
+
* * Otherwise, the state will be read from the local database.
|
|
592
|
+
*
|
|
593
|
+
* @param {boolean} refresh_from_network
|
|
594
|
+
* @returns {Promise<InboxState>}
|
|
595
|
+
*/
|
|
596
|
+
inboxState(refresh_from_network) {
|
|
597
|
+
const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
|
|
598
|
+
return ret;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* @param {string} inbox_id
|
|
602
|
+
* @returns {Promise<InboxState>}
|
|
603
|
+
*/
|
|
604
|
+
getLatestInboxState(inbox_id) {
|
|
605
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
606
|
+
const len0 = WASM_VECTOR_LEN;
|
|
607
|
+
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
608
|
+
return ret;
|
|
609
|
+
}
|
|
576
610
|
/**
|
|
577
611
|
* @returns {string}
|
|
578
612
|
*/
|
|
@@ -680,30 +714,6 @@ export class Client {
|
|
|
680
714
|
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
681
715
|
return Conversations.__wrap(ret);
|
|
682
716
|
}
|
|
683
|
-
/**
|
|
684
|
-
*
|
|
685
|
-
* * Get the client's inbox state.
|
|
686
|
-
* *
|
|
687
|
-
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
688
|
-
* * Otherwise, the state will be read from the local database.
|
|
689
|
-
*
|
|
690
|
-
* @param {boolean} refresh_from_network
|
|
691
|
-
* @returns {Promise<InboxState>}
|
|
692
|
-
*/
|
|
693
|
-
inboxState(refresh_from_network) {
|
|
694
|
-
const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
|
|
695
|
-
return ret;
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* @param {string} inbox_id
|
|
699
|
-
* @returns {Promise<InboxState>}
|
|
700
|
-
*/
|
|
701
|
-
getLatestInboxState(inbox_id) {
|
|
702
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
703
|
-
const len0 = WASM_VECTOR_LEN;
|
|
704
|
-
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
705
|
-
return ret;
|
|
706
|
-
}
|
|
707
717
|
}
|
|
708
718
|
|
|
709
719
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1486,7 +1496,7 @@ export class Conversations {
|
|
|
1486
1496
|
}
|
|
1487
1497
|
/**
|
|
1488
1498
|
* @param {ListConversationsOptions | undefined} [opts]
|
|
1489
|
-
* @returns {
|
|
1499
|
+
* @returns {Array<any>}
|
|
1490
1500
|
*/
|
|
1491
1501
|
list(opts) {
|
|
1492
1502
|
let ptr0 = 0;
|
|
@@ -1495,11 +1505,14 @@ export class Conversations {
|
|
|
1495
1505
|
ptr0 = opts.__destroy_into_raw();
|
|
1496
1506
|
}
|
|
1497
1507
|
const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
|
|
1498
|
-
|
|
1508
|
+
if (ret[2]) {
|
|
1509
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1510
|
+
}
|
|
1511
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1499
1512
|
}
|
|
1500
1513
|
/**
|
|
1501
1514
|
* @param {ListConversationsOptions | undefined} [opts]
|
|
1502
|
-
* @returns {
|
|
1515
|
+
* @returns {Array<any>}
|
|
1503
1516
|
*/
|
|
1504
1517
|
listGroups(opts) {
|
|
1505
1518
|
let ptr0 = 0;
|
|
@@ -1508,11 +1521,14 @@ export class Conversations {
|
|
|
1508
1521
|
ptr0 = opts.__destroy_into_raw();
|
|
1509
1522
|
}
|
|
1510
1523
|
const ret = wasm.conversations_listGroups(this.__wbg_ptr, ptr0);
|
|
1511
|
-
|
|
1524
|
+
if (ret[2]) {
|
|
1525
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1526
|
+
}
|
|
1527
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1512
1528
|
}
|
|
1513
1529
|
/**
|
|
1514
1530
|
* @param {ListConversationsOptions | undefined} [opts]
|
|
1515
|
-
* @returns {
|
|
1531
|
+
* @returns {Array<any>}
|
|
1516
1532
|
*/
|
|
1517
1533
|
listDms(opts) {
|
|
1518
1534
|
let ptr0 = 0;
|
|
@@ -1521,7 +1537,10 @@ export class Conversations {
|
|
|
1521
1537
|
ptr0 = opts.__destroy_into_raw();
|
|
1522
1538
|
}
|
|
1523
1539
|
const ret = wasm.conversations_listDms(this.__wbg_ptr, ptr0);
|
|
1524
|
-
|
|
1540
|
+
if (ret[2]) {
|
|
1541
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1542
|
+
}
|
|
1543
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1525
1544
|
}
|
|
1526
1545
|
}
|
|
1527
1546
|
|
|
@@ -2190,6 +2209,19 @@ export class Installation {
|
|
|
2190
2209
|
const ptr = this.__destroy_into_raw();
|
|
2191
2210
|
wasm.__wbg_installation_free(ptr, 0);
|
|
2192
2211
|
}
|
|
2212
|
+
/**
|
|
2213
|
+
* @returns {Uint8Array}
|
|
2214
|
+
*/
|
|
2215
|
+
get bytes() {
|
|
2216
|
+
const ret = wasm.__wbg_get_installation_bytes(this.__wbg_ptr);
|
|
2217
|
+
return ret;
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* @param {Uint8Array} arg0
|
|
2221
|
+
*/
|
|
2222
|
+
set bytes(arg0) {
|
|
2223
|
+
wasm.__wbg_set_installation_bytes(this.__wbg_ptr, arg0);
|
|
2224
|
+
}
|
|
2193
2225
|
/**
|
|
2194
2226
|
* @returns {string}
|
|
2195
2227
|
*/
|
|
@@ -2227,13 +2259,14 @@ export class Installation {
|
|
|
2227
2259
|
wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
2228
2260
|
}
|
|
2229
2261
|
/**
|
|
2262
|
+
* @param {Uint8Array} bytes
|
|
2230
2263
|
* @param {string} id
|
|
2231
2264
|
* @param {bigint | undefined} [client_timestamp_ns]
|
|
2232
2265
|
*/
|
|
2233
|
-
constructor(id, client_timestamp_ns) {
|
|
2266
|
+
constructor(bytes, id, client_timestamp_ns) {
|
|
2234
2267
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2235
2268
|
const len0 = WASM_VECTOR_LEN;
|
|
2236
|
-
const ret = wasm.installation_new(ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
2269
|
+
const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
2237
2270
|
this.__wbg_ptr = ret >>> 0;
|
|
2238
2271
|
InstallationFinalization.register(this, this.__wbg_ptr, this);
|
|
2239
2272
|
return this;
|
|
@@ -3481,7 +3514,7 @@ function __wbg_get_imports() {
|
|
|
3481
3514
|
const a = state0.a;
|
|
3482
3515
|
state0.a = 0;
|
|
3483
3516
|
try {
|
|
3484
|
-
return
|
|
3517
|
+
return __wbg_adapter_578(a, state0.b, arg0, arg1);
|
|
3485
3518
|
} finally {
|
|
3486
3519
|
state0.a = a;
|
|
3487
3520
|
}
|
|
@@ -3805,8 +3838,8 @@ function __wbg_get_imports() {
|
|
|
3805
3838
|
const ret = false;
|
|
3806
3839
|
return ret;
|
|
3807
3840
|
};
|
|
3808
|
-
imports.wbg.
|
|
3809
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3841
|
+
imports.wbg.__wbindgen_closure_wrapper11192 = function(arg0, arg1, arg2) {
|
|
3842
|
+
const ret = makeMutClosure(arg0, arg1, 2585, __wbg_adapter_50);
|
|
3810
3843
|
return ret;
|
|
3811
3844
|
};
|
|
3812
3845
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -47,9 +47,9 @@ export const conversations_findDmByTargetInboxId: (a: number, b: number, c: numb
|
|
|
47
47
|
export const conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
48
48
|
export const conversations_sync: (a: number) => any;
|
|
49
49
|
export const conversations_syncAllConversations: (a: number) => any;
|
|
50
|
-
export const conversations_list: (a: number, b: number) =>
|
|
51
|
-
export const conversations_listGroups: (a: number, b: number) =>
|
|
52
|
-
export const conversations_listDms: (a: number, b: number) =>
|
|
50
|
+
export const conversations_list: (a: number, b: number) => [number, number, number];
|
|
51
|
+
export const conversations_listGroups: (a: number, b: number) => [number, number, number];
|
|
52
|
+
export const conversations_listDms: (a: number, b: number) => [number, number, number];
|
|
53
53
|
export const __wbg_contenttypeid_free: (a: number, b: number) => void;
|
|
54
54
|
export const __wbg_get_contenttypeid_typeId: (a: number) => [number, number];
|
|
55
55
|
export const __wbg_set_contenttypeid_typeId: (a: number, b: number, c: number) => void;
|
|
@@ -98,41 +98,42 @@ export const verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) =
|
|
|
98
98
|
export const client_createInboxSignatureText: (a: number) => any;
|
|
99
99
|
export const client_addWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
100
100
|
export const client_revokeWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
101
|
-
export const
|
|
101
|
+
export const client_revokeAllOtherInstallationsSignatureText: (a: number) => any;
|
|
102
|
+
export const client_revokeInstallationsSignatureText: (a: number, b: number, c: number) => any;
|
|
102
103
|
export const client_addSignature: (a: number, b: number, c: any) => any;
|
|
103
104
|
export const client_addScwSignature: (a: number, b: number, c: any, d: bigint, e: number, f: bigint) => any;
|
|
104
105
|
export const client_applySignatureRequests: (a: number) => any;
|
|
105
106
|
export const client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
106
107
|
export const client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
108
|
+
export const __wbg_set_contenttypeid_authorityId: (a: number, b: number, c: number) => void;
|
|
109
|
+
export const __wbg_get_contenttypeid_authorityId: (a: number) => [number, number];
|
|
107
110
|
export const __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
108
111
|
export const __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
109
112
|
export const __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
110
113
|
export const __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
111
114
|
export const __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
112
115
|
export const __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
113
|
-
export const
|
|
114
|
-
export const
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
119
|
-
export const
|
|
120
|
-
export const
|
|
121
|
-
export const
|
|
122
|
-
export const
|
|
123
|
-
export const
|
|
124
|
-
export const
|
|
125
|
-
export const
|
|
126
|
-
export const
|
|
127
|
-
export const
|
|
128
|
-
export const
|
|
129
|
-
export const
|
|
130
|
-
export const
|
|
131
|
-
export const
|
|
132
|
-
export const
|
|
133
|
-
export const
|
|
134
|
-
export const client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
135
|
-
export const client_conversations: (a: number) => number;
|
|
116
|
+
export const __wbg_permissionpolicyset_free: (a: number, b: number) => void;
|
|
117
|
+
export const __wbg_get_permissionpolicyset_addMemberPolicy: (a: number) => number;
|
|
118
|
+
export const __wbg_set_permissionpolicyset_addMemberPolicy: (a: number, b: number) => void;
|
|
119
|
+
export const __wbg_get_permissionpolicyset_removeMemberPolicy: (a: number) => number;
|
|
120
|
+
export const __wbg_set_permissionpolicyset_removeMemberPolicy: (a: number, b: number) => void;
|
|
121
|
+
export const __wbg_get_permissionpolicyset_addAdminPolicy: (a: number) => number;
|
|
122
|
+
export const __wbg_set_permissionpolicyset_addAdminPolicy: (a: number, b: number) => void;
|
|
123
|
+
export const __wbg_get_permissionpolicyset_removeAdminPolicy: (a: number) => number;
|
|
124
|
+
export const __wbg_set_permissionpolicyset_removeAdminPolicy: (a: number, b: number) => void;
|
|
125
|
+
export const __wbg_get_permissionpolicyset_updateGroupNamePolicy: (a: number) => number;
|
|
126
|
+
export const __wbg_set_permissionpolicyset_updateGroupNamePolicy: (a: number, b: number) => void;
|
|
127
|
+
export const __wbg_get_permissionpolicyset_updateGroupDescriptionPolicy: (a: number) => number;
|
|
128
|
+
export const __wbg_set_permissionpolicyset_updateGroupDescriptionPolicy: (a: number, b: number) => void;
|
|
129
|
+
export const __wbg_get_permissionpolicyset_updateGroupImageUrlSquarePolicy: (a: number) => number;
|
|
130
|
+
export const __wbg_set_permissionpolicyset_updateGroupImageUrlSquarePolicy: (a: number, b: number) => void;
|
|
131
|
+
export const __wbg_get_permissionpolicyset_updateGroupPinnedFrameUrlPolicy: (a: number) => number;
|
|
132
|
+
export const __wbg_set_permissionpolicyset_updateGroupPinnedFrameUrlPolicy: (a: number, b: number) => void;
|
|
133
|
+
export const permissionpolicyset_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
134
|
+
export const __wbg_grouppermissions_free: (a: number, b: number) => void;
|
|
135
|
+
export const grouppermissions_policyType: (a: number) => [number, number, number];
|
|
136
|
+
export const grouppermissions_policySet: (a: number) => [number, number, number];
|
|
136
137
|
export const __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
137
138
|
export const groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
138
139
|
export const groupmetadata_conversationType: (a: number) => [number, number];
|
|
@@ -184,11 +185,13 @@ export const conversation_groupMetadata: (a: number) => any;
|
|
|
184
185
|
export const conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
185
186
|
export const conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
186
187
|
export const __wbg_installation_free: (a: number, b: number) => void;
|
|
188
|
+
export const __wbg_get_installation_bytes: (a: number) => any;
|
|
189
|
+
export const __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
187
190
|
export const __wbg_get_installation_id: (a: number) => [number, number];
|
|
188
191
|
export const __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
189
192
|
export const __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
190
193
|
export const __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
191
|
-
export const installation_new: (a:
|
|
194
|
+
export const installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
192
195
|
export const __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
193
196
|
export const __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
194
197
|
export const __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
@@ -201,27 +204,27 @@ export const client_inboxState: (a: number, b: number) => any;
|
|
|
201
204
|
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
202
205
|
export const __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
203
206
|
export const __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
204
|
-
export const
|
|
205
|
-
export const
|
|
206
|
-
export const
|
|
207
|
-
export const
|
|
208
|
-
export const
|
|
209
|
-
export const
|
|
210
|
-
export const
|
|
211
|
-
export const
|
|
212
|
-
export const
|
|
213
|
-
export const
|
|
214
|
-
export const
|
|
215
|
-
export const
|
|
216
|
-
export const
|
|
217
|
-
export const
|
|
218
|
-
export const
|
|
219
|
-
export const
|
|
220
|
-
export const
|
|
221
|
-
export const
|
|
222
|
-
export const
|
|
223
|
-
export const
|
|
224
|
-
export const
|
|
207
|
+
export const __wbg_client_free: (a: number, b: number) => void;
|
|
208
|
+
export const __wbg_logoptions_free: (a: number, b: number) => void;
|
|
209
|
+
export const __wbg_get_logoptions_structured: (a: number) => number;
|
|
210
|
+
export const __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
211
|
+
export const __wbg_get_logoptions_performance: (a: number) => number;
|
|
212
|
+
export const __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
213
|
+
export const __wbg_get_logoptions_level: (a: number) => number;
|
|
214
|
+
export const __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
215
|
+
export const logoptions_new: (a: number, b: number, c: number) => number;
|
|
216
|
+
export const createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
217
|
+
export const client_accountAddress: (a: number) => [number, number];
|
|
218
|
+
export const client_inboxId: (a: number) => [number, number];
|
|
219
|
+
export const client_isRegistered: (a: number) => number;
|
|
220
|
+
export const client_installationId: (a: number) => [number, number];
|
|
221
|
+
export const client_installationIdBytes: (a: number) => any;
|
|
222
|
+
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
223
|
+
export const client_registerIdentity: (a: number) => any;
|
|
224
|
+
export const client_sendHistorySyncRequest: (a: number) => any;
|
|
225
|
+
export const client_sendConsentSyncRequest: (a: number) => any;
|
|
226
|
+
export const client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
227
|
+
export const client_conversations: (a: number) => number;
|
|
225
228
|
export const __wbg_version_free: (a: number, b: number) => void;
|
|
226
229
|
export const __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
227
230
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
@@ -245,6 +248,6 @@ export const __wbindgen_export_5: WebAssembly.Table;
|
|
|
245
248
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
246
249
|
export const __externref_table_dealloc: (a: number) => void;
|
|
247
250
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
248
|
-
export const
|
|
249
|
-
export const
|
|
251
|
+
export const closure2584_externref_shim: (a: number, b: number, c: any) => void;
|
|
252
|
+
export const closure3678_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
250
253
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmtp/wasm-bindings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "WASM bindings for the libXMTP rust library",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@sqlite.org/sqlite-wasm": "^3.47.0-build1",
|
|
59
|
-
"binaryen": "^
|
|
59
|
+
"binaryen": "^121.0.0",
|
|
60
60
|
"wasm-pack": "^0.13.1"
|
|
61
61
|
},
|
|
62
62
|
"packageManager": "yarn@4.5.1"
|