@xmtp/wasm-bindings 1.7.0-rc2 → 1.7.0-rc3

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.
@@ -1,45 +1,45 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
4
3
  export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
4
+ export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
5
5
  export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
6
+ export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
6
7
  export function encodeAttachment(attachment: Attachment): EncodedContent;
7
8
  export function attachmentContentType(): ContentTypeId;
8
9
  export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
9
10
  export function readReceiptContentType(): ContentTypeId;
10
11
  export function groupUpdatedContentType(): ContentTypeId;
11
12
  export function leaveRequestContentType(): ContentTypeId;
12
- export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
13
- /**
14
- * Encrypts an attachment for storage as a remote attachment.
15
- */
16
- export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
17
13
  /**
18
14
  * Decrypts an encrypted payload from a remote attachment.
19
15
  */
20
16
  export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
21
17
  export function remoteAttachmentContentType(): ContentTypeId;
18
+ /**
19
+ * Encrypts an attachment for storage as a remote attachment.
20
+ */
21
+ export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
22
+ export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
22
23
  export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
23
24
  export function walletSendCallsContentType(): ContentTypeId;
24
- export function transactionReferenceContentType(): ContentTypeId;
25
25
  export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
26
+ export function transactionReferenceContentType(): ContentTypeId;
26
27
  export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
27
28
  export function multiRemoteAttachmentContentType(): ContentTypeId;
28
29
  export function encodeText(text: string): EncodedContent;
29
30
  export function textContentType(): ContentTypeId;
30
31
  export function replyContentType(): ContentTypeId;
31
- export function encodeIntent(intent: Intent): EncodedContent;
32
32
  export function intentContentType(): ContentTypeId;
33
- export function encodeActions(actions: Actions): EncodedContent;
33
+ export function encodeIntent(intent: Intent): EncodedContent;
34
34
  export function actionsContentType(): ContentTypeId;
35
- export function markdownContentType(): ContentTypeId;
35
+ export function encodeActions(actions: Actions): EncodedContent;
36
36
  export function encodeMarkdown(text: string): EncodedContent;
37
+ export function markdownContentType(): ContentTypeId;
37
38
  export function encodeReaction(reaction: Reaction): EncodedContent;
38
39
  export function reactionContentType(): ContentTypeId;
39
40
  export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncServerUrl?: string | null, deviceSyncWorkerMode?: DeviceSyncWorkerMode | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, appVersion?: string | null, gatewayHost?: string | null, nonce?: bigint | null, authCallback?: any | null, authHandle?: AuthHandle | null, clientMode?: ClientMode | null): Promise<Client>;
40
- export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, accountIdentifier: Identifier): Promise<string | undefined>;
41
41
  export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
42
- export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
42
+ export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, accountIdentifier: Identifier): Promise<string | undefined>;
43
43
  /**
44
44
  * Entry point invoked by JavaScript in a worker.
45
45
  */
@@ -50,62 +50,34 @@ export function task_worker_entry_point(ptr: number): void;
50
50
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
51
51
  */
52
52
  type ReadableStreamType = "bytes";
53
- export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
54
-
55
- export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
56
-
57
- export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
58
-
59
- export interface GroupPermissions {
60
- policyType: GroupPermissionsOptions;
61
- policySet: PermissionPolicySet;
62
- }
63
-
64
- export interface PermissionPolicySet {
65
- addMemberPolicy: PermissionPolicy;
66
- removeMemberPolicy: PermissionPolicy;
67
- addAdminPolicy: PermissionPolicy;
68
- removeAdminPolicy: PermissionPolicy;
69
- updateGroupNamePolicy: PermissionPolicy;
70
- updateGroupDescriptionPolicy: PermissionPolicy;
71
- updateGroupImageUrlSquarePolicy: PermissionPolicy;
72
- updateMessageDisappearingPolicy: PermissionPolicy;
53
+ export interface PasskeySignature {
54
+ publicKey: Uint8Array;
55
+ signature: Uint8Array;
56
+ authenticatorData: Uint8Array;
57
+ clientDataJson: Uint8Array;
73
58
  }
74
59
 
75
- export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
76
-
77
- export type ContentType = "unknown" | "text" | "markdown" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
78
-
79
- export interface IdentityStats {
80
- publishIdentityUpdate: bigint;
81
- getIdentityUpdatesV2: bigint;
82
- getInboxIds: bigint;
83
- verifySmartContractWalletSignature: bigint;
60
+ export interface Installation {
61
+ bytes: Uint8Array;
62
+ id: string;
63
+ clientTimestampNs?: bigint;
84
64
  }
85
65
 
86
- export interface Identifier {
87
- identifier: string;
88
- identifierKind: IdentifierKind;
66
+ export interface InboxState {
67
+ inboxId: string;
68
+ recoveryIdentifier: Identifier;
69
+ installations: Installation[];
70
+ accountIdentifiers: Identifier[];
89
71
  }
90
72
 
91
- export type IdentifierKind = "Ethereum" | "Passkey";
92
-
93
- export interface ApiStats {
94
- uploadKeyPackage: bigint;
95
- fetchKeyPackage: bigint;
96
- sendGroupMessages: bigint;
97
- sendWelcomeMessages: bigint;
98
- queryGroupMessages: bigint;
99
- queryWelcomeMessages: bigint;
100
- subscribeMessages: bigint;
101
- subscribeWelcomes: bigint;
73
+ export interface KeyPackageStatus {
74
+ lifetime?: Lifetime;
75
+ validationError?: string;
102
76
  }
103
77
 
104
- export interface PasskeySignature {
105
- publicKey: Uint8Array;
106
- signature: Uint8Array;
107
- authenticatorData: Uint8Array;
108
- clientDataJson: Uint8Array;
78
+ export interface Lifetime {
79
+ notBefore: bigint;
80
+ notAfter: bigint;
109
81
  }
110
82
 
111
83
  export interface Attachment {
@@ -122,6 +94,10 @@ export interface MetadataFieldChange {
122
94
  newValue?: string;
123
95
  }
124
96
 
97
+ export interface Inbox {
98
+ inboxId: string;
99
+ }
100
+
125
101
  export interface GroupUpdated {
126
102
  initiatedByInboxId: string;
127
103
  addedInboxes: Inbox[];
@@ -134,14 +110,21 @@ export interface GroupUpdated {
134
110
  removedSuperAdminInboxes: Inbox[];
135
111
  }
136
112
 
137
- export interface Inbox {
138
- inboxId: string;
139
- }
140
-
141
113
  export interface LeaveRequest {
142
114
  authenticatedNote?: Uint8Array;
143
115
  }
144
116
 
117
+ export interface RemoteAttachment {
118
+ url: string;
119
+ contentDigest: string;
120
+ secret: Uint8Array;
121
+ salt: Uint8Array;
122
+ nonce: Uint8Array;
123
+ scheme: string;
124
+ contentLength: number;
125
+ filename?: string;
126
+ }
127
+
145
128
  /**
146
129
  * Result of encrypting an attachment for remote storage.
147
130
  */
@@ -176,25 +159,6 @@ export interface EncryptedAttachment {
176
159
  filename?: string;
177
160
  }
178
161
 
179
- export interface RemoteAttachment {
180
- url: string;
181
- contentDigest: string;
182
- secret: Uint8Array;
183
- salt: Uint8Array;
184
- nonce: Uint8Array;
185
- scheme: string;
186
- contentLength: number;
187
- filename?: string;
188
- }
189
-
190
- export interface WalletSendCalls {
191
- version: string;
192
- chainId: string;
193
- from: string;
194
- calls: WalletCall[];
195
- capabilities?: Record<string, string>;
196
- }
197
-
198
162
  export interface WalletCall {
199
163
  to?: string;
200
164
  data?: string;
@@ -203,11 +167,12 @@ export interface WalletCall {
203
167
  metadata?: Record<string, string>;
204
168
  }
205
169
 
206
- export interface TransactionReference {
207
- namespace?: string;
208
- networkId: string;
209
- reference: string;
210
- metadata?: TransactionMetadata;
170
+ export interface WalletSendCalls {
171
+ version: string;
172
+ chainId: string;
173
+ from: string;
174
+ calls: WalletCall[];
175
+ capabilities?: Record<string, string>;
211
176
  }
212
177
 
213
178
  export interface TransactionMetadata {
@@ -219,6 +184,13 @@ export interface TransactionMetadata {
219
184
  toAddress: string;
220
185
  }
221
186
 
187
+ export interface TransactionReference {
188
+ namespace?: string;
189
+ networkId: string;
190
+ reference: string;
191
+ metadata?: TransactionMetadata;
192
+ }
193
+
222
194
  export type DecodedMessageContent = { type: "text"; content: string } | { type: "markdown"; content: MarkdownContent } | { type: "reply"; content: EnrichedReply } | { type: "reaction"; content: Reaction } | { type: "attachment"; content: Attachment } | { type: "remoteAttachment"; content: RemoteAttachment } | { type: "multiRemoteAttachment"; content: MultiRemoteAttachment } | { type: "transactionReference"; content: TransactionReference } | { type: "groupUpdated"; content: GroupUpdated } | { type: "readReceipt"; content: ReadReceipt } | { type: "leaveRequest"; content: LeaveRequest } | { type: "walletSendCalls"; content: WalletSendCalls } | { type: "intent"; content: Intent | undefined } | { type: "actions"; content: Actions | undefined } | { type: "custom"; content: EncodedContent };
223
195
 
224
196
  export interface RemoteAttachmentInfo {
@@ -240,38 +212,38 @@ export interface TextContent {
240
212
  content: string;
241
213
  }
242
214
 
243
- export interface EnrichedReply {
244
- referenceId: string;
245
- content: DecodedMessageContent;
246
- inReplyTo?: DecodedMessage;
247
- }
248
-
249
215
  export interface Reply {
250
216
  content: EncodedContent;
251
217
  reference: string;
252
218
  referenceInboxId?: string;
253
219
  }
254
220
 
221
+ export interface EnrichedReply {
222
+ referenceId: string;
223
+ content: DecodedMessageContent;
224
+ inReplyTo?: DecodedMessage;
225
+ }
226
+
255
227
  export interface Intent {
256
228
  id: string;
257
229
  actionId: string;
258
230
  metadata?: Record<string, string | number | boolean | null>;
259
231
  }
260
232
 
261
- export interface Actions {
233
+ export interface Action {
262
234
  id: string;
263
- description: string;
264
- actions: Action[];
235
+ label: string;
236
+ imageUrl?: string;
237
+ style?: ActionStyle;
265
238
  expiresAtNs?: bigint;
266
239
  }
267
240
 
268
241
  export type ActionStyle = "primary" | "secondary" | "danger";
269
242
 
270
- export interface Action {
243
+ export interface Actions {
271
244
  id: string;
272
- label: string;
273
- imageUrl?: string;
274
- style?: ActionStyle;
245
+ description: string;
246
+ actions: Action[];
275
247
  expiresAtNs?: bigint;
276
248
  }
277
249
 
@@ -279,6 +251,8 @@ export interface MarkdownContent {
279
251
  content: string;
280
252
  }
281
253
 
254
+ export type ReactionAction = "unknown" | "added" | "removed";
255
+
282
256
  export type ReactionSchema = "unknown" | "unicode" | "shortcode" | "custom";
283
257
 
284
258
  export interface Reaction {
@@ -289,8 +263,6 @@ export interface Reaction {
289
263
  schema: ReactionSchema;
290
264
  }
291
265
 
292
- export type ReactionAction = "unknown" | "added" | "removed";
293
-
294
266
  export interface EncodedContent {
295
267
  type?: ContentTypeId;
296
268
  parameters?: Record<string, string>;
@@ -322,6 +294,8 @@ export interface DecodedMessage {
322
294
  expiresAtNs: bigint | undefined;
323
295
  }
324
296
 
297
+ export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
298
+
325
299
  export interface Credential {
326
300
  name?: string;
327
301
  value: string;
@@ -330,15 +304,6 @@ export interface Credential {
330
304
 
331
305
  export type DeviceSyncWorkerMode = "enabled" | "disabled";
332
306
 
333
- export interface GroupSyncSummary {
334
- numEligible: number;
335
- numSynced: number;
336
- }
337
-
338
- export type ClientMode = "default" | "notification";
339
-
340
- export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
341
-
342
307
  /**
343
308
  * Specify options for the logger
344
309
  */
@@ -357,68 +322,65 @@ export interface LogOptions {
357
322
  level?: LogLevel;
358
323
  }
359
324
 
360
- export type MessageSortBy = "sentAt" | "insertedAt";
361
-
362
- export type DeliveryStatus = "unpublished" | "published" | "failed";
363
-
364
- export type GroupMessageKind = "application" | "membershipchange";
325
+ export type ClientMode = "default" | "notification";
365
326
 
366
- export type SortDirection = "ascending" | "descending";
327
+ export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
367
328
 
368
- export interface Message {
369
- id: string;
370
- sentAtNs: bigint;
371
- convoId: string;
372
- senderInboxId: string;
373
- content: EncodedContent;
374
- kind: GroupMessageKind;
375
- deliveryStatus: DeliveryStatus;
329
+ export interface GroupSyncSummary {
330
+ numEligible: number;
331
+ numSynced: number;
376
332
  }
377
333
 
378
- export interface MessageWithReactions {
379
- message: Message;
380
- reactions: Message[];
334
+ export interface Identifier {
335
+ identifier: string;
336
+ identifierKind: IdentifierKind;
381
337
  }
382
338
 
383
- export interface ListMessagesOptions {
384
- contentTypes?: ContentType[];
385
- excludeContentTypes?: ContentType[];
386
- sentBeforeNs?: bigint;
387
- sentAfterNs?: bigint;
388
- limit?: bigint;
389
- deliveryStatus?: DeliveryStatus;
390
- direction?: SortDirection;
391
- kind?: GroupMessageKind;
392
- excludeSenderInboxIds?: string[];
393
- sortBy?: MessageSortBy;
394
- insertedAfterNs?: bigint;
395
- insertedBeforeNs?: bigint;
339
+ export interface ApiStats {
340
+ uploadKeyPackage: bigint;
341
+ fetchKeyPackage: bigint;
342
+ sendGroupMessages: bigint;
343
+ sendWelcomeMessages: bigint;
344
+ queryGroupMessages: bigint;
345
+ queryWelcomeMessages: bigint;
346
+ subscribeMessages: bigint;
347
+ subscribeWelcomes: bigint;
396
348
  }
397
349
 
398
- export interface Lifetime {
399
- notBefore: bigint;
400
- notAfter: bigint;
401
- }
350
+ export type IdentifierKind = "Ethereum" | "Passkey";
402
351
 
403
- export interface Installation {
404
- bytes: Uint8Array;
405
- id: string;
406
- clientTimestampNs?: bigint;
352
+ export interface IdentityStats {
353
+ publishIdentityUpdate: bigint;
354
+ getIdentityUpdatesV2: bigint;
355
+ getInboxIds: bigint;
356
+ verifySmartContractWalletSignature: bigint;
407
357
  }
408
358
 
409
- export interface InboxState {
410
- inboxId: string;
411
- recoveryIdentifier: Identifier;
412
- installations: Installation[];
413
- accountIdentifiers: Identifier[];
359
+ export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
360
+
361
+ export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
362
+
363
+ export interface GroupPermissions {
364
+ policyType: GroupPermissionsOptions;
365
+ policySet: PermissionPolicySet;
414
366
  }
415
367
 
416
- export interface KeyPackageStatus {
417
- lifetime?: Lifetime;
418
- validationError?: string;
368
+ export interface PermissionPolicySet {
369
+ addMemberPolicy: PermissionPolicy;
370
+ removeMemberPolicy: PermissionPolicy;
371
+ addAdminPolicy: PermissionPolicy;
372
+ removeAdminPolicy: PermissionPolicy;
373
+ updateGroupNamePolicy: PermissionPolicy;
374
+ updateGroupDescriptionPolicy: PermissionPolicy;
375
+ updateGroupImageUrlSquarePolicy: PermissionPolicy;
376
+ updateMessageDisappearingPolicy: PermissionPolicy;
419
377
  }
420
378
 
421
- export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
379
+ export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
380
+
381
+ export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
382
+
383
+ export type ContentType = "unknown" | "text" | "markdown" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
422
384
 
423
385
  export interface GroupMember {
424
386
  inboxId: string;
@@ -428,18 +390,20 @@ export interface GroupMember {
428
390
  consentState: ConsentState;
429
391
  }
430
392
 
431
- export interface GroupMetadata {
432
- creatorInboxId: string;
433
- conversationType: string;
393
+ export interface SendMessageOpts {
394
+ shouldPush: boolean;
395
+ optimistic?: boolean;
434
396
  }
435
397
 
436
398
  export type PermissionLevel = "member" | "admin" | "superAdmin";
437
399
 
438
- export interface SendMessageOpts {
439
- shouldPush: boolean;
440
- optimistic?: boolean;
400
+ export interface GroupMetadata {
401
+ creatorInboxId: string;
402
+ conversationType: string;
441
403
  }
442
404
 
405
+ export type ConsentEntityType = "groupId" | "inboxId";
406
+
443
407
  export type ConsentState = "unknown" | "allowed" | "denied";
444
408
 
445
409
  export interface Consent {
@@ -448,13 +412,28 @@ export interface Consent {
448
412
  entity: string;
449
413
  }
450
414
 
451
- export type ConsentEntityType = "groupId" | "inboxId";
415
+ export interface CreateGroupOptions {
416
+ permissions?: GroupPermissionsOptions;
417
+ groupName?: string;
418
+ groupImageUrlSquare?: string;
419
+ groupDescription?: string;
420
+ customPermissionPolicySet?: PermissionPolicySet;
421
+ messageDisappearingSettings?: MessageDisappearingSettings;
422
+ appData?: string;
423
+ }
424
+
425
+ export type ListConversationsOrderBy = "createdAt" | "lastActivity";
452
426
 
453
427
  export interface CreateDMOptions {
454
428
  messageDisappearingSettings?: MessageDisappearingSettings;
455
429
  }
456
430
 
457
- export type ListConversationsOrderBy = "createdAt" | "lastActivity";
431
+ export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
432
+
433
+ export interface Cursor {
434
+ originatorId: number;
435
+ sequenceId: bigint;
436
+ }
458
437
 
459
438
  export interface ListConversationsOptions {
460
439
  consentStates?: ConsentState[];
@@ -466,23 +445,11 @@ export interface ListConversationsOptions {
466
445
  limit?: bigint;
467
446
  }
468
447
 
469
- export interface HmacKey {
470
- key: Uint8Array;
471
- epoch: bigint;
472
- }
473
-
474
- export interface CreateGroupOptions {
475
- permissions?: GroupPermissionsOptions;
476
- groupName?: string;
477
- groupImageUrlSquare?: string;
478
- groupDescription?: string;
479
- customPermissionPolicySet?: PermissionPolicySet;
480
- messageDisappearingSettings?: MessageDisappearingSettings;
481
- appData?: string;
448
+ export interface MessageDisappearingSettings {
449
+ fromNs: bigint;
450
+ inNs: bigint;
482
451
  }
483
452
 
484
- export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
485
-
486
453
  export type ConversationType = "dm" | "group" | "sync" | "oneshot";
487
454
 
488
455
  export interface ConversationDebugInfo {
@@ -495,14 +462,47 @@ export interface ConversationDebugInfo {
495
462
  cursor: Cursor[];
496
463
  }
497
464
 
498
- export interface Cursor {
499
- originatorId: number;
500
- sequenceId: bigint;
465
+ export interface HmacKey {
466
+ key: Uint8Array;
467
+ epoch: bigint;
501
468
  }
502
469
 
503
- export interface MessageDisappearingSettings {
504
- fromNs: bigint;
505
- inNs: bigint;
470
+ export interface MessageWithReactions {
471
+ message: Message;
472
+ reactions: Message[];
473
+ }
474
+
475
+ export type DeliveryStatus = "unpublished" | "published" | "failed";
476
+
477
+ export type SortDirection = "ascending" | "descending";
478
+
479
+ export interface ListMessagesOptions {
480
+ contentTypes?: ContentType[];
481
+ excludeContentTypes?: ContentType[];
482
+ sentBeforeNs?: bigint;
483
+ sentAfterNs?: bigint;
484
+ limit?: bigint;
485
+ deliveryStatus?: DeliveryStatus;
486
+ direction?: SortDirection;
487
+ kind?: GroupMessageKind;
488
+ excludeSenderInboxIds?: string[];
489
+ sortBy?: MessageSortBy;
490
+ insertedAfterNs?: bigint;
491
+ insertedBeforeNs?: bigint;
492
+ }
493
+
494
+ export type MessageSortBy = "sentAt" | "insertedAt";
495
+
496
+ export type GroupMessageKind = "application" | "membershipchange";
497
+
498
+ export interface Message {
499
+ id: string;
500
+ sentAtNs: bigint;
501
+ convoId: string;
502
+ senderInboxId: string;
503
+ content: EncodedContent;
504
+ kind: GroupMessageKind;
505
+ deliveryStatus: DeliveryStatus;
506
506
  }
507
507
 
508
508
  export class AuthHandle {
@@ -526,19 +526,6 @@ export class Client {
526
526
  revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
527
527
  changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
528
528
  revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
529
- /**
530
- * Output booleans should be zipped with the index of input identifiers
531
- */
532
- canMessage(accountIdentifiers: Identifier[]): Promise<any>;
533
- conversations(): Conversations;
534
- apiStatistics(): ApiStats;
535
- syncPreferences(): Promise<GroupSyncSummary>;
536
- sendSyncRequest(): Promise<void>;
537
- clearAllStatistics(): void;
538
- apiIdentityStatistics(): IdentityStats;
539
- apiAggregateStatistics(): string;
540
- inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
541
- findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
542
529
  /**
543
530
  *
544
531
  * * Get the client's inbox state.
@@ -557,6 +544,19 @@ export class Client {
557
544
  *
558
545
  */
559
546
  getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
547
+ /**
548
+ * Output booleans should be zipped with the index of input identifiers
549
+ */
550
+ canMessage(accountIdentifiers: Identifier[]): Promise<any>;
551
+ conversations(): Conversations;
552
+ apiStatistics(): ApiStats;
553
+ syncPreferences(): Promise<GroupSyncSummary>;
554
+ sendSyncRequest(): Promise<void>;
555
+ clearAllStatistics(): void;
556
+ apiIdentityStatistics(): IdentityStats;
557
+ apiAggregateStatistics(): string;
558
+ inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
559
+ findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
560
560
  getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
561
561
  setConsentStates(records: Consent[]): Promise<void>;
562
562
  readonly appVersion: string;
@@ -762,7 +762,10 @@ export interface InitOutput {
762
762
  readonly client_conversations: (a: number) => number;
763
763
  readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
764
764
  readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
765
+ readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
766
+ readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
765
767
  readonly client_inboxId: (a: number) => [number, number];
768
+ readonly client_inboxState: (a: number, b: number) => any;
766
769
  readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
767
770
  readonly client_installationId: (a: number) => [number, number];
768
771
  readonly client_installationIdBytes: (a: number) => any;
@@ -793,6 +796,7 @@ export interface InitOutput {
793
796
  readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
794
797
  readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
795
798
  readonly groupUpdatedContentType: () => any;
799
+ readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
796
800
  readonly intentContentType: () => any;
797
801
  readonly leaveRequestContentType: () => any;
798
802
  readonly markdownContentType: () => any;
@@ -810,10 +814,6 @@ export interface InitOutput {
810
814
  readonly transactionReferenceContentType: () => any;
811
815
  readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
812
816
  readonly walletSendCallsContentType: () => any;
813
- readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
814
- readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
815
- readonly client_inboxState: (a: number, b: number) => any;
816
- readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
817
817
  readonly __wbg_conversation_free: (a: number, b: number) => void;
818
818
  readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
819
819
  readonly __wbg_conversations_free: (a: number, b: number) => void;
@@ -947,14 +947,14 @@ export interface InitOutput {
947
947
  readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
948
948
  readonly intounderlyingbytesource_start: (a: number, b: any) => void;
949
949
  readonly intounderlyingbytesource_type: (a: number) => number;
950
- readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
951
- readonly wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
952
- readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
953
- readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
954
950
  readonly wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
955
951
  readonly wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
952
+ readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
953
+ readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
956
954
  readonly wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1: (a: number, b: number) => void;
957
955
  readonly wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1: (a: number, b: number) => void;
956
+ readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
957
+ readonly wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
958
958
  readonly wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb: (a: number, b: number, c: any, d: any) => void;
959
959
  readonly __wbindgen_malloc: (a: number, b: number) => number;
960
960
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
@@ -225,6 +225,25 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
 
228
+ function takeFromExternrefTable0(idx) {
229
+ const value = wasm.__wbindgen_externrefs.get(idx);
230
+ wasm.__externref_table_dealloc(idx);
231
+ return value;
232
+ }
233
+ /**
234
+ * @param {string} signatureText
235
+ * @param {Uint8Array} signatureBytes
236
+ * @param {Uint8Array} publicKey
237
+ */
238
+ export function verifySignedWithPublicKey(signatureText, signatureBytes, publicKey) {
239
+ const ptr0 = passStringToWasm0(signatureText, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len0 = WASM_VECTOR_LEN;
241
+ const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signatureBytes, publicKey);
242
+ if (ret[1]) {
243
+ throw takeFromExternrefTable0(ret[0]);
244
+ }
245
+ }
246
+
228
247
  function passArrayJsValueToWasm0(array, malloc) {
229
248
  const ptr = malloc(array.length * 4, 4) >>> 0;
230
249
  for (let i = 0; i < array.length; i++) {
@@ -234,12 +253,6 @@ function passArrayJsValueToWasm0(array, malloc) {
234
253
  WASM_VECTOR_LEN = array.length;
235
254
  return ptr;
236
255
  }
237
-
238
- function takeFromExternrefTable0(idx) {
239
- const value = wasm.__wbindgen_externrefs.get(idx);
240
- wasm.__externref_table_dealloc(idx);
241
- return value;
242
- }
243
256
  /**
244
257
  * @param {string} host
245
258
  * @param {string | null | undefined} gatewayHost
@@ -264,20 +277,6 @@ export function revokeInstallationsSignatureRequest(host, gatewayHost, recoveryI
264
277
  return SignatureRequestHandle.__wrap(ret[0]);
265
278
  }
266
279
 
267
- /**
268
- * @param {string} signatureText
269
- * @param {Uint8Array} signatureBytes
270
- * @param {Uint8Array} publicKey
271
- */
272
- export function verifySignedWithPublicKey(signatureText, signatureBytes, publicKey) {
273
- const ptr0 = passStringToWasm0(signatureText, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
274
- const len0 = WASM_VECTOR_LEN;
275
- const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signatureBytes, publicKey);
276
- if (ret[1]) {
277
- throw takeFromExternrefTable0(ret[0]);
278
- }
279
- }
280
-
281
280
  function _assertClass(instance, klass) {
282
281
  if (!(instance instanceof klass)) {
283
282
  throw new Error(`expected instance of ${klass.name}`);
@@ -299,6 +298,23 @@ export function applySignatureRequest(host, gatewayHost, signatureRequest) {
299
298
  return ret;
300
299
  }
301
300
 
301
+ /**
302
+ * @param {string} host
303
+ * @param {string | null | undefined} gatewayHost
304
+ * @param {string[]} inboxIds
305
+ * @returns {Promise<InboxState[]>}
306
+ */
307
+ export function inboxStateFromInboxIds(host, gatewayHost, inboxIds) {
308
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
+ const len0 = WASM_VECTOR_LEN;
310
+ var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
311
+ var len1 = WASM_VECTOR_LEN;
312
+ const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
313
+ const len2 = WASM_VECTOR_LEN;
314
+ const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
315
+ return ret;
316
+ }
317
+
302
318
  /**
303
319
  * @param {Attachment} attachment
304
320
  * @returns {EncodedContent}
@@ -355,31 +371,6 @@ export function leaveRequestContentType() {
355
371
  return ret;
356
372
  }
357
373
 
358
- /**
359
- * @param {RemoteAttachment} remote_attachment
360
- * @returns {EncodedContent}
361
- */
362
- export function encodeRemoteAttachment(remote_attachment) {
363
- const ret = wasm.encodeRemoteAttachment(remote_attachment);
364
- if (ret[2]) {
365
- throw takeFromExternrefTable0(ret[1]);
366
- }
367
- return takeFromExternrefTable0(ret[0]);
368
- }
369
-
370
- /**
371
- * Encrypts an attachment for storage as a remote attachment.
372
- * @param {Attachment} attachment
373
- * @returns {EncryptedAttachment}
374
- */
375
- export function encryptAttachment(attachment) {
376
- const ret = wasm.encryptAttachment(attachment);
377
- if (ret[2]) {
378
- throw takeFromExternrefTable0(ret[1]);
379
- }
380
- return takeFromExternrefTable0(ret[0]);
381
- }
382
-
383
374
  function passArray8ToWasm0(arg, malloc) {
384
375
  const ptr = malloc(arg.length * 1, 1) >>> 0;
385
376
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -410,6 +401,31 @@ export function remoteAttachmentContentType() {
410
401
  return ret;
411
402
  }
412
403
 
404
+ /**
405
+ * Encrypts an attachment for storage as a remote attachment.
406
+ * @param {Attachment} attachment
407
+ * @returns {EncryptedAttachment}
408
+ */
409
+ export function encryptAttachment(attachment) {
410
+ const ret = wasm.encryptAttachment(attachment);
411
+ if (ret[2]) {
412
+ throw takeFromExternrefTable0(ret[1]);
413
+ }
414
+ return takeFromExternrefTable0(ret[0]);
415
+ }
416
+
417
+ /**
418
+ * @param {RemoteAttachment} remote_attachment
419
+ * @returns {EncodedContent}
420
+ */
421
+ export function encodeRemoteAttachment(remote_attachment) {
422
+ const ret = wasm.encodeRemoteAttachment(remote_attachment);
423
+ if (ret[2]) {
424
+ throw takeFromExternrefTable0(ret[1]);
425
+ }
426
+ return takeFromExternrefTable0(ret[0]);
427
+ }
428
+
413
429
  /**
414
430
  * @param {WalletSendCalls} wallet_send_calls
415
431
  * @returns {EncodedContent}
@@ -430,14 +446,6 @@ export function walletSendCallsContentType() {
430
446
  return ret;
431
447
  }
432
448
 
433
- /**
434
- * @returns {ContentTypeId}
435
- */
436
- export function transactionReferenceContentType() {
437
- const ret = wasm.transactionReferenceContentType();
438
- return ret;
439
- }
440
-
441
449
  /**
442
450
  * @param {TransactionReference} transaction_reference
443
451
  * @returns {EncodedContent}
@@ -450,6 +458,14 @@ export function encodeTransactionReference(transaction_reference) {
450
458
  return takeFromExternrefTable0(ret[0]);
451
459
  }
452
460
 
461
+ /**
462
+ * @returns {ContentTypeId}
463
+ */
464
+ export function transactionReferenceContentType() {
465
+ const ret = wasm.transactionReferenceContentType();
466
+ return ret;
467
+ }
468
+
453
469
  /**
454
470
  * @param {MultiRemoteAttachment} multi_remote_attachment
455
471
  * @returns {EncodedContent}
@@ -500,6 +516,14 @@ export function replyContentType() {
500
516
  return ret;
501
517
  }
502
518
 
519
+ /**
520
+ * @returns {ContentTypeId}
521
+ */
522
+ export function intentContentType() {
523
+ const ret = wasm.intentContentType();
524
+ return ret;
525
+ }
526
+
503
527
  /**
504
528
  * @param {Intent} intent
505
529
  * @returns {EncodedContent}
@@ -515,8 +539,8 @@ export function encodeIntent(intent) {
515
539
  /**
516
540
  * @returns {ContentTypeId}
517
541
  */
518
- export function intentContentType() {
519
- const ret = wasm.intentContentType();
542
+ export function actionsContentType() {
543
+ const ret = wasm.actionsContentType();
520
544
  return ret;
521
545
  }
522
546
 
@@ -532,22 +556,6 @@ export function encodeActions(actions) {
532
556
  return takeFromExternrefTable0(ret[0]);
533
557
  }
534
558
 
535
- /**
536
- * @returns {ContentTypeId}
537
- */
538
- export function actionsContentType() {
539
- const ret = wasm.actionsContentType();
540
- return ret;
541
- }
542
-
543
- /**
544
- * @returns {ContentTypeId}
545
- */
546
- export function markdownContentType() {
547
- const ret = wasm.markdownContentType();
548
- return ret;
549
- }
550
-
551
559
  /**
552
560
  * @param {string} text
553
561
  * @returns {EncodedContent}
@@ -562,6 +570,14 @@ export function encodeMarkdown(text) {
562
570
  return takeFromExternrefTable0(ret[0]);
563
571
  }
564
572
 
573
+ /**
574
+ * @returns {ContentTypeId}
575
+ */
576
+ export function markdownContentType() {
577
+ const ret = wasm.markdownContentType();
578
+ return ret;
579
+ }
580
+
565
581
  /**
566
582
  * @param {Reaction} reaction
567
583
  * @returns {EncodedContent}
@@ -622,21 +638,6 @@ export function createClient(host, inboxId, accountIdentifier, dbPath, encryptio
622
638
  return ret;
623
639
  }
624
640
 
625
- /**
626
- * @param {string} host
627
- * @param {string | null | undefined} gatewayHost
628
- * @param {Identifier} accountIdentifier
629
- * @returns {Promise<string | undefined>}
630
- */
631
- export function getInboxIdForIdentifier(host, gatewayHost, accountIdentifier) {
632
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
633
- const len0 = WASM_VECTOR_LEN;
634
- var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
- var len1 = WASM_VECTOR_LEN;
636
- const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
637
- return ret;
638
- }
639
-
640
641
  /**
641
642
  * @param {Identifier} accountIdentifier
642
643
  * @param {bigint | null} [nonce]
@@ -664,17 +665,15 @@ export function generateInboxId(accountIdentifier, nonce) {
664
665
  /**
665
666
  * @param {string} host
666
667
  * @param {string | null | undefined} gatewayHost
667
- * @param {string[]} inboxIds
668
- * @returns {Promise<InboxState[]>}
668
+ * @param {Identifier} accountIdentifier
669
+ * @returns {Promise<string | undefined>}
669
670
  */
670
- export function inboxStateFromInboxIds(host, gatewayHost, inboxIds) {
671
+ export function getInboxIdForIdentifier(host, gatewayHost, accountIdentifier) {
671
672
  const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
672
673
  const len0 = WASM_VECTOR_LEN;
673
674
  var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
674
675
  var len1 = WASM_VECTOR_LEN;
675
- const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
676
- const len2 = WASM_VECTOR_LEN;
677
- const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
676
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
678
677
  return ret;
679
678
  }
680
679
 
@@ -689,22 +688,22 @@ export function task_worker_entry_point(ptr) {
689
688
  }
690
689
  }
691
690
 
692
- function wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005(arg0, arg1) {
693
- wasm.wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005(arg0, arg1);
691
+ function wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040(arg0, arg1) {
692
+ wasm.wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040(arg0, arg1);
694
693
  }
695
694
 
696
695
  function wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6(arg0, arg1, arg2) {
697
696
  wasm.wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6(arg0, arg1, arg2);
698
697
  }
699
698
 
700
- function wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040(arg0, arg1) {
701
- wasm.wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040(arg0, arg1);
702
- }
703
-
704
699
  function wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1(arg0, arg1) {
705
700
  wasm.wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1(arg0, arg1);
706
701
  }
707
702
 
703
+ function wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005(arg0, arg1) {
704
+ wasm.wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005(arg0, arg1);
705
+ }
706
+
708
707
  function wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb(arg0, arg1, arg2, arg3) {
709
708
  wasm.wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb(arg0, arg1, arg2, arg3);
710
709
  }
@@ -882,6 +881,45 @@ export class Client {
882
881
  const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
883
882
  return ret;
884
883
  }
884
+ /**
885
+ *
886
+ * * Get the client's inbox state.
887
+ * *
888
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
889
+ * * Otherwise, the state will be read from the local database.
890
+ *
891
+ * @param {boolean} refreshFromNetwork
892
+ * @returns {Promise<InboxState>}
893
+ */
894
+ inboxState(refreshFromNetwork) {
895
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
896
+ return ret;
897
+ }
898
+ /**
899
+ * @param {string} inboxId
900
+ * @returns {Promise<InboxState>}
901
+ */
902
+ getLatestInboxState(inboxId) {
903
+ const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
904
+ const len0 = WASM_VECTOR_LEN;
905
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
906
+ return ret;
907
+ }
908
+ /**
909
+ *
910
+ * * Get key package statuses for a list of installation IDs.
911
+ * *
912
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
913
+ *
914
+ * @param {string[]} installationIds
915
+ * @returns {Promise<any>}
916
+ */
917
+ getKeyPackageStatusesForInstallationIds(installationIds) {
918
+ const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
919
+ const len0 = WASM_VECTOR_LEN;
920
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
921
+ return ret;
922
+ }
885
923
  /**
886
924
  * @returns {string}
887
925
  */
@@ -1046,45 +1084,6 @@ export class Client {
1046
1084
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1047
1085
  }
1048
1086
  }
1049
- /**
1050
- *
1051
- * * Get the client's inbox state.
1052
- * *
1053
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1054
- * * Otherwise, the state will be read from the local database.
1055
- *
1056
- * @param {boolean} refreshFromNetwork
1057
- * @returns {Promise<InboxState>}
1058
- */
1059
- inboxState(refreshFromNetwork) {
1060
- const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
1061
- return ret;
1062
- }
1063
- /**
1064
- * @param {string} inboxId
1065
- * @returns {Promise<InboxState>}
1066
- */
1067
- getLatestInboxState(inboxId) {
1068
- const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1069
- const len0 = WASM_VECTOR_LEN;
1070
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1071
- return ret;
1072
- }
1073
- /**
1074
- *
1075
- * * Get key package statuses for a list of installation IDs.
1076
- * *
1077
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1078
- *
1079
- * @param {string[]} installationIds
1080
- * @returns {Promise<any>}
1081
- */
1082
- getKeyPackageStatusesForInstallationIds(installationIds) {
1083
- const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
1084
- const len0 = WASM_VECTOR_LEN;
1085
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1086
- return ret;
1087
- }
1088
1087
  /**
1089
1088
  * @param {ConsentEntityType} entityType
1090
1089
  * @param {string} entity
@@ -3047,23 +3046,26 @@ function __wbg_get_imports() {
3047
3046
  const ret = Date.now();
3048
3047
  return ret;
3049
3048
  };
3050
- imports.wbg.__wbg_on_auth_required_e368aaddaa60794a = function() { return handleError(function (arg0) {
3049
+ imports.wbg.__wbg_on_auth_required_4d27971fad5718ff = function() { return handleError(function (arg0) {
3051
3050
  const ret = arg0.on_auth_required();
3052
3051
  return ret;
3053
3052
  }, arguments) };
3054
- imports.wbg.__wbg_on_close_d69734f43badf0eb = function(arg0) {
3053
+ imports.wbg.__wbg_on_close_14821f03bb5ede2f = function(arg0) {
3055
3054
  arg0.on_close();
3056
3055
  };
3057
- imports.wbg.__wbg_on_consent_update_4208639345abe4bc = function(arg0, arg1) {
3056
+ imports.wbg.__wbg_on_consent_update_dc96dde83bbb726e = function(arg0, arg1) {
3058
3057
  arg0.on_consent_update(arg1);
3059
3058
  };
3060
- imports.wbg.__wbg_on_conversation_3f44180a0d9b4cea = function(arg0, arg1) {
3059
+ imports.wbg.__wbg_on_conversation_d996b7e46a9c857e = function(arg0, arg1) {
3061
3060
  arg0.on_conversation(Conversation.__wrap(arg1));
3062
3061
  };
3063
- imports.wbg.__wbg_on_error_d7ae86c5b7c32997 = function(arg0, arg1) {
3062
+ imports.wbg.__wbg_on_error_718c5bce4272e57a = function(arg0, arg1) {
3064
3063
  arg0.on_error(arg1);
3065
3064
  };
3066
- imports.wbg.__wbg_on_message_deleted_96ff70f0f1607b68 = function(arg0, arg1, arg2) {
3065
+ imports.wbg.__wbg_on_message_d08be52589042a46 = function(arg0, arg1) {
3066
+ arg0.on_message(arg1);
3067
+ };
3068
+ imports.wbg.__wbg_on_message_deleted_48a1c63e2869646f = function(arg0, arg1, arg2) {
3067
3069
  let deferred0_0;
3068
3070
  let deferred0_1;
3069
3071
  try {
@@ -3074,10 +3076,7 @@ function __wbg_get_imports() {
3074
3076
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3075
3077
  }
3076
3078
  };
3077
- imports.wbg.__wbg_on_message_f4d392e5315b2bcd = function(arg0, arg1) {
3078
- arg0.on_message(arg1);
3079
- };
3080
- imports.wbg.__wbg_on_user_preference_update_ee6c6db0e041f04d = function(arg0, arg1, arg2) {
3079
+ imports.wbg.__wbg_on_user_preference_update_5ece44a4cfcd5994 = function(arg0, arg1, arg2) {
3081
3080
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
3082
3081
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
3083
3082
  arg0.on_user_preference_update(v0);
@@ -3341,8 +3340,8 @@ function __wbg_get_imports() {
3341
3340
  const ret = arg0.write(arg1, arg2);
3342
3341
  return ret;
3343
3342
  }, arguments) };
3344
- imports.wbg.__wbindgen_cast_211e08c655cf62bf = function(arg0, arg1) {
3345
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6889, function: Function { arguments: [], shim_idx: 6890, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3343
+ imports.wbg.__wbindgen_cast_072c4209cbb41c0f = function(arg0, arg1) {
3344
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 6914, function: Function { arguments: [], shim_idx: 6915, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3346
3345
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1, wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1);
3347
3346
  return ret;
3348
3347
  };
@@ -3363,16 +3362,6 @@ function __wbg_get_imports() {
3363
3362
  const ret = v0;
3364
3363
  return ret;
3365
3364
  };
3366
- imports.wbg.__wbindgen_cast_653b194fefadb0d3 = function(arg0, arg1) {
3367
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7298, function: Function { arguments: [Externref], shim_idx: 7299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3368
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hed8af60076250245, wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6);
3369
- return ret;
3370
- };
3371
- imports.wbg.__wbindgen_cast_71b65f902d88c9ed = function(arg0, arg1) {
3372
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7265, function: Function { arguments: [], shim_idx: 7266, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3373
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3c5639ee43c80f22, wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005);
3374
- return ret;
3375
- };
3376
3365
  imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
3377
3366
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3378
3367
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3392,16 +3381,16 @@ function __wbg_get_imports() {
3392
3381
  const ret = arg0;
3393
3382
  return ret;
3394
3383
  };
3395
- imports.wbg.__wbindgen_cast_c57c2f5798589a39 = function(arg0, arg1) {
3396
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7106, function: Function { arguments: [], shim_idx: 7107, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3397
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfbd660e60d498df9, wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040);
3398
- return ret;
3399
- };
3400
3384
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
3401
3385
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
3402
3386
  const ret = getArrayU8FromWasm0(arg0, arg1);
3403
3387
  return ret;
3404
3388
  };
3389
+ imports.wbg.__wbindgen_cast_ccc31394da4c983b = function(arg0, arg1) {
3390
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7323, function: Function { arguments: [Externref], shim_idx: 7324, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3391
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hed8af60076250245, wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6);
3392
+ return ret;
3393
+ };
3405
3394
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
3406
3395
  // Cast intrinsic for `F64 -> Externref`.
3407
3396
  const ret = arg0;
@@ -3414,6 +3403,11 @@ function __wbg_get_imports() {
3414
3403
  const ret = v0;
3415
3404
  return ret;
3416
3405
  };
3406
+ imports.wbg.__wbindgen_cast_ee75496ec5e2c856 = function(arg0, arg1) {
3407
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7290, function: Function { arguments: [], shim_idx: 7291, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3408
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3c5639ee43c80f22, wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005);
3409
+ return ret;
3410
+ };
3417
3411
  imports.wbg.__wbindgen_cast_f20a506f31063fd0 = function(arg0, arg1) {
3418
3412
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3419
3413
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3421,6 +3415,11 @@ function __wbg_get_imports() {
3421
3415
  const ret = v0;
3422
3416
  return ret;
3423
3417
  };
3418
+ imports.wbg.__wbindgen_cast_f8f15095990b7349 = function(arg0, arg1) {
3419
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7131, function: Function { arguments: [], shim_idx: 7132, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3420
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfbd660e60d498df9, wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040);
3421
+ return ret;
3422
+ };
3424
3423
  imports.wbg.__wbindgen_init_externref_table = function() {
3425
3424
  const table = wasm.__wbindgen_externrefs;
3426
3425
  const offset = table.grow(4);
Binary file
@@ -23,7 +23,10 @@ export const client_clearAllStatistics: (a: number) => void;
23
23
  export const client_conversations: (a: number) => number;
24
24
  export const client_createInboxSignatureRequest: (a: number) => [number, number, number];
25
25
  export const client_findInboxIdByIdentifier: (a: number, b: any) => any;
26
+ export const client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
27
+ export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
26
28
  export const client_inboxId: (a: number) => [number, number];
29
+ export const client_inboxState: (a: number, b: number) => any;
27
30
  export const client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
28
31
  export const client_installationId: (a: number) => [number, number];
29
32
  export const client_installationIdBytes: (a: number) => any;
@@ -54,6 +57,7 @@ export const encryptAttachment: (a: any) => [number, number, number];
54
57
  export const generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
55
58
  export const getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
56
59
  export const groupUpdatedContentType: () => any;
60
+ export const inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
57
61
  export const intentContentType: () => any;
58
62
  export const leaveRequestContentType: () => any;
59
63
  export const markdownContentType: () => any;
@@ -71,10 +75,6 @@ export const textContentType: () => any;
71
75
  export const transactionReferenceContentType: () => any;
72
76
  export const verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
73
77
  export const walletSendCallsContentType: () => any;
74
- export const client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
75
- export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
76
- export const client_inboxState: (a: number, b: number) => any;
77
- export const inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
78
78
  export const __wbg_conversation_free: (a: number, b: number) => void;
79
79
  export const __wbg_conversationlistitem_free: (a: number, b: number) => void;
80
80
  export const __wbg_conversations_free: (a: number, b: number) => void;
@@ -208,14 +208,14 @@ export const intounderlyingbytesource_cancel: (a: number) => void;
208
208
  export const intounderlyingbytesource_pull: (a: number, b: any) => any;
209
209
  export const intounderlyingbytesource_start: (a: number, b: any) => void;
210
210
  export const intounderlyingbytesource_type: (a: number) => number;
211
- export const wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
212
- export const wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
213
- export const wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
214
- export const wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
215
211
  export const wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
216
212
  export const wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
213
+ export const wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
214
+ export const wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
217
215
  export const wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1: (a: number, b: number) => void;
218
216
  export const wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1: (a: number, b: number) => void;
217
+ export const wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
218
+ export const wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
219
219
  export const wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb: (a: number, b: number, c: any, d: any) => void;
220
220
  export const __wbindgen_malloc: (a: number, b: number) => number;
221
221
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmtp/wasm-bindings",
3
- "version": "1.7.0-rc2",
3
+ "version": "1.7.0-rc3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "WASM bindings for the libXMTP rust library",