@xmtp/wasm-bindings 1.9.1 → 1.10.0-dev.680d192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings_wasm.d.ts +1097 -935
- package/dist/bindings_wasm.js +3296 -3167
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +78 -67
- package/package.json +5 -5
package/dist/bindings_wasm.d.ts
CHANGED
|
@@ -1,296 +1,172 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function contentTypeReadReceipt(): ContentTypeId;
|
|
4
|
-
export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
|
|
5
|
-
export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
|
|
6
|
-
export function contentTypeTransactionReference(): ContentTypeId;
|
|
7
|
-
export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
|
|
8
|
-
export function contentTypeMultiRemoteAttachment(): ContentTypeId;
|
|
9
|
-
export function contentTypeReply(): ContentTypeId;
|
|
10
|
-
export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
|
|
11
|
-
export function metadataFieldName(field: MetadataField): string;
|
|
12
|
-
/**
|
|
13
|
-
* Initialize the OPFS SQLite VFS if not already initialized.
|
|
14
|
-
* This must be called before using other OPFS functions.
|
|
15
|
-
*/
|
|
16
|
-
export function opfsInit(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* List all database files stored in OPFS.
|
|
19
|
-
* Returns an array of file names.
|
|
20
|
-
*/
|
|
21
|
-
export function opfsListFiles(): Promise<string[]>;
|
|
22
|
-
/**
|
|
23
|
-
* Export a database file from OPFS as a byte array.
|
|
24
|
-
* This can be used to backup or transfer a database.
|
|
25
|
-
* Note: The database should be closed before exporting for consistency.
|
|
26
|
-
*/
|
|
27
|
-
export function opfsExportDb(filename: string): Promise<Uint8Array>;
|
|
28
|
-
/**
|
|
29
|
-
* Get the current capacity of the OPFS file pool.
|
|
30
|
-
*/
|
|
31
|
-
export function opfsPoolCapacity(): Promise<number>;
|
|
32
|
-
/**
|
|
33
|
-
* Get the number of database files stored in OPFS.
|
|
34
|
-
*/
|
|
35
|
-
export function opfsFileCount(): Promise<number>;
|
|
36
3
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* Note: Any existing database with the same name must be closed before importing.
|
|
4
|
+
* The `ReadableStreamType` enum.
|
|
5
|
+
*
|
|
6
|
+
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
41
7
|
*/
|
|
42
|
-
|
|
8
|
+
|
|
9
|
+
type ReadableStreamType = "bytes";
|
|
43
10
|
/**
|
|
44
|
-
*
|
|
45
|
-
* Note: All databases must be closed before calling this function.
|
|
11
|
+
* An available archive in the sync group
|
|
46
12
|
*/
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
13
|
+
export interface AvailableArchiveInfo {
|
|
14
|
+
pin: string;
|
|
15
|
+
metadata: ArchiveMetadata;
|
|
16
|
+
sentByInstallation: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
|
|
52
19
|
/**
|
|
53
|
-
*
|
|
54
|
-
* Returns true if the file was deleted, false if it didn't exist.
|
|
55
|
-
* Note: The database must be closed before calling this function.
|
|
20
|
+
* Metadata about a backup archive
|
|
56
21
|
*/
|
|
57
|
-
export
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
|
|
66
|
-
export function contentTypeRemoteAttachment(): ContentTypeId;
|
|
22
|
+
export interface ArchiveMetadata {
|
|
23
|
+
backupVersion: number;
|
|
24
|
+
elements: BackupElementSelectionOption[];
|
|
25
|
+
exportedAtNs: bigint;
|
|
26
|
+
startNs?: bigint;
|
|
27
|
+
endNs?: bigint;
|
|
28
|
+
}
|
|
29
|
+
|
|
67
30
|
/**
|
|
68
|
-
*
|
|
31
|
+
* Options for creating or sending an archive
|
|
69
32
|
*/
|
|
70
|
-
export
|
|
33
|
+
export interface ArchiveOptions {
|
|
34
|
+
startNs?: bigint;
|
|
35
|
+
endNs?: bigint;
|
|
36
|
+
elements: BackupElementSelectionOption[];
|
|
37
|
+
excludeDisappearingMessages: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
71
40
|
/**
|
|
72
|
-
*
|
|
41
|
+
* Result of encrypting an attachment for remote storage.
|
|
73
42
|
*/
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
43
|
+
export interface EncryptedAttachment {
|
|
44
|
+
/**
|
|
45
|
+
* The encrypted bytes to upload to the remote server
|
|
46
|
+
*/
|
|
47
|
+
payload: Uint8Array;
|
|
48
|
+
/**
|
|
49
|
+
* SHA-256 digest of the encrypted bytes (hex-encoded)
|
|
50
|
+
*/
|
|
51
|
+
contentDigest: string;
|
|
52
|
+
/**
|
|
53
|
+
* The 32-byte secret key needed for decryption
|
|
54
|
+
*/
|
|
55
|
+
secret: Uint8Array;
|
|
56
|
+
/**
|
|
57
|
+
* The 32-byte salt used in key derivation
|
|
58
|
+
*/
|
|
59
|
+
salt: Uint8Array;
|
|
60
|
+
/**
|
|
61
|
+
* The 12-byte nonce used in encryption
|
|
62
|
+
*/
|
|
63
|
+
nonce: Uint8Array;
|
|
64
|
+
/**
|
|
65
|
+
* The length of the encrypted content
|
|
66
|
+
*/
|
|
67
|
+
contentLength: number;
|
|
68
|
+
/**
|
|
69
|
+
* The filename of the attachment
|
|
70
|
+
*/
|
|
71
|
+
filename?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
90
74
|
/**
|
|
91
|
-
*
|
|
75
|
+
* Specify options for the logger
|
|
92
76
|
*/
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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 DeletedBy {
|
|
137
|
-
Sender = 0,
|
|
138
|
-
Admin = 1,
|
|
139
|
-
}
|
|
140
|
-
export enum DeliveryStatus {
|
|
141
|
-
Unpublished = 0,
|
|
142
|
-
Published = 1,
|
|
143
|
-
Failed = 2,
|
|
144
|
-
}
|
|
145
|
-
export enum DeviceSyncWorkerMode {
|
|
146
|
-
Enabled = 0,
|
|
147
|
-
Disabled = 1,
|
|
148
|
-
}
|
|
149
|
-
export enum GroupMembershipState {
|
|
150
|
-
Allowed = 0,
|
|
151
|
-
Rejected = 1,
|
|
152
|
-
Pending = 2,
|
|
153
|
-
Restored = 3,
|
|
154
|
-
PendingRemove = 4,
|
|
155
|
-
}
|
|
156
|
-
export enum GroupMessageKind {
|
|
157
|
-
Application = 0,
|
|
158
|
-
MembershipChange = 1,
|
|
159
|
-
}
|
|
160
|
-
export enum GroupPermissionsOptions {
|
|
161
|
-
Default = 0,
|
|
162
|
-
AdminOnly = 1,
|
|
163
|
-
CustomPolicy = 2,
|
|
164
|
-
}
|
|
165
|
-
export enum IdentifierKind {
|
|
166
|
-
Ethereum = 0,
|
|
167
|
-
Passkey = 1,
|
|
168
|
-
}
|
|
169
|
-
export enum ListConversationsOrderBy {
|
|
170
|
-
CreatedAt = 0,
|
|
171
|
-
LastActivity = 1,
|
|
172
|
-
}
|
|
173
|
-
export enum LogLevel {
|
|
174
|
-
Off = 0,
|
|
175
|
-
Error = 1,
|
|
176
|
-
Warn = 2,
|
|
177
|
-
Info = 3,
|
|
178
|
-
Debug = 4,
|
|
179
|
-
Trace = 5,
|
|
180
|
-
}
|
|
181
|
-
export enum MessageSortBy {
|
|
182
|
-
SentAt = 0,
|
|
183
|
-
InsertedAt = 1,
|
|
184
|
-
}
|
|
185
|
-
export enum MetadataField {
|
|
186
|
-
AppData = 0,
|
|
187
|
-
Description = 1,
|
|
188
|
-
GroupName = 2,
|
|
189
|
-
GroupImageUrlSquare = 3,
|
|
190
|
-
MessageExpirationFromNs = 4,
|
|
191
|
-
MessageExpirationInNs = 5,
|
|
192
|
-
}
|
|
193
|
-
export enum PermissionLevel {
|
|
194
|
-
Member = 0,
|
|
195
|
-
Admin = 1,
|
|
196
|
-
SuperAdmin = 2,
|
|
197
|
-
}
|
|
198
|
-
export enum PermissionPolicy {
|
|
199
|
-
Allow = 0,
|
|
200
|
-
Deny = 1,
|
|
201
|
-
Admin = 2,
|
|
202
|
-
SuperAdmin = 3,
|
|
203
|
-
DoesNotExist = 4,
|
|
204
|
-
Other = 5,
|
|
205
|
-
}
|
|
206
|
-
export enum PermissionUpdateType {
|
|
207
|
-
AddMember = 0,
|
|
208
|
-
RemoveMember = 1,
|
|
209
|
-
AddAdmin = 2,
|
|
210
|
-
RemoveAdmin = 3,
|
|
211
|
-
UpdateMetadata = 4,
|
|
212
|
-
}
|
|
213
|
-
export enum ReactionAction {
|
|
214
|
-
Unknown = 0,
|
|
215
|
-
Added = 1,
|
|
216
|
-
Removed = 2,
|
|
77
|
+
export interface LogOptions {
|
|
78
|
+
/**
|
|
79
|
+
* enable structured JSON logging to stdout. Useful for third-party log viewers
|
|
80
|
+
*/
|
|
81
|
+
structured?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* enable performance metrics for libxmtp in the `performance` tab
|
|
84
|
+
*/
|
|
85
|
+
performance?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* filter for logs
|
|
88
|
+
*/
|
|
89
|
+
level?: LogLevel;
|
|
217
90
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
91
|
+
|
|
92
|
+
export interface Action {
|
|
93
|
+
id: string;
|
|
94
|
+
label: string;
|
|
95
|
+
imageUrl?: string;
|
|
96
|
+
style?: ActionStyle;
|
|
97
|
+
expiresAtNs?: bigint;
|
|
223
98
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
99
|
+
|
|
100
|
+
export interface Actions {
|
|
101
|
+
id: string;
|
|
102
|
+
description: string;
|
|
103
|
+
actions: Action[];
|
|
104
|
+
expiresAtNs?: bigint;
|
|
227
105
|
}
|
|
228
|
-
/**
|
|
229
|
-
* The `ReadableStreamType` enum.
|
|
230
|
-
*
|
|
231
|
-
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
232
|
-
*/
|
|
233
|
-
type ReadableStreamType = "bytes";
|
|
234
|
-
export type ReadReceipt = Record<string, never>;
|
|
235
106
|
|
|
236
|
-
export interface
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
107
|
+
export interface ApiStats {
|
|
108
|
+
uploadKeyPackage: bigint;
|
|
109
|
+
fetchKeyPackage: bigint;
|
|
110
|
+
sendGroupMessages: bigint;
|
|
111
|
+
sendWelcomeMessages: bigint;
|
|
112
|
+
queryGroupMessages: bigint;
|
|
113
|
+
queryWelcomeMessages: bigint;
|
|
114
|
+
subscribeMessages: bigint;
|
|
115
|
+
subscribeWelcomes: bigint;
|
|
243
116
|
}
|
|
244
117
|
|
|
245
|
-
export interface
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
metadata?: TransactionMetadata;
|
|
118
|
+
export interface Attachment {
|
|
119
|
+
filename?: string;
|
|
120
|
+
mimeType: string;
|
|
121
|
+
content: Uint8Array;
|
|
250
122
|
}
|
|
251
123
|
|
|
252
|
-
export
|
|
124
|
+
export interface Consent {
|
|
125
|
+
entityType: ConsentEntityType;
|
|
126
|
+
state: ConsentState;
|
|
127
|
+
entity: string;
|
|
128
|
+
}
|
|
253
129
|
|
|
254
|
-
export interface
|
|
255
|
-
|
|
130
|
+
export interface ContentTypeId {
|
|
131
|
+
authorityId: string;
|
|
132
|
+
typeId: string;
|
|
133
|
+
versionMajor: number;
|
|
134
|
+
versionMinor: number;
|
|
256
135
|
}
|
|
257
136
|
|
|
258
|
-
export interface
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
filename?: string;
|
|
137
|
+
export interface ConversationDebugInfo {
|
|
138
|
+
epoch: bigint;
|
|
139
|
+
maybeForked: boolean;
|
|
140
|
+
forkDetails: string;
|
|
141
|
+
isCommitLogForked?: boolean;
|
|
142
|
+
localCommitLog: string;
|
|
143
|
+
remoteCommitLog: string;
|
|
144
|
+
cursor: Cursor[];
|
|
267
145
|
}
|
|
268
146
|
|
|
269
|
-
export interface
|
|
270
|
-
|
|
271
|
-
content: DecodedMessageContent;
|
|
272
|
-
inReplyTo?: DecodedMessage;
|
|
147
|
+
export interface CreateDmOptions {
|
|
148
|
+
messageDisappearingSettings?: MessageDisappearingSettings;
|
|
273
149
|
}
|
|
274
150
|
|
|
275
|
-
export interface
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
151
|
+
export interface CreateGroupOptions {
|
|
152
|
+
permissions?: GroupPermissionsOptions;
|
|
153
|
+
groupName?: string;
|
|
154
|
+
groupImageUrlSquare?: string;
|
|
155
|
+
groupDescription?: string;
|
|
156
|
+
customPermissionPolicySet?: PermissionPolicySet;
|
|
157
|
+
messageDisappearingSettings?: MessageDisappearingSettings;
|
|
158
|
+
appData?: string;
|
|
279
159
|
}
|
|
280
160
|
|
|
281
|
-
export interface
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
compression?: number;
|
|
286
|
-
content: Uint8Array;
|
|
161
|
+
export interface Credential {
|
|
162
|
+
name?: string;
|
|
163
|
+
value: string;
|
|
164
|
+
expiresAtSeconds: bigint;
|
|
287
165
|
}
|
|
288
166
|
|
|
289
|
-
export interface
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
versionMajor: number;
|
|
293
|
-
versionMinor: number;
|
|
167
|
+
export interface Cursor {
|
|
168
|
+
originatorId: number;
|
|
169
|
+
sequenceId: bigint;
|
|
294
170
|
}
|
|
295
171
|
|
|
296
172
|
export interface DecodedMessage {
|
|
@@ -309,27 +185,36 @@ export interface DecodedMessage {
|
|
|
309
185
|
expiresAtNs: bigint | undefined;
|
|
310
186
|
}
|
|
311
187
|
|
|
312
|
-
export interface
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
clientTimestampNs?: bigint;
|
|
188
|
+
export interface DeletedMessage {
|
|
189
|
+
deletedBy: DeletedBy;
|
|
190
|
+
adminInboxId?: string;
|
|
316
191
|
}
|
|
317
192
|
|
|
318
|
-
export interface
|
|
319
|
-
|
|
320
|
-
|
|
193
|
+
export interface EncodedContent {
|
|
194
|
+
type?: ContentTypeId;
|
|
195
|
+
parameters: Record<string, string>;
|
|
196
|
+
fallback?: string;
|
|
197
|
+
compression?: number;
|
|
198
|
+
content: Uint8Array;
|
|
321
199
|
}
|
|
322
200
|
|
|
323
|
-
export interface
|
|
201
|
+
export interface EnrichedReply {
|
|
202
|
+
referenceId: string;
|
|
203
|
+
content: DecodedMessageContent;
|
|
204
|
+
inReplyTo?: DecodedMessage;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface GroupMember {
|
|
324
208
|
inboxId: string;
|
|
325
|
-
recoveryIdentifier: Identifier;
|
|
326
|
-
installations: Installation[];
|
|
327
209
|
accountIdentifiers: Identifier[];
|
|
210
|
+
installationIds: string[];
|
|
211
|
+
permissionLevel: PermissionLevel;
|
|
212
|
+
consentState: ConsentState;
|
|
328
213
|
}
|
|
329
214
|
|
|
330
|
-
export interface
|
|
331
|
-
|
|
332
|
-
|
|
215
|
+
export interface GroupMetadata {
|
|
216
|
+
creatorInboxId: string;
|
|
217
|
+
conversationType: ConversationType;
|
|
333
218
|
}
|
|
334
219
|
|
|
335
220
|
export interface GroupPermissions {
|
|
@@ -337,46 +222,85 @@ export interface GroupPermissions {
|
|
|
337
222
|
policySet: PermissionPolicySet;
|
|
338
223
|
}
|
|
339
224
|
|
|
340
|
-
export interface
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
225
|
+
export interface GroupSyncSummary {
|
|
226
|
+
numEligible: number;
|
|
227
|
+
numSynced: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface GroupUpdated {
|
|
231
|
+
initiatedByInboxId: string;
|
|
232
|
+
addedInboxes: Inbox[];
|
|
233
|
+
removedInboxes: Inbox[];
|
|
234
|
+
leftInboxes: Inbox[];
|
|
235
|
+
metadataFieldChanges: MetadataFieldChange[];
|
|
236
|
+
addedAdminInboxes: Inbox[];
|
|
237
|
+
removedAdminInboxes: Inbox[];
|
|
238
|
+
addedSuperAdminInboxes: Inbox[];
|
|
239
|
+
removedSuperAdminInboxes: Inbox[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface HmacKey {
|
|
243
|
+
key: Uint8Array;
|
|
244
|
+
epoch: bigint;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface Identifier {
|
|
248
|
+
identifier: string;
|
|
249
|
+
identifierKind: IdentifierKind;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface IdentityStats {
|
|
253
|
+
publishIdentityUpdate: bigint;
|
|
254
|
+
getIdentityUpdatesV2: bigint;
|
|
255
|
+
getInboxIds: bigint;
|
|
256
|
+
verifySmartContractWalletSignature: bigint;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface Inbox {
|
|
260
|
+
inboxId: string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface InboxState {
|
|
264
|
+
inboxId: string;
|
|
265
|
+
recoveryIdentifier: Identifier;
|
|
266
|
+
installations: Installation[];
|
|
267
|
+
accountIdentifiers: Identifier[];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface Installation {
|
|
271
|
+
bytes: Uint8Array;
|
|
272
|
+
id: string;
|
|
273
|
+
clientTimestampNs?: bigint;
|
|
350
274
|
}
|
|
351
275
|
|
|
352
|
-
export interface
|
|
353
|
-
|
|
354
|
-
|
|
276
|
+
export interface Intent {
|
|
277
|
+
id: string;
|
|
278
|
+
actionId: string;
|
|
279
|
+
metadata?: Record<string, string | number | boolean | null>;
|
|
355
280
|
}
|
|
356
281
|
|
|
357
|
-
export
|
|
282
|
+
export interface KeyPackageStatus {
|
|
283
|
+
lifetime?: Lifetime;
|
|
284
|
+
validationError?: string;
|
|
285
|
+
}
|
|
358
286
|
|
|
359
|
-
export interface
|
|
360
|
-
|
|
361
|
-
identifierKind: IdentifierKind;
|
|
287
|
+
export interface LeaveRequest {
|
|
288
|
+
authenticatedNote?: Uint8Array;
|
|
362
289
|
}
|
|
363
290
|
|
|
364
|
-
export interface
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
getInboxIds: bigint;
|
|
368
|
-
verifySmartContractWalletSignature: bigint;
|
|
291
|
+
export interface Lifetime {
|
|
292
|
+
notBefore: bigint;
|
|
293
|
+
notAfter: bigint;
|
|
369
294
|
}
|
|
370
295
|
|
|
371
|
-
export interface
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
subscribeWelcomes: bigint;
|
|
296
|
+
export interface ListConversationsOptions {
|
|
297
|
+
consentStates?: ConsentState[];
|
|
298
|
+
conversationType?: ConversationType;
|
|
299
|
+
createdAfterNs?: bigint;
|
|
300
|
+
createdBeforeNs?: bigint;
|
|
301
|
+
includeDuplicateDms?: boolean;
|
|
302
|
+
orderBy?: ListConversationsOrderBy;
|
|
303
|
+
limit?: bigint;
|
|
380
304
|
}
|
|
381
305
|
|
|
382
306
|
export interface ListMessagesOptions {
|
|
@@ -404,6 +328,21 @@ export interface Message {
|
|
|
404
328
|
deliveryStatus: DeliveryStatus;
|
|
405
329
|
}
|
|
406
330
|
|
|
331
|
+
export interface MessageDisappearingSettings {
|
|
332
|
+
fromNs: bigint;
|
|
333
|
+
inNs: bigint;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface MetadataFieldChange {
|
|
337
|
+
fieldName: string;
|
|
338
|
+
oldValue?: string;
|
|
339
|
+
newValue?: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface MultiRemoteAttachment {
|
|
343
|
+
attachments: RemoteAttachment[];
|
|
344
|
+
}
|
|
345
|
+
|
|
407
346
|
export interface PasskeySignature {
|
|
408
347
|
publicKey: Uint8Array;
|
|
409
348
|
signature: Uint8Array;
|
|
@@ -411,17 +350,41 @@ export interface PasskeySignature {
|
|
|
411
350
|
clientDataJson: Uint8Array;
|
|
412
351
|
}
|
|
413
352
|
|
|
414
|
-
export interface
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
353
|
+
export interface PermissionPolicySet {
|
|
354
|
+
addMemberPolicy: PermissionPolicy;
|
|
355
|
+
removeMemberPolicy: PermissionPolicy;
|
|
356
|
+
addAdminPolicy: PermissionPolicy;
|
|
357
|
+
removeAdminPolicy: PermissionPolicy;
|
|
358
|
+
updateGroupNamePolicy: PermissionPolicy;
|
|
359
|
+
updateGroupDescriptionPolicy: PermissionPolicy;
|
|
360
|
+
updateGroupImageUrlSquarePolicy: PermissionPolicy;
|
|
361
|
+
updateMessageDisappearingPolicy: PermissionPolicy;
|
|
362
|
+
updateAppDataPolicy: PermissionPolicy;
|
|
420
363
|
}
|
|
421
364
|
|
|
422
|
-
export interface
|
|
423
|
-
|
|
424
|
-
|
|
365
|
+
export interface Reaction {
|
|
366
|
+
reference: string;
|
|
367
|
+
referenceInboxId: string;
|
|
368
|
+
action: ReactionAction;
|
|
369
|
+
content: string;
|
|
370
|
+
schema: ReactionSchema;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface RemoteAttachment {
|
|
374
|
+
url: string;
|
|
375
|
+
contentDigest: string;
|
|
376
|
+
secret: Uint8Array;
|
|
377
|
+
salt: Uint8Array;
|
|
378
|
+
nonce: Uint8Array;
|
|
379
|
+
scheme: string;
|
|
380
|
+
contentLength?: number;
|
|
381
|
+
filename?: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface Reply {
|
|
385
|
+
content: EncodedContent;
|
|
386
|
+
reference: string;
|
|
387
|
+
referenceInboxId?: string;
|
|
425
388
|
}
|
|
426
389
|
|
|
427
390
|
export interface SendMessageOpts {
|
|
@@ -429,705 +392,904 @@ export interface SendMessageOpts {
|
|
|
429
392
|
optimistic?: boolean;
|
|
430
393
|
}
|
|
431
394
|
|
|
432
|
-
export interface
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
395
|
+
export interface TransactionMetadata {
|
|
396
|
+
transactionType: string;
|
|
397
|
+
currency: string;
|
|
398
|
+
amount: number;
|
|
399
|
+
decimals: number;
|
|
400
|
+
fromAddress: string;
|
|
401
|
+
toAddress: string;
|
|
436
402
|
}
|
|
437
403
|
|
|
438
|
-
export interface
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
404
|
+
export interface TransactionReference {
|
|
405
|
+
namespace?: string;
|
|
406
|
+
networkId: string;
|
|
407
|
+
reference: string;
|
|
408
|
+
metadata?: TransactionMetadata;
|
|
442
409
|
}
|
|
443
410
|
|
|
444
|
-
export interface
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
411
|
+
export interface WalletCall {
|
|
412
|
+
to?: string;
|
|
413
|
+
data?: string;
|
|
414
|
+
value?: string;
|
|
415
|
+
gas?: string;
|
|
416
|
+
metadata?: Record<string, string>;
|
|
448
417
|
}
|
|
449
418
|
|
|
450
|
-
export interface
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
addedAdminInboxes: Inbox[];
|
|
457
|
-
removedAdminInboxes: Inbox[];
|
|
458
|
-
addedSuperAdminInboxes: Inbox[];
|
|
459
|
-
removedSuperAdminInboxes: Inbox[];
|
|
419
|
+
export interface WalletSendCalls {
|
|
420
|
+
version: string;
|
|
421
|
+
chainId: string;
|
|
422
|
+
from: string;
|
|
423
|
+
calls: WalletCall[];
|
|
424
|
+
capabilities?: Record<string, string>;
|
|
460
425
|
}
|
|
461
426
|
|
|
462
|
-
export
|
|
463
|
-
inboxId: string;
|
|
464
|
-
}
|
|
427
|
+
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 } | { type: "deletedMessage"; content: DeletedMessage };
|
|
465
428
|
|
|
466
|
-
export
|
|
467
|
-
|
|
429
|
+
export type ReadReceipt = Record<string, never>;
|
|
430
|
+
|
|
431
|
+
export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
export enum ActionStyle {
|
|
435
|
+
Primary = 0,
|
|
436
|
+
Secondary = 1,
|
|
437
|
+
Danger = 2,
|
|
468
438
|
}
|
|
469
439
|
|
|
470
|
-
export
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
scheme: string;
|
|
477
|
-
contentLength: number;
|
|
478
|
-
filename?: string;
|
|
440
|
+
export class AuthHandle {
|
|
441
|
+
free(): void;
|
|
442
|
+
[Symbol.dispose](): void;
|
|
443
|
+
id(): number;
|
|
444
|
+
constructor();
|
|
445
|
+
set(credential: Credential): Promise<void>;
|
|
479
446
|
}
|
|
480
447
|
|
|
481
448
|
/**
|
|
482
|
-
*
|
|
449
|
+
* Selection of what elements to include in a backup
|
|
483
450
|
*/
|
|
484
|
-
export
|
|
451
|
+
export enum BackupElementSelectionOption {
|
|
452
|
+
Messages = 0,
|
|
453
|
+
Consent = 1,
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export class Client {
|
|
457
|
+
private constructor();
|
|
458
|
+
free(): void;
|
|
459
|
+
[Symbol.dispose](): void;
|
|
460
|
+
addWalletSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>;
|
|
461
|
+
apiAggregateStatistics(): string;
|
|
462
|
+
apiIdentityStatistics(): IdentityStats;
|
|
463
|
+
apiStatistics(): ApiStats;
|
|
464
|
+
applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
|
|
485
465
|
/**
|
|
486
|
-
*
|
|
466
|
+
* Output booleans should be zipped with the index of input identifiers
|
|
487
467
|
*/
|
|
488
|
-
|
|
468
|
+
canMessage(accountIdentifiers: Identifier[]): Promise<any>;
|
|
469
|
+
changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
|
|
470
|
+
clearAllStatistics(): void;
|
|
471
|
+
conversations(): Conversations;
|
|
472
|
+
createInboxSignatureRequest(): SignatureRequestHandle | undefined;
|
|
473
|
+
device_sync(): DeviceSync;
|
|
474
|
+
fetchLatestInboxUpdatesCount(refresh_from_network: boolean, inbox_ids: string[]): Promise<any>;
|
|
475
|
+
fetchOwnInboxUpdatesCount(refresh_from_network: boolean): Promise<number>;
|
|
476
|
+
findInboxIdByIdentity(identifier: Identifier): Promise<string | undefined>;
|
|
477
|
+
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
|
|
489
478
|
/**
|
|
490
|
-
*
|
|
479
|
+
*
|
|
480
|
+
* * Get key package statuses for a list of installation IDs.
|
|
481
|
+
* *
|
|
482
|
+
* * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
|
|
483
|
+
*
|
|
491
484
|
*/
|
|
492
|
-
|
|
485
|
+
getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
|
|
486
|
+
getLatestInboxState(inboxId: string): Promise<InboxState>;
|
|
493
487
|
/**
|
|
494
|
-
*
|
|
488
|
+
*
|
|
489
|
+
* * Get the client's inbox state.
|
|
490
|
+
* *
|
|
491
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
492
|
+
* * Otherwise, the state will be read from the local database.
|
|
493
|
+
*
|
|
495
494
|
*/
|
|
496
|
-
|
|
495
|
+
inboxState(refreshFromNetwork: boolean): Promise<InboxState>;
|
|
496
|
+
inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
|
|
497
|
+
registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
|
|
498
|
+
revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
|
|
499
|
+
revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
|
|
500
|
+
revokeWalletSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
|
|
501
|
+
setConsentStates(records: Consent[]): Promise<void>;
|
|
502
|
+
signWithInstallationKey(signatureText: string): Uint8Array;
|
|
503
|
+
syncPreferences(): Promise<GroupSyncSummary>;
|
|
504
|
+
verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void;
|
|
505
|
+
readonly accountIdentifier: Identifier;
|
|
506
|
+
readonly appVersion: string;
|
|
507
|
+
readonly inboxId: string;
|
|
508
|
+
readonly installationId: string;
|
|
509
|
+
readonly installationIdBytes: Uint8Array;
|
|
510
|
+
readonly isRegistered: boolean;
|
|
511
|
+
readonly libxmtpVersion: string;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export enum ClientMode {
|
|
515
|
+
Default = 0,
|
|
516
|
+
Notification = 1,
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export enum ConsentEntityType {
|
|
520
|
+
GroupId = 0,
|
|
521
|
+
InboxId = 1,
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export enum ConsentState {
|
|
525
|
+
Unknown = 0,
|
|
526
|
+
Allowed = 1,
|
|
527
|
+
Denied = 2,
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export enum ContentType {
|
|
531
|
+
Actions = 0,
|
|
532
|
+
Attachment = 1,
|
|
533
|
+
Custom = 2,
|
|
534
|
+
GroupMembershipChange = 3,
|
|
535
|
+
GroupUpdated = 4,
|
|
536
|
+
Intent = 5,
|
|
537
|
+
LeaveRequest = 6,
|
|
538
|
+
Markdown = 7,
|
|
539
|
+
MultiRemoteAttachment = 8,
|
|
540
|
+
Reaction = 9,
|
|
541
|
+
ReadReceipt = 10,
|
|
542
|
+
RemoteAttachment = 11,
|
|
543
|
+
Reply = 12,
|
|
544
|
+
Text = 13,
|
|
545
|
+
TransactionReference = 14,
|
|
546
|
+
WalletSendCalls = 15,
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export class Conversation {
|
|
550
|
+
private constructor();
|
|
551
|
+
free(): void;
|
|
552
|
+
[Symbol.dispose](): void;
|
|
553
|
+
addAdmin(inboxId: string): Promise<void>;
|
|
554
|
+
addMembers(inboxIds: string[]): Promise<void>;
|
|
555
|
+
addMembersByIdentity(accountIdentifiers: Identifier[]): Promise<void>;
|
|
556
|
+
addSuperAdmin(inboxId: string): Promise<void>;
|
|
557
|
+
addedByInboxId(): string;
|
|
558
|
+
adminList(): string[];
|
|
559
|
+
appData(): string;
|
|
560
|
+
consentState(): ConsentState;
|
|
561
|
+
countMessages(opts?: ListMessagesOptions | null): Promise<bigint>;
|
|
562
|
+
createdAtNs(): bigint;
|
|
563
|
+
dmPeerInboxId(): string;
|
|
564
|
+
findDuplicateDms(): Promise<Conversation[]>;
|
|
565
|
+
findEnrichedMessages(opts?: ListMessagesOptions | null): Promise<DecodedMessage[]>;
|
|
566
|
+
findMessages(opts?: ListMessagesOptions | null): Promise<Message[]>;
|
|
567
|
+
getDebugInfo(): Promise<any>;
|
|
568
|
+
getHmacKeys(): any;
|
|
569
|
+
getLastReadTimes(): Promise<any>;
|
|
570
|
+
groupDescription(): string;
|
|
571
|
+
groupImageUrlSquare(): string;
|
|
572
|
+
groupMetadata(): Promise<GroupMetadata>;
|
|
573
|
+
groupName(): string;
|
|
574
|
+
groupPermissions(): GroupPermissions;
|
|
575
|
+
id(): string;
|
|
576
|
+
isActive(): boolean;
|
|
577
|
+
isAdmin(inboxId: string): boolean;
|
|
578
|
+
isMessageDisappearingEnabled(): boolean;
|
|
579
|
+
isSuperAdmin(inboxId: string): boolean;
|
|
580
|
+
leaveGroup(): Promise<void>;
|
|
581
|
+
listMembers(): Promise<any>;
|
|
582
|
+
membershipState(): GroupMembershipState;
|
|
583
|
+
messageDisappearingSettings(): MessageDisappearingSettings | undefined;
|
|
584
|
+
pausedForVersion(): string | undefined;
|
|
497
585
|
/**
|
|
498
|
-
*
|
|
586
|
+
* Prepare a message for later publishing.
|
|
587
|
+
* Stores the message locally without publishing. Returns the message ID.
|
|
499
588
|
*/
|
|
500
|
-
|
|
589
|
+
prepareMessage(encodedContent: EncodedContent, shouldPush: boolean): string;
|
|
590
|
+
processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise<Message[]>;
|
|
501
591
|
/**
|
|
502
|
-
*
|
|
592
|
+
* Publish all unpublished messages
|
|
503
593
|
*/
|
|
504
|
-
|
|
594
|
+
publishMessages(): Promise<void>;
|
|
505
595
|
/**
|
|
506
|
-
*
|
|
596
|
+
* Publish a previously prepared message by ID.
|
|
507
597
|
*/
|
|
508
|
-
|
|
598
|
+
publishStoredMessage(messageId: string): Promise<void>;
|
|
599
|
+
removeAdmin(inboxId: string): Promise<void>;
|
|
600
|
+
removeMembers(inboxIds: string[]): Promise<void>;
|
|
601
|
+
removeMembersByIdentity(accountIdentifiers: Identifier[]): Promise<void>;
|
|
602
|
+
removeMessageDisappearingSettings(): Promise<void>;
|
|
603
|
+
removeSuperAdmin(inboxId: string): Promise<void>;
|
|
604
|
+
send(encodedContent: EncodedContent, opts: SendMessageOpts): Promise<string>;
|
|
605
|
+
sendActions(actions: Actions, optimistic?: boolean | null): Promise<string>;
|
|
606
|
+
sendAttachment(attachment: Attachment, optimistic?: boolean | null): Promise<string>;
|
|
607
|
+
sendIntent(intent: Intent, optimistic?: boolean | null): Promise<string>;
|
|
608
|
+
sendMarkdown(markdown: string, optimistic?: boolean | null): Promise<string>;
|
|
609
|
+
sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, optimistic?: boolean | null): Promise<string>;
|
|
610
|
+
sendReaction(reaction: Reaction, optimistic?: boolean | null): Promise<string>;
|
|
611
|
+
sendReadReceipt(optimistic?: boolean | null): Promise<string>;
|
|
612
|
+
sendRemoteAttachment(remoteAttachment: RemoteAttachment, optimistic?: boolean | null): Promise<string>;
|
|
613
|
+
sendReply(reply: Reply, optimistic?: boolean | null): Promise<string>;
|
|
614
|
+
sendText(text: string, optimistic?: boolean | null): Promise<string>;
|
|
615
|
+
sendTransactionReference(transactionReference: TransactionReference, optimistic?: boolean | null): Promise<string>;
|
|
616
|
+
sendWalletSendCalls(walletSendCalls: WalletSendCalls, optimistic?: boolean | null): Promise<string>;
|
|
617
|
+
stream(callback: any): StreamCloser;
|
|
618
|
+
superAdminList(): string[];
|
|
619
|
+
sync(): Promise<void>;
|
|
620
|
+
updateAppData(appData: string): Promise<void>;
|
|
621
|
+
updateConsentState(state: ConsentState): void;
|
|
622
|
+
updateGroupDescription(groupDescription: string): Promise<void>;
|
|
623
|
+
updateGroupImageUrlSquare(groupImageUrlSquare: string): Promise<void>;
|
|
624
|
+
updateGroupName(groupName: string): Promise<void>;
|
|
625
|
+
updateMessageDisappearingSettings(settings: MessageDisappearingSettings): Promise<void>;
|
|
626
|
+
updatePermissionPolicy(permissionUpdateType: PermissionUpdateType, permissionPolicyOption: PermissionPolicy, metadataField?: MetadataField | null): Promise<void>;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export class ConversationListItem {
|
|
630
|
+
free(): void;
|
|
631
|
+
[Symbol.dispose](): void;
|
|
632
|
+
constructor(conversation: Conversation, lastMessage?: Message | null, isCommitLogForked?: boolean | null);
|
|
633
|
+
conversation: Conversation;
|
|
634
|
+
get isCommitLogForked(): boolean | undefined;
|
|
635
|
+
set isCommitLogForked(value: boolean | null | undefined);
|
|
636
|
+
get lastMessage(): Message | undefined;
|
|
637
|
+
set lastMessage(value: Message | null | undefined);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export enum ConversationType {
|
|
641
|
+
Dm = 0,
|
|
642
|
+
Group = 1,
|
|
643
|
+
Sync = 2,
|
|
644
|
+
Oneshot = 3,
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export class Conversations {
|
|
648
|
+
private constructor();
|
|
649
|
+
free(): void;
|
|
650
|
+
[Symbol.dispose](): void;
|
|
651
|
+
createDm(accountIdentifier: Identifier, options?: CreateDmOptions | null): Promise<Conversation>;
|
|
652
|
+
createDmByInboxId(inboxId: string, options?: CreateDmOptions | null): Promise<Conversation>;
|
|
653
|
+
createGroup(accountIdentifiers: Identifier[], options?: CreateGroupOptions | null): Promise<Conversation>;
|
|
654
|
+
createGroupByInboxIds(inboxIds: string[], options?: CreateGroupOptions | null): Promise<Conversation>;
|
|
655
|
+
createGroupOptimistic(options?: CreateGroupOptions | null): Conversation;
|
|
656
|
+
deleteMessageById(messageId: string): number;
|
|
657
|
+
findDmByTargetInboxId(targetInboxId: string): Conversation;
|
|
658
|
+
findEnrichedMessageById(messageId: string): Promise<DecodedMessage>;
|
|
659
|
+
findGroupById(groupId: string): Conversation;
|
|
660
|
+
findMessageById(messageId: string): Message;
|
|
661
|
+
getHmacKeys(): any;
|
|
662
|
+
list(opts?: ListConversationsOptions | null): Array<any>;
|
|
663
|
+
stream(callback: any, conversationType?: ConversationType | null): StreamCloser;
|
|
664
|
+
streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: any[] | null): StreamCloser;
|
|
665
|
+
streamConsent(callback: any): StreamCloser;
|
|
509
666
|
/**
|
|
510
|
-
*
|
|
667
|
+
* Returns a 'ReadableStream' of Conversations
|
|
511
668
|
*/
|
|
512
|
-
|
|
669
|
+
streamLocal(conversationType?: ConversationType | null): Promise<ReadableStream>;
|
|
670
|
+
streamMessageDeletions(callback: any): StreamCloser;
|
|
671
|
+
streamPreferences(callback: any): StreamCloser;
|
|
672
|
+
sync(): Promise<void>;
|
|
673
|
+
syncAllConversations(consentStates?: any[] | null): Promise<GroupSyncSummary>;
|
|
513
674
|
}
|
|
514
675
|
|
|
515
|
-
export
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
676
|
+
export enum DeletedBy {
|
|
677
|
+
Sender = 0,
|
|
678
|
+
Admin = 1,
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export enum DeliveryStatus {
|
|
682
|
+
Unpublished = 0,
|
|
683
|
+
Published = 1,
|
|
684
|
+
Failed = 2,
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export class DeviceSync {
|
|
688
|
+
private constructor();
|
|
689
|
+
free(): void;
|
|
690
|
+
[Symbol.dispose](): void;
|
|
691
|
+
/**
|
|
692
|
+
* Load the metadata for an archive to see what it contains.
|
|
693
|
+
*/
|
|
694
|
+
archiveMetadata(data: Uint8Array, key: Uint8Array): Promise<ArchiveMetadata>;
|
|
695
|
+
/**
|
|
696
|
+
* Export archive data to bytes for later restoration.
|
|
697
|
+
*/
|
|
698
|
+
createArchive(opts: ArchiveOptions, key: Uint8Array): Promise<Uint8Array>;
|
|
699
|
+
/**
|
|
700
|
+
* Import an archive from bytes.
|
|
701
|
+
*/
|
|
702
|
+
importArchive(data: Uint8Array, key: Uint8Array): Promise<void>;
|
|
703
|
+
/**
|
|
704
|
+
* List the archives available for import in the sync group.
|
|
705
|
+
* You may need to manually sync the sync group before calling
|
|
706
|
+
* this function to see recently uploaded archives.
|
|
707
|
+
*/
|
|
708
|
+
listAvailableArchives(daysCutoff: bigint): AvailableArchiveInfo[];
|
|
709
|
+
/**
|
|
710
|
+
* Manually process a sync archive that matches the pin given.
|
|
711
|
+
* If no pin is given, then it will process the last archive sent.
|
|
712
|
+
*/
|
|
713
|
+
processSyncArchive(archive_pin?: string | null): Promise<void>;
|
|
714
|
+
/**
|
|
715
|
+
* Manually send a sync archive to the sync group.
|
|
716
|
+
* The pin will be later used for reference when importing.
|
|
717
|
+
*/
|
|
718
|
+
sendSyncArchive(options: ArchiveOptions, serverUrl: string, pin: string): Promise<void>;
|
|
719
|
+
/**
|
|
720
|
+
* Manually trigger a device sync request to sync records from another active device on this account.
|
|
721
|
+
*/
|
|
722
|
+
sendSyncRequest(): Promise<void>;
|
|
723
|
+
/**
|
|
724
|
+
* Manually sync all device sync groups.
|
|
725
|
+
*/
|
|
726
|
+
syncAllDeviceSyncGroups(): Promise<GroupSyncSummary>;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export enum DeviceSyncWorkerMode {
|
|
730
|
+
Enabled = 0,
|
|
731
|
+
Disabled = 1,
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export enum GroupMembershipState {
|
|
735
|
+
Allowed = 0,
|
|
736
|
+
Rejected = 1,
|
|
737
|
+
Pending = 2,
|
|
738
|
+
Restored = 3,
|
|
739
|
+
PendingRemove = 4,
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export enum GroupMessageKind {
|
|
743
|
+
Application = 0,
|
|
744
|
+
MembershipChange = 1,
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export enum GroupPermissionsOptions {
|
|
748
|
+
Default = 0,
|
|
749
|
+
AdminOnly = 1,
|
|
750
|
+
CustomPolicy = 2,
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export enum IdentifierKind {
|
|
754
|
+
Ethereum = 0,
|
|
755
|
+
Passkey = 1,
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export class IntoUnderlyingByteSource {
|
|
759
|
+
private constructor();
|
|
760
|
+
free(): void;
|
|
761
|
+
[Symbol.dispose](): void;
|
|
762
|
+
cancel(): void;
|
|
763
|
+
pull(controller: ReadableByteStreamController): Promise<any>;
|
|
764
|
+
start(controller: ReadableByteStreamController): void;
|
|
765
|
+
readonly autoAllocateChunkSize: number;
|
|
766
|
+
readonly type: ReadableStreamType;
|
|
521
767
|
}
|
|
522
768
|
|
|
523
|
-
export
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
769
|
+
export class IntoUnderlyingSink {
|
|
770
|
+
private constructor();
|
|
771
|
+
free(): void;
|
|
772
|
+
[Symbol.dispose](): void;
|
|
773
|
+
abort(reason: any): Promise<any>;
|
|
774
|
+
close(): Promise<any>;
|
|
775
|
+
write(chunk: any): Promise<any>;
|
|
529
776
|
}
|
|
530
777
|
|
|
531
|
-
export
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
778
|
+
export class IntoUnderlyingSource {
|
|
779
|
+
private constructor();
|
|
780
|
+
free(): void;
|
|
781
|
+
[Symbol.dispose](): void;
|
|
782
|
+
cancel(): void;
|
|
783
|
+
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
535
784
|
}
|
|
536
785
|
|
|
537
|
-
export
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
imageUrl?: string;
|
|
541
|
-
style?: ActionStyle;
|
|
542
|
-
expiresAtNs?: bigint;
|
|
786
|
+
export enum ListConversationsOrderBy {
|
|
787
|
+
CreatedAt = 0,
|
|
788
|
+
LastActivity = 1,
|
|
543
789
|
}
|
|
544
790
|
|
|
545
|
-
export
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
791
|
+
export enum LogLevel {
|
|
792
|
+
Off = 0,
|
|
793
|
+
Error = 1,
|
|
794
|
+
Warn = 2,
|
|
795
|
+
Info = 3,
|
|
796
|
+
Debug = 4,
|
|
797
|
+
Trace = 5,
|
|
550
798
|
}
|
|
551
799
|
|
|
552
|
-
export
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
action: ReactionAction;
|
|
556
|
-
content: string;
|
|
557
|
-
schema: ReactionSchema;
|
|
800
|
+
export enum MessageSortBy {
|
|
801
|
+
SentAt = 0,
|
|
802
|
+
InsertedAt = 1,
|
|
558
803
|
}
|
|
559
804
|
|
|
560
|
-
export
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
limit?: bigint;
|
|
805
|
+
export enum MetadataField {
|
|
806
|
+
AppData = 0,
|
|
807
|
+
Description = 1,
|
|
808
|
+
GroupName = 2,
|
|
809
|
+
GroupImageUrlSquare = 3,
|
|
810
|
+
MessageExpirationFromNs = 4,
|
|
811
|
+
MessageExpirationInNs = 5,
|
|
568
812
|
}
|
|
569
813
|
|
|
570
|
-
export
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
groupDescription?: string;
|
|
575
|
-
customPermissionPolicySet?: PermissionPolicySet;
|
|
576
|
-
messageDisappearingSettings?: MessageDisappearingSettings;
|
|
577
|
-
appData?: string;
|
|
814
|
+
export enum PermissionLevel {
|
|
815
|
+
Member = 0,
|
|
816
|
+
Admin = 1,
|
|
817
|
+
SuperAdmin = 2,
|
|
578
818
|
}
|
|
579
819
|
|
|
580
|
-
export
|
|
581
|
-
|
|
582
|
-
|
|
820
|
+
export enum PermissionPolicy {
|
|
821
|
+
Allow = 0,
|
|
822
|
+
Deny = 1,
|
|
823
|
+
Admin = 2,
|
|
824
|
+
SuperAdmin = 3,
|
|
825
|
+
DoesNotExist = 4,
|
|
826
|
+
Other = 5,
|
|
583
827
|
}
|
|
584
828
|
|
|
585
|
-
export
|
|
586
|
-
|
|
829
|
+
export enum PermissionUpdateType {
|
|
830
|
+
AddMember = 0,
|
|
831
|
+
RemoveMember = 1,
|
|
832
|
+
AddAdmin = 2,
|
|
833
|
+
RemoveAdmin = 3,
|
|
834
|
+
UpdateMetadata = 4,
|
|
587
835
|
}
|
|
588
836
|
|
|
589
|
-
export
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
isCommitLogForked?: boolean;
|
|
594
|
-
localCommitLog: string;
|
|
595
|
-
remoteCommitLog: string;
|
|
596
|
-
cursor: Cursor[];
|
|
837
|
+
export enum ReactionAction {
|
|
838
|
+
Unknown = 0,
|
|
839
|
+
Added = 1,
|
|
840
|
+
Removed = 2,
|
|
597
841
|
}
|
|
598
842
|
|
|
599
|
-
export
|
|
600
|
-
|
|
601
|
-
|
|
843
|
+
export enum ReactionSchema {
|
|
844
|
+
Unknown = 0,
|
|
845
|
+
Unicode = 1,
|
|
846
|
+
Shortcode = 2,
|
|
847
|
+
Custom = 3,
|
|
602
848
|
}
|
|
603
849
|
|
|
604
|
-
export
|
|
605
|
-
|
|
606
|
-
|
|
850
|
+
export class SignatureRequestHandle {
|
|
851
|
+
private constructor();
|
|
852
|
+
free(): void;
|
|
853
|
+
[Symbol.dispose](): void;
|
|
854
|
+
addEcdsaSignature(signatureBytes: Uint8Array): Promise<void>;
|
|
855
|
+
addPasskeySignature(signature: PasskeySignature): Promise<void>;
|
|
856
|
+
addScwSignature(accountIdentifier: Identifier, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | null): Promise<void>;
|
|
857
|
+
signatureText(): Promise<string>;
|
|
607
858
|
}
|
|
608
859
|
|
|
609
|
-
export
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
expiresAtSeconds: bigint;
|
|
860
|
+
export enum SortDirection {
|
|
861
|
+
Ascending = 0,
|
|
862
|
+
Descending = 1,
|
|
613
863
|
}
|
|
614
864
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
865
|
+
export class StreamCloser {
|
|
866
|
+
private constructor();
|
|
867
|
+
free(): void;
|
|
868
|
+
[Symbol.dispose](): void;
|
|
619
869
|
/**
|
|
620
|
-
*
|
|
870
|
+
* Signal the stream to end
|
|
871
|
+
* Does not wait for the stream to end.
|
|
621
872
|
*/
|
|
622
|
-
|
|
873
|
+
end(): void;
|
|
623
874
|
/**
|
|
624
|
-
*
|
|
875
|
+
* End the stream and `await` for it to shutdown
|
|
876
|
+
* Returns the `Result` of the task.
|
|
877
|
+
* End the stream and asynchronously wait for it to shutdown
|
|
625
878
|
*/
|
|
626
|
-
|
|
879
|
+
endAndWait(): Promise<void>;
|
|
627
880
|
/**
|
|
628
|
-
*
|
|
881
|
+
* Checks if this stream is closed
|
|
629
882
|
*/
|
|
630
|
-
|
|
883
|
+
isClosed(): boolean;
|
|
884
|
+
waitForReady(): Promise<void>;
|
|
631
885
|
}
|
|
632
886
|
|
|
633
|
-
export
|
|
634
|
-
numEligible: number;
|
|
635
|
-
numSynced: number;
|
|
636
|
-
}
|
|
887
|
+
export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
|
|
637
888
|
|
|
638
|
-
export
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
export
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
appData(): string;
|
|
772
|
-
isAdmin(inboxId: string): boolean;
|
|
773
|
-
addAdmin(inboxId: string): Promise<void>;
|
|
774
|
-
isActive(): boolean;
|
|
775
|
-
sendText(text: string, optimistic?: boolean | null): Promise<string>;
|
|
776
|
-
consentState(): ConsentState;
|
|
777
|
-
updateConsentState(state: ConsentState): void;
|
|
778
|
-
}
|
|
779
|
-
export class ConversationListItem {
|
|
780
|
-
free(): void;
|
|
781
|
-
[Symbol.dispose](): void;
|
|
782
|
-
constructor(conversation: Conversation, lastMessage?: Message | null, isCommitLogForked?: boolean | null);
|
|
783
|
-
conversation: Conversation;
|
|
784
|
-
get lastMessage(): Message | undefined;
|
|
785
|
-
set lastMessage(value: Message | null | undefined);
|
|
786
|
-
get isCommitLogForked(): boolean | undefined;
|
|
787
|
-
set isCommitLogForked(value: boolean | null | undefined);
|
|
788
|
-
}
|
|
789
|
-
export class Conversations {
|
|
790
|
-
private constructor();
|
|
791
|
-
free(): void;
|
|
792
|
-
[Symbol.dispose](): void;
|
|
793
|
-
createGroup(accountIdentifiers: Identifier[], options?: CreateGroupOptions | null): Promise<Conversation>;
|
|
794
|
-
getHmacKeys(): any;
|
|
795
|
-
streamConsent(callback: any): StreamCloser;
|
|
796
|
-
findGroupById(groupId: string): Conversation;
|
|
797
|
-
createDm(accountIdentifier: Identifier, options?: CreateDmOptions | null): Promise<Conversation>;
|
|
798
|
-
findMessageById(messageId: string): Message;
|
|
799
|
-
streamPreferences(callback: any): StreamCloser;
|
|
800
|
-
streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: any[] | null): StreamCloser;
|
|
801
|
-
deleteMessageById(messageId: string): number;
|
|
802
|
-
syncAllConversations(consentStates?: any[] | null): Promise<GroupSyncSummary>;
|
|
803
|
-
createGroupOptimistic(options?: CreateGroupOptions | null): Conversation;
|
|
804
|
-
streamMessageDeletions(callback: any): StreamCloser;
|
|
805
|
-
createGroupByInboxIds(inboxIds: string[], options?: CreateGroupOptions | null): Promise<Conversation>;
|
|
806
|
-
findDmByTargetInboxId(targetInboxId: string): Conversation;
|
|
807
|
-
/**
|
|
808
|
-
* Returns a 'ReadableStream' of Conversations
|
|
809
|
-
*/
|
|
810
|
-
streamLocal(conversationType?: ConversationType | null): Promise<ReadableStream>;
|
|
811
|
-
findEnrichedMessageById(messageId: string): Promise<DecodedMessage>;
|
|
812
|
-
createDmByInboxId(inboxId: string, options?: CreateDmOptions | null): Promise<Conversation>;
|
|
813
|
-
list(opts?: ListConversationsOptions | null): Array<any>;
|
|
814
|
-
sync(): Promise<void>;
|
|
815
|
-
stream(callback: any, conversationType?: ConversationType | null): StreamCloser;
|
|
816
|
-
}
|
|
817
|
-
export class IntoUnderlyingByteSource {
|
|
818
|
-
private constructor();
|
|
819
|
-
free(): void;
|
|
820
|
-
[Symbol.dispose](): void;
|
|
821
|
-
pull(controller: ReadableByteStreamController): Promise<any>;
|
|
822
|
-
start(controller: ReadableByteStreamController): void;
|
|
823
|
-
cancel(): void;
|
|
824
|
-
readonly autoAllocateChunkSize: number;
|
|
825
|
-
readonly type: ReadableStreamType;
|
|
826
|
-
}
|
|
827
|
-
export class IntoUnderlyingSink {
|
|
828
|
-
private constructor();
|
|
829
|
-
free(): void;
|
|
830
|
-
[Symbol.dispose](): void;
|
|
831
|
-
abort(reason: any): Promise<any>;
|
|
832
|
-
close(): Promise<any>;
|
|
833
|
-
write(chunk: any): Promise<any>;
|
|
834
|
-
}
|
|
835
|
-
export class IntoUnderlyingSource {
|
|
836
|
-
private constructor();
|
|
837
|
-
free(): void;
|
|
838
|
-
[Symbol.dispose](): void;
|
|
839
|
-
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
840
|
-
cancel(): void;
|
|
841
|
-
}
|
|
842
|
-
export class SignatureRequestHandle {
|
|
843
|
-
private constructor();
|
|
844
|
-
free(): void;
|
|
845
|
-
[Symbol.dispose](): void;
|
|
846
|
-
signatureText(): Promise<string>;
|
|
847
|
-
addScwSignature(accountIdentifier: Identifier, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | null): Promise<void>;
|
|
848
|
-
addEcdsaSignature(signatureBytes: Uint8Array): Promise<void>;
|
|
849
|
-
addPasskeySignature(signature: PasskeySignature): Promise<void>;
|
|
850
|
-
}
|
|
851
|
-
export class StreamCloser {
|
|
852
|
-
private constructor();
|
|
853
|
-
free(): void;
|
|
854
|
-
[Symbol.dispose](): void;
|
|
855
|
-
/**
|
|
856
|
-
* End the stream and `await` for it to shutdown
|
|
857
|
-
* Returns the `Result` of the task.
|
|
858
|
-
* End the stream and asynchronously wait for it to shutdown
|
|
859
|
-
*/
|
|
860
|
-
endAndWait(): Promise<void>;
|
|
861
|
-
waitForReady(): Promise<void>;
|
|
862
|
-
/**
|
|
863
|
-
* Signal the stream to end
|
|
864
|
-
* Does not wait for the stream to end.
|
|
865
|
-
*/
|
|
866
|
-
end(): void;
|
|
867
|
-
/**
|
|
868
|
-
* Checks if this stream is closed
|
|
869
|
-
*/
|
|
870
|
-
isClosed(): boolean;
|
|
871
|
-
}
|
|
889
|
+
export function contentTypeActions(): ContentTypeId;
|
|
890
|
+
|
|
891
|
+
export function contentTypeAttachment(): ContentTypeId;
|
|
892
|
+
|
|
893
|
+
export function contentTypeGroupUpdated(): ContentTypeId;
|
|
894
|
+
|
|
895
|
+
export function contentTypeIntent(): ContentTypeId;
|
|
896
|
+
|
|
897
|
+
export function contentTypeLeaveRequest(): ContentTypeId;
|
|
898
|
+
|
|
899
|
+
export function contentTypeMarkdown(): ContentTypeId;
|
|
900
|
+
|
|
901
|
+
export function contentTypeMultiRemoteAttachment(): ContentTypeId;
|
|
902
|
+
|
|
903
|
+
export function contentTypeReaction(): ContentTypeId;
|
|
904
|
+
|
|
905
|
+
export function contentTypeReadReceipt(): ContentTypeId;
|
|
906
|
+
|
|
907
|
+
export function contentTypeRemoteAttachment(): ContentTypeId;
|
|
908
|
+
|
|
909
|
+
export function contentTypeReply(): ContentTypeId;
|
|
910
|
+
|
|
911
|
+
export function contentTypeText(): ContentTypeId;
|
|
912
|
+
|
|
913
|
+
export function contentTypeTransactionReference(): ContentTypeId;
|
|
914
|
+
|
|
915
|
+
export function contentTypeWalletSendCalls(): ContentTypeId;
|
|
916
|
+
|
|
917
|
+
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>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Decrypts an encrypted payload from a remote attachment.
|
|
921
|
+
*/
|
|
922
|
+
export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
|
|
923
|
+
|
|
924
|
+
export function encodeActions(actions: Actions): EncodedContent;
|
|
925
|
+
|
|
926
|
+
export function encodeAttachment(attachment: Attachment): EncodedContent;
|
|
927
|
+
|
|
928
|
+
export function encodeIntent(intent: Intent): EncodedContent;
|
|
929
|
+
|
|
930
|
+
export function encodeMarkdown(text: string): EncodedContent;
|
|
931
|
+
|
|
932
|
+
export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
|
|
933
|
+
|
|
934
|
+
export function encodeReaction(reaction: Reaction): EncodedContent;
|
|
935
|
+
|
|
936
|
+
export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
|
|
937
|
+
|
|
938
|
+
export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
|
|
939
|
+
|
|
940
|
+
export function encodeText(text: string): EncodedContent;
|
|
941
|
+
|
|
942
|
+
export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
|
|
943
|
+
|
|
944
|
+
export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Encrypts an attachment for storage as a remote attachment.
|
|
948
|
+
*/
|
|
949
|
+
export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
|
|
950
|
+
|
|
951
|
+
export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
|
|
952
|
+
|
|
953
|
+
export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, isSecure: boolean, accountIdentifier: Identifier): Promise<string | undefined>;
|
|
954
|
+
|
|
955
|
+
export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
|
|
956
|
+
|
|
957
|
+
export function metadataFieldName(field: MetadataField): string;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Delete all database files from OPFS.
|
|
961
|
+
* Note: All databases must be closed before calling this function.
|
|
962
|
+
*/
|
|
963
|
+
export function opfsClearAll(): Promise<void>;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Delete a specific database file from OPFS.
|
|
967
|
+
* Returns true if the file was deleted, false if it didn't exist.
|
|
968
|
+
* Note: The database must be closed before calling this function.
|
|
969
|
+
*/
|
|
970
|
+
export function opfsDeleteFile(filename: string): Promise<boolean>;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Export a database file from OPFS as a byte array.
|
|
974
|
+
* This can be used to backup or transfer a database.
|
|
975
|
+
* Note: The database should be closed before exporting for consistency.
|
|
976
|
+
*/
|
|
977
|
+
export function opfsExportDb(filename: string): Promise<Uint8Array>;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Get the number of database files stored in OPFS.
|
|
981
|
+
*/
|
|
982
|
+
export function opfsFileCount(): Promise<number>;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Check if a database file exists in OPFS.
|
|
986
|
+
*/
|
|
987
|
+
export function opfsFileExists(filename: string): Promise<boolean>;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Import a database from a byte array into OPFS.
|
|
991
|
+
* This will overwrite any existing database with the same name.
|
|
992
|
+
* The byte array must contain a valid SQLite database.
|
|
993
|
+
* Note: Any existing database with the same name must be closed before importing.
|
|
994
|
+
*/
|
|
995
|
+
export function opfsImportDb(filename: string, data: Uint8Array): Promise<void>;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Initialize the OPFS SQLite VFS if not already initialized.
|
|
999
|
+
* This must be called before using other OPFS functions.
|
|
1000
|
+
*/
|
|
1001
|
+
export function opfsInit(): Promise<void>;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* List all database files stored in OPFS.
|
|
1005
|
+
* Returns an array of file names.
|
|
1006
|
+
*/
|
|
1007
|
+
export function opfsListFiles(): Promise<string[]>;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Get the current capacity of the OPFS file pool.
|
|
1011
|
+
*/
|
|
1012
|
+
export function opfsPoolCapacity(): Promise<number>;
|
|
1013
|
+
|
|
1014
|
+
export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Entry point invoked by JavaScript in a worker.
|
|
1018
|
+
*/
|
|
1019
|
+
export function task_worker_entry_point(ptr: number): void;
|
|
1020
|
+
|
|
1021
|
+
export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
|
|
872
1022
|
|
|
873
1023
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
874
1024
|
|
|
875
1025
|
export interface InitOutput {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1026
|
+
readonly memory: WebAssembly.Memory;
|
|
1027
|
+
readonly contentTypeLeaveRequest: () => any;
|
|
1028
|
+
readonly contentTypeMultiRemoteAttachment: () => any;
|
|
1029
|
+
readonly contentTypeTransactionReference: () => any;
|
|
1030
|
+
readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
|
|
1031
|
+
readonly encodeTransactionReference: (a: any) => [number, number, number];
|
|
1032
|
+
readonly __wbg_authhandle_free: (a: number, b: number) => void;
|
|
1033
|
+
readonly authhandle_id: (a: number) => number;
|
|
1034
|
+
readonly authhandle_new: () => number;
|
|
1035
|
+
readonly authhandle_set: (a: number, b: any) => any;
|
|
1036
|
+
readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
|
|
1037
|
+
readonly client_setConsentStates: (a: number, b: number, c: number) => any;
|
|
1038
|
+
readonly contentTypeAttachment: () => any;
|
|
1039
|
+
readonly contentTypeMarkdown: () => any;
|
|
1040
|
+
readonly contentTypeText: () => any;
|
|
1041
|
+
readonly conversation_consentState: (a: number) => [number, number, number];
|
|
1042
|
+
readonly conversation_updateConsentState: (a: number, b: number) => [number, number];
|
|
1043
|
+
readonly encodeAttachment: (a: any) => [number, number, number];
|
|
1044
|
+
readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
|
|
1045
|
+
readonly encodeText: (a: number, b: number) => [number, number, number];
|
|
1046
|
+
readonly client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any;
|
|
1047
|
+
readonly client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any;
|
|
1048
|
+
readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
|
|
1049
|
+
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
1050
|
+
readonly client_inboxState: (a: number, b: number) => any;
|
|
1051
|
+
readonly contentTypeGroupUpdated: () => any;
|
|
1052
|
+
readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
|
|
1053
|
+
readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
1054
|
+
readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
1055
|
+
readonly metadataFieldName: (a: number) => [number, number];
|
|
1056
|
+
readonly contentTypeReply: () => any;
|
|
1057
|
+
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
1058
|
+
readonly __wbg_conversation_free: (a: number, b: number) => void;
|
|
1059
|
+
readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
|
|
1060
|
+
readonly __wbg_conversations_free: (a: number, b: number) => void;
|
|
1061
|
+
readonly __wbg_devicesync_free: (a: number, b: number) => void;
|
|
1062
|
+
readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
|
|
1063
|
+
readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
|
|
1064
|
+
readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
|
|
1065
|
+
readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
|
|
1066
|
+
readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
|
|
1067
|
+
readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
|
|
1068
|
+
readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
|
|
1069
|
+
readonly __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
1070
|
+
readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1071
|
+
readonly client_accountIdentifier: (a: number) => any;
|
|
1072
|
+
readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
|
|
1073
|
+
readonly client_apiAggregateStatistics: (a: number) => [number, number];
|
|
1074
|
+
readonly client_apiIdentityStatistics: (a: number) => any;
|
|
1075
|
+
readonly client_apiStatistics: (a: number) => any;
|
|
1076
|
+
readonly client_appVersion: (a: number) => [number, number];
|
|
1077
|
+
readonly client_applySignatureRequest: (a: number, b: number) => any;
|
|
1078
|
+
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
1079
|
+
readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
|
|
1080
|
+
readonly client_clearAllStatistics: (a: number) => void;
|
|
1081
|
+
readonly client_conversations: (a: number) => number;
|
|
1082
|
+
readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
|
|
1083
|
+
readonly client_device_sync: (a: number) => number;
|
|
1084
|
+
readonly client_findInboxIdByIdentity: (a: number, b: any) => any;
|
|
1085
|
+
readonly client_inboxId: (a: number) => [number, number];
|
|
1086
|
+
readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
|
|
1087
|
+
readonly client_installationId: (a: number) => [number, number];
|
|
1088
|
+
readonly client_installationIdBytes: (a: number) => any;
|
|
1089
|
+
readonly client_isRegistered: (a: number) => number;
|
|
1090
|
+
readonly client_libxmtpVersion: (a: number) => [number, number];
|
|
1091
|
+
readonly client_registerIdentity: (a: number, b: number) => any;
|
|
1092
|
+
readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
|
|
1093
|
+
readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
|
|
1094
|
+
readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
|
|
1095
|
+
readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
1096
|
+
readonly client_syncPreferences: (a: number) => any;
|
|
1097
|
+
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
1098
|
+
readonly contentTypeActions: () => any;
|
|
1099
|
+
readonly contentTypeIntent: () => any;
|
|
1100
|
+
readonly contentTypeReaction: () => any;
|
|
1101
|
+
readonly contentTypeReadReceipt: () => any;
|
|
1102
|
+
readonly contentTypeRemoteAttachment: () => any;
|
|
1103
|
+
readonly contentTypeWalletSendCalls: () => any;
|
|
1104
|
+
readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
1105
|
+
readonly conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
1106
|
+
readonly conversation_addMembersByIdentity: (a: number, b: number, c: number) => any;
|
|
1107
|
+
readonly conversation_addSuperAdmin: (a: number, b: number, c: number) => any;
|
|
1108
|
+
readonly conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
1109
|
+
readonly conversation_adminList: (a: number) => [number, number, number, number];
|
|
1110
|
+
readonly conversation_appData: (a: number) => [number, number, number, number];
|
|
1111
|
+
readonly conversation_countMessages: (a: number, b: number) => any;
|
|
1112
|
+
readonly conversation_createdAtNs: (a: number) => bigint;
|
|
1113
|
+
readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
1114
|
+
readonly conversation_findDuplicateDms: (a: number) => any;
|
|
1115
|
+
readonly conversation_findEnrichedMessages: (a: number, b: number) => any;
|
|
1116
|
+
readonly conversation_findMessages: (a: number, b: number) => any;
|
|
1117
|
+
readonly conversation_getDebugInfo: (a: number) => any;
|
|
1118
|
+
readonly conversation_getHmacKeys: (a: number) => [number, number, number];
|
|
1119
|
+
readonly conversation_getLastReadTimes: (a: number) => any;
|
|
1120
|
+
readonly conversation_groupDescription: (a: number) => [number, number, number, number];
|
|
1121
|
+
readonly conversation_groupImageUrlSquare: (a: number) => [number, number, number, number];
|
|
1122
|
+
readonly conversation_groupMetadata: (a: number) => any;
|
|
1123
|
+
readonly conversation_groupName: (a: number) => [number, number, number, number];
|
|
1124
|
+
readonly conversation_groupPermissions: (a: number) => [number, number, number];
|
|
1125
|
+
readonly conversation_id: (a: number) => [number, number];
|
|
1126
|
+
readonly conversation_isActive: (a: number) => [number, number, number];
|
|
1127
|
+
readonly conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
1128
|
+
readonly conversation_isMessageDisappearingEnabled: (a: number) => [number, number, number];
|
|
1129
|
+
readonly conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
1130
|
+
readonly conversation_leaveGroup: (a: number) => any;
|
|
1131
|
+
readonly conversation_listMembers: (a: number) => any;
|
|
1132
|
+
readonly conversation_membershipState: (a: number) => [number, number, number];
|
|
1133
|
+
readonly conversation_messageDisappearingSettings: (a: number) => [number, number, number];
|
|
1134
|
+
readonly conversation_pausedForVersion: (a: number) => [number, number, number, number];
|
|
1135
|
+
readonly conversation_prepareMessage: (a: number, b: any, c: number) => [number, number, number, number];
|
|
1136
|
+
readonly conversation_processStreamedGroupMessage: (a: number, b: any) => any;
|
|
1137
|
+
readonly conversation_publishMessages: (a: number) => any;
|
|
1138
|
+
readonly conversation_publishStoredMessage: (a: number, b: number, c: number) => any;
|
|
1139
|
+
readonly conversation_removeAdmin: (a: number, b: number, c: number) => any;
|
|
1140
|
+
readonly conversation_removeMembers: (a: number, b: number, c: number) => any;
|
|
1141
|
+
readonly conversation_removeMembersByIdentity: (a: number, b: number, c: number) => any;
|
|
1142
|
+
readonly conversation_removeMessageDisappearingSettings: (a: number) => any;
|
|
1143
|
+
readonly conversation_removeSuperAdmin: (a: number, b: number, c: number) => any;
|
|
1144
|
+
readonly conversation_send: (a: number, b: any, c: any) => any;
|
|
1145
|
+
readonly conversation_sendActions: (a: number, b: any, c: number) => any;
|
|
1146
|
+
readonly conversation_sendAttachment: (a: number, b: any, c: number) => any;
|
|
1147
|
+
readonly conversation_sendIntent: (a: number, b: any, c: number) => any;
|
|
1148
|
+
readonly conversation_sendMarkdown: (a: number, b: number, c: number, d: number) => any;
|
|
1149
|
+
readonly conversation_sendMultiRemoteAttachment: (a: number, b: any, c: number) => any;
|
|
1150
|
+
readonly conversation_sendReaction: (a: number, b: any, c: number) => any;
|
|
1151
|
+
readonly conversation_sendReadReceipt: (a: number, b: number) => any;
|
|
1152
|
+
readonly conversation_sendRemoteAttachment: (a: number, b: any, c: number) => any;
|
|
1153
|
+
readonly conversation_sendReply: (a: number, b: any, c: number) => any;
|
|
1154
|
+
readonly conversation_sendText: (a: number, b: number, c: number, d: number) => any;
|
|
1155
|
+
readonly conversation_sendTransactionReference: (a: number, b: any, c: number) => any;
|
|
1156
|
+
readonly conversation_sendWalletSendCalls: (a: number, b: any, c: number) => any;
|
|
1157
|
+
readonly conversation_stream: (a: number, b: any) => [number, number, number];
|
|
1158
|
+
readonly conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
1159
|
+
readonly conversation_sync: (a: number) => any;
|
|
1160
|
+
readonly conversation_updateAppData: (a: number, b: number, c: number) => any;
|
|
1161
|
+
readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
1162
|
+
readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
1163
|
+
readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
1164
|
+
readonly conversation_updateMessageDisappearingSettings: (a: number, b: any) => any;
|
|
1165
|
+
readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
1166
|
+
readonly conversationlistitem_new: (a: number, b: number, c: number) => number;
|
|
1167
|
+
readonly conversations_createDm: (a: number, b: any, c: number) => any;
|
|
1168
|
+
readonly conversations_createDmByInboxId: (a: number, b: number, c: number, d: number) => any;
|
|
1169
|
+
readonly conversations_createGroup: (a: number, b: number, c: number, d: number) => any;
|
|
1170
|
+
readonly conversations_createGroupByInboxIds: (a: number, b: number, c: number, d: number) => any;
|
|
1171
|
+
readonly conversations_createGroupOptimistic: (a: number, b: number) => [number, number, number];
|
|
1172
|
+
readonly conversations_deleteMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
1173
|
+
readonly conversations_findDmByTargetInboxId: (a: number, b: number, c: number) => [number, number, number];
|
|
1174
|
+
readonly conversations_findEnrichedMessageById: (a: number, b: number, c: number) => any;
|
|
1175
|
+
readonly conversations_findGroupById: (a: number, b: number, c: number) => [number, number, number];
|
|
1176
|
+
readonly conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
1177
|
+
readonly conversations_getHmacKeys: (a: number) => [number, number, number];
|
|
1178
|
+
readonly conversations_list: (a: number, b: number) => [number, number, number];
|
|
1179
|
+
readonly conversations_stream: (a: number, b: any, c: number) => [number, number, number];
|
|
1180
|
+
readonly conversations_streamAllMessages: (a: number, b: any, c: number, d: number, e: number) => [number, number, number];
|
|
1181
|
+
readonly conversations_streamConsent: (a: number, b: any) => [number, number, number];
|
|
1182
|
+
readonly conversations_streamLocal: (a: number, b: number) => any;
|
|
1183
|
+
readonly conversations_streamMessageDeletions: (a: number, b: any) => [number, number, number];
|
|
1184
|
+
readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
|
|
1185
|
+
readonly conversations_sync: (a: number) => any;
|
|
1186
|
+
readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
|
|
1187
|
+
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;
|
|
1188
|
+
readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
|
|
1189
|
+
readonly devicesync_archiveMetadata: (a: number, b: any, c: any) => any;
|
|
1190
|
+
readonly devicesync_createArchive: (a: number, b: any, c: any) => any;
|
|
1191
|
+
readonly devicesync_importArchive: (a: number, b: any, c: any) => any;
|
|
1192
|
+
readonly devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number];
|
|
1193
|
+
readonly devicesync_processSyncArchive: (a: number, b: number, c: number) => any;
|
|
1194
|
+
readonly devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
1195
|
+
readonly devicesync_sendSyncRequest: (a: number) => any;
|
|
1196
|
+
readonly devicesync_syncAllDeviceSyncGroups: (a: number) => any;
|
|
1197
|
+
readonly encodeActions: (a: any) => [number, number, number];
|
|
1198
|
+
readonly encodeIntent: (a: any) => [number, number, number];
|
|
1199
|
+
readonly encodeReaction: (a: any) => [number, number, number];
|
|
1200
|
+
readonly encodeReadReceipt: (a: any) => [number, number, number];
|
|
1201
|
+
readonly encodeRemoteAttachment: (a: any) => [number, number, number];
|
|
1202
|
+
readonly encodeWalletSendCalls: (a: any) => [number, number, number];
|
|
1203
|
+
readonly encryptAttachment: (a: any) => [number, number, number];
|
|
1204
|
+
readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
1205
|
+
readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
|
|
1206
|
+
readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
|
|
1207
|
+
readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
|
|
1208
|
+
readonly signaturerequesthandle_signatureText: (a: number) => any;
|
|
1209
|
+
readonly streamcloser_end: (a: number) => void;
|
|
1210
|
+
readonly streamcloser_endAndWait: (a: number) => any;
|
|
1211
|
+
readonly streamcloser_isClosed: (a: number) => number;
|
|
1212
|
+
readonly streamcloser_waitForReady: (a: number) => any;
|
|
1213
|
+
readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
|
|
1214
|
+
readonly opfsClearAll: () => any;
|
|
1215
|
+
readonly opfsDeleteFile: (a: number, b: number) => any;
|
|
1216
|
+
readonly opfsExportDb: (a: number, b: number) => any;
|
|
1217
|
+
readonly opfsFileCount: () => any;
|
|
1218
|
+
readonly opfsFileExists: (a: number, b: number) => any;
|
|
1219
|
+
readonly opfsImportDb: (a: number, b: number, c: any) => any;
|
|
1220
|
+
readonly opfsInit: () => any;
|
|
1221
|
+
readonly opfsListFiles: () => any;
|
|
1222
|
+
readonly opfsPoolCapacity: () => any;
|
|
1223
|
+
readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
1224
|
+
readonly rust_zstd_wasm_shim_free: (a: number) => void;
|
|
1225
|
+
readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
1226
|
+
readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
|
|
1227
|
+
readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
|
|
1228
|
+
readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
|
|
1229
|
+
readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
|
|
1230
|
+
readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
|
|
1231
|
+
readonly rust_sqlite_wasm_abort: () => void;
|
|
1232
|
+
readonly rust_sqlite_wasm_assert_fail: (a: number, b: number, c: number, d: number) => void;
|
|
1233
|
+
readonly rust_sqlite_wasm_calloc: (a: number, b: number) => number;
|
|
1234
|
+
readonly rust_sqlite_wasm_malloc: (a: number) => number;
|
|
1235
|
+
readonly rust_sqlite_wasm_free: (a: number) => void;
|
|
1236
|
+
readonly rust_sqlite_wasm_getentropy: (a: number, b: number) => number;
|
|
1237
|
+
readonly rust_sqlite_wasm_localtime: (a: number) => number;
|
|
1238
|
+
readonly rust_sqlite_wasm_realloc: (a: number, b: number) => number;
|
|
1239
|
+
readonly sqlite3_os_end: () => number;
|
|
1240
|
+
readonly sqlite3_os_init: () => number;
|
|
1241
|
+
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
1242
|
+
readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
1243
|
+
readonly intounderlyingsink_abort: (a: number, b: any) => any;
|
|
1244
|
+
readonly intounderlyingsink_close: (a: number) => any;
|
|
1245
|
+
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
1246
|
+
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
1247
|
+
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
1248
|
+
readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
|
|
1249
|
+
readonly intounderlyingbytesource_cancel: (a: number) => void;
|
|
1250
|
+
readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
|
|
1251
|
+
readonly intounderlyingbytesource_start: (a: number, b: any) => void;
|
|
1252
|
+
readonly intounderlyingbytesource_type: (a: number) => number;
|
|
1253
|
+
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
1254
|
+
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
1255
|
+
readonly wasm_bindgen__closure__destroy__h3780b9cea27d1b0e: (a: number, b: number) => void;
|
|
1256
|
+
readonly wasm_bindgen__closure__destroy__ha0e8fabffbde5a75: (a: number, b: number) => void;
|
|
1257
|
+
readonly wasm_bindgen__closure__destroy__h580b2c22888073c1: (a: number, b: number) => void;
|
|
1258
|
+
readonly wasm_bindgen__closure__destroy__h8818735ce6b8834b: (a: number, b: number) => void;
|
|
1259
|
+
readonly wasm_bindgen__convert__closures_____invoke__h9946670875dab85b: (a: number, b: number, c: any, d: any) => void;
|
|
1260
|
+
readonly wasm_bindgen__convert__closures_____invoke__hcc62c9bf57b4ac74: (a: number, b: number, c: any) => void;
|
|
1261
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2c56f933a1e2701a: (a: number, b: number) => void;
|
|
1262
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc7cbde6e4b659782: (a: number, b: number) => void;
|
|
1263
|
+
readonly wasm_bindgen__convert__closures_____invoke__hb319faf0153cb912: (a: number, b: number) => void;
|
|
1264
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1265
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1266
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1267
|
+
readonly __externref_table_alloc: () => number;
|
|
1268
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1269
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1270
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
1271
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
1272
|
+
readonly __wbindgen_start: () => void;
|
|
1112
1273
|
}
|
|
1113
1274
|
|
|
1114
1275
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1276
|
+
|
|
1115
1277
|
/**
|
|
1116
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
1117
|
-
* a precompiled `WebAssembly.Module`.
|
|
1118
|
-
*
|
|
1119
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1120
|
-
*
|
|
1121
|
-
* @returns {InitOutput}
|
|
1122
|
-
*/
|
|
1278
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1279
|
+
* a precompiled `WebAssembly.Module`.
|
|
1280
|
+
*
|
|
1281
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1282
|
+
*
|
|
1283
|
+
* @returns {InitOutput}
|
|
1284
|
+
*/
|
|
1123
1285
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1124
1286
|
|
|
1125
1287
|
/**
|
|
1126
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1127
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1128
|
-
*
|
|
1129
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1130
|
-
*
|
|
1131
|
-
* @returns {Promise<InitOutput>}
|
|
1132
|
-
*/
|
|
1288
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1289
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1290
|
+
*
|
|
1291
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1292
|
+
*
|
|
1293
|
+
* @returns {Promise<InitOutput>}
|
|
1294
|
+
*/
|
|
1133
1295
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|