@xmtp/wasm-bindings 1.7.0-rc2 → 1.8.0

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,64 +1,253 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
4
+ export function metadataFieldName(field: MetadataField): string;
5
+ export function contentTypeLeaveRequest(): ContentTypeId;
6
+ export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
7
+ export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, isSecure: boolean, accountIdentifier: Identifier): Promise<string | undefined>;
3
8
  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
9
  export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
10
+ export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
11
+ export function contentTypeAttachment(): ContentTypeId;
6
12
  export function encodeAttachment(attachment: Attachment): EncodedContent;
7
- export function attachmentContentType(): ContentTypeId;
13
+ export function contentTypeReadReceipt(): ContentTypeId;
8
14
  export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
9
- export function readReceiptContentType(): ContentTypeId;
10
- export function groupUpdatedContentType(): ContentTypeId;
11
- 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;
15
+ export function contentTypeGroupUpdated(): ContentTypeId;
17
16
  /**
18
17
  * Decrypts an encrypted payload from a remote attachment.
19
18
  */
20
19
  export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
21
- export function remoteAttachmentContentType(): ContentTypeId;
20
+ /**
21
+ * Encrypts an attachment for storage as a remote attachment.
22
+ */
23
+ export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
24
+ export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
25
+ export function contentTypeRemoteAttachment(): ContentTypeId;
22
26
  export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
23
- export function walletSendCallsContentType(): ContentTypeId;
24
- export function transactionReferenceContentType(): ContentTypeId;
27
+ export function contentTypeWalletSendCalls(): ContentTypeId;
28
+ export function contentTypeTransactionReference(): ContentTypeId;
25
29
  export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
26
30
  export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
27
- export function multiRemoteAttachmentContentType(): ContentTypeId;
31
+ export function contentTypeMultiRemoteAttachment(): ContentTypeId;
28
32
  export function encodeText(text: string): EncodedContent;
29
- export function textContentType(): ContentTypeId;
30
- export function replyContentType(): ContentTypeId;
33
+ export function contentTypeText(): ContentTypeId;
34
+ export function contentTypeReply(): ContentTypeId;
31
35
  export function encodeIntent(intent: Intent): EncodedContent;
32
- export function intentContentType(): ContentTypeId;
36
+ export function contentTypeIntent(): ContentTypeId;
37
+ export function contentTypeActions(): ContentTypeId;
33
38
  export function encodeActions(actions: Actions): EncodedContent;
34
- export function actionsContentType(): ContentTypeId;
35
- export function markdownContentType(): ContentTypeId;
39
+ export function contentTypeMarkdown(): ContentTypeId;
36
40
  export function encodeMarkdown(text: string): EncodedContent;
37
41
  export function encodeReaction(reaction: Reaction): EncodedContent;
38
- export function reactionContentType(): ContentTypeId;
42
+ export function contentTypeReaction(): ContentTypeId;
39
43
  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
- export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
42
- export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
44
+ /**
45
+ * Get the number of database files stored in OPFS.
46
+ */
47
+ export function opfsFileCount(): Promise<number>;
48
+ /**
49
+ * Check if a database file exists in OPFS.
50
+ */
51
+ export function opfsFileExists(filename: string): Promise<boolean>;
52
+ /**
53
+ * Import a database from a byte array into OPFS.
54
+ * This will overwrite any existing database with the same name.
55
+ * The byte array must contain a valid SQLite database.
56
+ * Note: Any existing database with the same name must be closed before importing.
57
+ */
58
+ export function opfsImportDb(filename: string, data: Uint8Array): Promise<void>;
59
+ /**
60
+ * Delete all database files from OPFS.
61
+ * Note: All databases must be closed before calling this function.
62
+ */
63
+ export function opfsClearAll(): Promise<void>;
64
+ /**
65
+ * Get the current capacity of the OPFS file pool.
66
+ */
67
+ export function opfsPoolCapacity(): Promise<number>;
68
+ /**
69
+ * Export a database file from OPFS as a byte array.
70
+ * This can be used to backup or transfer a database.
71
+ * Note: The database should be closed before exporting for consistency.
72
+ */
73
+ export function opfsExportDb(filename: string): Promise<Uint8Array>;
74
+ /**
75
+ * Delete a specific database file from OPFS.
76
+ * Returns true if the file was deleted, false if it didn't exist.
77
+ * Note: The database must be closed before calling this function.
78
+ */
79
+ export function opfsDeleteFile(filename: string): Promise<boolean>;
80
+ /**
81
+ * Initialize the OPFS SQLite VFS if not already initialized.
82
+ * This must be called before using other OPFS functions.
83
+ */
84
+ export function opfsInit(): Promise<void>;
85
+ /**
86
+ * List all database files stored in OPFS.
87
+ * Returns an array of file names.
88
+ */
89
+ export function opfsListFiles(): Promise<string[]>;
43
90
  /**
44
91
  * Entry point invoked by JavaScript in a worker.
45
92
  */
46
93
  export function task_worker_entry_point(ptr: number): void;
94
+ export enum ActionStyle {
95
+ Primary = 0,
96
+ Secondary = 1,
97
+ Danger = 2,
98
+ }
99
+ export enum ClientMode {
100
+ Default = 0,
101
+ Notification = 1,
102
+ }
103
+ export enum ConsentEntityType {
104
+ GroupId = 0,
105
+ InboxId = 1,
106
+ }
107
+ export enum ConsentState {
108
+ Unknown = 0,
109
+ Allowed = 1,
110
+ Denied = 2,
111
+ }
112
+ export enum ContentType {
113
+ Actions = 0,
114
+ Attachment = 1,
115
+ Custom = 2,
116
+ GroupMembershipChange = 3,
117
+ GroupUpdated = 4,
118
+ Intent = 5,
119
+ LeaveRequest = 6,
120
+ Markdown = 7,
121
+ MultiRemoteAttachment = 8,
122
+ Reaction = 9,
123
+ ReadReceipt = 10,
124
+ RemoteAttachment = 11,
125
+ Reply = 12,
126
+ Text = 13,
127
+ TransactionReference = 14,
128
+ WalletSendCalls = 15,
129
+ }
130
+ export enum ConversationType {
131
+ Dm = 0,
132
+ Group = 1,
133
+ Sync = 2,
134
+ Oneshot = 3,
135
+ }
136
+ export enum DeliveryStatus {
137
+ Unpublished = 0,
138
+ Published = 1,
139
+ Failed = 2,
140
+ }
141
+ export enum DeviceSyncWorkerMode {
142
+ Enabled = 0,
143
+ Disabled = 1,
144
+ }
145
+ export enum GroupMembershipState {
146
+ Allowed = 0,
147
+ Rejected = 1,
148
+ Pending = 2,
149
+ Restored = 3,
150
+ PendingRemove = 4,
151
+ }
152
+ export enum GroupMessageKind {
153
+ Application = 0,
154
+ MembershipChange = 1,
155
+ }
156
+ export enum GroupPermissionsOptions {
157
+ Default = 0,
158
+ AdminOnly = 1,
159
+ CustomPolicy = 2,
160
+ }
161
+ export enum IdentifierKind {
162
+ Ethereum = 0,
163
+ Passkey = 1,
164
+ }
165
+ export enum ListConversationsOrderBy {
166
+ CreatedAt = 0,
167
+ LastActivity = 1,
168
+ }
169
+ export enum LogLevel {
170
+ Off = 0,
171
+ Error = 1,
172
+ Warn = 2,
173
+ Info = 3,
174
+ Debug = 4,
175
+ Trace = 5,
176
+ }
177
+ export enum MessageSortBy {
178
+ SentAt = 0,
179
+ InsertedAt = 1,
180
+ }
181
+ export enum MetadataField {
182
+ AppData = 0,
183
+ Description = 1,
184
+ GroupName = 2,
185
+ GroupImageUrlSquare = 3,
186
+ MessageExpirationFromNs = 4,
187
+ MessageExpirationInNs = 5,
188
+ }
189
+ export enum PermissionLevel {
190
+ Member = 0,
191
+ Admin = 1,
192
+ SuperAdmin = 2,
193
+ }
194
+ export enum PermissionPolicy {
195
+ Allow = 0,
196
+ Deny = 1,
197
+ Admin = 2,
198
+ SuperAdmin = 3,
199
+ DoesNotExist = 4,
200
+ Other = 5,
201
+ }
202
+ export enum PermissionUpdateType {
203
+ AddMember = 0,
204
+ RemoveMember = 1,
205
+ AddAdmin = 2,
206
+ RemoveAdmin = 3,
207
+ UpdateMetadata = 4,
208
+ }
209
+ export enum ReactionAction {
210
+ Unknown = 0,
211
+ Added = 1,
212
+ Removed = 2,
213
+ }
214
+ export enum ReactionSchema {
215
+ Unknown = 0,
216
+ Unicode = 1,
217
+ Shortcode = 2,
218
+ Custom = 3,
219
+ }
220
+ export enum SortDirection {
221
+ Ascending = 0,
222
+ Descending = 1,
223
+ }
47
224
  /**
48
225
  * The `ReadableStreamType` enum.
49
226
  *
50
227
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
51
228
  */
52
229
  type ReadableStreamType = "bytes";
53
- export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
230
+ export interface KeyPackageStatus {
231
+ lifetime?: Lifetime;
232
+ validationError?: string;
233
+ }
54
234
 
55
- export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
235
+ export interface Lifetime {
236
+ notBefore: bigint;
237
+ notAfter: bigint;
238
+ }
56
239
 
57
- export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
240
+ export interface InboxState {
241
+ inboxId: string;
242
+ recoveryIdentifier: Identifier;
243
+ installations: Installation[];
244
+ accountIdentifiers: Identifier[];
245
+ }
58
246
 
59
- export interface GroupPermissions {
60
- policyType: GroupPermissionsOptions;
61
- policySet: PermissionPolicySet;
247
+ export interface Installation {
248
+ bytes: Uint8Array;
249
+ id: string;
250
+ clientTimestampNs?: bigint;
62
251
  }
63
252
 
64
253
  export interface PermissionPolicySet {
@@ -70,35 +259,141 @@ export interface PermissionPolicySet {
70
259
  updateGroupDescriptionPolicy: PermissionPolicy;
71
260
  updateGroupImageUrlSquarePolicy: PermissionPolicy;
72
261
  updateMessageDisappearingPolicy: PermissionPolicy;
262
+ updateAppDataPolicy: PermissionPolicy;
73
263
  }
74
264
 
75
- export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
265
+ export interface GroupPermissions {
266
+ policyType: GroupPermissionsOptions;
267
+ policySet: PermissionPolicySet;
268
+ }
76
269
 
77
- export type ContentType = "unknown" | "text" | "markdown" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
270
+ export interface GroupMetadata {
271
+ creatorInboxId: string;
272
+ conversationType: ConversationType;
273
+ }
78
274
 
79
- export interface IdentityStats {
80
- publishIdentityUpdate: bigint;
81
- getIdentityUpdatesV2: bigint;
82
- getInboxIds: bigint;
83
- verifySmartContractWalletSignature: bigint;
275
+ export interface GroupMember {
276
+ inboxId: string;
277
+ accountIdentifiers: Identifier[];
278
+ installationIds: string[];
279
+ permissionLevel: PermissionLevel;
280
+ consentState: ConsentState;
84
281
  }
85
282
 
86
- export interface Identifier {
87
- identifier: string;
88
- identifierKind: IdentifierKind;
283
+ export interface SendMessageOpts {
284
+ shouldPush: boolean;
285
+ optimistic?: boolean;
89
286
  }
90
287
 
91
- export type IdentifierKind = "Ethereum" | "Passkey";
288
+ export interface Consent {
289
+ entityType: ConsentEntityType;
290
+ state: ConsentState;
291
+ entity: string;
292
+ }
92
293
 
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;
294
+ export interface LeaveRequest {
295
+ authenticatedNote?: Uint8Array;
296
+ }
297
+
298
+ export interface ListConversationsOptions {
299
+ consentStates?: ConsentState[];
300
+ conversationType?: ConversationType;
301
+ createdAfterNs?: bigint;
302
+ createdBeforeNs?: bigint;
303
+ includeDuplicateDms?: boolean;
304
+ orderBy?: ListConversationsOrderBy;
305
+ limit?: bigint;
306
+ }
307
+
308
+ export interface HmacKey {
309
+ key: Uint8Array;
310
+ epoch: bigint;
311
+ }
312
+
313
+ export interface Cursor {
314
+ originatorId: number;
315
+ sequenceId: bigint;
316
+ }
317
+
318
+ export interface CreateDmOptions {
319
+ messageDisappearingSettings?: MessageDisappearingSettings;
320
+ }
321
+
322
+ export interface CreateGroupOptions {
323
+ permissions?: GroupPermissionsOptions;
324
+ groupName?: string;
325
+ groupImageUrlSquare?: string;
326
+ groupDescription?: string;
327
+ customPermissionPolicySet?: PermissionPolicySet;
328
+ messageDisappearingSettings?: MessageDisappearingSettings;
329
+ appData?: string;
330
+ }
331
+
332
+ export interface MessageDisappearingSettings {
333
+ fromNs: bigint;
334
+ inNs: bigint;
335
+ }
336
+
337
+ export interface ConversationDebugInfo {
338
+ epoch: bigint;
339
+ maybeForked: boolean;
340
+ forkDetails: string;
341
+ isCommitLogForked?: boolean;
342
+ localCommitLog: string;
343
+ remoteCommitLog: string;
344
+ cursor: Cursor[];
345
+ }
346
+
347
+ export interface DecodedMessage {
348
+ id: string;
349
+ sentAtNs: bigint;
350
+ kind: GroupMessageKind;
351
+ senderInstallationId: string;
352
+ senderInboxId: string;
353
+ contentType: ContentTypeId;
354
+ conversationId: string;
355
+ content: DecodedMessageContent;
356
+ fallback?: string;
357
+ reactions: DecodedMessage[];
358
+ deliveryStatus: DeliveryStatus;
359
+ numReplies: bigint;
360
+ expiresAtNs: bigint | undefined;
361
+ }
362
+
363
+ export interface Credential {
364
+ name?: string;
365
+ value: string;
366
+ expiresAtSeconds: bigint;
367
+ }
368
+
369
+ export interface MessageWithReactions {
370
+ message: Message;
371
+ reactions: Message[];
372
+ }
373
+
374
+ export interface Message {
375
+ id: string;
376
+ sentAtNs: bigint;
377
+ convoId: string;
378
+ senderInboxId: string;
379
+ content: EncodedContent;
380
+ kind: GroupMessageKind;
381
+ deliveryStatus: DeliveryStatus;
382
+ }
383
+
384
+ export interface ListMessagesOptions {
385
+ contentTypes?: ContentType[];
386
+ excludeContentTypes?: ContentType[];
387
+ sentBeforeNs?: bigint;
388
+ sentAfterNs?: bigint;
389
+ limit?: bigint;
390
+ deliveryStatus?: DeliveryStatus;
391
+ direction?: SortDirection;
392
+ kind?: GroupMessageKind;
393
+ excludeSenderInboxIds?: string[];
394
+ sortBy?: MessageSortBy;
395
+ insertedAfterNs?: bigint;
396
+ insertedBeforeNs?: bigint;
102
397
  }
103
398
 
104
399
  export interface PasskeySignature {
@@ -116,12 +411,6 @@ export interface Attachment {
116
411
 
117
412
  export type ReadReceipt = Record<string, never>;
118
413
 
119
- export interface MetadataFieldChange {
120
- fieldName: string;
121
- oldValue?: string;
122
- newValue?: string;
123
- }
124
-
125
414
  export interface GroupUpdated {
126
415
  initiatedByInboxId: string;
127
416
  addedInboxes: Inbox[];
@@ -138,8 +427,10 @@ export interface Inbox {
138
427
  inboxId: string;
139
428
  }
140
429
 
141
- export interface LeaveRequest {
142
- authenticatedNote?: Uint8Array;
430
+ export interface MetadataFieldChange {
431
+ fieldName: string;
432
+ oldValue?: string;
433
+ newValue?: string;
143
434
  }
144
435
 
145
436
  /**
@@ -203,13 +494,6 @@ export interface WalletCall {
203
494
  metadata?: Record<string, string>;
204
495
  }
205
496
 
206
- export interface TransactionReference {
207
- namespace?: string;
208
- networkId: string;
209
- reference: string;
210
- metadata?: TransactionMetadata;
211
- }
212
-
213
497
  export interface TransactionMetadata {
214
498
  transactionType: string;
215
499
  currency: string;
@@ -219,7 +503,14 @@ export interface TransactionMetadata {
219
503
  toAddress: string;
220
504
  }
221
505
 
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 };
506
+ export interface TransactionReference {
507
+ namespace?: string;
508
+ networkId: string;
509
+ reference: string;
510
+ metadata?: TransactionMetadata;
511
+ }
512
+
513
+ export type DecodedMessageContent = { type: "actions"; content: Actions | undefined } | { type: "attachment"; content: Attachment } | { type: "custom"; content: EncodedContent } | { type: "groupUpdated"; content: GroupUpdated } | { type: "intent"; content: Intent | undefined } | { type: "leaveRequest"; content: LeaveRequest } | { type: "markdown"; content: string } | { type: "multiRemoteAttachment"; content: MultiRemoteAttachment } | { type: "reaction"; content: Reaction } | { type: "readReceipt"; content: ReadReceipt } | { type: "remoteAttachment"; content: RemoteAttachment } | { type: "reply"; content: EnrichedReply } | { type: "text"; content: string } | { type: "transactionReference"; content: TransactionReference } | { type: "walletSendCalls"; content: WalletSendCalls };
223
514
 
224
515
  export interface RemoteAttachmentInfo {
225
516
  secret: Uint8Array;
@@ -236,10 +527,6 @@ export interface MultiRemoteAttachment {
236
527
  attachments: RemoteAttachmentInfo[];
237
528
  }
238
529
 
239
- export interface TextContent {
240
- content: string;
241
- }
242
-
243
530
  export interface EnrichedReply {
244
531
  referenceId: string;
245
532
  content: DecodedMessageContent;
@@ -265,8 +552,6 @@ export interface Actions {
265
552
  expiresAtNs?: bigint;
266
553
  }
267
554
 
268
- export type ActionStyle = "primary" | "secondary" | "danger";
269
-
270
555
  export interface Action {
271
556
  id: string;
272
557
  label: string;
@@ -275,234 +560,75 @@ export interface Action {
275
560
  expiresAtNs?: bigint;
276
561
  }
277
562
 
278
- export interface MarkdownContent {
279
- content: string;
280
- }
281
-
282
- export type ReactionSchema = "unknown" | "unicode" | "shortcode" | "custom";
283
-
284
- export interface Reaction {
285
- reference: string;
286
- referenceInboxId: string;
287
- action: ReactionAction;
288
- content: string;
289
- schema: ReactionSchema;
290
- }
291
-
292
- export type ReactionAction = "unknown" | "added" | "removed";
293
-
294
- export interface EncodedContent {
295
- type?: ContentTypeId;
296
- parameters?: Record<string, string>;
297
- fallback?: string;
298
- compression?: number;
299
- content: Uint8Array;
300
- }
301
-
302
- export interface ContentTypeId {
303
- authorityId: string;
304
- typeId: string;
305
- versionMajor: number;
306
- versionMinor: number;
307
- }
308
-
309
- export interface DecodedMessage {
310
- id: string;
311
- sentAtNs: bigint;
312
- kind: GroupMessageKind;
313
- senderInstallationId: string;
314
- senderInboxId: string;
315
- contentType: ContentTypeId;
316
- conversationId: string;
317
- content: DecodedMessageContent;
318
- fallback?: string;
319
- reactions: DecodedMessage[];
320
- deliveryStatus: DeliveryStatus;
321
- numReplies: bigint;
322
- expiresAtNs: bigint | undefined;
323
- }
324
-
325
- export interface Credential {
326
- name?: string;
327
- value: string;
328
- expiresAtSeconds: bigint;
329
- }
330
-
331
- export type DeviceSyncWorkerMode = "enabled" | "disabled";
332
-
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
- /**
343
- * Specify options for the logger
344
- */
345
- export interface LogOptions {
346
- /**
347
- * enable structured JSON logging to stdout. Useful for third-party log viewers
348
- */
349
- structured?: boolean;
350
- /**
351
- * enable performance metrics for libxmtp in the `performance` tab
352
- */
353
- performance?: boolean;
354
- /**
355
- * filter for logs
356
- */
357
- level?: LogLevel;
358
- }
359
-
360
- export type MessageSortBy = "sentAt" | "insertedAt";
361
-
362
- export type DeliveryStatus = "unpublished" | "published" | "failed";
363
-
364
- export type GroupMessageKind = "application" | "membershipchange";
365
-
366
- export type SortDirection = "ascending" | "descending";
367
-
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;
376
- }
377
-
378
- export interface MessageWithReactions {
379
- message: Message;
380
- reactions: Message[];
381
- }
382
-
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;
396
- }
397
-
398
- export interface Lifetime {
399
- notBefore: bigint;
400
- notAfter: bigint;
401
- }
402
-
403
- export interface Installation {
404
- bytes: Uint8Array;
405
- id: string;
406
- clientTimestampNs?: bigint;
407
- }
408
-
409
- export interface InboxState {
410
- inboxId: string;
411
- recoveryIdentifier: Identifier;
412
- installations: Installation[];
413
- accountIdentifiers: Identifier[];
414
- }
415
-
416
- export interface KeyPackageStatus {
417
- lifetime?: Lifetime;
418
- validationError?: string;
419
- }
420
-
421
- export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
422
-
423
- export interface GroupMember {
424
- inboxId: string;
425
- accountIdentifiers: Identifier[];
426
- installationIds: string[];
427
- permissionLevel: PermissionLevel;
428
- consentState: ConsentState;
429
- }
430
-
431
- export interface GroupMetadata {
432
- creatorInboxId: string;
433
- conversationType: string;
434
- }
435
-
436
- export type PermissionLevel = "member" | "admin" | "superAdmin";
437
-
438
- export interface SendMessageOpts {
439
- shouldPush: boolean;
440
- optimistic?: boolean;
563
+ export interface Reaction {
564
+ reference: string;
565
+ referenceInboxId: string;
566
+ action: ReactionAction;
567
+ content: string;
568
+ schema: ReactionSchema;
441
569
  }
442
570
 
443
- export type ConsentState = "unknown" | "allowed" | "denied";
444
-
445
- export interface Consent {
446
- entityType: ConsentEntityType;
447
- state: ConsentState;
448
- entity: string;
571
+ export interface EncodedContent {
572
+ type?: ContentTypeId;
573
+ parameters: Record<string, string>;
574
+ fallback?: string;
575
+ compression?: number;
576
+ content: Uint8Array;
449
577
  }
450
578
 
451
- export type ConsentEntityType = "groupId" | "inboxId";
452
-
453
- export interface CreateDMOptions {
454
- messageDisappearingSettings?: MessageDisappearingSettings;
579
+ export interface ContentTypeId {
580
+ authorityId: string;
581
+ typeId: string;
582
+ versionMajor: number;
583
+ versionMinor: number;
455
584
  }
456
585
 
457
- export type ListConversationsOrderBy = "createdAt" | "lastActivity";
458
-
459
- export interface ListConversationsOptions {
460
- consentStates?: ConsentState[];
461
- conversationType?: ConversationType;
462
- createdAfterNs?: bigint;
463
- createdBeforeNs?: bigint;
464
- includeDuplicateDms?: boolean;
465
- orderBy?: ListConversationsOrderBy;
466
- limit?: bigint;
467
- }
586
+ export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
468
587
 
469
- export interface HmacKey {
470
- key: Uint8Array;
471
- epoch: bigint;
588
+ export interface GroupSyncSummary {
589
+ numEligible: number;
590
+ numSynced: number;
472
591
  }
473
592
 
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;
593
+ /**
594
+ * Specify options for the logger
595
+ */
596
+ export interface LogOptions {
597
+ /**
598
+ * enable structured JSON logging to stdout. Useful for third-party log viewers
599
+ */
600
+ structured?: boolean;
601
+ /**
602
+ * enable performance metrics for libxmtp in the `performance` tab
603
+ */
604
+ performance?: boolean;
605
+ /**
606
+ * filter for logs
607
+ */
608
+ level?: LogLevel;
482
609
  }
483
610
 
484
- export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
485
-
486
- export type ConversationType = "dm" | "group" | "sync" | "oneshot";
487
-
488
- export interface ConversationDebugInfo {
489
- epoch: bigint;
490
- maybeForked: boolean;
491
- forkDetails: string;
492
- isCommitLogForked?: boolean;
493
- localCommitLog: string;
494
- remoteCommitLog: string;
495
- cursor: Cursor[];
611
+ export interface ApiStats {
612
+ uploadKeyPackage: bigint;
613
+ fetchKeyPackage: bigint;
614
+ sendGroupMessages: bigint;
615
+ sendWelcomeMessages: bigint;
616
+ queryGroupMessages: bigint;
617
+ queryWelcomeMessages: bigint;
618
+ subscribeMessages: bigint;
619
+ subscribeWelcomes: bigint;
496
620
  }
497
621
 
498
- export interface Cursor {
499
- originatorId: number;
500
- sequenceId: bigint;
622
+ export interface IdentityStats {
623
+ publishIdentityUpdate: bigint;
624
+ getIdentityUpdatesV2: bigint;
625
+ getInboxIds: bigint;
626
+ verifySmartContractWalletSignature: bigint;
501
627
  }
502
628
 
503
- export interface MessageDisappearingSettings {
504
- fromNs: bigint;
505
- inNs: bigint;
629
+ export interface Identifier {
630
+ identifier: string;
631
+ identifierKind: IdentifierKind;
506
632
  }
507
633
 
508
634
  export class AuthHandle {
@@ -516,6 +642,26 @@ export class Client {
516
642
  private constructor();
517
643
  free(): void;
518
644
  [Symbol.dispose](): void;
645
+ /**
646
+ *
647
+ * * Get the client's inbox state.
648
+ * *
649
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
650
+ * * Otherwise, the state will be read from the local database.
651
+ *
652
+ */
653
+ inboxState(refreshFromNetwork: boolean): Promise<InboxState>;
654
+ getLatestInboxState(inboxId: string): Promise<InboxState>;
655
+ /**
656
+ *
657
+ * * Get key package statuses for a list of installation IDs.
658
+ * *
659
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
660
+ *
661
+ */
662
+ getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
663
+ getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
664
+ setConsentStates(records: Consent[]): Promise<void>;
519
665
  registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
520
666
  applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
521
667
  signWithInstallationKey(signatureText: string): Uint8Array;
@@ -539,26 +685,6 @@ export class Client {
539
685
  apiAggregateStatistics(): string;
540
686
  inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
541
687
  findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
542
- /**
543
- *
544
- * * Get the client's inbox state.
545
- * *
546
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
547
- * * Otherwise, the state will be read from the local database.
548
- *
549
- */
550
- inboxState(refreshFromNetwork: boolean): Promise<InboxState>;
551
- getLatestInboxState(inboxId: string): Promise<InboxState>;
552
- /**
553
- *
554
- * * Get key package statuses for a list of installation IDs.
555
- * *
556
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
557
- *
558
- */
559
- getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
560
- getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
561
- setConsentStates(records: Consent[]): Promise<void>;
562
688
  readonly appVersion: string;
563
689
  readonly isRegistered: boolean;
564
690
  readonly installationId: string;
@@ -660,12 +786,12 @@ export class Conversations {
660
786
  getHmacKeys(): any;
661
787
  streamConsent(callback: any): StreamCloser;
662
788
  findGroupById(groupId: string): Conversation;
663
- createDm(accountIdentifier: Identifier, options?: CreateDMOptions | null): Promise<Conversation>;
789
+ createDm(accountIdentifier: Identifier, options?: CreateDmOptions | null): Promise<Conversation>;
664
790
  findMessageById(messageId: string): Message;
665
791
  streamPreferences(callback: any): StreamCloser;
666
- streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: ConsentState[] | null): StreamCloser;
792
+ streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: any[] | null): StreamCloser;
667
793
  deleteMessageById(messageId: string): number;
668
- syncAllConversations(consentStates?: ConsentState[] | null): Promise<GroupSyncSummary>;
794
+ syncAllConversations(consentStates?: any[] | null): Promise<GroupSyncSummary>;
669
795
  createGroupOptimistic(options?: CreateGroupOptions | null): Conversation;
670
796
  streamMessageDeletions(callback: any): StreamCloser;
671
797
  createGroupByInboxIds(inboxIds: string[], options?: CreateGroupOptions | null): Promise<Conversation>;
@@ -675,7 +801,7 @@ export class Conversations {
675
801
  */
676
802
  streamLocal(conversationType?: ConversationType | null): Promise<ReadableStream>;
677
803
  findEnrichedMessageById(messageId: string): Promise<DecodedMessage>;
678
- createDmByInboxId(inboxId: string, options?: CreateDMOptions | null): Promise<Conversation>;
804
+ createDmByInboxId(inboxId: string, options?: CreateDmOptions | null): Promise<Conversation>;
679
805
  list(opts?: ListConversationsOptions | null): Array<any>;
680
806
  sync(): Promise<void>;
681
807
  stream(callback: any, conversationType?: ConversationType | null): StreamCloser;
@@ -741,79 +867,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
741
867
  export interface InitOutput {
742
868
  readonly memory: WebAssembly.Memory;
743
869
  readonly __wbg_authhandle_free: (a: number, b: number) => void;
744
- readonly __wbg_client_free: (a: number, b: number) => void;
745
- readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
746
- readonly actionsContentType: () => any;
747
- readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
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;
752
- readonly client_accountIdentifier: (a: number) => any;
753
- readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
754
- readonly client_apiAggregateStatistics: (a: number) => [number, number];
755
- readonly client_apiIdentityStatistics: (a: number) => any;
756
- readonly client_apiStatistics: (a: number) => any;
757
- readonly client_appVersion: (a: number) => [number, number];
758
- readonly client_applySignatureRequest: (a: number, b: number) => any;
759
- readonly client_canMessage: (a: number, b: number, c: number) => any;
760
- readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
761
- readonly client_clearAllStatistics: (a: number) => void;
762
- readonly client_conversations: (a: number) => number;
763
- readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
764
- readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
765
- readonly client_inboxId: (a: number) => [number, number];
766
- readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
767
- readonly client_installationId: (a: number) => [number, number];
768
- readonly client_installationIdBytes: (a: number) => any;
769
- readonly client_isRegistered: (a: number) => number;
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;
775
- readonly client_sendSyncRequest: (a: number) => any;
776
- readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
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
870
  readonly __wbg_conversation_free: (a: number, b: number) => void;
818
871
  readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
819
872
  readonly __wbg_conversations_free: (a: number, b: number) => void;
@@ -824,8 +877,15 @@ export interface InitOutput {
824
877
  readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
825
878
  readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
826
879
  readonly __wbg_streamcloser_free: (a: number, b: number) => void;
827
- readonly client_getConsentState: (a: number, b: any, c: number, d: number) => any;
880
+ readonly authhandle_id: (a: number) => number;
881
+ readonly authhandle_new: () => number;
882
+ readonly authhandle_set: (a: number, b: any) => any;
883
+ readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
884
+ readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
885
+ readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
886
+ readonly client_inboxState: (a: number, b: number) => any;
828
887
  readonly client_setConsentStates: (a: number, b: number, c: number) => any;
888
+ readonly contentTypeLeaveRequest: () => any;
829
889
  readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
830
890
  readonly conversation_addMembers: (a: number, b: number, c: number) => any;
831
891
  readonly conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
@@ -884,12 +944,12 @@ export interface InitOutput {
884
944
  readonly conversation_superAdminList: (a: number) => [number, number, number, number];
885
945
  readonly conversation_sync: (a: number) => any;
886
946
  readonly conversation_updateAppData: (a: number, b: number, c: number) => any;
887
- readonly conversation_updateConsentState: (a: number, b: any) => [number, number];
947
+ readonly conversation_updateConsentState: (a: number, b: number) => [number, number];
888
948
  readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
889
949
  readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
890
950
  readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
891
951
  readonly conversation_updateMessageDisappearingSettings: (a: number, b: any) => any;
892
- readonly conversation_updatePermissionPolicy: (a: number, b: any, c: any, d: number) => any;
952
+ readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
893
953
  readonly conversationlistitem_new: (a: number, b: number, c: number) => number;
894
954
  readonly conversations_createDm: (a: number, b: any, c: number) => any;
895
955
  readonly conversations_createDmByInboxId: (a: number, b: number, c: number, d: number) => any;
@@ -911,10 +971,86 @@ export interface InitOutput {
911
971
  readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
912
972
  readonly conversations_sync: (a: number) => any;
913
973
  readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
974
+ readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
975
+ readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
976
+ readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
977
+ readonly metadataFieldName: (a: number) => [number, number];
914
978
  readonly streamcloser_end: (a: number) => void;
915
979
  readonly streamcloser_endAndWait: (a: number) => any;
916
980
  readonly streamcloser_isClosed: (a: number) => number;
917
981
  readonly streamcloser_waitForReady: (a: number) => any;
982
+ readonly __wbg_client_free: (a: number, b: number) => void;
983
+ readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
984
+ readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
985
+ readonly client_accountIdentifier: (a: number) => any;
986
+ readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
987
+ readonly client_apiAggregateStatistics: (a: number) => [number, number];
988
+ readonly client_apiIdentityStatistics: (a: number) => any;
989
+ readonly client_apiStatistics: (a: number) => any;
990
+ readonly client_appVersion: (a: number) => [number, number];
991
+ readonly client_applySignatureRequest: (a: number, b: number) => any;
992
+ readonly client_canMessage: (a: number, b: number, c: number) => any;
993
+ readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
994
+ readonly client_clearAllStatistics: (a: number) => void;
995
+ readonly client_conversations: (a: number) => number;
996
+ readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
997
+ readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
998
+ readonly client_inboxId: (a: number) => [number, number];
999
+ readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
1000
+ readonly client_installationId: (a: number) => [number, number];
1001
+ readonly client_installationIdBytes: (a: number) => any;
1002
+ readonly client_isRegistered: (a: number) => number;
1003
+ readonly client_libxmtpVersion: (a: number) => [number, number];
1004
+ readonly client_registerIdentity: (a: number, b: number) => any;
1005
+ readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
1006
+ readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
1007
+ readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
1008
+ readonly client_sendSyncRequest: (a: number) => any;
1009
+ readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
1010
+ readonly client_syncPreferences: (a: number) => any;
1011
+ readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
1012
+ readonly contentTypeActions: () => any;
1013
+ readonly contentTypeAttachment: () => any;
1014
+ readonly contentTypeGroupUpdated: () => any;
1015
+ readonly contentTypeIntent: () => any;
1016
+ readonly contentTypeMarkdown: () => any;
1017
+ readonly contentTypeMultiRemoteAttachment: () => any;
1018
+ readonly contentTypeReaction: () => any;
1019
+ readonly contentTypeReadReceipt: () => any;
1020
+ readonly contentTypeRemoteAttachment: () => any;
1021
+ readonly contentTypeReply: () => any;
1022
+ readonly contentTypeText: () => any;
1023
+ readonly contentTypeTransactionReference: () => any;
1024
+ readonly contentTypeWalletSendCalls: () => any;
1025
+ 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;
1026
+ readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
1027
+ readonly encodeActions: (a: any) => [number, number, number];
1028
+ readonly encodeAttachment: (a: any) => [number, number, number];
1029
+ readonly encodeIntent: (a: any) => [number, number, number];
1030
+ readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
1031
+ readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
1032
+ readonly encodeReaction: (a: any) => [number, number, number];
1033
+ readonly encodeReadReceipt: (a: any) => [number, number, number];
1034
+ readonly encodeRemoteAttachment: (a: any) => [number, number, number];
1035
+ readonly encodeText: (a: number, b: number) => [number, number, number];
1036
+ readonly encodeTransactionReference: (a: any) => [number, number, number];
1037
+ readonly encodeWalletSendCalls: (a: any) => [number, number, number];
1038
+ readonly encryptAttachment: (a: any) => [number, number, number];
1039
+ readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1040
+ readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
1041
+ readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
1042
+ readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
1043
+ readonly signaturerequesthandle_signatureText: (a: number) => any;
1044
+ readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
1045
+ readonly opfsClearAll: () => any;
1046
+ readonly opfsDeleteFile: (a: number, b: number) => any;
1047
+ readonly opfsExportDb: (a: number, b: number) => any;
1048
+ readonly opfsFileCount: () => any;
1049
+ readonly opfsFileExists: (a: number, b: number) => any;
1050
+ readonly opfsImportDb: (a: number, b: number, c: any) => any;
1051
+ readonly opfsInit: () => any;
1052
+ readonly opfsListFiles: () => any;
1053
+ readonly opfsPoolCapacity: () => any;
918
1054
  readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
919
1055
  readonly rust_zstd_wasm_shim_free: (a: number) => void;
920
1056
  readonly rust_zstd_wasm_shim_malloc: (a: number) => number;