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

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,5 +1,8 @@
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
+ export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
5
+ export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
3
6
  export function encodeAttachment(attachment: Attachment): EncodedContent;
4
7
  export function attachmentContentType(): ContentTypeId;
5
8
  export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
@@ -7,29 +10,36 @@ export function readReceiptContentType(): ContentTypeId;
7
10
  export function groupUpdatedContentType(): ContentTypeId;
8
11
  export function leaveRequestContentType(): ContentTypeId;
9
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
+ /**
18
+ * Decrypts an encrypted payload from a remote attachment.
19
+ */
20
+ export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
10
21
  export function remoteAttachmentContentType(): ContentTypeId;
11
- export function walletSendCallsContentType(): ContentTypeId;
12
22
  export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
13
- export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
23
+ export function walletSendCallsContentType(): ContentTypeId;
14
24
  export function transactionReferenceContentType(): ContentTypeId;
15
- export function multiRemoteAttachmentContentType(): ContentTypeId;
25
+ export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
16
26
  export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
27
+ export function multiRemoteAttachmentContentType(): ContentTypeId;
17
28
  export function encodeText(text: string): EncodedContent;
18
29
  export function textContentType(): ContentTypeId;
19
30
  export function replyContentType(): ContentTypeId;
20
31
  export function encodeIntent(intent: Intent): EncodedContent;
21
32
  export function intentContentType(): ContentTypeId;
22
- export function actionsContentType(): ContentTypeId;
23
33
  export function encodeActions(actions: Actions): EncodedContent;
24
- export function reactionContentType(): ContentTypeId;
34
+ export function actionsContentType(): ContentTypeId;
35
+ export function markdownContentType(): ContentTypeId;
36
+ export function encodeMarkdown(text: string): EncodedContent;
25
37
  export function encodeReaction(reaction: Reaction): EncodedContent;
38
+ export function reactionContentType(): ContentTypeId;
26
39
  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>;
27
- export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
28
- export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
29
- export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
30
- export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
31
40
  export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, accountIdentifier: Identifier): Promise<string | undefined>;
32
41
  export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
42
+ export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
33
43
  /**
34
44
  * Entry point invoked by JavaScript in a worker.
35
45
  */
@@ -40,35 +50,63 @@ export function task_worker_entry_point(ptr: number): void;
40
50
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
41
51
  */
42
52
  type ReadableStreamType = "bytes";
43
- export interface GroupMember {
44
- inboxId: string;
45
- accountIdentifiers: Identifier[];
46
- installationIds: string[];
47
- permissionLevel: PermissionLevel;
48
- consentState: ConsentState;
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;
49
62
  }
50
63
 
51
- export type PermissionLevel = "member" | "admin" | "superAdmin";
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;
73
+ }
52
74
 
53
- export interface GroupMetadata {
54
- creatorInboxId: string;
55
- conversationType: string;
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;
56
84
  }
57
85
 
58
- export interface SendMessageOpts {
59
- shouldPush: boolean;
60
- optimistic?: boolean;
86
+ export interface Identifier {
87
+ identifier: string;
88
+ identifierKind: IdentifierKind;
61
89
  }
62
90
 
63
- export type ConsentState = "unknown" | "allowed" | "denied";
91
+ export type IdentifierKind = "Ethereum" | "Passkey";
64
92
 
65
- export interface Consent {
66
- entityType: ConsentEntityType;
67
- state: ConsentState;
68
- entity: string;
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;
69
102
  }
70
103
 
71
- export type ConsentEntityType = "groupId" | "inboxId";
104
+ export interface PasskeySignature {
105
+ publicKey: Uint8Array;
106
+ signature: Uint8Array;
107
+ authenticatorData: Uint8Array;
108
+ clientDataJson: Uint8Array;
109
+ }
72
110
 
73
111
  export interface Attachment {
74
112
  filename?: string;
@@ -78,10 +116,6 @@ export interface Attachment {
78
116
 
79
117
  export type ReadReceipt = Record<string, never>;
80
118
 
81
- export interface Inbox {
82
- inboxId: string;
83
- }
84
-
85
119
  export interface MetadataFieldChange {
86
120
  fieldName: string;
87
121
  oldValue?: string;
@@ -100,10 +134,48 @@ export interface GroupUpdated {
100
134
  removedSuperAdminInboxes: Inbox[];
101
135
  }
102
136
 
137
+ export interface Inbox {
138
+ inboxId: string;
139
+ }
140
+
103
141
  export interface LeaveRequest {
104
142
  authenticatedNote?: Uint8Array;
105
143
  }
106
144
 
145
+ /**
146
+ * Result of encrypting an attachment for remote storage.
147
+ */
148
+ export interface EncryptedAttachment {
149
+ /**
150
+ * The encrypted bytes to upload to the remote server
151
+ */
152
+ payload: Uint8Array;
153
+ /**
154
+ * SHA-256 digest of the encrypted bytes (hex-encoded)
155
+ */
156
+ contentDigest: string;
157
+ /**
158
+ * The 32-byte secret key needed for decryption
159
+ */
160
+ secret: Uint8Array;
161
+ /**
162
+ * The 32-byte salt used in key derivation
163
+ */
164
+ salt: Uint8Array;
165
+ /**
166
+ * The 12-byte nonce used in encryption
167
+ */
168
+ nonce: Uint8Array;
169
+ /**
170
+ * The length of the encrypted content
171
+ */
172
+ contentLength: number;
173
+ /**
174
+ * The filename of the attachment
175
+ */
176
+ filename?: string;
177
+ }
178
+
107
179
  export interface RemoteAttachment {
108
180
  url: string;
109
181
  contentDigest: string;
@@ -115,14 +187,6 @@ export interface RemoteAttachment {
115
187
  filename?: string;
116
188
  }
117
189
 
118
- export interface WalletCall {
119
- to?: string;
120
- data?: string;
121
- value?: string;
122
- gas?: string;
123
- metadata?: Record<string, string>;
124
- }
125
-
126
190
  export interface WalletSendCalls {
127
191
  version: string;
128
192
  chainId: string;
@@ -131,6 +195,14 @@ export interface WalletSendCalls {
131
195
  capabilities?: Record<string, string>;
132
196
  }
133
197
 
198
+ export interface WalletCall {
199
+ to?: string;
200
+ data?: string;
201
+ value?: string;
202
+ gas?: string;
203
+ metadata?: Record<string, string>;
204
+ }
205
+
134
206
  export interface TransactionReference {
135
207
  namespace?: string;
136
208
  networkId: string;
@@ -147,11 +219,7 @@ export interface TransactionMetadata {
147
219
  toAddress: string;
148
220
  }
149
221
 
150
- export type DecodedMessageContent = { type: "text"; content: string } | { 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 };
151
-
152
- export interface MultiRemoteAttachment {
153
- attachments: RemoteAttachmentInfo[];
154
- }
222
+ 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 };
155
223
 
156
224
  export interface RemoteAttachmentInfo {
157
225
  secret: Uint8Array;
@@ -164,6 +232,10 @@ export interface RemoteAttachmentInfo {
164
232
  filename?: string;
165
233
  }
166
234
 
235
+ export interface MultiRemoteAttachment {
236
+ attachments: RemoteAttachmentInfo[];
237
+ }
238
+
167
239
  export interface TextContent {
168
240
  content: string;
169
241
  }
@@ -186,6 +258,15 @@ export interface Intent {
186
258
  metadata?: Record<string, string | number | boolean | null>;
187
259
  }
188
260
 
261
+ export interface Actions {
262
+ id: string;
263
+ description: string;
264
+ actions: Action[];
265
+ expiresAtNs?: bigint;
266
+ }
267
+
268
+ export type ActionStyle = "primary" | "secondary" | "danger";
269
+
189
270
  export interface Action {
190
271
  id: string;
191
272
  label: string;
@@ -194,19 +275,12 @@ export interface Action {
194
275
  expiresAtNs?: bigint;
195
276
  }
196
277
 
197
- export interface Actions {
198
- id: string;
199
- description: string;
200
- actions: Action[];
201
- expiresAtNs?: bigint;
278
+ export interface MarkdownContent {
279
+ content: string;
202
280
  }
203
281
 
204
- export type ActionStyle = "primary" | "secondary" | "danger";
205
-
206
282
  export type ReactionSchema = "unknown" | "unicode" | "shortcode" | "custom";
207
283
 
208
- export type ReactionAction = "unknown" | "added" | "removed";
209
-
210
284
  export interface Reaction {
211
285
  reference: string;
212
286
  referenceInboxId: string;
@@ -215,6 +289,8 @@ export interface Reaction {
215
289
  schema: ReactionSchema;
216
290
  }
217
291
 
292
+ export type ReactionAction = "unknown" | "added" | "removed";
293
+
218
294
  export interface EncodedContent {
219
295
  type?: ContentTypeId;
220
296
  parameters?: Record<string, string>;
@@ -243,14 +319,26 @@ export interface DecodedMessage {
243
319
  reactions: DecodedMessage[];
244
320
  deliveryStatus: DeliveryStatus;
245
321
  numReplies: bigint;
322
+ expiresAtNs: bigint | undefined;
246
323
  }
247
324
 
248
- export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
325
+ export interface Credential {
326
+ name?: string;
327
+ value: string;
328
+ expiresAtSeconds: bigint;
329
+ }
249
330
 
250
331
  export type DeviceSyncWorkerMode = "enabled" | "disabled";
251
332
 
333
+ export interface GroupSyncSummary {
334
+ numEligible: number;
335
+ numSynced: number;
336
+ }
337
+
252
338
  export type ClientMode = "default" | "notification";
253
339
 
340
+ export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
341
+
254
342
  /**
255
343
  * Specify options for the logger
256
344
  */
@@ -269,12 +357,11 @@ export interface LogOptions {
269
357
  level?: LogLevel;
270
358
  }
271
359
 
272
- export interface GroupSyncSummary {
273
- numEligible: number;
274
- numSynced: number;
275
- }
360
+ export type MessageSortBy = "sentAt" | "insertedAt";
276
361
 
277
- export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
362
+ export type DeliveryStatus = "unpublished" | "published" | "failed";
363
+
364
+ export type GroupMessageKind = "application" | "membershipchange";
278
365
 
279
366
  export type SortDirection = "ascending" | "descending";
280
367
 
@@ -288,9 +375,10 @@ export interface Message {
288
375
  deliveryStatus: DeliveryStatus;
289
376
  }
290
377
 
291
- export type DeliveryStatus = "unpublished" | "published" | "failed";
292
-
293
- export type GroupMessageKind = "application" | "membershipchange";
378
+ export interface MessageWithReactions {
379
+ message: Message;
380
+ reactions: Message[];
381
+ }
294
382
 
295
383
  export interface ListMessagesOptions {
296
384
  contentTypes?: ContentType[];
@@ -307,76 +395,6 @@ export interface ListMessagesOptions {
307
395
  insertedBeforeNs?: bigint;
308
396
  }
309
397
 
310
- export type MessageSortBy = "sentAt" | "insertedAt";
311
-
312
- export interface MessageWithReactions {
313
- message: Message;
314
- reactions: Message[];
315
- }
316
-
317
- export interface PasskeySignature {
318
- publicKey: Uint8Array;
319
- signature: Uint8Array;
320
- authenticatorData: Uint8Array;
321
- clientDataJson: Uint8Array;
322
- }
323
-
324
- export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
325
-
326
- export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
327
-
328
- export interface GroupPermissions {
329
- policyType: GroupPermissionsOptions;
330
- policySet: PermissionPolicySet;
331
- }
332
-
333
- export interface PermissionPolicySet {
334
- addMemberPolicy: PermissionPolicy;
335
- removeMemberPolicy: PermissionPolicy;
336
- addAdminPolicy: PermissionPolicy;
337
- removeAdminPolicy: PermissionPolicy;
338
- updateGroupNamePolicy: PermissionPolicy;
339
- updateGroupDescriptionPolicy: PermissionPolicy;
340
- updateGroupImageUrlSquarePolicy: PermissionPolicy;
341
- updateMessageDisappearingPolicy: PermissionPolicy;
342
- }
343
-
344
- export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
345
-
346
- export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
347
-
348
- export type IdentifierKind = "Ethereum" | "Passkey";
349
-
350
- export interface ApiStats {
351
- uploadKeyPackage: bigint;
352
- fetchKeyPackage: bigint;
353
- sendGroupMessages: bigint;
354
- sendWelcomeMessages: bigint;
355
- queryGroupMessages: bigint;
356
- queryWelcomeMessages: bigint;
357
- subscribeMessages: bigint;
358
- subscribeWelcomes: bigint;
359
- }
360
-
361
- export interface Identifier {
362
- identifier: string;
363
- identifierKind: IdentifierKind;
364
- }
365
-
366
- export interface IdentityStats {
367
- publishIdentityUpdate: bigint;
368
- getIdentityUpdatesV2: bigint;
369
- getInboxIds: bigint;
370
- verifySmartContractWalletSignature: bigint;
371
- }
372
-
373
- export interface InboxState {
374
- inboxId: string;
375
- recoveryIdentifier: Identifier;
376
- installations: Installation[];
377
- accountIdentifiers: Identifier[];
378
- }
379
-
380
398
  export interface Lifetime {
381
399
  notBefore: bigint;
382
400
  notAfter: bigint;
@@ -388,40 +406,55 @@ export interface Installation {
388
406
  clientTimestampNs?: bigint;
389
407
  }
390
408
 
409
+ export interface InboxState {
410
+ inboxId: string;
411
+ recoveryIdentifier: Identifier;
412
+ installations: Installation[];
413
+ accountIdentifiers: Identifier[];
414
+ }
415
+
391
416
  export interface KeyPackageStatus {
392
417
  lifetime?: Lifetime;
393
418
  validationError?: string;
394
419
  }
395
420
 
396
- export type ContentType = "unknown" | "text" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
421
+ export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
397
422
 
398
- export type ListConversationsOrderBy = "createdAt" | "lastActivity";
423
+ export interface GroupMember {
424
+ inboxId: string;
425
+ accountIdentifiers: Identifier[];
426
+ installationIds: string[];
427
+ permissionLevel: PermissionLevel;
428
+ consentState: ConsentState;
429
+ }
399
430
 
400
- export interface CreateGroupOptions {
401
- permissions?: GroupPermissionsOptions;
402
- groupName?: string;
403
- groupImageUrlSquare?: string;
404
- groupDescription?: string;
405
- customPermissionPolicySet?: PermissionPolicySet;
406
- messageDisappearingSettings?: MessageDisappearingSettings;
407
- appData?: string;
431
+ export interface GroupMetadata {
432
+ creatorInboxId: string;
433
+ conversationType: string;
408
434
  }
409
435
 
410
- export interface CreateDMOptions {
411
- messageDisappearingSettings?: MessageDisappearingSettings;
436
+ export type PermissionLevel = "member" | "admin" | "superAdmin";
437
+
438
+ export interface SendMessageOpts {
439
+ shouldPush: boolean;
440
+ optimistic?: boolean;
412
441
  }
413
442
 
414
- export interface HmacKey {
415
- key: Uint8Array;
416
- epoch: bigint;
443
+ export type ConsentState = "unknown" | "allowed" | "denied";
444
+
445
+ export interface Consent {
446
+ entityType: ConsentEntityType;
447
+ state: ConsentState;
448
+ entity: string;
417
449
  }
418
450
 
419
- export interface MessageDisappearingSettings {
420
- fromNs: bigint;
421
- inNs: bigint;
451
+ export type ConsentEntityType = "groupId" | "inboxId";
452
+
453
+ export interface CreateDMOptions {
454
+ messageDisappearingSettings?: MessageDisappearingSettings;
422
455
  }
423
456
 
424
- export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
457
+ export type ListConversationsOrderBy = "createdAt" | "lastActivity";
425
458
 
426
459
  export interface ListConversationsOptions {
427
460
  consentStates?: ConsentState[];
@@ -433,6 +466,25 @@ export interface ListConversationsOptions {
433
466
  limit?: bigint;
434
467
  }
435
468
 
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;
482
+ }
483
+
484
+ export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
485
+
486
+ export type ConversationType = "dm" | "group" | "sync" | "oneshot";
487
+
436
488
  export interface ConversationDebugInfo {
437
489
  epoch: bigint;
438
490
  maybeForked: boolean;
@@ -448,12 +500,9 @@ export interface Cursor {
448
500
  sequenceId: bigint;
449
501
  }
450
502
 
451
- export type ConversationType = "dm" | "group" | "sync" | "oneshot";
452
-
453
- export interface Credential {
454
- name?: string;
455
- value: string;
456
- expiresAtSeconds: bigint;
503
+ export interface MessageDisappearingSettings {
504
+ fromNs: bigint;
505
+ inNs: bigint;
457
506
  }
458
507
 
459
508
  export class AuthHandle {
@@ -467,8 +516,16 @@ export class Client {
467
516
  private constructor();
468
517
  free(): void;
469
518
  [Symbol.dispose](): void;
470
- getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
471
- setConsentStates(records: Consent[]): Promise<void>;
519
+ registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
520
+ applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
521
+ signWithInstallationKey(signatureText: string): Uint8Array;
522
+ createInboxSignatureRequest(): SignatureRequestHandle | undefined;
523
+ addWalletSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>;
524
+ revokeWalletSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
525
+ verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void;
526
+ revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
527
+ changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
528
+ revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
472
529
  /**
473
530
  * Output booleans should be zipped with the index of input identifiers
474
531
  */
@@ -482,16 +539,6 @@ export class Client {
482
539
  apiAggregateStatistics(): string;
483
540
  inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
484
541
  findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
485
- registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
486
- applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
487
- signWithInstallationKey(signatureText: string): Uint8Array;
488
- createInboxSignatureRequest(): SignatureRequestHandle | undefined;
489
- addWalletSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>;
490
- revokeWalletSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
491
- verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void;
492
- revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
493
- changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
494
- revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
495
542
  /**
496
543
  *
497
544
  * * Get the client's inbox state.
@@ -510,6 +557,8 @@ export class Client {
510
557
  *
511
558
  */
512
559
  getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
560
+ getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
561
+ setConsentStates(records: Consent[]): Promise<void>;
513
562
  readonly appVersion: string;
514
563
  readonly isRegistered: boolean;
515
564
  readonly installationId: string;
@@ -535,6 +584,7 @@ export class Conversation {
535
584
  createdAtNs(): bigint;
536
585
  findMessages(opts?: ListMessagesOptions | null): Promise<Message[]>;
537
586
  getHmacKeys(): any;
587
+ sendMarkdown(markdown: string, optimistic?: boolean | null): Promise<string>;
538
588
  sendReaction(reaction: Reaction, optimistic?: boolean | null): Promise<string>;
539
589
  countMessages(opts?: ListMessagesOptions | null): Promise<bigint>;
540
590
  groupMetadata(): Promise<GroupMetadata>;
@@ -577,7 +627,7 @@ export class Conversation {
577
627
  messageDisappearingSettings(): MessageDisappearingSettings | undefined;
578
628
  updateGroupImageUrlSquare(groupImageUrlSquare: string): Promise<void>;
579
629
  id(): string;
580
- processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise<Message>;
630
+ processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise<Message[]>;
581
631
  isMessageDisappearingEnabled(): boolean;
582
632
  removeMessageDisappearingSettings(): Promise<void>;
583
633
  updateMessageDisappearingSettings(settings: MessageDisappearingSettings): Promise<void>;
@@ -690,29 +740,92 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
690
740
 
691
741
  export interface InitOutput {
692
742
  readonly memory: WebAssembly.Memory;
743
+ readonly __wbg_authhandle_free: (a: number, b: number) => void;
693
744
  readonly __wbg_client_free: (a: number, b: number) => void;
694
- readonly __wbg_conversation_free: (a: number, b: number) => void;
745
+ readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
695
746
  readonly actionsContentType: () => any;
747
+ readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
696
748
  readonly attachmentContentType: () => any;
749
+ readonly authhandle_id: (a: number) => number;
750
+ readonly authhandle_new: () => number;
751
+ readonly authhandle_set: (a: number, b: any) => any;
697
752
  readonly client_accountIdentifier: (a: number) => any;
753
+ readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
698
754
  readonly client_apiAggregateStatistics: (a: number) => [number, number];
699
755
  readonly client_apiIdentityStatistics: (a: number) => any;
700
756
  readonly client_apiStatistics: (a: number) => any;
701
757
  readonly client_appVersion: (a: number) => [number, number];
758
+ readonly client_applySignatureRequest: (a: number, b: number) => any;
702
759
  readonly client_canMessage: (a: number, b: number, c: number) => any;
760
+ readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
703
761
  readonly client_clearAllStatistics: (a: number) => void;
704
762
  readonly client_conversations: (a: number) => number;
763
+ readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
705
764
  readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
706
- readonly client_getConsentState: (a: number, b: any, c: number, d: number) => any;
707
765
  readonly client_inboxId: (a: number) => [number, number];
708
766
  readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
709
767
  readonly client_installationId: (a: number) => [number, number];
710
768
  readonly client_installationIdBytes: (a: number) => any;
711
769
  readonly client_isRegistered: (a: number) => number;
712
770
  readonly client_libxmtpVersion: (a: number) => [number, number];
771
+ readonly client_registerIdentity: (a: number, b: number) => any;
772
+ readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
773
+ readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
774
+ readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
713
775
  readonly client_sendSyncRequest: (a: number) => any;
714
- readonly client_setConsentStates: (a: number, b: number, c: number) => any;
776
+ readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
715
777
  readonly client_syncPreferences: (a: number) => any;
778
+ readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
779
+ readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: bigint, t: number, u: number, v: number) => any;
780
+ readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
781
+ readonly encodeActions: (a: any) => [number, number, number];
782
+ readonly encodeAttachment: (a: any) => [number, number, number];
783
+ readonly encodeIntent: (a: any) => [number, number, number];
784
+ readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
785
+ readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
786
+ readonly encodeReaction: (a: any) => [number, number, number];
787
+ readonly encodeReadReceipt: (a: any) => [number, number, number];
788
+ readonly encodeRemoteAttachment: (a: any) => [number, number, number];
789
+ readonly encodeText: (a: number, b: number) => [number, number, number];
790
+ readonly encodeTransactionReference: (a: any) => [number, number, number];
791
+ readonly encodeWalletSendCalls: (a: any) => [number, number, number];
792
+ readonly encryptAttachment: (a: any) => [number, number, number];
793
+ readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
794
+ readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
795
+ readonly groupUpdatedContentType: () => any;
796
+ readonly intentContentType: () => any;
797
+ readonly leaveRequestContentType: () => any;
798
+ readonly markdownContentType: () => any;
799
+ readonly multiRemoteAttachmentContentType: () => any;
800
+ readonly reactionContentType: () => any;
801
+ readonly readReceiptContentType: () => any;
802
+ readonly remoteAttachmentContentType: () => any;
803
+ readonly replyContentType: () => any;
804
+ readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
805
+ readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
806
+ readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
807
+ readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
808
+ readonly signaturerequesthandle_signatureText: (a: number) => any;
809
+ readonly textContentType: () => any;
810
+ readonly transactionReferenceContentType: () => any;
811
+ readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
812
+ 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
+ readonly __wbg_conversation_free: (a: number, b: number) => void;
818
+ readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
819
+ readonly __wbg_conversations_free: (a: number, b: number) => void;
820
+ readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
821
+ readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
822
+ readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
823
+ readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
824
+ readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
825
+ readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
826
+ readonly __wbg_streamcloser_free: (a: number, b: number) => void;
827
+ readonly client_getConsentState: (a: number, b: any, c: number, d: number) => any;
828
+ readonly client_setConsentStates: (a: number, b: number, c: number) => any;
716
829
  readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
717
830
  readonly conversation_addMembers: (a: number, b: number, c: number) => any;
718
831
  readonly conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
@@ -757,6 +870,7 @@ export interface InitOutput {
757
870
  readonly conversation_sendActions: (a: number, b: any, c: number) => any;
758
871
  readonly conversation_sendAttachment: (a: number, b: any, c: number) => any;
759
872
  readonly conversation_sendIntent: (a: number, b: any, c: number) => any;
873
+ readonly conversation_sendMarkdown: (a: number, b: number, c: number, d: number) => any;
760
874
  readonly conversation_sendMultiRemoteAttachment: (a: number, b: any, c: number) => any;
761
875
  readonly conversation_sendOptimistic: (a: number, b: any, c: any) => [number, number, number, number];
762
876
  readonly conversation_sendReaction: (a: number, b: any, c: number) => any;
@@ -776,62 +890,6 @@ export interface InitOutput {
776
890
  readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
777
891
  readonly conversation_updateMessageDisappearingSettings: (a: number, b: any) => any;
778
892
  readonly conversation_updatePermissionPolicy: (a: number, b: any, c: any, d: number) => any;
779
- readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: bigint, t: number, u: number, v: number) => any;
780
- readonly encodeActions: (a: any) => [number, number, number];
781
- readonly encodeAttachment: (a: any) => [number, number, number];
782
- readonly encodeIntent: (a: any) => [number, number, number];
783
- readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
784
- readonly encodeReaction: (a: any) => [number, number, number];
785
- readonly encodeReadReceipt: (a: any) => [number, number, number];
786
- readonly encodeRemoteAttachment: (a: any) => [number, number, number];
787
- readonly encodeText: (a: number, b: number) => [number, number, number];
788
- readonly encodeTransactionReference: (a: any) => [number, number, number];
789
- readonly encodeWalletSendCalls: (a: any) => [number, number, number];
790
- readonly groupUpdatedContentType: () => any;
791
- readonly intentContentType: () => any;
792
- readonly leaveRequestContentType: () => any;
793
- readonly multiRemoteAttachmentContentType: () => any;
794
- readonly reactionContentType: () => any;
795
- readonly readReceiptContentType: () => any;
796
- readonly remoteAttachmentContentType: () => any;
797
- readonly replyContentType: () => any;
798
- readonly textContentType: () => any;
799
- readonly transactionReferenceContentType: () => any;
800
- readonly walletSendCallsContentType: () => any;
801
- readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
802
- readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
803
- readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
804
- readonly client_applySignatureRequest: (a: number, b: number) => any;
805
- readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
806
- readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
807
- readonly client_registerIdentity: (a: number, b: number) => any;
808
- readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
809
- readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
810
- readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
811
- readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
812
- readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
813
- readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
814
- readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
815
- readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
816
- readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
817
- readonly signaturerequesthandle_signatureText: (a: number) => any;
818
- readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
819
- readonly __wbg_authhandle_free: (a: number, b: number) => void;
820
- readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
821
- readonly __wbg_conversations_free: (a: number, b: number) => void;
822
- readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
823
- readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
824
- readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
825
- readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
826
- readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
827
- readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
828
- readonly __wbg_streamcloser_free: (a: number, b: number) => void;
829
- readonly authhandle_id: (a: number) => number;
830
- readonly authhandle_new: () => number;
831
- readonly authhandle_set: (a: number, b: any) => any;
832
- readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
833
- readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
834
- readonly client_inboxState: (a: number, b: number) => any;
835
893
  readonly conversationlistitem_new: (a: number, b: number, c: number) => number;
836
894
  readonly conversations_createDm: (a: number, b: any, c: number) => any;
837
895
  readonly conversations_createDmByInboxId: (a: number, b: number, c: number, d: number) => any;
@@ -853,9 +911,6 @@ export interface InitOutput {
853
911
  readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
854
912
  readonly conversations_sync: (a: number) => any;
855
913
  readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
856
- readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
857
- readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
858
- readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
859
914
  readonly streamcloser_end: (a: number) => void;
860
915
  readonly streamcloser_endAndWait: (a: number) => any;
861
916
  readonly streamcloser_isClosed: (a: number) => number;
@@ -892,12 +947,12 @@ export interface InitOutput {
892
947
  readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
893
948
  readonly intounderlyingbytesource_start: (a: number, b: any) => void;
894
949
  readonly intounderlyingbytesource_type: (a: number) => number;
895
- readonly wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
896
- readonly wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
897
- readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
898
- readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
899
950
  readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
900
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
+ readonly wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
955
+ readonly wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
901
956
  readonly wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1: (a: number, b: number) => void;
902
957
  readonly wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1: (a: number, b: number) => void;
903
958
  readonly wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb: (a: number, b: number, c: any, d: any) => void;