@xmtp/browser-sdk 5.2.0 → 6.0.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.
- package/dist/index.d.ts +587 -670
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/workers/client.js +1 -1
- package/dist/workers/client.js.map +1 -1
- package/dist/workers/opfs.js +2 -0
- package/dist/workers/opfs.js.map +1 -0
- package/package.json +12 -16
- package/src/Client.ts +92 -219
- package/src/CodecRegistry.ts +27 -0
- package/src/Conversation.ts +275 -104
- package/src/Conversations.ts +188 -99
- package/src/DebugInformation.ts +10 -27
- package/src/DecodedMessage.ts +155 -58
- package/src/Dm.ts +25 -9
- package/src/Group.ts +69 -26
- package/src/Opfs.ts +63 -0
- package/src/Preferences.ts +68 -52
- package/src/WorkerClient.ts +5 -5
- package/src/WorkerConversation.ts +119 -44
- package/src/WorkerConversations.ts +35 -74
- package/src/WorkerDebugInformation.ts +1 -12
- package/src/WorkerPreferences.ts +6 -14
- package/src/index.ts +53 -24
- package/src/types/actions/client.ts +6 -17
- package/src/types/actions/conversation.ts +160 -31
- package/src/types/actions/conversations.ts +21 -24
- package/src/types/actions/debugInformation.ts +3 -11
- package/src/types/actions/dm.ts +1 -1
- package/src/types/actions/group.ts +25 -0
- package/src/types/actions/opfs.ts +66 -0
- package/src/types/actions/preferences.ts +6 -13
- package/src/types/actions/streams.ts +8 -8
- package/src/types/actions.ts +11 -9
- package/src/types/options.ts +47 -6
- package/src/{ClientWorkerClass.ts → utils/WorkerBridge.ts} +35 -45
- package/src/utils/contentTypes.ts +77 -0
- package/src/utils/conversions.ts +18 -588
- package/src/utils/createClient.ts +16 -11
- package/src/utils/errors.ts +13 -19
- package/src/utils/inboxId.ts +46 -0
- package/src/utils/inboxState.ts +23 -0
- package/src/utils/installations.ts +95 -0
- package/src/utils/metadata.ts +15 -0
- package/src/utils/signer.ts +4 -4
- package/src/utils/uuid.ts +8 -0
- package/src/workers/client.ts +191 -132
- package/src/workers/opfs.ts +127 -0
- package/dist/workers/utils.js +0 -2
- package/dist/workers/utils.js.map +0 -1
- package/src/Utils.ts +0 -143
- package/src/UtilsWorkerClass.ts +0 -121
- package/src/types/actions/utils.ts +0 -69
- package/src/workers/utils.ts +0 -155
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ContentCodec, ContentTypeId as ContentTypeId$1, EncodedContent as EncodedContent$1 } from '@xmtp/content-type-primitives';
|
|
2
1
|
import * as _xmtp_wasm_bindings from '@xmtp/wasm-bindings';
|
|
3
|
-
import { Identifier, Conversations as Conversations$1, ConsentState,
|
|
4
|
-
export { Consent, ConsentEntityType, ConsentState, ContentType,
|
|
5
|
-
import {
|
|
6
|
-
import { TextCodec } from '@xmtp/content-type-text';
|
|
2
|
+
import { ContentTypeId as ContentTypeId$1, DeliveryStatus, GroupMessageKind, Reaction, DecodedMessage as DecodedMessage$1, LeaveRequest, ReadReceipt, Attachment, RemoteAttachment, TransactionReference, WalletSendCalls, Actions, Intent, MultiRemoteAttachment, GroupUpdated, EnrichedReply, LogLevel, Identifier, Conversations as Conversations$1, ConsentState, ListConversationsOptions, CreateGroupOptions, CreateDmOptions, Conversation as Conversation$1, ConversationType, Message, Client as Client$1, Consent, ConsentEntityType, UserPreferenceUpdate, SignatureRequestHandle, KeyPackageStatus, GroupMember, PermissionUpdateType, PermissionPolicy, MetadataField, EncodedContent, SendMessageOpts, Reply as Reply$1, ListMessagesOptions, MessageDisappearingSettings, HmacKey, ConversationDebugInfo, GroupPermissionsOptions, PermissionPolicySet, GroupMetadata, ApiStats, IdentityStats, InboxState, GroupSyncSummary } from '@xmtp/wasm-bindings';
|
|
3
|
+
export { Action, ActionStyle, Actions, ApiStats, Attachment, Consent, ConsentEntityType, ConsentState, ContentType, ConversationDebugInfo, ConversationListItem, ConversationType, CreateDmOptions, CreateGroupOptions, Cursor, DeliveryStatus, EncryptedAttachment, GroupMember, GroupMembershipState, GroupMessageKind, GroupMetadata, GroupPermissions, GroupPermissionsOptions, GroupSyncSummary, GroupUpdated, HmacKey, Identifier, IdentifierKind, IdentityStats, Inbox, InboxState, Installation, Intent, KeyPackageStatus, LeaveRequest, Lifetime, ListConversationsOptions, ListConversationsOrderBy, ListMessagesOptions, LogLevel, LogOptions, Message, MessageDisappearingSettings, MessageSortBy, MetadataField, MetadataFieldChange, MultiRemoteAttachment, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, Reaction, ReactionAction, ReactionSchema, ReadReceipt, RemoteAttachment, RemoteAttachmentInfo, SendMessageOpts, SignatureRequestHandle, SortDirection, TransactionMetadata, TransactionReference, UserPreferenceUpdate, WalletCall, WalletSendCalls } from '@xmtp/wasm-bindings';
|
|
4
|
+
import { ContentCodec, ContentTypeId } from '@xmtp/content-type-primitives';
|
|
7
5
|
|
|
8
6
|
type ResolveValue<T> = {
|
|
9
7
|
value: T;
|
|
@@ -111,6 +109,55 @@ declare const HistorySyncUrls: {
|
|
|
111
109
|
readonly production: "https://message-history.production.ephemera.network";
|
|
112
110
|
};
|
|
113
111
|
|
|
112
|
+
declare class CodecRegistry {
|
|
113
|
+
#private;
|
|
114
|
+
constructor(codecs: ContentCodec[]);
|
|
115
|
+
/**
|
|
116
|
+
* Gets the codec for a given content type
|
|
117
|
+
*
|
|
118
|
+
* @param contentType - The content type to get the codec for
|
|
119
|
+
* @returns The codec, if found
|
|
120
|
+
*/
|
|
121
|
+
getCodec<ContentType = unknown>(contentType: ContentTypeId): ContentCodec<ContentType> | undefined;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Represents a decoded XMTP message
|
|
126
|
+
*
|
|
127
|
+
* @class
|
|
128
|
+
* @property {unknown} content - The decoded content of the message
|
|
129
|
+
* @property {ContentTypeId} contentType - The content type of the message content
|
|
130
|
+
* @property {string} conversationId - Unique identifier for the conversation
|
|
131
|
+
* @property {DeliveryStatus} deliveryStatus - Current delivery status of the message ("unpublished" | "published" | "failed")
|
|
132
|
+
* @property {bigint} expiresAtNs - Timestamp when the message will expire (in nanoseconds)
|
|
133
|
+
* @property {Date} expiresAt - Timestamp when the message will expire
|
|
134
|
+
* @property {string} fallback - Optional fallback text for the message
|
|
135
|
+
* @property {string} id - Unique identifier for the message
|
|
136
|
+
* @property {GroupMessageKind} kind - Type of message ("application" | "membership_change")
|
|
137
|
+
* @property {bigint} numReplies - Number of replies to the message
|
|
138
|
+
* @property {DecodedMessage<Reaction>[]} reactions - Reactions to the message
|
|
139
|
+
* @property {string} senderInboxId - Identifier for the sender's inbox
|
|
140
|
+
* @property {Date} sentAt - Timestamp when the message was sent
|
|
141
|
+
* @property {bigint} sentAtNs - Timestamp when the message was sent (in nanoseconds)
|
|
142
|
+
*/
|
|
143
|
+
declare class DecodedMessage<ContentTypes = unknown> {
|
|
144
|
+
content: ContentTypes | undefined;
|
|
145
|
+
contentType: ContentTypeId$1;
|
|
146
|
+
conversationId: string;
|
|
147
|
+
deliveryStatus: DeliveryStatus;
|
|
148
|
+
expiresAtNs?: bigint;
|
|
149
|
+
expiresAt?: Date;
|
|
150
|
+
fallback?: string;
|
|
151
|
+
id: string;
|
|
152
|
+
kind: GroupMessageKind;
|
|
153
|
+
numReplies: bigint;
|
|
154
|
+
reactions: DecodedMessage<Reaction>[];
|
|
155
|
+
senderInboxId: string;
|
|
156
|
+
sentAt: Date;
|
|
157
|
+
sentAtNs: bigint;
|
|
158
|
+
constructor(codecRegistry: CodecRegistry, message: DecodedMessage$1);
|
|
159
|
+
}
|
|
160
|
+
|
|
114
161
|
type XmtpEnv = keyof typeof ApiUrls;
|
|
115
162
|
/**
|
|
116
163
|
* Network options
|
|
@@ -180,7 +227,7 @@ type OtherOptions = {
|
|
|
180
227
|
/**
|
|
181
228
|
* Logging level
|
|
182
229
|
*/
|
|
183
|
-
loggingLevel?:
|
|
230
|
+
loggingLevel?: LogLevel;
|
|
184
231
|
/**
|
|
185
232
|
* Disable automatic registration when creating a client
|
|
186
233
|
*/
|
|
@@ -193,13 +240,15 @@ type OtherOptions = {
|
|
|
193
240
|
* Custom app version
|
|
194
241
|
*/
|
|
195
242
|
appVersion?: string;
|
|
196
|
-
/**
|
|
197
|
-
* Should debug events be tracked
|
|
198
|
-
* (default: false)
|
|
199
|
-
*/
|
|
200
|
-
debugEventsEnabled?: boolean;
|
|
201
243
|
};
|
|
202
244
|
type ClientOptions = NetworkOptions & ContentOptions & StorageOptions & OtherOptions;
|
|
245
|
+
type Reply<T = unknown, U = unknown> = {
|
|
246
|
+
referenceId: EnrichedReply["referenceId"];
|
|
247
|
+
content: T;
|
|
248
|
+
inReplyTo: DecodedMessage<U> | null;
|
|
249
|
+
};
|
|
250
|
+
type BuiltInContentTypes = string | LeaveRequest | Reaction | ReadReceipt | Attachment | RemoteAttachment | TransactionReference | WalletSendCalls | Actions | Intent | MultiRemoteAttachment | GroupUpdated;
|
|
251
|
+
type ExtractCodecContentTypes<C extends ContentCodec[] = []> = C extends readonly [] ? BuiltInContentTypes : [...C][number] extends ContentCodec<infer T> ? T | BuiltInContentTypes | Reply<T | BuiltInContentTypes, T | BuiltInContentTypes> : BuiltInContentTypes;
|
|
203
252
|
|
|
204
253
|
type SignMessage = (message: string) => Promise<Uint8Array> | Uint8Array;
|
|
205
254
|
type GetIdentifier = () => Promise<Identifier> | Identifier;
|
|
@@ -241,17 +290,17 @@ declare class WorkerConversations {
|
|
|
241
290
|
sync(): Promise<void>;
|
|
242
291
|
syncAll(consentStates?: ConsentState[]): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
|
|
243
292
|
getConversationById(id: string): WorkerConversation | undefined;
|
|
244
|
-
getMessageById(id: string):
|
|
293
|
+
getMessageById(id: string): Promise<DecodedMessage$1 | undefined>;
|
|
245
294
|
getDmByInboxId(inboxId: string): WorkerConversation | undefined;
|
|
246
|
-
list(options?:
|
|
247
|
-
listGroups(options?: Omit<
|
|
248
|
-
listDms(options?: Omit<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
295
|
+
list(options?: ListConversationsOptions): WorkerConversation[];
|
|
296
|
+
listGroups(options?: Omit<ListConversationsOptions, "conversationType">): WorkerConversation[];
|
|
297
|
+
listDms(options?: Omit<ListConversationsOptions, "conversationType">): WorkerConversation[];
|
|
298
|
+
createGroupOptimistic(options?: CreateGroupOptions): WorkerConversation;
|
|
299
|
+
createGroupWithIdentifiers(identifiers: Identifier[], options?: CreateGroupOptions): Promise<WorkerConversation>;
|
|
300
|
+
createGroup(inboxIds: string[], options?: CreateGroupOptions): Promise<WorkerConversation>;
|
|
301
|
+
createDmWithIdentifier(identifier: Identifier, options?: CreateDmOptions): Promise<WorkerConversation>;
|
|
302
|
+
createDm(inboxId: string, options?: CreateDmOptions): Promise<WorkerConversation>;
|
|
303
|
+
hmacKeys(): HmacKeys;
|
|
255
304
|
stream(callback: StreamCallback<Conversation$1>, onFail: () => void, conversationType?: ConversationType): _xmtp_wasm_bindings.StreamCloser;
|
|
256
305
|
streamGroups(callback: StreamCallback<Conversation$1>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
|
|
257
306
|
streamDms(callback: StreamCallback<Conversation$1>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
|
|
@@ -266,12 +315,11 @@ declare class WorkerConversations {
|
|
|
266
315
|
*/
|
|
267
316
|
declare class WorkerDebugInformation {
|
|
268
317
|
#private;
|
|
269
|
-
constructor(client: Client$1
|
|
318
|
+
constructor(client: Client$1);
|
|
270
319
|
apiStatistics(): _xmtp_wasm_bindings.ApiStats;
|
|
271
320
|
apiIdentityStatistics(): _xmtp_wasm_bindings.IdentityStats;
|
|
272
321
|
apiAggregateStatistics(): string;
|
|
273
322
|
clearAllStatistics(): void;
|
|
274
|
-
uploadDebugArchive(serverUrl?: string): Promise<string>;
|
|
275
323
|
}
|
|
276
324
|
|
|
277
325
|
declare class WorkerPreferences {
|
|
@@ -279,17 +327,16 @@ declare class WorkerPreferences {
|
|
|
279
327
|
constructor(client: Client$1, conversations: Conversations$1);
|
|
280
328
|
sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
|
|
281
329
|
inboxState(refreshFromNetwork: boolean): Promise<_xmtp_wasm_bindings.InboxState>;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
setConsentStates(records: SafeConsent[]): Promise<void>;
|
|
330
|
+
getInboxStates(inboxIds: string[], refreshFromNetwork?: boolean): Promise<_xmtp_wasm_bindings.InboxState[]>;
|
|
331
|
+
setConsentStates(records: Consent[]): Promise<void>;
|
|
285
332
|
getConsentState(entityType: ConsentEntityType, entity: string): Promise<_xmtp_wasm_bindings.ConsentState>;
|
|
286
333
|
streamConsent(callback: StreamCallback<Consent[]>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
|
|
287
|
-
streamPreferences(callback: StreamCallback<
|
|
334
|
+
streamPreferences(callback: StreamCallback<UserPreferenceUpdate[]>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
|
|
288
335
|
}
|
|
289
336
|
|
|
290
337
|
declare class WorkerClient {
|
|
291
338
|
#private;
|
|
292
|
-
constructor(client: Client$1
|
|
339
|
+
constructor(client: Client$1);
|
|
293
340
|
static create(identifier: Identifier, options?: Omit<ClientOptions, "codecs">): Promise<WorkerClient>;
|
|
294
341
|
get libxmtpVersion(): string;
|
|
295
342
|
get appVersion(): string;
|
|
@@ -312,16 +359,16 @@ declare class WorkerClient {
|
|
|
312
359
|
revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
|
|
313
360
|
changeRecoveryIdentifierSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
|
|
314
361
|
registerIdentity(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise<void>;
|
|
315
|
-
|
|
362
|
+
getInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
|
|
316
363
|
signWithInstallationKey(signatureText: string): Uint8Array<ArrayBufferLike>;
|
|
317
364
|
verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): boolean;
|
|
318
365
|
verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): boolean;
|
|
319
|
-
|
|
366
|
+
fetchKeyPackageStatuses(installationIds: string[]): Promise<Map<string, KeyPackageStatus>>;
|
|
320
367
|
}
|
|
321
368
|
|
|
322
369
|
declare class WorkerConversation {
|
|
323
370
|
#private;
|
|
324
|
-
constructor(client: WorkerClient, group: Conversation$1
|
|
371
|
+
constructor(client: WorkerClient, group: Conversation$1);
|
|
325
372
|
get id(): string;
|
|
326
373
|
get name(): string;
|
|
327
374
|
updateName(name: string): Promise<void>;
|
|
@@ -329,19 +376,17 @@ declare class WorkerConversation {
|
|
|
329
376
|
updateImageUrl(imageUrl: string): Promise<void>;
|
|
330
377
|
get description(): string;
|
|
331
378
|
updateDescription(description: string): Promise<void>;
|
|
379
|
+
get appData(): string;
|
|
380
|
+
updateAppData(appData: string): Promise<void>;
|
|
332
381
|
get isActive(): boolean;
|
|
333
|
-
get isCommitLogForked(): boolean | undefined;
|
|
334
382
|
get addedByInboxId(): string;
|
|
335
383
|
get createdAtNs(): bigint;
|
|
336
|
-
lastMessage(): Promise<
|
|
337
|
-
metadata(): Promise<
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
get admins(): string[];
|
|
343
|
-
get superAdmins(): string[];
|
|
344
|
-
get permissions(): {
|
|
384
|
+
lastMessage(): Promise<DecodedMessage$1 | undefined>;
|
|
385
|
+
metadata(): Promise<_xmtp_wasm_bindings.GroupMetadata>;
|
|
386
|
+
members(): Promise<GroupMember[]>;
|
|
387
|
+
listAdmins(): string[];
|
|
388
|
+
listSuperAdmins(): string[];
|
|
389
|
+
permissions(): {
|
|
345
390
|
policyType: _xmtp_wasm_bindings.GroupPermissionsOptions;
|
|
346
391
|
policySet: _xmtp_wasm_bindings.PermissionPolicySet;
|
|
347
392
|
};
|
|
@@ -358,11 +403,22 @@ declare class WorkerConversation {
|
|
|
358
403
|
addSuperAdmin(inboxId: string): Promise<void>;
|
|
359
404
|
removeSuperAdmin(inboxId: string): Promise<void>;
|
|
360
405
|
publishMessages(): Promise<void>;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
406
|
+
send(encodedContent: EncodedContent, opts?: SendMessageOpts): Promise<string>;
|
|
407
|
+
sendText(text: string, isOptimistic?: boolean): Promise<string>;
|
|
408
|
+
sendMarkdown(markdown: string, isOptimistic?: boolean): Promise<string>;
|
|
409
|
+
sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise<string>;
|
|
410
|
+
sendReadReceipt(isOptimistic?: boolean): Promise<string>;
|
|
411
|
+
sendReply(reply: Reply$1, isOptimistic?: boolean): Promise<string>;
|
|
412
|
+
sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise<string>;
|
|
413
|
+
sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise<string>;
|
|
414
|
+
sendActions(actions: Actions, isOptimistic?: boolean): Promise<string>;
|
|
415
|
+
sendIntent(intent: Intent, isOptimistic?: boolean): Promise<string>;
|
|
416
|
+
sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise<string>;
|
|
417
|
+
sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise<string>;
|
|
418
|
+
sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise<string>;
|
|
419
|
+
messages(options?: ListMessagesOptions): Promise<DecodedMessage$1[]>;
|
|
420
|
+
countMessages(options?: ListMessagesOptions): Promise<bigint>;
|
|
421
|
+
consentState(): ConsentState;
|
|
366
422
|
updateConsentState(state: ConsentState): void;
|
|
367
423
|
dmPeerInboxId(): string;
|
|
368
424
|
messageDisappearingSettings(): MessageDisappearingSettings | undefined;
|
|
@@ -371,220 +427,43 @@ declare class WorkerConversation {
|
|
|
371
427
|
isMessageDisappearingEnabled(): boolean;
|
|
372
428
|
stream(callback: StreamCallback<Message>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
|
|
373
429
|
pausedForVersion(): string | undefined;
|
|
374
|
-
|
|
430
|
+
hmacKeys(): Map<string, HmacKey[]>;
|
|
375
431
|
debugInfo(): Promise<ConversationDebugInfo>;
|
|
376
|
-
|
|
432
|
+
duplicateDms(): Promise<WorkerConversation[]>;
|
|
433
|
+
requestRemoval(): Promise<void>;
|
|
434
|
+
isPendingRemoval(): boolean;
|
|
435
|
+
lastReadTimes(): Promise<LastReadTimes>;
|
|
377
436
|
}
|
|
378
437
|
|
|
379
|
-
declare const toContentTypeId: (contentTypeId: ContentTypeId) => ContentTypeId$1;
|
|
380
|
-
declare const fromContentTypeId: (contentTypeId: ContentTypeId$1) => ContentTypeId;
|
|
381
|
-
type SafeContentTypeId = {
|
|
382
|
-
authorityId: string;
|
|
383
|
-
typeId: string;
|
|
384
|
-
versionMajor: number;
|
|
385
|
-
versionMinor: number;
|
|
386
|
-
};
|
|
387
|
-
declare const toSafeContentTypeId: (contentTypeId: ContentTypeId$1) => SafeContentTypeId;
|
|
388
|
-
declare const fromSafeContentTypeId: (contentTypeId: SafeContentTypeId) => ContentTypeId$1;
|
|
389
|
-
declare const toEncodedContent: (content: EncodedContent) => EncodedContent$1;
|
|
390
|
-
declare const fromEncodedContent: (content: EncodedContent$1) => EncodedContent;
|
|
391
|
-
type SafeEncodedContent = {
|
|
392
|
-
type: SafeContentTypeId;
|
|
393
|
-
parameters: Record<string, string>;
|
|
394
|
-
fallback?: string;
|
|
395
|
-
compression?: number;
|
|
396
|
-
content: Uint8Array;
|
|
397
|
-
};
|
|
398
|
-
declare const toSafeEncodedContent: (content: EncodedContent$1) => SafeEncodedContent;
|
|
399
|
-
declare const fromSafeEncodedContent: (content: SafeEncodedContent) => EncodedContent$1;
|
|
400
|
-
type SafeMessage = {
|
|
401
|
-
content: SafeEncodedContent;
|
|
402
|
-
convoId: string;
|
|
403
|
-
deliveryStatus: DeliveryStatus;
|
|
404
|
-
id: string;
|
|
405
|
-
kind: GroupMessageKind;
|
|
406
|
-
senderInboxId: string;
|
|
407
|
-
sentAtNs: bigint;
|
|
408
|
-
};
|
|
409
|
-
declare const toSafeMessage: (message: Message) => SafeMessage;
|
|
410
|
-
type SafeListMessagesOptions = {
|
|
411
|
-
contentTypes?: ContentType[];
|
|
412
|
-
deliveryStatus?: DeliveryStatus;
|
|
413
|
-
direction?: SortDirection;
|
|
414
|
-
excludeContentTypes?: ContentType[];
|
|
415
|
-
excludeSenderInboxIds?: string[];
|
|
416
|
-
insertedAfterNs?: bigint;
|
|
417
|
-
insertedBeforeNs?: bigint;
|
|
418
|
-
kind?: GroupMessageKind;
|
|
419
|
-
limit?: bigint;
|
|
420
|
-
sentAfterNs?: bigint;
|
|
421
|
-
sentBeforeNs?: bigint;
|
|
422
|
-
sortBy?: MessageSortBy;
|
|
423
|
-
};
|
|
424
|
-
declare const toSafeListMessagesOptions: (options: ListMessagesOptions) => SafeListMessagesOptions;
|
|
425
|
-
declare const fromSafeListMessagesOptions: (options: SafeListMessagesOptions) => ListMessagesOptions;
|
|
426
|
-
type SafeSendMessageOpts = {
|
|
427
|
-
shouldPush: boolean;
|
|
428
|
-
};
|
|
429
|
-
declare const toSafeSendMessageOpts: (opts: SendMessageOpts) => SafeSendMessageOpts;
|
|
430
|
-
declare const fromSafeSendMessageOpts: (opts: SafeSendMessageOpts) => SendMessageOpts;
|
|
431
|
-
type SafeListConversationsOptions = {
|
|
432
|
-
consentStates?: ConsentState[];
|
|
433
|
-
conversationType?: ConversationType;
|
|
434
|
-
createdAfterNs?: bigint;
|
|
435
|
-
createdBeforeNs?: bigint;
|
|
436
|
-
includeDuplicateDms?: boolean;
|
|
437
|
-
limit?: bigint;
|
|
438
|
-
orderBy?: ListConversationsOrderBy;
|
|
439
|
-
};
|
|
440
|
-
declare const toSafeListConversationsOptions: (options: ListConversationsOptions) => SafeListConversationsOptions;
|
|
441
|
-
declare const fromSafeListConversationsOptions: (options: SafeListConversationsOptions) => ListConversationsOptions;
|
|
442
|
-
type SafePermissionPolicySet = {
|
|
443
|
-
addAdminPolicy: PermissionPolicy;
|
|
444
|
-
addMemberPolicy: PermissionPolicy;
|
|
445
|
-
removeAdminPolicy: PermissionPolicy;
|
|
446
|
-
removeMemberPolicy: PermissionPolicy;
|
|
447
|
-
updateGroupDescriptionPolicy: PermissionPolicy;
|
|
448
|
-
updateGroupImageUrlSquarePolicy: PermissionPolicy;
|
|
449
|
-
updateGroupNamePolicy: PermissionPolicy;
|
|
450
|
-
updateMessageDisappearingPolicy: PermissionPolicy;
|
|
451
|
-
};
|
|
452
|
-
declare const toSafePermissionPolicySet: (policySet: PermissionPolicySet) => SafePermissionPolicySet;
|
|
453
|
-
declare const fromSafePermissionPolicySet: (policySet: SafePermissionPolicySet) => PermissionPolicySet;
|
|
454
|
-
type SafeCreateGroupOptions = {
|
|
455
|
-
customPermissionPolicySet?: SafePermissionPolicySet;
|
|
456
|
-
description?: string;
|
|
457
|
-
imageUrlSquare?: string;
|
|
458
|
-
messageDisappearingSettings?: SafeMessageDisappearingSettings;
|
|
459
|
-
name?: string;
|
|
460
|
-
permissions?: GroupPermissionsOptions;
|
|
461
|
-
};
|
|
462
|
-
declare const toSafeCreateGroupOptions: (options: CreateGroupOptions) => SafeCreateGroupOptions;
|
|
463
|
-
declare const fromSafeCreateGroupOptions: (options: SafeCreateGroupOptions) => CreateGroupOptions;
|
|
464
|
-
type SafeCreateDmOptions = {
|
|
465
|
-
messageDisappearingSettings?: SafeMessageDisappearingSettings;
|
|
466
|
-
};
|
|
467
|
-
declare const toSafeCreateDmOptions: (options: CreateDMOptions) => SafeCreateDmOptions;
|
|
468
|
-
declare const fromSafeCreateDmOptions: (options: SafeCreateDmOptions) => CreateDMOptions;
|
|
469
438
|
type SafeConversation = {
|
|
470
439
|
id: string;
|
|
471
440
|
name: string;
|
|
472
441
|
imageUrl: string;
|
|
473
442
|
description: string;
|
|
443
|
+
appData: string;
|
|
474
444
|
permissions: {
|
|
475
445
|
policyType: GroupPermissionsOptions;
|
|
476
|
-
policySet:
|
|
477
|
-
addAdminPolicy: PermissionPolicy;
|
|
478
|
-
addMemberPolicy: PermissionPolicy;
|
|
479
|
-
removeAdminPolicy: PermissionPolicy;
|
|
480
|
-
removeMemberPolicy: PermissionPolicy;
|
|
481
|
-
updateGroupDescriptionPolicy: PermissionPolicy;
|
|
482
|
-
updateGroupImageUrlSquarePolicy: PermissionPolicy;
|
|
483
|
-
updateGroupNamePolicy: PermissionPolicy;
|
|
484
|
-
updateMessageDisappearingPolicy: PermissionPolicy;
|
|
485
|
-
};
|
|
446
|
+
policySet: PermissionPolicySet;
|
|
486
447
|
};
|
|
487
448
|
addedByInboxId: string;
|
|
488
|
-
metadata:
|
|
489
|
-
creatorInboxId: string;
|
|
490
|
-
conversationType: string;
|
|
491
|
-
};
|
|
449
|
+
metadata: GroupMetadata;
|
|
492
450
|
admins: string[];
|
|
493
451
|
superAdmins: string[];
|
|
494
452
|
createdAtNs: bigint;
|
|
495
|
-
isCommitLogForked?: boolean;
|
|
496
453
|
};
|
|
497
454
|
declare const toSafeConversation: (conversation: WorkerConversation) => Promise<SafeConversation>;
|
|
498
|
-
type SafeInstallation = {
|
|
499
|
-
bytes: Uint8Array;
|
|
500
|
-
clientTimestampNs?: bigint;
|
|
501
|
-
id: string;
|
|
502
|
-
};
|
|
503
|
-
declare const toSafeInstallation: (installation: Installation) => SafeInstallation;
|
|
504
|
-
type SafeInboxState = {
|
|
505
|
-
identifiers: Identifier[];
|
|
506
|
-
inboxId: string;
|
|
507
|
-
installations: SafeInstallation[];
|
|
508
|
-
recoveryIdentifier: Identifier;
|
|
509
|
-
};
|
|
510
|
-
declare const toSafeInboxState: (inboxState: InboxState) => SafeInboxState;
|
|
511
|
-
type SafeConsent = {
|
|
512
|
-
entity: string;
|
|
513
|
-
entityType: ConsentEntityType;
|
|
514
|
-
state: ConsentState;
|
|
515
|
-
};
|
|
516
|
-
declare const toSafeConsent: (consent: Consent) => SafeConsent;
|
|
517
|
-
declare const fromSafeConsent: (consent: SafeConsent) => Consent;
|
|
518
|
-
type SafeGroupMember = {
|
|
519
|
-
accountIdentifiers: Identifier[];
|
|
520
|
-
consentState: ConsentState;
|
|
521
|
-
inboxId: string;
|
|
522
|
-
installationIds: string[];
|
|
523
|
-
permissionLevel: PermissionLevel;
|
|
524
|
-
};
|
|
525
|
-
declare const toSafeGroupMember: (member: GroupMember) => SafeGroupMember;
|
|
526
|
-
declare const fromSafeGroupMember: (member: SafeGroupMember) => GroupMember;
|
|
527
|
-
type SafeHmacKey = {
|
|
528
|
-
key: Uint8Array;
|
|
529
|
-
epoch: bigint;
|
|
530
|
-
};
|
|
531
|
-
declare const toSafeHmacKey: (hmacKey: HmacKey) => SafeHmacKey;
|
|
532
455
|
type HmacKeys = Map<string, HmacKey[]>;
|
|
533
|
-
type
|
|
534
|
-
type SafeMessageDisappearingSettings = {
|
|
535
|
-
fromNs: bigint;
|
|
536
|
-
inNs: bigint;
|
|
537
|
-
};
|
|
538
|
-
declare const toSafeMessageDisappearingSettings: (settings: MessageDisappearingSettings) => SafeMessageDisappearingSettings;
|
|
539
|
-
declare const fromSafeMessageDisappearingSettings: (settings: SafeMessageDisappearingSettings) => MessageDisappearingSettings;
|
|
540
|
-
type SafeKeyPackageStatus = {
|
|
541
|
-
lifetime?: {
|
|
542
|
-
notBefore: bigint;
|
|
543
|
-
notAfter: bigint;
|
|
544
|
-
};
|
|
545
|
-
validationError?: string;
|
|
546
|
-
};
|
|
547
|
-
declare const toSafeKeyPackageStatus: (status: KeyPackageStatus) => SafeKeyPackageStatus;
|
|
548
|
-
type SafeXMTPCursor = {
|
|
549
|
-
originatorID: number;
|
|
550
|
-
sequenceID: bigint;
|
|
551
|
-
};
|
|
552
|
-
type SafeConversationDebugInfo = {
|
|
553
|
-
epoch: bigint;
|
|
554
|
-
maybeForked: boolean;
|
|
555
|
-
forkDetails: string;
|
|
556
|
-
isCommitLogForked?: boolean;
|
|
557
|
-
localCommitLog: string;
|
|
558
|
-
remoteCommitLog: string;
|
|
559
|
-
cursor: SafeXMTPCursor[];
|
|
560
|
-
};
|
|
561
|
-
declare const toSafeConversationDebugInfo: (debugInfo: ConversationDebugInfo) => SafeConversationDebugInfo;
|
|
562
|
-
type SafeApiStats = {
|
|
563
|
-
fetchKeyPackage: bigint;
|
|
564
|
-
queryGroupMessages: bigint;
|
|
565
|
-
queryWelcomeMessages: bigint;
|
|
566
|
-
sendGroupMessages: bigint;
|
|
567
|
-
sendWelcomeMessages: bigint;
|
|
568
|
-
subscribeMessages: bigint;
|
|
569
|
-
subscribeWelcomes: bigint;
|
|
570
|
-
uploadKeyPackage: bigint;
|
|
571
|
-
};
|
|
572
|
-
declare const toSafeApiStats: (stats: ApiStats) => SafeApiStats;
|
|
573
|
-
type SafeIdentityStats = {
|
|
574
|
-
getIdentityUpdatesV2: bigint;
|
|
575
|
-
getInboxIds: bigint;
|
|
576
|
-
publishIdentityUpdate: bigint;
|
|
577
|
-
verifySmartContractWalletSignature: bigint;
|
|
578
|
-
};
|
|
579
|
-
declare const toSafeIdentityStats: (stats: IdentityStats) => SafeIdentityStats;
|
|
456
|
+
type LastReadTimes = Map<string, bigint>;
|
|
580
457
|
|
|
581
458
|
type ClientAction = {
|
|
582
459
|
action: "client.init";
|
|
583
460
|
id: string;
|
|
584
461
|
result: {
|
|
462
|
+
appVersion: string;
|
|
585
463
|
inboxId: string;
|
|
586
464
|
installationId: string;
|
|
587
465
|
installationIdBytes: Uint8Array;
|
|
466
|
+
libxmtpVersion: string;
|
|
588
467
|
};
|
|
589
468
|
data: {
|
|
590
469
|
identifier: Identifier;
|
|
@@ -727,7 +606,7 @@ type ClientAction = {
|
|
|
727
606
|
identifiers: Identifier[];
|
|
728
607
|
};
|
|
729
608
|
} | {
|
|
730
|
-
action: "client.
|
|
609
|
+
action: "client.getInboxIdByIdentifier";
|
|
731
610
|
id: string;
|
|
732
611
|
result: string | undefined;
|
|
733
612
|
data: {
|
|
@@ -758,22 +637,12 @@ type ClientAction = {
|
|
|
758
637
|
publicKey: Uint8Array;
|
|
759
638
|
};
|
|
760
639
|
} | {
|
|
761
|
-
action: "client.
|
|
640
|
+
action: "client.fetchKeyPackageStatuses";
|
|
762
641
|
id: string;
|
|
763
|
-
result: Map<string,
|
|
642
|
+
result: Map<string, KeyPackageStatus>;
|
|
764
643
|
data: {
|
|
765
644
|
installationIds: string[];
|
|
766
645
|
};
|
|
767
|
-
} | {
|
|
768
|
-
action: "client.libxmtpVersion";
|
|
769
|
-
id: string;
|
|
770
|
-
result: string;
|
|
771
|
-
data: undefined;
|
|
772
|
-
} | {
|
|
773
|
-
action: "client.appVersion";
|
|
774
|
-
id: string;
|
|
775
|
-
result: string;
|
|
776
|
-
data: undefined;
|
|
777
646
|
};
|
|
778
647
|
|
|
779
648
|
type ConversationAction = {
|
|
@@ -789,17 +658,8 @@ type ConversationAction = {
|
|
|
789
658
|
result: string;
|
|
790
659
|
data: {
|
|
791
660
|
id: string;
|
|
792
|
-
content:
|
|
793
|
-
|
|
794
|
-
};
|
|
795
|
-
} | {
|
|
796
|
-
action: "conversation.sendOptimistic";
|
|
797
|
-
id: string;
|
|
798
|
-
result: string;
|
|
799
|
-
data: {
|
|
800
|
-
id: string;
|
|
801
|
-
content: SafeEncodedContent;
|
|
802
|
-
sendOptions: SafeSendMessageOpts;
|
|
661
|
+
content: EncodedContent;
|
|
662
|
+
options?: SendMessageOpts;
|
|
803
663
|
};
|
|
804
664
|
} | {
|
|
805
665
|
action: "conversation.publishMessages";
|
|
@@ -811,10 +671,10 @@ type ConversationAction = {
|
|
|
811
671
|
} | {
|
|
812
672
|
action: "conversation.messages";
|
|
813
673
|
id: string;
|
|
814
|
-
result:
|
|
674
|
+
result: DecodedMessage$1[];
|
|
815
675
|
data: {
|
|
816
676
|
id: string;
|
|
817
|
-
options?:
|
|
677
|
+
options?: ListMessagesOptions;
|
|
818
678
|
};
|
|
819
679
|
} | {
|
|
820
680
|
action: "conversation.countMessages";
|
|
@@ -822,19 +682,19 @@ type ConversationAction = {
|
|
|
822
682
|
result: bigint;
|
|
823
683
|
data: {
|
|
824
684
|
id: string;
|
|
825
|
-
options?: Omit<
|
|
685
|
+
options?: Omit<ListMessagesOptions, "limit" | "direction">;
|
|
826
686
|
};
|
|
827
687
|
} | {
|
|
828
688
|
action: "conversation.members";
|
|
829
689
|
id: string;
|
|
830
|
-
result:
|
|
690
|
+
result: GroupMember[];
|
|
831
691
|
data: {
|
|
832
692
|
id: string;
|
|
833
693
|
};
|
|
834
694
|
} | {
|
|
835
695
|
action: "conversation.messageDisappearingSettings";
|
|
836
696
|
id: string;
|
|
837
|
-
result:
|
|
697
|
+
result: MessageDisappearingSettings | undefined;
|
|
838
698
|
data: {
|
|
839
699
|
id: string;
|
|
840
700
|
};
|
|
@@ -842,7 +702,7 @@ type ConversationAction = {
|
|
|
842
702
|
action: "conversation.updateMessageDisappearingSettings";
|
|
843
703
|
id: string;
|
|
844
704
|
result: undefined;
|
|
845
|
-
data:
|
|
705
|
+
data: MessageDisappearingSettings & {
|
|
846
706
|
id: string;
|
|
847
707
|
};
|
|
848
708
|
} | {
|
|
@@ -875,16 +735,16 @@ type ConversationAction = {
|
|
|
875
735
|
id: string;
|
|
876
736
|
};
|
|
877
737
|
} | {
|
|
878
|
-
action: "conversation.
|
|
738
|
+
action: "conversation.hmacKeys";
|
|
879
739
|
id: string;
|
|
880
|
-
result:
|
|
740
|
+
result: HmacKeys;
|
|
881
741
|
data: {
|
|
882
742
|
id: string;
|
|
883
743
|
};
|
|
884
744
|
} | {
|
|
885
745
|
action: "conversation.debugInfo";
|
|
886
746
|
id: string;
|
|
887
|
-
result:
|
|
747
|
+
result: ConversationDebugInfo;
|
|
888
748
|
data: {
|
|
889
749
|
id: string;
|
|
890
750
|
};
|
|
@@ -906,7 +766,7 @@ type ConversationAction = {
|
|
|
906
766
|
} | {
|
|
907
767
|
action: "conversation.lastMessage";
|
|
908
768
|
id: string;
|
|
909
|
-
result:
|
|
769
|
+
result: DecodedMessage$1 | undefined;
|
|
910
770
|
data: {
|
|
911
771
|
id: string;
|
|
912
772
|
};
|
|
@@ -917,6 +777,120 @@ type ConversationAction = {
|
|
|
917
777
|
data: {
|
|
918
778
|
id: string;
|
|
919
779
|
};
|
|
780
|
+
} | {
|
|
781
|
+
action: "conversation.lastReadTimes";
|
|
782
|
+
id: string;
|
|
783
|
+
result: LastReadTimes;
|
|
784
|
+
data: {
|
|
785
|
+
id: string;
|
|
786
|
+
};
|
|
787
|
+
} | {
|
|
788
|
+
action: "conversation.sendText";
|
|
789
|
+
id: string;
|
|
790
|
+
result: string;
|
|
791
|
+
data: {
|
|
792
|
+
id: string;
|
|
793
|
+
text: string;
|
|
794
|
+
isOptimistic?: boolean;
|
|
795
|
+
};
|
|
796
|
+
} | {
|
|
797
|
+
action: "conversation.sendMarkdown";
|
|
798
|
+
id: string;
|
|
799
|
+
result: string;
|
|
800
|
+
data: {
|
|
801
|
+
id: string;
|
|
802
|
+
markdown: string;
|
|
803
|
+
isOptimistic?: boolean;
|
|
804
|
+
};
|
|
805
|
+
} | {
|
|
806
|
+
action: "conversation.sendReaction";
|
|
807
|
+
id: string;
|
|
808
|
+
result: string;
|
|
809
|
+
data: {
|
|
810
|
+
id: string;
|
|
811
|
+
reaction: Reaction;
|
|
812
|
+
isOptimistic?: boolean;
|
|
813
|
+
};
|
|
814
|
+
} | {
|
|
815
|
+
action: "conversation.sendReadReceipt";
|
|
816
|
+
id: string;
|
|
817
|
+
result: string;
|
|
818
|
+
data: {
|
|
819
|
+
id: string;
|
|
820
|
+
isOptimistic?: boolean;
|
|
821
|
+
};
|
|
822
|
+
} | {
|
|
823
|
+
action: "conversation.sendReply";
|
|
824
|
+
id: string;
|
|
825
|
+
result: string;
|
|
826
|
+
data: {
|
|
827
|
+
id: string;
|
|
828
|
+
reply: Reply$1;
|
|
829
|
+
isOptimistic?: boolean;
|
|
830
|
+
};
|
|
831
|
+
} | {
|
|
832
|
+
action: "conversation.sendTransactionReference";
|
|
833
|
+
id: string;
|
|
834
|
+
result: string;
|
|
835
|
+
data: {
|
|
836
|
+
id: string;
|
|
837
|
+
transactionReference: TransactionReference;
|
|
838
|
+
isOptimistic?: boolean;
|
|
839
|
+
};
|
|
840
|
+
} | {
|
|
841
|
+
action: "conversation.sendWalletSendCalls";
|
|
842
|
+
id: string;
|
|
843
|
+
result: string;
|
|
844
|
+
data: {
|
|
845
|
+
id: string;
|
|
846
|
+
walletSendCalls: WalletSendCalls;
|
|
847
|
+
isOptimistic?: boolean;
|
|
848
|
+
};
|
|
849
|
+
} | {
|
|
850
|
+
action: "conversation.sendActions";
|
|
851
|
+
id: string;
|
|
852
|
+
result: string;
|
|
853
|
+
data: {
|
|
854
|
+
id: string;
|
|
855
|
+
actions: Actions;
|
|
856
|
+
isOptimistic?: boolean;
|
|
857
|
+
};
|
|
858
|
+
} | {
|
|
859
|
+
action: "conversation.sendIntent";
|
|
860
|
+
id: string;
|
|
861
|
+
result: string;
|
|
862
|
+
data: {
|
|
863
|
+
id: string;
|
|
864
|
+
intent: Intent;
|
|
865
|
+
isOptimistic?: boolean;
|
|
866
|
+
};
|
|
867
|
+
} | {
|
|
868
|
+
action: "conversation.sendAttachment";
|
|
869
|
+
id: string;
|
|
870
|
+
result: string;
|
|
871
|
+
data: {
|
|
872
|
+
id: string;
|
|
873
|
+
attachment: Attachment;
|
|
874
|
+
isOptimistic?: boolean;
|
|
875
|
+
};
|
|
876
|
+
} | {
|
|
877
|
+
action: "conversation.sendMultiRemoteAttachment";
|
|
878
|
+
id: string;
|
|
879
|
+
result: string;
|
|
880
|
+
data: {
|
|
881
|
+
id: string;
|
|
882
|
+
multiRemoteAttachment: MultiRemoteAttachment;
|
|
883
|
+
isOptimistic?: boolean;
|
|
884
|
+
};
|
|
885
|
+
} | {
|
|
886
|
+
action: "conversation.sendRemoteAttachment";
|
|
887
|
+
id: string;
|
|
888
|
+
result: string;
|
|
889
|
+
data: {
|
|
890
|
+
id: string;
|
|
891
|
+
remoteAttachment: RemoteAttachment;
|
|
892
|
+
isOptimistic?: boolean;
|
|
893
|
+
};
|
|
920
894
|
};
|
|
921
895
|
|
|
922
896
|
type ConversationsAction = {
|
|
@@ -929,7 +903,7 @@ type ConversationsAction = {
|
|
|
929
903
|
} | {
|
|
930
904
|
action: "conversations.getMessageById";
|
|
931
905
|
id: string;
|
|
932
|
-
result:
|
|
906
|
+
result: DecodedMessage$1 | undefined;
|
|
933
907
|
data: {
|
|
934
908
|
id: string;
|
|
935
909
|
};
|
|
@@ -945,60 +919,60 @@ type ConversationsAction = {
|
|
|
945
919
|
id: string;
|
|
946
920
|
result: SafeConversation[];
|
|
947
921
|
data: {
|
|
948
|
-
options?:
|
|
922
|
+
options?: ListConversationsOptions;
|
|
949
923
|
};
|
|
950
924
|
} | {
|
|
951
925
|
action: "conversations.listGroups";
|
|
952
926
|
id: string;
|
|
953
927
|
result: SafeConversation[];
|
|
954
928
|
data: {
|
|
955
|
-
options?: Omit<
|
|
929
|
+
options?: Omit<ListConversationsOptions, "conversationType">;
|
|
956
930
|
};
|
|
957
931
|
} | {
|
|
958
932
|
action: "conversations.listDms";
|
|
959
933
|
id: string;
|
|
960
934
|
result: SafeConversation[];
|
|
961
935
|
data: {
|
|
962
|
-
options?: Omit<
|
|
936
|
+
options?: Omit<ListConversationsOptions, "conversationType">;
|
|
963
937
|
};
|
|
964
938
|
} | {
|
|
965
|
-
action: "conversations.
|
|
939
|
+
action: "conversations.createGroupOptimistic";
|
|
966
940
|
id: string;
|
|
967
941
|
result: SafeConversation;
|
|
968
942
|
data: {
|
|
969
|
-
options?:
|
|
943
|
+
options?: CreateGroupOptions;
|
|
970
944
|
};
|
|
971
945
|
} | {
|
|
972
|
-
action: "conversations.
|
|
946
|
+
action: "conversations.createGroupWithIdentifiers";
|
|
973
947
|
id: string;
|
|
974
948
|
result: SafeConversation;
|
|
975
949
|
data: {
|
|
976
950
|
identifiers: Identifier[];
|
|
977
|
-
options?:
|
|
951
|
+
options?: CreateGroupOptions;
|
|
978
952
|
};
|
|
979
953
|
} | {
|
|
980
|
-
action: "conversations.
|
|
954
|
+
action: "conversations.createGroup";
|
|
981
955
|
id: string;
|
|
982
956
|
result: SafeConversation;
|
|
983
957
|
data: {
|
|
984
958
|
inboxIds: string[];
|
|
985
|
-
options?:
|
|
959
|
+
options?: CreateGroupOptions;
|
|
986
960
|
};
|
|
987
961
|
} | {
|
|
988
|
-
action: "conversations.
|
|
962
|
+
action: "conversations.createDmWithIdentifier";
|
|
989
963
|
id: string;
|
|
990
964
|
result: SafeConversation;
|
|
991
965
|
data: {
|
|
992
966
|
identifier: Identifier;
|
|
993
|
-
options?:
|
|
967
|
+
options?: CreateDmOptions;
|
|
994
968
|
};
|
|
995
969
|
} | {
|
|
996
|
-
action: "conversations.
|
|
970
|
+
action: "conversations.createDm";
|
|
997
971
|
id: string;
|
|
998
972
|
result: SafeConversation;
|
|
999
973
|
data: {
|
|
1000
974
|
inboxId: string;
|
|
1001
|
-
options?:
|
|
975
|
+
options?: CreateDmOptions;
|
|
1002
976
|
};
|
|
1003
977
|
} | {
|
|
1004
978
|
action: "conversations.sync";
|
|
@@ -1013,9 +987,9 @@ type ConversationsAction = {
|
|
|
1013
987
|
consentStates?: ConsentState[];
|
|
1014
988
|
};
|
|
1015
989
|
} | {
|
|
1016
|
-
action: "conversations.
|
|
990
|
+
action: "conversations.hmacKeys";
|
|
1017
991
|
id: string;
|
|
1018
|
-
result:
|
|
992
|
+
result: HmacKeys;
|
|
1019
993
|
data: undefined;
|
|
1020
994
|
} | {
|
|
1021
995
|
action: "conversations.stream";
|
|
@@ -1046,12 +1020,12 @@ type ConversationsAction = {
|
|
|
1046
1020
|
type DebugInformationAction = {
|
|
1047
1021
|
action: "debugInformation.apiStatistics";
|
|
1048
1022
|
id: string;
|
|
1049
|
-
result:
|
|
1023
|
+
result: ApiStats;
|
|
1050
1024
|
data: undefined;
|
|
1051
1025
|
} | {
|
|
1052
1026
|
action: "debugInformation.apiIdentityStatistics";
|
|
1053
1027
|
id: string;
|
|
1054
|
-
result:
|
|
1028
|
+
result: IdentityStats;
|
|
1055
1029
|
data: undefined;
|
|
1056
1030
|
} | {
|
|
1057
1031
|
action: "debugInformation.apiAggregateStatistics";
|
|
@@ -1063,13 +1037,6 @@ type DebugInformationAction = {
|
|
|
1063
1037
|
id: string;
|
|
1064
1038
|
result: undefined;
|
|
1065
1039
|
data: undefined;
|
|
1066
|
-
} | {
|
|
1067
|
-
action: "debugInformation.uploadDebugArchive";
|
|
1068
|
-
id: string;
|
|
1069
|
-
result: string;
|
|
1070
|
-
data: {
|
|
1071
|
-
serverUrl?: string;
|
|
1072
|
-
};
|
|
1073
1040
|
};
|
|
1074
1041
|
|
|
1075
1042
|
type DmAction = {
|
|
@@ -1080,7 +1047,7 @@ type DmAction = {
|
|
|
1080
1047
|
id: string;
|
|
1081
1048
|
};
|
|
1082
1049
|
} | {
|
|
1083
|
-
action: "dm.
|
|
1050
|
+
action: "dm.duplicateDms";
|
|
1084
1051
|
id: string;
|
|
1085
1052
|
result: SafeConversation[];
|
|
1086
1053
|
data: {
|
|
@@ -1206,6 +1173,14 @@ type GroupAction = {
|
|
|
1206
1173
|
id: string;
|
|
1207
1174
|
imageUrl: string;
|
|
1208
1175
|
};
|
|
1176
|
+
} | {
|
|
1177
|
+
action: "group.updateAppData";
|
|
1178
|
+
id: string;
|
|
1179
|
+
result: undefined;
|
|
1180
|
+
data: {
|
|
1181
|
+
id: string;
|
|
1182
|
+
appData: string;
|
|
1183
|
+
};
|
|
1209
1184
|
} | {
|
|
1210
1185
|
action: "group.updatePermission";
|
|
1211
1186
|
id: string;
|
|
@@ -1223,36 +1198,43 @@ type GroupAction = {
|
|
|
1223
1198
|
data: {
|
|
1224
1199
|
id: string;
|
|
1225
1200
|
};
|
|
1201
|
+
} | {
|
|
1202
|
+
action: "group.requestRemoval";
|
|
1203
|
+
id: string;
|
|
1204
|
+
result: undefined;
|
|
1205
|
+
data: {
|
|
1206
|
+
id: string;
|
|
1207
|
+
};
|
|
1208
|
+
} | {
|
|
1209
|
+
action: "group.isPendingRemoval";
|
|
1210
|
+
id: string;
|
|
1211
|
+
result: boolean;
|
|
1212
|
+
data: {
|
|
1213
|
+
id: string;
|
|
1214
|
+
};
|
|
1226
1215
|
};
|
|
1227
1216
|
|
|
1228
1217
|
type PreferencesAction = {
|
|
1229
1218
|
action: "preferences.inboxState";
|
|
1230
1219
|
id: string;
|
|
1231
|
-
result:
|
|
1220
|
+
result: InboxState;
|
|
1232
1221
|
data: {
|
|
1233
1222
|
refreshFromNetwork: boolean;
|
|
1234
1223
|
};
|
|
1235
1224
|
} | {
|
|
1236
|
-
action: "preferences.
|
|
1225
|
+
action: "preferences.getInboxStates";
|
|
1237
1226
|
id: string;
|
|
1238
|
-
result:
|
|
1227
|
+
result: InboxState[];
|
|
1239
1228
|
data: {
|
|
1240
1229
|
inboxIds: string[];
|
|
1241
1230
|
refreshFromNetwork: boolean;
|
|
1242
1231
|
};
|
|
1243
|
-
} | {
|
|
1244
|
-
action: "preferences.getLatestInboxState";
|
|
1245
|
-
id: string;
|
|
1246
|
-
result: SafeInboxState;
|
|
1247
|
-
data: {
|
|
1248
|
-
inboxId: string;
|
|
1249
|
-
};
|
|
1250
1232
|
} | {
|
|
1251
1233
|
action: "preferences.setConsentStates";
|
|
1252
1234
|
id: string;
|
|
1253
1235
|
result: undefined;
|
|
1254
1236
|
data: {
|
|
1255
|
-
records:
|
|
1237
|
+
records: Consent[];
|
|
1256
1238
|
};
|
|
1257
1239
|
} | {
|
|
1258
1240
|
action: "preferences.getConsentState";
|
|
@@ -1289,14 +1271,15 @@ type UnknownAction = {
|
|
|
1289
1271
|
result: unknown;
|
|
1290
1272
|
data: unknown;
|
|
1291
1273
|
};
|
|
1292
|
-
type
|
|
1274
|
+
type EndStreamAction = {
|
|
1293
1275
|
action: "endStream";
|
|
1294
1276
|
id: string;
|
|
1295
1277
|
result: undefined;
|
|
1296
1278
|
data: {
|
|
1297
1279
|
streamId: string;
|
|
1298
1280
|
};
|
|
1299
|
-
}
|
|
1281
|
+
};
|
|
1282
|
+
type ClientWorkerAction = EndStreamAction | ClientAction | ConversationAction | ConversationsAction | DmAction | GroupAction | PreferencesAction | DebugInformationAction;
|
|
1300
1283
|
type ActionName<T extends UnknownAction> = T["action"];
|
|
1301
1284
|
type ExtractAction<T extends UnknownAction, A extends ActionName<T>> = Extract<T, {
|
|
1302
1285
|
action: A;
|
|
@@ -1317,7 +1300,7 @@ type ActionErrorData<T extends UnknownAction> = {
|
|
|
1317
1300
|
type StreamAction = {
|
|
1318
1301
|
action: "stream.message";
|
|
1319
1302
|
streamId: string;
|
|
1320
|
-
result:
|
|
1303
|
+
result: DecodedMessage$1 | undefined;
|
|
1321
1304
|
} | {
|
|
1322
1305
|
action: "stream.conversation";
|
|
1323
1306
|
streamId: string;
|
|
@@ -1325,11 +1308,11 @@ type StreamAction = {
|
|
|
1325
1308
|
} | {
|
|
1326
1309
|
action: "stream.consent";
|
|
1327
1310
|
streamId: string;
|
|
1328
|
-
result:
|
|
1311
|
+
result: Consent[] | undefined;
|
|
1329
1312
|
} | {
|
|
1330
1313
|
action: "stream.preferences";
|
|
1331
1314
|
streamId: string;
|
|
1332
|
-
result:
|
|
1315
|
+
result: UserPreferenceUpdate[] | undefined;
|
|
1333
1316
|
} | {
|
|
1334
1317
|
action: "stream.messageDeleted";
|
|
1335
1318
|
streamId: string;
|
|
@@ -1341,85 +1324,45 @@ type StreamAction = {
|
|
|
1341
1324
|
};
|
|
1342
1325
|
|
|
1343
1326
|
/**
|
|
1344
|
-
* Class that sets up a
|
|
1327
|
+
* Class that sets up a bridge for worker communications
|
|
1345
1328
|
*
|
|
1346
|
-
* This class is not meant to be used directly
|
|
1347
|
-
* to provide an interface to the worker.
|
|
1329
|
+
* This class is not meant to be used directly.
|
|
1348
1330
|
*
|
|
1349
|
-
* @param worker - The worker to use for
|
|
1331
|
+
* @param worker - The worker to use for communications
|
|
1350
1332
|
* @param enableLogging - Whether to enable logging in the worker
|
|
1351
|
-
* @returns A new
|
|
1333
|
+
* @returns A new WorkerBridge instance
|
|
1352
1334
|
*/
|
|
1353
|
-
declare class
|
|
1335
|
+
declare class WorkerBridge<T extends UnknownAction> {
|
|
1354
1336
|
#private;
|
|
1355
|
-
constructor(worker: Worker, enableLogging
|
|
1337
|
+
constructor(worker: Worker, enableLogging?: boolean);
|
|
1356
1338
|
/**
|
|
1357
|
-
* Sends an action message to the
|
|
1339
|
+
* Sends an action message to the worker
|
|
1358
1340
|
*
|
|
1359
1341
|
* @param action - The action to send to the worker
|
|
1360
1342
|
* @param data - The data to send to the worker
|
|
1361
1343
|
* @returns A promise that resolves when the action is completed
|
|
1362
1344
|
*/
|
|
1363
|
-
|
|
1345
|
+
action<A extends ActionName<T>, D = ExtractActionData<T, A>, R = ExtractActionResult<T, A>>(action: A, ...args: D extends undefined ? [] : [data: D]): [R] extends [undefined] ? Promise<void> : Promise<R>;
|
|
1364
1346
|
/**
|
|
1365
|
-
* Handles a message from the
|
|
1347
|
+
* Handles a message from the worker
|
|
1366
1348
|
*
|
|
1367
1349
|
* @param event - The event to handle
|
|
1368
1350
|
*/
|
|
1369
|
-
handleMessage: (event: MessageEvent<ActionWithoutData<
|
|
1351
|
+
handleMessage: (event: MessageEvent<ActionWithoutData<T> | ActionErrorData<T>>) => void;
|
|
1370
1352
|
/**
|
|
1371
|
-
* Handles a stream message from the
|
|
1353
|
+
* Handles a stream message from the worker
|
|
1372
1354
|
*
|
|
1373
1355
|
* @param streamId - The ID of the stream to handle
|
|
1374
1356
|
* @param callback - The callback to handle the stream message
|
|
1375
1357
|
* @returns A function to remove the stream handler
|
|
1376
1358
|
*/
|
|
1377
|
-
handleStreamMessage: <
|
|
1359
|
+
handleStreamMessage: <R extends StreamAction["result"], V = R>(streamId: string, callback: (error: Error | null, value: R | undefined) => void, options?: StreamOptions<R, V>) => () => Promise<void>;
|
|
1378
1360
|
/**
|
|
1379
1361
|
* Removes all event listeners and terminates the worker
|
|
1380
1362
|
*/
|
|
1381
1363
|
close(): void;
|
|
1382
1364
|
}
|
|
1383
1365
|
|
|
1384
|
-
type MessageKind = "application" | "membership_change";
|
|
1385
|
-
type MessageDeliveryStatus = "unpublished" | "published" | "failed";
|
|
1386
|
-
/**
|
|
1387
|
-
* Represents a decoded XMTP message
|
|
1388
|
-
*
|
|
1389
|
-
* This class transforms network messages into a structured format with
|
|
1390
|
-
* content decoding.
|
|
1391
|
-
*
|
|
1392
|
-
* @class
|
|
1393
|
-
* @property {any} content - The decoded content of the message
|
|
1394
|
-
* @property {ContentTypeId} contentType - The content type of the message content
|
|
1395
|
-
* @property {string} conversationId - Unique identifier for the conversation
|
|
1396
|
-
* @property {MessageDeliveryStatus} deliveryStatus - Current delivery status of the message ("unpublished" | "published" | "failed")
|
|
1397
|
-
* @property {string} [fallback] - Optional fallback text for the message
|
|
1398
|
-
* @property {number} [compression] - Optional compression level applied to the message
|
|
1399
|
-
* @property {string} id - Unique identifier for the message
|
|
1400
|
-
* @property {MessageKind} kind - Type of message ("application" | "membership_change")
|
|
1401
|
-
* @property {Map<string, string>} parameters - Additional parameters associated with the message
|
|
1402
|
-
* @property {SafeMessage["content"]} encodedContent - Raw encoded content of the message
|
|
1403
|
-
* @property {string} senderInboxId - Identifier for the sender's inbox
|
|
1404
|
-
* @property {bigint} sentAtNs - Timestamp when the message was sent (in nanoseconds)
|
|
1405
|
-
*/
|
|
1406
|
-
declare class DecodedMessage<ContentTypes = unknown> {
|
|
1407
|
-
#private;
|
|
1408
|
-
content: ContentTypes | undefined;
|
|
1409
|
-
contentType: ContentTypeId$1;
|
|
1410
|
-
conversationId: string;
|
|
1411
|
-
deliveryStatus: MessageDeliveryStatus;
|
|
1412
|
-
fallback?: string;
|
|
1413
|
-
compression?: number;
|
|
1414
|
-
id: string;
|
|
1415
|
-
kind: MessageKind;
|
|
1416
|
-
parameters: Map<string, string>;
|
|
1417
|
-
encodedContent: SafeMessage["content"];
|
|
1418
|
-
senderInboxId: string;
|
|
1419
|
-
sentAtNs: bigint;
|
|
1420
|
-
constructor(client: Client<ContentTypes>, message: SafeMessage);
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
1366
|
/**
|
|
1424
1367
|
* Represents a conversation
|
|
1425
1368
|
*
|
|
@@ -1430,20 +1373,17 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
1430
1373
|
/**
|
|
1431
1374
|
* Creates a new conversation instance
|
|
1432
1375
|
*
|
|
1433
|
-
* @param
|
|
1376
|
+
* @param worker - The worker bridge instance for client communication
|
|
1377
|
+
* @param codecRegistry - The codec registry instance
|
|
1434
1378
|
* @param id - The unique identifier for this conversation
|
|
1435
1379
|
* @param data - Optional conversation data to initialize with
|
|
1436
1380
|
*/
|
|
1437
|
-
constructor(
|
|
1381
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>, codecRegistry: CodecRegistry, id: string, data?: SafeConversation);
|
|
1438
1382
|
get id(): string;
|
|
1439
|
-
get isCommitLogForked(): boolean | undefined;
|
|
1440
1383
|
get addedByInboxId(): string | undefined;
|
|
1441
1384
|
get createdAtNs(): bigint | undefined;
|
|
1442
1385
|
get createdAt(): Date | undefined;
|
|
1443
|
-
get metadata():
|
|
1444
|
-
creatorInboxId: string;
|
|
1445
|
-
conversationType: string;
|
|
1446
|
-
} | undefined;
|
|
1386
|
+
get metadata(): _xmtp_wasm_bindings.GroupMetadata | undefined;
|
|
1447
1387
|
lastMessage(): Promise<DecodedMessage<ContentTypes> | undefined>;
|
|
1448
1388
|
isActive(): Promise<boolean>;
|
|
1449
1389
|
/**
|
|
@@ -1451,7 +1391,7 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
1451
1391
|
*
|
|
1452
1392
|
* @returns Promise that resolves with the conversation members
|
|
1453
1393
|
*/
|
|
1454
|
-
members(): Promise<
|
|
1394
|
+
members(): Promise<_xmtp_wasm_bindings.GroupMember[]>;
|
|
1455
1395
|
/**
|
|
1456
1396
|
* Synchronizes conversation data from the network
|
|
1457
1397
|
*
|
|
@@ -1465,37 +1405,126 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
1465
1405
|
*/
|
|
1466
1406
|
publishMessages(): Promise<void>;
|
|
1467
1407
|
/**
|
|
1468
|
-
*
|
|
1408
|
+
* Sends a message
|
|
1409
|
+
*
|
|
1410
|
+
* @param content - The encoded content to send
|
|
1411
|
+
* @param options - Optional send options
|
|
1412
|
+
* @param options.shouldPush - Indicates whether this message should be
|
|
1413
|
+
* included in push notifications
|
|
1414
|
+
* @param options.isOptimistic - Indicates whether this message should be
|
|
1415
|
+
* sent optimistically and published later via `publishMessages`
|
|
1416
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1417
|
+
*/
|
|
1418
|
+
send(content: EncodedContent, options?: SendMessageOpts): Promise<string>;
|
|
1419
|
+
/**
|
|
1420
|
+
* Sends a text message
|
|
1421
|
+
*
|
|
1422
|
+
* @param text - The text to send
|
|
1423
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1424
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1425
|
+
*/
|
|
1426
|
+
sendText(text: string, isOptimistic?: boolean): Promise<string>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Sends a markdown message
|
|
1429
|
+
*
|
|
1430
|
+
* @param markdown - The markdown to send
|
|
1431
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1432
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1433
|
+
*/
|
|
1434
|
+
sendMarkdown(markdown: string, isOptimistic?: boolean): Promise<string>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Sends a reaction message
|
|
1437
|
+
*
|
|
1438
|
+
* @param reaction - The reaction to send
|
|
1439
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1440
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1441
|
+
*/
|
|
1442
|
+
sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise<string>;
|
|
1443
|
+
/**
|
|
1444
|
+
* Sends a read receipt message
|
|
1445
|
+
*
|
|
1446
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1447
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1448
|
+
*/
|
|
1449
|
+
sendReadReceipt(isOptimistic?: boolean): Promise<string>;
|
|
1450
|
+
/**
|
|
1451
|
+
* Sends a reply message
|
|
1452
|
+
*
|
|
1453
|
+
* @param reply - The reply to send
|
|
1454
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1455
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1456
|
+
*/
|
|
1457
|
+
sendReply(reply: Reply$1, isOptimistic?: boolean): Promise<string>;
|
|
1458
|
+
/**
|
|
1459
|
+
* Sends a transaction reference message
|
|
1460
|
+
*
|
|
1461
|
+
* @param transactionReference - The transaction reference to send
|
|
1462
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1463
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1464
|
+
*/
|
|
1465
|
+
sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise<string>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Sends a wallet send calls message
|
|
1468
|
+
*
|
|
1469
|
+
* @param walletSendCalls - The wallet send calls to send
|
|
1470
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1471
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1472
|
+
*/
|
|
1473
|
+
sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise<string>;
|
|
1474
|
+
/**
|
|
1475
|
+
* Sends an actions message
|
|
1476
|
+
*
|
|
1477
|
+
* @param actions - The actions to send
|
|
1478
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1479
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1480
|
+
*/
|
|
1481
|
+
sendActions(actions: Actions, isOptimistic?: boolean): Promise<string>;
|
|
1482
|
+
/**
|
|
1483
|
+
* Sends an intent message
|
|
1469
1484
|
*
|
|
1470
|
-
* @param
|
|
1471
|
-
* @param
|
|
1472
|
-
* @returns Promise that resolves with the message ID
|
|
1473
|
-
* @throws {MissingContentTypeError} if content type is required but not provided
|
|
1485
|
+
* @param intent - The intent to send
|
|
1486
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1487
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1474
1488
|
*/
|
|
1475
|
-
|
|
1489
|
+
sendIntent(intent: Intent, isOptimistic?: boolean): Promise<string>;
|
|
1476
1490
|
/**
|
|
1477
|
-
*
|
|
1491
|
+
* Sends an attachment message
|
|
1478
1492
|
*
|
|
1479
|
-
* @param
|
|
1480
|
-
* @param
|
|
1493
|
+
* @param attachment - The attachment to send
|
|
1494
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1481
1495
|
* @returns Promise that resolves with the message ID after it has been sent
|
|
1482
|
-
* @throws {MissingContentTypeError} if content type is required but not provided
|
|
1483
1496
|
*/
|
|
1484
|
-
|
|
1497
|
+
sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise<string>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Sends a multi remote attachment message
|
|
1500
|
+
*
|
|
1501
|
+
* @param multiRemoteAttachment - The multi remote attachment to send
|
|
1502
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1503
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1504
|
+
*/
|
|
1505
|
+
sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise<string>;
|
|
1506
|
+
/**
|
|
1507
|
+
* Sends a remote attachment message
|
|
1508
|
+
*
|
|
1509
|
+
* @param remoteAttachment - The remote attachment to send
|
|
1510
|
+
* @param isOptimistic - Whether to send the message optimistically
|
|
1511
|
+
* @returns Promise that resolves with the message ID after it has been sent
|
|
1512
|
+
*/
|
|
1513
|
+
sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise<string>;
|
|
1485
1514
|
/**
|
|
1486
1515
|
* Lists messages in this conversation
|
|
1487
1516
|
*
|
|
1488
1517
|
* @param options - Optional filtering and pagination options
|
|
1489
1518
|
* @returns Promise that resolves with an array of decoded messages
|
|
1490
1519
|
*/
|
|
1491
|
-
messages(options?:
|
|
1520
|
+
messages(options?: ListMessagesOptions): Promise<DecodedMessage<ContentTypes>[]>;
|
|
1492
1521
|
/**
|
|
1493
1522
|
* Counts messages in this conversation
|
|
1494
1523
|
*
|
|
1495
1524
|
* @param options - Optional filtering options
|
|
1496
1525
|
* @returns Promise that resolves with the count of messages
|
|
1497
1526
|
*/
|
|
1498
|
-
countMessages(options?: Omit<
|
|
1527
|
+
countMessages(options?: Omit<ListMessagesOptions, "limit" | "direction">): Promise<bigint>;
|
|
1499
1528
|
/**
|
|
1500
1529
|
* Gets the consent state for this conversation
|
|
1501
1530
|
*
|
|
@@ -1514,7 +1543,7 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
1514
1543
|
*
|
|
1515
1544
|
* @returns Promise that resolves with the current message disappearing settings
|
|
1516
1545
|
*/
|
|
1517
|
-
messageDisappearingSettings(): Promise<
|
|
1546
|
+
messageDisappearingSettings(): Promise<_xmtp_wasm_bindings.MessageDisappearingSettings | undefined>;
|
|
1518
1547
|
/**
|
|
1519
1548
|
* Updates message disappearing settings for this conversation
|
|
1520
1549
|
*
|
|
@@ -1541,20 +1570,27 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
1541
1570
|
* @param callback - Optional callback function for handling new stream values
|
|
1542
1571
|
* @returns Stream instance for new messages
|
|
1543
1572
|
*/
|
|
1544
|
-
stream(options?: StreamOptions<
|
|
1573
|
+
stream(options?: StreamOptions<DecodedMessage$1, DecodedMessage<ContentTypes>>): Promise<AsyncStreamProxy<DecodedMessage<ContentTypes>>>;
|
|
1545
1574
|
pausedForVersion(): Promise<string | undefined>;
|
|
1546
1575
|
/**
|
|
1547
|
-
*
|
|
1576
|
+
* Gets HMAC keys for this conversation
|
|
1548
1577
|
*
|
|
1549
1578
|
* @returns Promise that resolves with the HMAC keys
|
|
1550
1579
|
*/
|
|
1551
|
-
|
|
1580
|
+
hmacKeys(): Promise<HmacKeys>;
|
|
1552
1581
|
/**
|
|
1553
1582
|
* Retrieves information for this conversation to help with debugging
|
|
1554
1583
|
*
|
|
1555
1584
|
* @returns The debug information for this conversation
|
|
1556
1585
|
*/
|
|
1557
|
-
debugInfo(): Promise<
|
|
1586
|
+
debugInfo(): Promise<_xmtp_wasm_bindings.ConversationDebugInfo>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Retrieves the last read times for this conversation
|
|
1589
|
+
*
|
|
1590
|
+
* @returns A map keyed by inbox ID with the last read timestamp
|
|
1591
|
+
* (nanoseconds since epoch)
|
|
1592
|
+
*/
|
|
1593
|
+
lastReadTimes(): Promise<LastReadTimes>;
|
|
1558
1594
|
}
|
|
1559
1595
|
|
|
1560
1596
|
/**
|
|
@@ -1567,18 +1603,19 @@ declare class Dm<ContentTypes = unknown> extends Conversation<ContentTypes> {
|
|
|
1567
1603
|
/**
|
|
1568
1604
|
* Creates a new direct message conversation instance
|
|
1569
1605
|
*
|
|
1570
|
-
* @param
|
|
1606
|
+
* @param worker - The worker bridge instance for client communication
|
|
1607
|
+
* @param codecRegistry - The codec registry instance
|
|
1571
1608
|
* @param id - Identifier for the direct message conversation
|
|
1572
1609
|
* @param data - Optional conversation data to initialize with
|
|
1573
1610
|
*/
|
|
1574
|
-
constructor(
|
|
1611
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>, codecRegistry: CodecRegistry, id: string, data?: SafeConversation);
|
|
1575
1612
|
/**
|
|
1576
1613
|
* Retrieves the inbox ID of the other participant in the DM
|
|
1577
1614
|
*
|
|
1578
1615
|
* @returns Promise that resolves with the peer's inbox ID
|
|
1579
1616
|
*/
|
|
1580
1617
|
peerInboxId(): Promise<string>;
|
|
1581
|
-
|
|
1618
|
+
duplicateDms(): Promise<Dm<ContentTypes>[]>;
|
|
1582
1619
|
}
|
|
1583
1620
|
|
|
1584
1621
|
/**
|
|
@@ -1591,11 +1628,12 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
|
|
|
1591
1628
|
/**
|
|
1592
1629
|
* Creates a new group conversation instance
|
|
1593
1630
|
*
|
|
1594
|
-
* @param
|
|
1631
|
+
* @param worker - The worker bridge instance for client communication
|
|
1632
|
+
* @param codecRegistry - The codec registry instance
|
|
1595
1633
|
* @param id - Identifier for the group conversation
|
|
1596
1634
|
* @param data - Optional conversation data to initialize with
|
|
1597
1635
|
*/
|
|
1598
|
-
constructor(
|
|
1636
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>, codecRegistry: CodecRegistry, id: string, data?: SafeConversation);
|
|
1599
1637
|
/**
|
|
1600
1638
|
* Synchronizes the group's data with the network
|
|
1601
1639
|
*
|
|
@@ -1632,6 +1670,16 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
|
|
|
1632
1670
|
* @param description The new description for the group
|
|
1633
1671
|
*/
|
|
1634
1672
|
updateDescription(description: string): Promise<void>;
|
|
1673
|
+
/**
|
|
1674
|
+
* The app data of the group
|
|
1675
|
+
*/
|
|
1676
|
+
get appData(): string | undefined;
|
|
1677
|
+
/**
|
|
1678
|
+
* Updates the group's app data (max 8192 bytes)
|
|
1679
|
+
*
|
|
1680
|
+
* @param appData The new app data for the group
|
|
1681
|
+
*/
|
|
1682
|
+
updateAppData(appData: string): Promise<void>;
|
|
1635
1683
|
/**
|
|
1636
1684
|
* The list of admins of the group by inbox ID
|
|
1637
1685
|
*/
|
|
@@ -1659,16 +1707,7 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
|
|
|
1659
1707
|
*/
|
|
1660
1708
|
permissions(): Promise<{
|
|
1661
1709
|
policyType: _xmtp_wasm_bindings.GroupPermissionsOptions;
|
|
1662
|
-
policySet:
|
|
1663
|
-
addAdminPolicy: PermissionPolicy;
|
|
1664
|
-
addMemberPolicy: PermissionPolicy;
|
|
1665
|
-
removeAdminPolicy: PermissionPolicy;
|
|
1666
|
-
removeMemberPolicy: PermissionPolicy;
|
|
1667
|
-
updateGroupDescriptionPolicy: PermissionPolicy;
|
|
1668
|
-
updateGroupImageUrlSquarePolicy: PermissionPolicy;
|
|
1669
|
-
updateGroupNamePolicy: PermissionPolicy;
|
|
1670
|
-
updateMessageDisappearingPolicy: PermissionPolicy;
|
|
1671
|
-
};
|
|
1710
|
+
policySet: _xmtp_wasm_bindings.PermissionPolicySet;
|
|
1672
1711
|
}>;
|
|
1673
1712
|
/**
|
|
1674
1713
|
* Updates a specific permission policy for the group
|
|
@@ -1740,6 +1779,16 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
|
|
|
1740
1779
|
* @param inboxId The inbox ID of the super admin to demote
|
|
1741
1780
|
*/
|
|
1742
1781
|
removeSuperAdmin(inboxId: string): Promise<void>;
|
|
1782
|
+
/**
|
|
1783
|
+
* Request to leave the group
|
|
1784
|
+
*/
|
|
1785
|
+
requestRemoval(): Promise<void>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Checks if the current user has requested to leave the group
|
|
1788
|
+
*
|
|
1789
|
+
* @returns Boolean
|
|
1790
|
+
*/
|
|
1791
|
+
isPendingRemoval(): Promise<boolean>;
|
|
1743
1792
|
}
|
|
1744
1793
|
|
|
1745
1794
|
/**
|
|
@@ -1752,9 +1801,10 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1752
1801
|
/**
|
|
1753
1802
|
* Creates a new conversations instance
|
|
1754
1803
|
*
|
|
1755
|
-
* @param
|
|
1804
|
+
* @param worker - The worker bridge instance for client communication
|
|
1805
|
+
* @param codecRegistry - The codec registry instance
|
|
1756
1806
|
*/
|
|
1757
|
-
constructor(
|
|
1807
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>, codecRegistry: CodecRegistry);
|
|
1758
1808
|
/**
|
|
1759
1809
|
* Synchronizes conversations for the current client from the network
|
|
1760
1810
|
*
|
|
@@ -1790,42 +1840,42 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1790
1840
|
* @param inboxId - The inbox ID to look up
|
|
1791
1841
|
* @returns Promise that resolves with the DM, if found
|
|
1792
1842
|
*/
|
|
1793
|
-
getDmByInboxId(inboxId: string): Promise<Dm<
|
|
1843
|
+
getDmByInboxId(inboxId: string): Promise<Dm<unknown> | undefined>;
|
|
1794
1844
|
/**
|
|
1795
|
-
*
|
|
1845
|
+
* Fetches a DM by identifier
|
|
1796
1846
|
*
|
|
1797
1847
|
* @param identifier - The identifier to look up
|
|
1798
1848
|
* @returns Promise that resolves with the DM, if found
|
|
1799
1849
|
*/
|
|
1800
|
-
|
|
1850
|
+
fetchDmByIdentifier(identifier: Identifier): Promise<Dm<unknown> | undefined>;
|
|
1801
1851
|
/**
|
|
1802
1852
|
* Lists all conversations with optional filtering
|
|
1803
1853
|
*
|
|
1804
1854
|
* @param options - Optional filtering and pagination options
|
|
1805
1855
|
* @returns Promise that resolves with an array of conversations
|
|
1806
1856
|
*/
|
|
1807
|
-
list(options?:
|
|
1857
|
+
list(options?: ListConversationsOptions): Promise<(Group<ContentTypes> | Dm<ContentTypes>)[]>;
|
|
1808
1858
|
/**
|
|
1809
1859
|
* Lists all group conversations with optional filtering
|
|
1810
1860
|
*
|
|
1811
1861
|
* @param options - Optional filtering and pagination options
|
|
1812
1862
|
* @returns Promise that resolves with an array of groups
|
|
1813
1863
|
*/
|
|
1814
|
-
listGroups(options?: Omit<
|
|
1864
|
+
listGroups(options?: Omit<ListConversationsOptions, "conversationType">): Promise<Group<ContentTypes>[]>;
|
|
1815
1865
|
/**
|
|
1816
1866
|
* Lists all DM conversations with optional filtering
|
|
1817
1867
|
*
|
|
1818
1868
|
* @param options - Optional filtering and pagination options
|
|
1819
1869
|
* @returns Promise that resolves with an array of DMs
|
|
1820
1870
|
*/
|
|
1821
|
-
listDms(options?: Omit<
|
|
1871
|
+
listDms(options?: Omit<ListConversationsOptions, "conversationType">): Promise<Dm<ContentTypes>[]>;
|
|
1822
1872
|
/**
|
|
1823
|
-
* Creates a new group without
|
|
1873
|
+
* Creates a new group conversation without publishing to the network
|
|
1824
1874
|
*
|
|
1825
1875
|
* @param options - Optional group creation options
|
|
1826
1876
|
* @returns Promise that resolves with the new group
|
|
1827
1877
|
*/
|
|
1828
|
-
|
|
1878
|
+
createGroupOptimistic(options?: CreateGroupOptions): Promise<Group<ContentTypes>>;
|
|
1829
1879
|
/**
|
|
1830
1880
|
* Creates a new group conversation with the specified identifiers
|
|
1831
1881
|
*
|
|
@@ -1833,7 +1883,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1833
1883
|
* @param options - Optional group creation options
|
|
1834
1884
|
* @returns Promise that resolves with the new group
|
|
1835
1885
|
*/
|
|
1836
|
-
|
|
1886
|
+
createGroupWithIdentifiers(identifiers: Identifier[], options?: CreateGroupOptions): Promise<Group<ContentTypes>>;
|
|
1837
1887
|
/**
|
|
1838
1888
|
* Creates a new group conversation with the specified inbox IDs
|
|
1839
1889
|
*
|
|
@@ -1841,7 +1891,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1841
1891
|
* @param options - Optional group creation options
|
|
1842
1892
|
* @returns Promise that resolves with the new group
|
|
1843
1893
|
*/
|
|
1844
|
-
|
|
1894
|
+
createGroup(inboxIds: string[], options?: CreateGroupOptions): Promise<Group<ContentTypes>>;
|
|
1845
1895
|
/**
|
|
1846
1896
|
* Creates a new DM conversation with the specified identifier
|
|
1847
1897
|
*
|
|
@@ -1849,7 +1899,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1849
1899
|
* @param options - Optional DM creation options
|
|
1850
1900
|
* @returns Promise that resolves with the new DM
|
|
1851
1901
|
*/
|
|
1852
|
-
|
|
1902
|
+
createDmWithIdentifier(identifier: Identifier, options?: CreateDmOptions): Promise<Dm<ContentTypes>>;
|
|
1853
1903
|
/**
|
|
1854
1904
|
* Creates a new DM conversation with the specified inbox ID
|
|
1855
1905
|
*
|
|
@@ -1857,13 +1907,13 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1857
1907
|
* @param options - Optional DM creation options
|
|
1858
1908
|
* @returns Promise that resolves with the new DM
|
|
1859
1909
|
*/
|
|
1860
|
-
|
|
1910
|
+
createDm(inboxId: string, options?: CreateDmOptions): Promise<Dm<ContentTypes>>;
|
|
1861
1911
|
/**
|
|
1862
|
-
*
|
|
1912
|
+
* Gets the HMAC keys for all conversations
|
|
1863
1913
|
*
|
|
1864
1914
|
* @returns Promise that resolves with the HMAC keys for all conversations
|
|
1865
1915
|
*/
|
|
1866
|
-
|
|
1916
|
+
hmacKeys(): Promise<HmacKeys>;
|
|
1867
1917
|
/**
|
|
1868
1918
|
* Creates a stream for new conversations
|
|
1869
1919
|
*
|
|
@@ -1896,7 +1946,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1896
1946
|
* @param options.consentStates - Optional consent states to filter messages
|
|
1897
1947
|
* @returns Stream instance for new messages
|
|
1898
1948
|
*/
|
|
1899
|
-
streamAllMessages(options?: StreamOptions<
|
|
1949
|
+
streamAllMessages(options?: StreamOptions<DecodedMessage$1, DecodedMessage<ContentTypes>> & {
|
|
1900
1950
|
conversationType?: ConversationType;
|
|
1901
1951
|
consentStates?: ConsentState[];
|
|
1902
1952
|
}): Promise<AsyncStreamProxy<DecodedMessage<ContentTypes>>>;
|
|
@@ -1907,7 +1957,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1907
1957
|
* @param options.consentStates - Optional consent states to filter messages
|
|
1908
1958
|
* @returns Stream instance for new group messages
|
|
1909
1959
|
*/
|
|
1910
|
-
streamAllGroupMessages(options?: StreamOptions<
|
|
1960
|
+
streamAllGroupMessages(options?: StreamOptions<DecodedMessage$1, DecodedMessage<ContentTypes>> & {
|
|
1911
1961
|
consentStates?: ConsentState[];
|
|
1912
1962
|
}): Promise<AsyncStreamProxy<DecodedMessage<ContentTypes>>>;
|
|
1913
1963
|
/**
|
|
@@ -1917,7 +1967,7 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1917
1967
|
* @param options.consentStates - Optional consent states to filter messages
|
|
1918
1968
|
* @returns Stream instance for new DM messages
|
|
1919
1969
|
*/
|
|
1920
|
-
streamAllDmMessages(options?: StreamOptions<
|
|
1970
|
+
streamAllDmMessages(options?: StreamOptions<DecodedMessage$1, DecodedMessage<ContentTypes>> & {
|
|
1921
1971
|
consentStates?: ConsentState[];
|
|
1922
1972
|
}): Promise<AsyncStreamProxy<DecodedMessage<ContentTypes>>>;
|
|
1923
1973
|
/**
|
|
@@ -1934,14 +1984,13 @@ declare class Conversations<ContentTypes = unknown> {
|
|
|
1934
1984
|
*
|
|
1935
1985
|
* This class is not intended to be initialized directly.
|
|
1936
1986
|
*/
|
|
1937
|
-
declare class DebugInformation
|
|
1987
|
+
declare class DebugInformation {
|
|
1938
1988
|
#private;
|
|
1939
|
-
constructor(
|
|
1940
|
-
apiStatistics(): Promise<
|
|
1941
|
-
apiIdentityStatistics(): Promise<
|
|
1989
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>);
|
|
1990
|
+
apiStatistics(): Promise<_xmtp_wasm_bindings.ApiStats>;
|
|
1991
|
+
apiIdentityStatistics(): Promise<_xmtp_wasm_bindings.IdentityStats>;
|
|
1942
1992
|
apiAggregateStatistics(): Promise<string>;
|
|
1943
1993
|
clearAllStatistics(): Promise<void>;
|
|
1944
|
-
uploadDebugArchive(serverUrl?: string): Promise<string>;
|
|
1945
1994
|
}
|
|
1946
1995
|
|
|
1947
1996
|
/**
|
|
@@ -1949,44 +1998,49 @@ declare class DebugInformation<ContentTypes = unknown> {
|
|
|
1949
1998
|
*
|
|
1950
1999
|
* This class is not intended to be initialized directly.
|
|
1951
2000
|
*/
|
|
1952
|
-
declare class Preferences
|
|
2001
|
+
declare class Preferences {
|
|
1953
2002
|
#private;
|
|
1954
2003
|
/**
|
|
1955
2004
|
* Creates a new preferences instance
|
|
1956
2005
|
*
|
|
1957
2006
|
* @param client - The client instance managing preferences
|
|
1958
2007
|
*/
|
|
1959
|
-
constructor(
|
|
2008
|
+
constructor(worker: WorkerBridge<ClientWorkerAction>);
|
|
1960
2009
|
sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
|
|
1961
2010
|
/**
|
|
1962
|
-
* Retrieves the current inbox state
|
|
2011
|
+
* Retrieves the current inbox state of this client from the local database
|
|
2012
|
+
*
|
|
2013
|
+
* @returns Promise that resolves with the inbox state
|
|
2014
|
+
*/
|
|
2015
|
+
inboxState(): Promise<_xmtp_wasm_bindings.InboxState>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Retrieves the latest inbox state of this client from the network
|
|
1963
2018
|
*
|
|
1964
|
-
* @param refreshFromNetwork - Optional flag to force refresh from network
|
|
1965
2019
|
* @returns Promise that resolves with the inbox state
|
|
1966
2020
|
*/
|
|
1967
|
-
|
|
2021
|
+
fetchInboxState(): Promise<_xmtp_wasm_bindings.InboxState>;
|
|
1968
2022
|
/**
|
|
1969
|
-
* Retrieves inbox
|
|
2023
|
+
* Retrieves the current inbox states for specified inbox IDs from the local
|
|
2024
|
+
* database
|
|
1970
2025
|
*
|
|
1971
2026
|
* @param inboxIds - Array of inbox IDs to get state for
|
|
1972
|
-
* @
|
|
1973
|
-
* @returns Promise that resolves with the inbox state for the inbox IDs
|
|
2027
|
+
* @returns Promise that resolves with the inbox states for the inbox IDs
|
|
1974
2028
|
*/
|
|
1975
|
-
|
|
2029
|
+
getInboxStates(inboxIds: string[]): Promise<_xmtp_wasm_bindings.InboxState[]>;
|
|
1976
2030
|
/**
|
|
1977
|
-
*
|
|
2031
|
+
* Retrieves the latest inbox states for specified inbox IDs from the network
|
|
1978
2032
|
*
|
|
1979
|
-
* @param
|
|
1980
|
-
* @returns Promise that resolves with the
|
|
2033
|
+
* @param inboxIds - Array of inbox IDs to get state for
|
|
2034
|
+
* @returns Promise that resolves with the inbox states for the inbox IDs
|
|
1981
2035
|
*/
|
|
1982
|
-
|
|
2036
|
+
fetchInboxStates(inboxIds: string[]): Promise<_xmtp_wasm_bindings.InboxState[]>;
|
|
1983
2037
|
/**
|
|
1984
2038
|
* Updates consent states for multiple records
|
|
1985
2039
|
*
|
|
1986
2040
|
* @param records - Array of consent records to update
|
|
1987
2041
|
* @returns Promise that resolves when consent states are updated
|
|
1988
2042
|
*/
|
|
1989
|
-
setConsentStates(records:
|
|
2043
|
+
setConsentStates(records: Consent[]): Promise<void>;
|
|
1990
2044
|
/**
|
|
1991
2045
|
* Retrieves consent state for a specific entity
|
|
1992
2046
|
*
|
|
@@ -1994,32 +2048,27 @@ declare class Preferences<ContentTypes = unknown> {
|
|
|
1994
2048
|
* @param entity - Entity identifier
|
|
1995
2049
|
* @returns Promise that resolves with the consent state
|
|
1996
2050
|
*/
|
|
1997
|
-
getConsentState(entityType: ConsentEntityType, entity: string): Promise<
|
|
2051
|
+
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
|
|
1998
2052
|
/**
|
|
1999
2053
|
* Creates a stream of consent state updates
|
|
2000
2054
|
*
|
|
2001
2055
|
* @param options - Optional stream options
|
|
2002
2056
|
* @returns Stream instance for consent updates
|
|
2003
2057
|
*/
|
|
2004
|
-
streamConsent(options?: StreamOptions<
|
|
2058
|
+
streamConsent(options?: StreamOptions<Consent[]>): Promise<AsyncStreamProxy<Consent[]>>;
|
|
2005
2059
|
/**
|
|
2006
2060
|
* Creates a stream of user preference updates
|
|
2007
2061
|
*
|
|
2008
2062
|
* @param options - Optional stream options
|
|
2009
2063
|
* @returns Stream instance for preference updates
|
|
2010
2064
|
*/
|
|
2011
|
-
streamPreferences(options?: StreamOptions<
|
|
2065
|
+
streamPreferences(options?: StreamOptions<UserPreferenceUpdate[]>): Promise<AsyncStreamProxy<UserPreferenceUpdate[]>>;
|
|
2012
2066
|
}
|
|
2013
2067
|
|
|
2014
|
-
type ExtractCodecContentTypes<C extends ContentCodec[] = []> = [
|
|
2015
|
-
...C,
|
|
2016
|
-
GroupUpdatedCodec,
|
|
2017
|
-
TextCodec
|
|
2018
|
-
][number] extends ContentCodec<infer T> ? T : never;
|
|
2019
2068
|
/**
|
|
2020
2069
|
* Client for interacting with the XMTP network
|
|
2021
2070
|
*/
|
|
2022
|
-
declare class Client<ContentTypes = ExtractCodecContentTypes>
|
|
2071
|
+
declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
2023
2072
|
#private;
|
|
2024
2073
|
/**
|
|
2025
2074
|
* Creates a new XMTP client instance
|
|
@@ -2039,6 +2088,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
|
|
|
2039
2088
|
* @param identifier - The identifier to initialize the client with
|
|
2040
2089
|
*/
|
|
2041
2090
|
init(identifier: Identifier): Promise<void>;
|
|
2091
|
+
/**
|
|
2092
|
+
* Shutdown the client
|
|
2093
|
+
*/
|
|
2094
|
+
close(): void;
|
|
2042
2095
|
/**
|
|
2043
2096
|
* Creates a new client instance with a signer
|
|
2044
2097
|
*
|
|
@@ -2097,19 +2150,19 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
|
|
|
2097
2150
|
/**
|
|
2098
2151
|
* Gets the debug information helpers for this client
|
|
2099
2152
|
*/
|
|
2100
|
-
get debugInformation(): DebugInformation
|
|
2153
|
+
get debugInformation(): DebugInformation;
|
|
2101
2154
|
/**
|
|
2102
2155
|
* Gets the preferences manager for this client
|
|
2103
2156
|
*/
|
|
2104
|
-
get preferences(): Preferences
|
|
2157
|
+
get preferences(): Preferences;
|
|
2105
2158
|
/**
|
|
2106
2159
|
* Gets the version of libxmtp used in the bindings
|
|
2107
2160
|
*/
|
|
2108
|
-
libxmtpVersion():
|
|
2161
|
+
get libxmtpVersion(): string | undefined;
|
|
2109
2162
|
/**
|
|
2110
2163
|
* Gets the app version used by the client
|
|
2111
2164
|
*/
|
|
2112
|
-
appVersion():
|
|
2165
|
+
get appVersion(): string | undefined;
|
|
2113
2166
|
/**
|
|
2114
2167
|
* Creates signature text for creating a new inbox
|
|
2115
2168
|
*
|
|
@@ -2285,15 +2338,16 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
|
|
|
2285
2338
|
* @param inboxId - The inbox ID to revoke installations for
|
|
2286
2339
|
* @param installationIds - The installation IDs to revoke
|
|
2287
2340
|
*/
|
|
2288
|
-
static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string
|
|
2341
|
+
static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<void>;
|
|
2289
2342
|
/**
|
|
2290
|
-
*
|
|
2343
|
+
* Fetches the inbox states for the specified inbox IDs from the network
|
|
2344
|
+
* without a client
|
|
2291
2345
|
*
|
|
2292
2346
|
* @param inboxIds - The inbox IDs to get the state for
|
|
2293
2347
|
* @param env - The environment to use
|
|
2294
|
-
* @returns The inbox
|
|
2348
|
+
* @returns The inbox states for the specified inbox IDs
|
|
2295
2349
|
*/
|
|
2296
|
-
static
|
|
2350
|
+
static fetchInboxStates(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<_xmtp_wasm_bindings.InboxState[]>;
|
|
2297
2351
|
/**
|
|
2298
2352
|
* Changes the recovery identifier for the client's inbox
|
|
2299
2353
|
*
|
|
@@ -2325,52 +2379,13 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
|
|
|
2325
2379
|
*/
|
|
2326
2380
|
static canMessage(identifiers: Identifier[], env?: XmtpEnv): Promise<Map<string, boolean>>;
|
|
2327
2381
|
/**
|
|
2328
|
-
*
|
|
2382
|
+
* Fetches the inbox ID for a given identifier from the local database
|
|
2383
|
+
* If not found, fetches from the network
|
|
2329
2384
|
*
|
|
2330
2385
|
* @param identifier - The identifier to look up
|
|
2331
2386
|
* @returns The inbox ID, if found
|
|
2332
2387
|
*/
|
|
2333
|
-
|
|
2334
|
-
/**
|
|
2335
|
-
* Gets the codec for a given content type
|
|
2336
|
-
*
|
|
2337
|
-
* @param contentType - The content type to get the codec for
|
|
2338
|
-
* @returns The codec, if found
|
|
2339
|
-
*/
|
|
2340
|
-
codecFor<ContentType = unknown>(contentType: ContentTypeId$1): ContentCodec<ContentType> | undefined;
|
|
2341
|
-
/**
|
|
2342
|
-
* Encodes content for a given content type
|
|
2343
|
-
*
|
|
2344
|
-
* @param content - The content to encode
|
|
2345
|
-
* @param contentType - The content type to encode for
|
|
2346
|
-
* @returns The encoded content
|
|
2347
|
-
* @throws {CodecNotFoundError} if no codec is found for the content type
|
|
2348
|
-
*/
|
|
2349
|
-
encodeContent(content: ContentTypes, contentType: ContentTypeId$1): SafeEncodedContent;
|
|
2350
|
-
/**
|
|
2351
|
-
* Prepares content for sending by encoding it and generating send options from the codec
|
|
2352
|
-
*
|
|
2353
|
-
* @param content - The message content to prepare for sending
|
|
2354
|
-
* @param contentType - The content type identifier for the appropriate codec
|
|
2355
|
-
* @returns An object containing the encoded content and send options
|
|
2356
|
-
* @throws {CodecNotFoundError} When no codec is registered for the specified content type
|
|
2357
|
-
*/
|
|
2358
|
-
prepareForSend(content: ContentTypes, contentType: ContentTypeId$1): {
|
|
2359
|
-
encodedContent: SafeEncodedContent;
|
|
2360
|
-
sendOptions: {
|
|
2361
|
-
shouldPush: boolean;
|
|
2362
|
-
};
|
|
2363
|
-
};
|
|
2364
|
-
/**
|
|
2365
|
-
* Decodes a message for a given content type
|
|
2366
|
-
*
|
|
2367
|
-
* @param message - The message to decode
|
|
2368
|
-
* @param contentType - The content type to decode for
|
|
2369
|
-
* @returns The decoded content
|
|
2370
|
-
* @throws {CodecNotFoundError} if no codec is found for the content type
|
|
2371
|
-
* @throws {InvalidGroupMembershipChangeError} if the message is an invalid group membership change
|
|
2372
|
-
*/
|
|
2373
|
-
decodeContent<ContentType = unknown>(message: SafeMessage, contentType: ContentTypeId$1): ContentType;
|
|
2388
|
+
fetchInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
|
|
2374
2389
|
/**
|
|
2375
2390
|
* Signs a message with the installation key
|
|
2376
2391
|
*
|
|
@@ -2396,179 +2411,84 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
|
|
|
2396
2411
|
*/
|
|
2397
2412
|
verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): Promise<boolean>;
|
|
2398
2413
|
/**
|
|
2399
|
-
*
|
|
2414
|
+
* Fetches the key package statuses from the network for the specified
|
|
2415
|
+
* installation IDs
|
|
2400
2416
|
*
|
|
2401
2417
|
* @param installationIds - The installation IDs to check
|
|
2402
2418
|
* @returns The key package statuses
|
|
2403
2419
|
*/
|
|
2404
|
-
|
|
2420
|
+
fetchKeyPackageStatuses(installationIds: string[]): Promise<Map<string, _xmtp_wasm_bindings.KeyPackageStatus>>;
|
|
2405
2421
|
}
|
|
2406
2422
|
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
}
|
|
2422
|
-
action: "utils.getInboxIdForIdentifier";
|
|
2423
|
-
id: string;
|
|
2424
|
-
result: string | undefined;
|
|
2425
|
-
data: {
|
|
2426
|
-
identifier: Identifier;
|
|
2427
|
-
env?: XmtpEnv;
|
|
2428
|
-
gatewayHost?: string;
|
|
2429
|
-
};
|
|
2430
|
-
} | {
|
|
2431
|
-
action: "utils.revokeInstallationsSignatureText";
|
|
2432
|
-
id: string;
|
|
2433
|
-
result: {
|
|
2434
|
-
signatureText: string;
|
|
2435
|
-
signatureRequestId: string;
|
|
2436
|
-
};
|
|
2437
|
-
data: {
|
|
2438
|
-
env?: XmtpEnv;
|
|
2439
|
-
identifier: Identifier;
|
|
2440
|
-
inboxId: string;
|
|
2441
|
-
gatewayHost?: string;
|
|
2442
|
-
installationIds: Uint8Array[];
|
|
2443
|
-
signatureRequestId: string;
|
|
2444
|
-
};
|
|
2445
|
-
} | {
|
|
2446
|
-
action: "utils.revokeInstallations";
|
|
2447
|
-
id: string;
|
|
2448
|
-
result: undefined;
|
|
2449
|
-
data: {
|
|
2450
|
-
env?: XmtpEnv;
|
|
2451
|
-
signer: SafeSigner;
|
|
2452
|
-
signatureRequestId: string;
|
|
2453
|
-
gatewayHost?: string;
|
|
2454
|
-
};
|
|
2455
|
-
} | {
|
|
2456
|
-
action: "utils.inboxStateFromInboxIds";
|
|
2457
|
-
id: string;
|
|
2458
|
-
result: SafeInboxState[];
|
|
2459
|
-
data: {
|
|
2460
|
-
inboxIds: string[];
|
|
2461
|
-
env?: XmtpEnv;
|
|
2462
|
-
gatewayHost?: string;
|
|
2463
|
-
};
|
|
2464
|
-
};
|
|
2423
|
+
declare class Opfs {
|
|
2424
|
+
#private;
|
|
2425
|
+
constructor(enableLogging?: boolean);
|
|
2426
|
+
init(): Promise<void>;
|
|
2427
|
+
close(): void;
|
|
2428
|
+
static create(enableLogging?: boolean): Promise<Opfs>;
|
|
2429
|
+
listFiles(): Promise<string[]>;
|
|
2430
|
+
fileCount(): Promise<number>;
|
|
2431
|
+
poolCapacity(): Promise<number>;
|
|
2432
|
+
fileExists(path: string): Promise<boolean>;
|
|
2433
|
+
deleteFile(path: string): Promise<boolean>;
|
|
2434
|
+
exportDb(path: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
2435
|
+
importDb(path: string, data: Uint8Array): Promise<void>;
|
|
2436
|
+
clearAll(): Promise<void>;
|
|
2437
|
+
}
|
|
2465
2438
|
|
|
2466
2439
|
/**
|
|
2467
|
-
*
|
|
2440
|
+
* Generates an inbox ID for a given identifier
|
|
2468
2441
|
*
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
2442
|
+
* @param identifier - The identifier to generate an inbox ID for
|
|
2443
|
+
* @param nonce - Optional nonce to use for generating the inbox ID
|
|
2444
|
+
* @returns Promise that resolves with the generated inbox ID
|
|
2445
|
+
*/
|
|
2446
|
+
declare const generateInboxId: (identifier: Identifier, nonce?: bigint) => Promise<string>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Gets the inbox ID for a specific identifier and optional environment
|
|
2471
2449
|
*
|
|
2472
|
-
* @param
|
|
2473
|
-
* @param
|
|
2474
|
-
* @
|
|
2450
|
+
* @param identifier - The identifier to get the inbox ID for
|
|
2451
|
+
* @param env - Optional XMTP environment configuration (default: "dev")
|
|
2452
|
+
* @param gatewayHost - Optional gateway host override
|
|
2453
|
+
* @returns Promise that resolves with the inbox ID for the identifier
|
|
2475
2454
|
*/
|
|
2476
|
-
declare
|
|
2477
|
-
#private;
|
|
2478
|
-
constructor(worker: Worker, enableLogging: boolean);
|
|
2479
|
-
/**
|
|
2480
|
-
* Initializes the utils worker
|
|
2481
|
-
*
|
|
2482
|
-
* @param enableLogging - Whether to enable logging in the worker
|
|
2483
|
-
* @returns A promise that resolves when the worker is initialized
|
|
2484
|
-
*/
|
|
2485
|
-
init(): Promise<void>;
|
|
2486
|
-
/**
|
|
2487
|
-
* Sends an action message to the utils worker
|
|
2488
|
-
*
|
|
2489
|
-
* @param action - The action to send to the worker
|
|
2490
|
-
* @param data - The data to send to the worker
|
|
2491
|
-
* @returns A promise that resolves when the action is completed
|
|
2492
|
-
*/
|
|
2493
|
-
sendMessage<A extends ActionName<UtilsWorkerAction>>(action: A, data: ExtractActionData<UtilsWorkerAction, A>): [ExtractActionResult<UtilsWorkerAction, A>] extends [undefined] ? Promise<void> : Promise<ExtractActionResult<UtilsWorkerAction, A>>;
|
|
2494
|
-
/**
|
|
2495
|
-
* Handles a message from the utils worker
|
|
2496
|
-
*
|
|
2497
|
-
* @param event - The event to handle
|
|
2498
|
-
*/
|
|
2499
|
-
handleMessage: (event: MessageEvent<ActionWithoutData<UtilsWorkerAction> | ActionErrorData<UtilsWorkerAction>>) => void;
|
|
2500
|
-
/**
|
|
2501
|
-
* Removes all event listeners and terminates the worker
|
|
2502
|
-
*/
|
|
2503
|
-
close(): void;
|
|
2504
|
-
}
|
|
2455
|
+
declare const getInboxIdForIdentifier: (identifier: Identifier, env?: XmtpEnv, gatewayHost?: string) => Promise<string | undefined>;
|
|
2505
2456
|
|
|
2506
2457
|
/**
|
|
2507
|
-
*
|
|
2458
|
+
* Gets the name of a metadata field
|
|
2459
|
+
*
|
|
2460
|
+
* @param field - The metadata field to get the name for
|
|
2461
|
+
* @returns The name of the metadata field
|
|
2508
2462
|
*/
|
|
2509
|
-
declare
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
*
|
|
2539
|
-
* It is highly recommended to use the `revokeInstallations` method instead.
|
|
2540
|
-
*
|
|
2541
|
-
* @param env - The environment to use
|
|
2542
|
-
* @param identifier - The identifier to revoke installations for
|
|
2543
|
-
* @param inboxId - The inbox ID to revoke installations for
|
|
2544
|
-
* @param installationIds - The installation IDs to revoke
|
|
2545
|
-
* @param gatewayHost - Optional gateway host override
|
|
2546
|
-
* @returns The signature text and signature request ID
|
|
2547
|
-
*/
|
|
2548
|
-
revokeInstallationsSignatureText(identifier: Identifier, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<{
|
|
2549
|
-
signatureText: string;
|
|
2550
|
-
signatureRequestId: string;
|
|
2551
|
-
}>;
|
|
2552
|
-
/**
|
|
2553
|
-
* Revokes installations for a given inbox ID
|
|
2554
|
-
*
|
|
2555
|
-
* @param env - The environment to use
|
|
2556
|
-
* @param signer - The signer to use
|
|
2557
|
-
* @param inboxId - The inbox ID to revoke installations for
|
|
2558
|
-
* @param installationIds - The installation IDs to revoke
|
|
2559
|
-
* @param gatewayHost - Optional gateway host override
|
|
2560
|
-
* @returns Promise that resolves with the result of the revoke installations operation
|
|
2561
|
-
*/
|
|
2562
|
-
revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<void>;
|
|
2563
|
-
/**
|
|
2564
|
-
* Gets the inbox state for the specified inbox IDs without a client
|
|
2565
|
-
*
|
|
2566
|
-
* @param inboxIds - The inbox IDs to get the state for
|
|
2567
|
-
* @param env - The environment to use
|
|
2568
|
-
* @returns The inbox state for the specified inbox IDs
|
|
2569
|
-
*/
|
|
2570
|
-
inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<SafeInboxState[]>;
|
|
2571
|
-
}
|
|
2463
|
+
declare const metadataFieldName: (field: MetadataField) => Promise<string>;
|
|
2464
|
+
|
|
2465
|
+
declare const encodeActions: (actions: _xmtp_wasm_bindings.Actions) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2466
|
+
declare const encodeAttachment: (attachment: _xmtp_wasm_bindings.Attachment) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2467
|
+
declare const encodeIntent: (intent: _xmtp_wasm_bindings.Intent) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2468
|
+
declare const encodeMarkdown: (text: string) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2469
|
+
declare const encodeMultiRemoteAttachment: (multi_remote_attachment: _xmtp_wasm_bindings.MultiRemoteAttachment) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2470
|
+
declare const encodeReaction: (reaction: _xmtp_wasm_bindings.Reaction) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2471
|
+
declare const encodeReadReceipt: (read_receipt: _xmtp_wasm_bindings.ReadReceipt) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2472
|
+
declare const encodeRemoteAttachment: (remote_attachment: _xmtp_wasm_bindings.RemoteAttachment) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2473
|
+
declare const encodeText: (text: string) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2474
|
+
declare const encodeTransactionReference: (transaction_reference: _xmtp_wasm_bindings.TransactionReference) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2475
|
+
declare const encodeWalletSendCalls: (wallet_send_calls: _xmtp_wasm_bindings.WalletSendCalls) => Promise<_xmtp_wasm_bindings.EncodedContent>;
|
|
2476
|
+
declare const contentTypeActions: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2477
|
+
declare const contentTypeAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2478
|
+
declare const contentTypeGroupUpdated: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2479
|
+
declare const contentTypeIntent: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2480
|
+
declare const contentTypeLeaveRequest: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2481
|
+
declare const contentTypeMarkdown: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2482
|
+
declare const contentTypeMultiRemoteAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2483
|
+
declare const contentTypeReaction: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2484
|
+
declare const contentTypeReadReceipt: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2485
|
+
declare const contentTypeRemoteAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2486
|
+
declare const contentTypeReply: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2487
|
+
declare const contentTypeText: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2488
|
+
declare const contentTypeTransactionReference: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2489
|
+
declare const contentTypeWalletSendCalls: () => Promise<_xmtp_wasm_bindings.ContentTypeId>;
|
|
2490
|
+
declare const encryptAttachment: (attachment: _xmtp_wasm_bindings.Attachment) => Promise<_xmtp_wasm_bindings.EncryptedAttachment>;
|
|
2491
|
+
declare const decryptAttachment: (encryptedBytes: Uint8Array<ArrayBufferLike>, remoteAttachment: _xmtp_wasm_bindings.RemoteAttachment) => Promise<_xmtp_wasm_bindings.Attachment>;
|
|
2572
2492
|
|
|
2573
2493
|
declare class ClientNotInitializedError extends Error {
|
|
2574
2494
|
constructor();
|
|
@@ -2576,9 +2496,6 @@ declare class ClientNotInitializedError extends Error {
|
|
|
2576
2496
|
declare class SignerUnavailableError extends Error {
|
|
2577
2497
|
constructor();
|
|
2578
2498
|
}
|
|
2579
|
-
declare class CodecNotFoundError extends Error {
|
|
2580
|
-
constructor(contentType: ContentTypeId$1);
|
|
2581
|
-
}
|
|
2582
2499
|
declare class InboxReassignError extends Error {
|
|
2583
2500
|
constructor();
|
|
2584
2501
|
}
|
|
@@ -2591,18 +2508,18 @@ declare class GroupNotFoundError extends Error {
|
|
|
2591
2508
|
declare class StreamNotFoundError extends Error {
|
|
2592
2509
|
constructor(streamId: string);
|
|
2593
2510
|
}
|
|
2594
|
-
declare class InvalidGroupMembershipChangeError extends Error {
|
|
2595
|
-
constructor(messageId: string);
|
|
2596
|
-
}
|
|
2597
|
-
declare class MissingContentTypeError extends Error {
|
|
2598
|
-
constructor();
|
|
2599
|
-
}
|
|
2600
2511
|
declare class StreamFailedError extends Error {
|
|
2601
2512
|
constructor(retryAttempts: number);
|
|
2602
2513
|
}
|
|
2603
2514
|
declare class StreamInvalidRetryAttemptsError extends Error {
|
|
2604
2515
|
constructor();
|
|
2605
2516
|
}
|
|
2517
|
+
declare class OpfsNotInitializedError extends Error {
|
|
2518
|
+
constructor();
|
|
2519
|
+
}
|
|
2520
|
+
declare class OpfsInitializationError extends Error {
|
|
2521
|
+
constructor();
|
|
2522
|
+
}
|
|
2606
2523
|
|
|
2607
|
-
export { AccountAlreadyAssociatedError, ApiUrls, Client, ClientNotInitializedError,
|
|
2608
|
-
export type { AsyncStreamProxy, ClientOptions, ContentOptions, EOASigner, ExtractCodecContentTypes, HmacKeys,
|
|
2524
|
+
export { AccountAlreadyAssociatedError, ApiUrls, Client, ClientNotInitializedError, Conversation, Conversations, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_DELAY, DecodedMessage, Dm, Group, GroupNotFoundError, HistorySyncUrls, InboxReassignError, Opfs, OpfsInitializationError, OpfsNotInitializedError, SignerUnavailableError, StreamFailedError, StreamInvalidRetryAttemptsError, StreamNotFoundError, contentTypeActions, contentTypeAttachment, contentTypeGroupUpdated, contentTypeIntent, contentTypeLeaveRequest, contentTypeMarkdown, contentTypeMultiRemoteAttachment, contentTypeReaction, contentTypeReadReceipt, contentTypeRemoteAttachment, contentTypeReply, contentTypeText, contentTypeTransactionReference, contentTypeWalletSendCalls, createStream, decryptAttachment, encodeActions, encodeAttachment, encodeIntent, encodeMarkdown, encodeMultiRemoteAttachment, encodeReaction, encodeReadReceipt, encodeRemoteAttachment, encodeText, encodeTransactionReference, encodeWalletSendCalls, encryptAttachment, generateInboxId, getInboxIdForIdentifier, metadataFieldName, toSafeConversation, toSafeSigner };
|
|
2525
|
+
export type { AsyncStreamProxy, BuiltInContentTypes, ClientOptions, ContentOptions, EOASigner, ExtractCodecContentTypes, HmacKeys, LastReadTimes, NetworkOptions, OtherOptions, Reply, SCWSigner, SafeConversation, SafeSigner, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, XmtpEnv };
|