@xmtp/browser-sdk 5.1.0 → 5.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ContentCodec, ContentTypeId as ContentTypeId$1, EncodedContent as EncodedContent$1 } from '@xmtp/content-type-primitives';
2
2
  import * as _xmtp_wasm_bindings from '@xmtp/wasm-bindings';
3
- import { Identifier, Conversations as Conversations$1, ConsentState, Message, Conversation as Conversation$1, ConversationType, Client as Client$1, ConsentEntityType, Consent, UserPreference, SignatureRequestHandle, KeyPackageStatus, PermissionUpdateType, PermissionPolicy, MetadataField, EncodedContent, MessageDisappearingSettings, HmacKey, ConversationDebugInfo, GroupPermissionsOptions, DeliveryStatus, GroupMessageKind, ContentType, SortDirection, PermissionLevel, ContentTypeId, ListMessagesOptions, ListConversationsOptions, PermissionPolicySet, CreateGroupOptions, CreateDMOptions, Installation, InboxState, GroupMember, ApiStats, IdentityStats } from '@xmtp/wasm-bindings';
4
- export { Consent, ConsentEntityType, ConsentState, ContentType, ContentTypeId, ConversationListItem, ConversationType, CreateDMOptions, CreateGroupOptions, DeliveryStatus, EncodedContent, GroupMember, GroupMembershipState, GroupMessageKind, GroupMetadata, GroupPermissions, GroupPermissionsOptions, HmacKey, Identifier, IdentifierKind, InboxState, Installation, ListConversationsOptions, ListMessagesOptions, LogOptions, Message, MessageDisappearingSettings, MetadataField, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, SignatureRequestHandle, SortDirection, UserPreference } from '@xmtp/wasm-bindings';
3
+ import { Identifier, Conversations as Conversations$1, ConsentState, Message, Conversation as Conversation$1, ConversationType, Client as Client$1, ConsentEntityType, Consent, UserPreference, SignatureRequestHandle, KeyPackageStatus, PermissionUpdateType, PermissionPolicy, MetadataField, EncodedContent, SendMessageOpts, MessageDisappearingSettings, HmacKey, ConversationDebugInfo, GroupPermissionsOptions, DeliveryStatus, GroupMessageKind, ContentType, SortDirection, MessageSortBy, PermissionLevel, ListConversationsOrderBy, ContentTypeId, ListMessagesOptions, ListConversationsOptions, PermissionPolicySet, CreateGroupOptions, CreateDMOptions, Installation, InboxState, GroupMember, ApiStats, IdentityStats, GroupSyncSummary } from '@xmtp/wasm-bindings';
4
+ export { Consent, ConsentEntityType, ConsentState, ContentType, ContentTypeId, ConversationListItem, ConversationType, CreateDMOptions, CreateGroupOptions, DeliveryStatus, EncodedContent, GroupMember, GroupMembershipState, GroupMessageKind, GroupMetadata, GroupPermissions, GroupPermissionsOptions, GroupSyncSummary, HmacKey, Identifier, IdentifierKind, InboxState, Installation, ListConversationsOptions, ListMessagesOptions, LogOptions, Message, MessageDisappearingSettings, MetadataField, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, SignatureRequestHandle, SortDirection, UserPreference } from '@xmtp/wasm-bindings';
5
5
  import { GroupUpdatedCodec } from '@xmtp/content-type-group-updated';
6
6
  import { TextCodec } from '@xmtp/content-type-text';
7
7
 
@@ -58,6 +58,11 @@ type StreamOptions<T = unknown, V = T> = {
58
58
  * (default: true)
59
59
  */
60
60
  retryOnFail?: boolean;
61
+ /**
62
+ * Whether to disable network sync before starting the stream
63
+ * (default: false)
64
+ */
65
+ disableSync?: boolean;
61
66
  };
62
67
  type StreamCallback<T = unknown> = (error: Error | null, value: T | undefined) => void;
63
68
  type StreamFunction<T = unknown> = (callback: StreamCallback<T>, onFail: () => void) => Promise<() => void>;
@@ -88,9 +93,9 @@ declare const createStream: <T = unknown, V = T>(streamFunction: StreamFunction<
88
93
  * @property {string} production - The production URL for the XMTP network
89
94
  */
90
95
  declare const ApiUrls: {
91
- readonly local: "http://localhost:5555";
92
- readonly dev: "https://dev.xmtp.network";
93
- readonly production: "https://production.xmtp.network";
96
+ readonly local: "http://localhost:5557";
97
+ readonly dev: "https://api.dev.xmtp.network:5558";
98
+ readonly production: "https://api.production.xmtp.network:5558";
94
99
  };
95
100
  /**
96
101
  * Pre-configured URLs for the XMTP history sync service based on the environment
@@ -125,6 +130,10 @@ type NetworkOptions = {
125
130
  * specific endpoint for syncing history
126
131
  */
127
132
  historySyncUrl?: string | null;
133
+ /**
134
+ * gatewayHost can be used to override the gateway endpoint
135
+ */
136
+ gatewayHost?: string | null;
128
137
  };
129
138
  type ContentOptions = {
130
139
  /**
@@ -230,7 +239,7 @@ declare class WorkerConversations {
230
239
  #private;
231
240
  constructor(client: WorkerClient, conversations: Conversations$1);
232
241
  sync(): Promise<void>;
233
- syncAll(consentStates?: ConsentState[]): Promise<number>;
242
+ syncAll(consentStates?: ConsentState[]): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
234
243
  getConversationById(id: string): WorkerConversation | undefined;
235
244
  getMessageById(id: string): Message | undefined;
236
245
  getDmByInboxId(inboxId: string): WorkerConversation | undefined;
@@ -247,6 +256,7 @@ declare class WorkerConversations {
247
256
  streamGroups(callback: StreamCallback<Conversation$1>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
248
257
  streamDms(callback: StreamCallback<Conversation$1>, onFail: () => void): _xmtp_wasm_bindings.StreamCloser;
249
258
  streamAllMessages(callback: StreamCallback<Message>, onFail: () => void, conversationType?: ConversationType, consentStates?: ConsentState[]): _xmtp_wasm_bindings.StreamCloser;
259
+ streamMessageDeletions(callback: StreamCallback<string>): _xmtp_wasm_bindings.StreamCloser;
250
260
  }
251
261
 
252
262
  /**
@@ -267,7 +277,7 @@ declare class WorkerDebugInformation {
267
277
  declare class WorkerPreferences {
268
278
  #private;
269
279
  constructor(client: Client$1, conversations: Conversations$1);
270
- sync(): Promise<number>;
280
+ sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
271
281
  inboxState(refreshFromNetwork: boolean): Promise<_xmtp_wasm_bindings.InboxState>;
272
282
  inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork?: boolean): Promise<_xmtp_wasm_bindings.InboxState[]>;
273
283
  getLatestInboxState(inboxId: string): Promise<_xmtp_wasm_bindings.InboxState>;
@@ -281,6 +291,8 @@ declare class WorkerClient {
281
291
  #private;
282
292
  constructor(client: Client$1, options?: ClientOptions);
283
293
  static create(identifier: Identifier, options?: Omit<ClientOptions, "codecs">): Promise<WorkerClient>;
294
+ get libxmtpVersion(): string;
295
+ get appVersion(): string;
284
296
  get accountIdentifier(): Identifier;
285
297
  get inboxId(): string;
286
298
  get installationId(): string;
@@ -296,7 +308,7 @@ declare class WorkerClient {
296
308
  createInboxSignatureRequest(): SignatureRequestHandle | undefined;
297
309
  addAccountSignatureRequest(newAccountIdentifier: Identifier): Promise<SignatureRequestHandle>;
298
310
  removeAccountSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
299
- revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle>;
311
+ revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
300
312
  revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
301
313
  changeRecoveryIdentifierSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
302
314
  registerIdentity(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise<void>;
@@ -317,6 +329,8 @@ declare class WorkerConversation {
317
329
  updateImageUrl(imageUrl: string): Promise<void>;
318
330
  get description(): string;
319
331
  updateDescription(description: string): Promise<void>;
332
+ get appData(): string;
333
+ updateAppData(appData: string): Promise<void>;
320
334
  get isActive(): boolean;
321
335
  get isCommitLogForked(): boolean | undefined;
322
336
  get addedByInboxId(): string;
@@ -346,9 +360,10 @@ declare class WorkerConversation {
346
360
  addSuperAdmin(inboxId: string): Promise<void>;
347
361
  removeSuperAdmin(inboxId: string): Promise<void>;
348
362
  publishMessages(): Promise<void>;
349
- sendOptimistic(encodedContent: EncodedContent): string;
350
- send(encodedContent: EncodedContent): Promise<string>;
363
+ sendOptimistic(encodedContent: EncodedContent, opts: SendMessageOpts): string;
364
+ send(encodedContent: EncodedContent, opts: SendMessageOpts): Promise<string>;
351
365
  messages(options?: SafeListMessagesOptions): Promise<Message[]>;
366
+ countMessages(options?: SafeListMessagesOptions): Promise<bigint>;
352
367
  get consentState(): ConsentState;
353
368
  updateConsentState(state: ConsentState): void;
354
369
  dmPeerInboxId(): string;
@@ -361,6 +376,8 @@ declare class WorkerConversation {
361
376
  getHmacKeys(): Map<string, HmacKey[]>;
362
377
  debugInfo(): Promise<ConversationDebugInfo>;
363
378
  getDuplicateDms(): Promise<WorkerConversation[]>;
379
+ requestRemoval(): Promise<void>;
380
+ get isPendingRemoval(): boolean;
364
381
  }
365
382
 
366
383
  declare const toContentTypeId: (contentTypeId: ContentTypeId) => ContentTypeId$1;
@@ -398,12 +415,23 @@ type SafeListMessagesOptions = {
398
415
  contentTypes?: ContentType[];
399
416
  deliveryStatus?: DeliveryStatus;
400
417
  direction?: SortDirection;
418
+ excludeContentTypes?: ContentType[];
419
+ excludeSenderInboxIds?: string[];
420
+ insertedAfterNs?: bigint;
421
+ insertedBeforeNs?: bigint;
422
+ kind?: GroupMessageKind;
401
423
  limit?: bigint;
402
424
  sentAfterNs?: bigint;
403
425
  sentBeforeNs?: bigint;
426
+ sortBy?: MessageSortBy;
404
427
  };
405
428
  declare const toSafeListMessagesOptions: (options: ListMessagesOptions) => SafeListMessagesOptions;
406
429
  declare const fromSafeListMessagesOptions: (options: SafeListMessagesOptions) => ListMessagesOptions;
430
+ type SafeSendMessageOpts = {
431
+ shouldPush: boolean;
432
+ };
433
+ declare const toSafeSendMessageOpts: (opts: SendMessageOpts) => SafeSendMessageOpts;
434
+ declare const fromSafeSendMessageOpts: (opts: SafeSendMessageOpts) => SendMessageOpts;
407
435
  type SafeListConversationsOptions = {
408
436
  consentStates?: ConsentState[];
409
437
  conversationType?: ConversationType;
@@ -411,6 +439,7 @@ type SafeListConversationsOptions = {
411
439
  createdBeforeNs?: bigint;
412
440
  includeDuplicateDms?: boolean;
413
441
  limit?: bigint;
442
+ orderBy?: ListConversationsOrderBy;
414
443
  };
415
444
  declare const toSafeListConversationsOptions: (options: ListConversationsOptions) => SafeListConversationsOptions;
416
445
  declare const fromSafeListConversationsOptions: (options: SafeListConversationsOptions) => ListConversationsOptions;
@@ -446,6 +475,7 @@ type SafeConversation = {
446
475
  name: string;
447
476
  imageUrl: string;
448
477
  description: string;
478
+ appData: string;
449
479
  permissions: {
450
480
  policyType: GroupPermissionsOptions;
451
481
  policySet: {
@@ -520,6 +550,10 @@ type SafeKeyPackageStatus = {
520
550
  validationError?: string;
521
551
  };
522
552
  declare const toSafeKeyPackageStatus: (status: KeyPackageStatus) => SafeKeyPackageStatus;
553
+ type SafeXMTPCursor = {
554
+ originatorID: number;
555
+ sequenceID: bigint;
556
+ };
523
557
  type SafeConversationDebugInfo = {
524
558
  epoch: bigint;
525
559
  maybeForked: boolean;
@@ -527,7 +561,7 @@ type SafeConversationDebugInfo = {
527
561
  isCommitLogForked?: boolean;
528
562
  localCommitLog: string;
529
563
  remoteCommitLog: string;
530
- cursor: bigint;
564
+ cursor: SafeXMTPCursor[];
531
565
  };
532
566
  declare const toSafeConversationDebugInfo: (debugInfo: ConversationDebugInfo) => SafeConversationDebugInfo;
533
567
  type SafeApiStats = {
@@ -605,7 +639,7 @@ type ClientAction = {
605
639
  action: "client.revokeAllOtherInstallationsSignatureText";
606
640
  id: string;
607
641
  result: {
608
- signatureText: string;
642
+ signatureText: string | undefined;
609
643
  signatureRequestId: string;
610
644
  };
611
645
  data: {
@@ -735,6 +769,16 @@ type ClientAction = {
735
769
  data: {
736
770
  installationIds: string[];
737
771
  };
772
+ } | {
773
+ action: "client.libxmtpVersion";
774
+ id: string;
775
+ result: string;
776
+ data: undefined;
777
+ } | {
778
+ action: "client.appVersion";
779
+ id: string;
780
+ result: string;
781
+ data: undefined;
738
782
  };
739
783
 
740
784
  type ConversationAction = {
@@ -751,6 +795,7 @@ type ConversationAction = {
751
795
  data: {
752
796
  id: string;
753
797
  content: SafeEncodedContent;
798
+ sendOptions: SafeSendMessageOpts;
754
799
  };
755
800
  } | {
756
801
  action: "conversation.sendOptimistic";
@@ -759,6 +804,7 @@ type ConversationAction = {
759
804
  data: {
760
805
  id: string;
761
806
  content: SafeEncodedContent;
807
+ sendOptions: SafeSendMessageOpts;
762
808
  };
763
809
  } | {
764
810
  action: "conversation.publishMessages";
@@ -775,6 +821,14 @@ type ConversationAction = {
775
821
  id: string;
776
822
  options?: SafeListMessagesOptions;
777
823
  };
824
+ } | {
825
+ action: "conversation.countMessages";
826
+ id: string;
827
+ result: bigint;
828
+ data: {
829
+ id: string;
830
+ options?: Omit<SafeListMessagesOptions, "limit" | "direction">;
831
+ };
778
832
  } | {
779
833
  action: "conversation.members";
780
834
  id: string;
@@ -985,6 +1039,13 @@ type ConversationsAction = {
985
1039
  conversationType?: ConversationType;
986
1040
  consentStates?: ConsentState[];
987
1041
  };
1042
+ } | {
1043
+ action: "conversations.streamMessageDeletions";
1044
+ id: string;
1045
+ result: undefined;
1046
+ data: {
1047
+ streamId: string;
1048
+ };
988
1049
  };
989
1050
 
990
1051
  type DebugInformationAction = {
@@ -1150,6 +1211,14 @@ type GroupAction = {
1150
1211
  id: string;
1151
1212
  imageUrl: string;
1152
1213
  };
1214
+ } | {
1215
+ action: "group.updateAppData";
1216
+ id: string;
1217
+ result: undefined;
1218
+ data: {
1219
+ id: string;
1220
+ appData: string;
1221
+ };
1153
1222
  } | {
1154
1223
  action: "group.updatePermission";
1155
1224
  id: string;
@@ -1167,6 +1236,20 @@ type GroupAction = {
1167
1236
  data: {
1168
1237
  id: string;
1169
1238
  };
1239
+ } | {
1240
+ action: "group.requestRemoval";
1241
+ id: string;
1242
+ result: undefined;
1243
+ data: {
1244
+ id: string;
1245
+ };
1246
+ } | {
1247
+ action: "group.isPendingRemoval";
1248
+ id: string;
1249
+ result: boolean;
1250
+ data: {
1251
+ id: string;
1252
+ };
1170
1253
  };
1171
1254
 
1172
1255
  type PreferencesAction = {
@@ -1209,7 +1292,7 @@ type PreferencesAction = {
1209
1292
  } | {
1210
1293
  action: "preferences.sync";
1211
1294
  id: string;
1212
- result: number;
1295
+ result: GroupSyncSummary;
1213
1296
  data: undefined;
1214
1297
  } | {
1215
1298
  action: "preferences.streamConsent";
@@ -1274,6 +1357,10 @@ type StreamAction = {
1274
1357
  action: "stream.preferences";
1275
1358
  streamId: string;
1276
1359
  result: UserPreference[] | undefined;
1360
+ } | {
1361
+ action: "stream.messageDeleted";
1362
+ streamId: string;
1363
+ result: string | undefined;
1277
1364
  } | {
1278
1365
  action: "stream.fail";
1279
1366
  streamId: string;
@@ -1429,6 +1516,13 @@ declare class Conversation<ContentTypes = unknown> {
1429
1516
  * @returns Promise that resolves with an array of decoded messages
1430
1517
  */
1431
1518
  messages(options?: SafeListMessagesOptions): Promise<DecodedMessage<ContentTypes>[]>;
1519
+ /**
1520
+ * Counts messages in this conversation
1521
+ *
1522
+ * @param options - Optional filtering options
1523
+ * @returns Promise that resolves with the count of messages
1524
+ */
1525
+ countMessages(options?: Omit<SafeListMessagesOptions, "limit" | "direction">): Promise<bigint>;
1432
1526
  /**
1433
1527
  * Gets the consent state for this conversation
1434
1528
  *
@@ -1565,6 +1659,16 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
1565
1659
  * @param description The new description for the group
1566
1660
  */
1567
1661
  updateDescription(description: string): Promise<void>;
1662
+ /**
1663
+ * The app data of the group
1664
+ */
1665
+ get appData(): string | undefined;
1666
+ /**
1667
+ * Updates the group's app data (max 8192 bytes)
1668
+ *
1669
+ * @param appData The new app data for the group
1670
+ */
1671
+ updateAppData(appData: string): Promise<void>;
1568
1672
  /**
1569
1673
  * The list of admins of the group by inbox ID
1570
1674
  */
@@ -1673,6 +1777,16 @@ declare class Group<ContentTypes = unknown> extends Conversation<ContentTypes> {
1673
1777
  * @param inboxId The inbox ID of the super admin to demote
1674
1778
  */
1675
1779
  removeSuperAdmin(inboxId: string): Promise<void>;
1780
+ /**
1781
+ * Request to leave the group
1782
+ */
1783
+ requestRemoval(): Promise<void>;
1784
+ /**
1785
+ * Checks if the current user has requested to leave the group
1786
+ *
1787
+ * @returns Boolean
1788
+ */
1789
+ isPendingRemoval(): Promise<boolean>;
1676
1790
  }
1677
1791
 
1678
1792
  /**
@@ -1853,6 +1967,13 @@ declare class Conversations<ContentTypes = unknown> {
1853
1967
  streamAllDmMessages(options?: StreamOptions<SafeMessage, DecodedMessage<ContentTypes>> & {
1854
1968
  consentStates?: ConsentState[];
1855
1969
  }): Promise<AsyncStreamProxy<DecodedMessage<ContentTypes>>>;
1970
+ /**
1971
+ * Creates a stream for message deletions
1972
+ *
1973
+ * @param options - Optional stream options
1974
+ * @returns Stream instance for message deletions
1975
+ */
1976
+ streamMessageDeletions(options?: Omit<StreamOptions<string>, "disableSync" | "onFail" | "onRetry" | "onRestart" | "retryAttempts" | "retryDelay" | "retryOnFail">): Promise<AsyncStreamProxy<string>>;
1856
1977
  }
1857
1978
 
1858
1979
  /**
@@ -1883,7 +2004,7 @@ declare class Preferences<ContentTypes = unknown> {
1883
2004
  * @param client - The client instance managing preferences
1884
2005
  */
1885
2006
  constructor(client: Client<ContentTypes>);
1886
- sync(): Promise<number>;
2007
+ sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>;
1887
2008
  /**
1888
2009
  * Retrieves the current inbox state
1889
2010
  *
@@ -2028,6 +2149,14 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
2028
2149
  * Gets the preferences manager for this client
2029
2150
  */
2030
2151
  get preferences(): Preferences<ContentTypes>;
2152
+ /**
2153
+ * Gets the version of libxmtp used in the bindings
2154
+ */
2155
+ libxmtpVersion(): Promise<string>;
2156
+ /**
2157
+ * Gets the app version used by the client
2158
+ */
2159
+ appVersion(): Promise<string>;
2031
2160
  /**
2032
2161
  * Creates signature text for creating a new inbox
2033
2162
  *
@@ -2090,7 +2219,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
2090
2219
  * @returns The signature text and signature request ID
2091
2220
  */
2092
2221
  unsafe_revokeAllOtherInstallationsSignatureText(): Promise<{
2093
- signatureText: string;
2222
+ signatureText: string | undefined;
2094
2223
  signatureRequestId: string;
2095
2224
  }>;
2096
2225
  /**
@@ -2203,7 +2332,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
2203
2332
  * @param inboxId - The inbox ID to revoke installations for
2204
2333
  * @param installationIds - The installation IDs to revoke
2205
2334
  */
2206
- static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, enableLogging?: boolean): Promise<void>;
2335
+ static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string, enableLogging?: boolean): Promise<void>;
2207
2336
  /**
2208
2337
  * Gets the inbox state for the specified inbox IDs without a client
2209
2338
  *
@@ -2211,7 +2340,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
2211
2340
  * @param env - The environment to use
2212
2341
  * @returns The inbox state for the specified inbox IDs
2213
2342
  */
2214
- static inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv, enableLogging?: boolean): Promise<SafeInboxState[]>;
2343
+ static inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv, enableLogging?: boolean, gatewayHost?: string): Promise<SafeInboxState[]>;
2215
2344
  /**
2216
2345
  * Changes the recovery identifier for the client's inbox
2217
2346
  *
@@ -2265,6 +2394,20 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> extends ClientWork
2265
2394
  * @throws {CodecNotFoundError} if no codec is found for the content type
2266
2395
  */
2267
2396
  encodeContent(content: ContentTypes, contentType: ContentTypeId$1): SafeEncodedContent;
2397
+ /**
2398
+ * Prepares content for sending by encoding it and generating send options from the codec
2399
+ *
2400
+ * @param content - The message content to prepare for sending
2401
+ * @param contentType - The content type identifier for the appropriate codec
2402
+ * @returns An object containing the encoded content and send options
2403
+ * @throws {CodecNotFoundError} When no codec is registered for the specified content type
2404
+ */
2405
+ prepareForSend(content: ContentTypes, contentType: ContentTypeId$1): {
2406
+ encodedContent: SafeEncodedContent;
2407
+ sendOptions: {
2408
+ shouldPush: boolean;
2409
+ };
2410
+ };
2268
2411
  /**
2269
2412
  * Decodes a message for a given content type
2270
2413
  *
@@ -2329,6 +2472,7 @@ type UtilsWorkerAction = {
2329
2472
  data: {
2330
2473
  identifier: Identifier;
2331
2474
  env?: XmtpEnv;
2475
+ gatewayHost?: string;
2332
2476
  };
2333
2477
  } | {
2334
2478
  action: "utils.revokeInstallationsSignatureText";
@@ -2341,6 +2485,7 @@ type UtilsWorkerAction = {
2341
2485
  env?: XmtpEnv;
2342
2486
  identifier: Identifier;
2343
2487
  inboxId: string;
2488
+ gatewayHost?: string;
2344
2489
  installationIds: Uint8Array[];
2345
2490
  signatureRequestId: string;
2346
2491
  };
@@ -2352,6 +2497,7 @@ type UtilsWorkerAction = {
2352
2497
  env?: XmtpEnv;
2353
2498
  signer: SafeSigner;
2354
2499
  signatureRequestId: string;
2500
+ gatewayHost?: string;
2355
2501
  };
2356
2502
  } | {
2357
2503
  action: "utils.inboxStateFromInboxIds";
@@ -2360,6 +2506,7 @@ type UtilsWorkerAction = {
2360
2506
  data: {
2361
2507
  inboxIds: string[];
2362
2508
  env?: XmtpEnv;
2509
+ gatewayHost?: string;
2363
2510
  };
2364
2511
  };
2365
2512
 
@@ -2425,9 +2572,10 @@ declare class Utils extends UtilsWorkerClass {
2425
2572
  *
2426
2573
  * @param identifier - The identifier to get the inbox ID for
2427
2574
  * @param env - Optional XMTP environment configuration (default: "dev")
2575
+ * @param gatewayHost - Optional gateway host override
2428
2576
  * @returns Promise that resolves with the inbox ID for the identifier
2429
2577
  */
2430
- getInboxIdForIdentifier(identifier: Identifier, env?: XmtpEnv): Promise<string | undefined>;
2578
+ getInboxIdForIdentifier(identifier: Identifier, env?: XmtpEnv, gatewayHost?: string): Promise<string | undefined>;
2431
2579
  /**
2432
2580
  * Creates signature text for revoking installations
2433
2581
  *
@@ -2441,9 +2589,10 @@ declare class Utils extends UtilsWorkerClass {
2441
2589
  * @param identifier - The identifier to revoke installations for
2442
2590
  * @param inboxId - The inbox ID to revoke installations for
2443
2591
  * @param installationIds - The installation IDs to revoke
2592
+ * @param gatewayHost - Optional gateway host override
2444
2593
  * @returns The signature text and signature request ID
2445
2594
  */
2446
- revokeInstallationsSignatureText(identifier: Identifier, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv): Promise<{
2595
+ revokeInstallationsSignatureText(identifier: Identifier, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<{
2447
2596
  signatureText: string;
2448
2597
  signatureRequestId: string;
2449
2598
  }>;
@@ -2454,9 +2603,10 @@ declare class Utils extends UtilsWorkerClass {
2454
2603
  * @param signer - The signer to use
2455
2604
  * @param inboxId - The inbox ID to revoke installations for
2456
2605
  * @param installationIds - The installation IDs to revoke
2606
+ * @param gatewayHost - Optional gateway host override
2457
2607
  * @returns Promise that resolves with the result of the revoke installations operation
2458
2608
  */
2459
- revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv): Promise<void>;
2609
+ revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<void>;
2460
2610
  /**
2461
2611
  * Gets the inbox state for the specified inbox IDs without a client
2462
2612
  *
@@ -2464,7 +2614,7 @@ declare class Utils extends UtilsWorkerClass {
2464
2614
  * @param env - The environment to use
2465
2615
  * @returns The inbox state for the specified inbox IDs
2466
2616
  */
2467
- inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv): Promise<SafeInboxState[]>;
2617
+ inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<SafeInboxState[]>;
2468
2618
  }
2469
2619
 
2470
2620
  declare class ClientNotInitializedError extends Error {
@@ -2501,5 +2651,5 @@ declare class StreamInvalidRetryAttemptsError extends Error {
2501
2651
  constructor();
2502
2652
  }
2503
2653
 
2504
- export { AccountAlreadyAssociatedError, ApiUrls, Client, ClientNotInitializedError, CodecNotFoundError, Conversation, Conversations, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_DELAY, DecodedMessage, Dm, Group, GroupNotFoundError, HistorySyncUrls, InboxReassignError, InvalidGroupMembershipChangeError, MissingContentTypeError, SignerUnavailableError, StreamFailedError, StreamInvalidRetryAttemptsError, StreamNotFoundError, Utils, createStream, fromContentTypeId, fromEncodedContent, fromSafeConsent, fromSafeContentTypeId, fromSafeCreateDmOptions, fromSafeCreateGroupOptions, fromSafeEncodedContent, fromSafeGroupMember, fromSafeListConversationsOptions, fromSafeListMessagesOptions, fromSafeMessageDisappearingSettings, fromSafePermissionPolicySet, toContentTypeId, toEncodedContent, toSafeApiStats, toSafeConsent, toSafeContentTypeId, toSafeConversation, toSafeConversationDebugInfo, toSafeCreateDmOptions, toSafeCreateGroupOptions, toSafeEncodedContent, toSafeGroupMember, toSafeHmacKey, toSafeIdentityStats, toSafeInboxState, toSafeInstallation, toSafeKeyPackageStatus, toSafeListConversationsOptions, toSafeListMessagesOptions, toSafeMessage, toSafeMessageDisappearingSettings, toSafePermissionPolicySet, toSafeSigner };
2505
- export type { AsyncStreamProxy, ClientOptions, ContentOptions, EOASigner, ExtractCodecContentTypes, HmacKeys, MessageDeliveryStatus, MessageKind, NetworkOptions, OtherOptions, SCWSigner, SafeApiStats, SafeConsent, SafeContentTypeId, SafeConversation, SafeConversationDebugInfo, SafeCreateDmOptions, SafeCreateGroupOptions, SafeEncodedContent, SafeGroupMember, SafeHmacKey, SafeHmacKeys, SafeIdentityStats, SafeInboxState, SafeInstallation, SafeKeyPackageStatus, SafeListConversationsOptions, SafeListMessagesOptions, SafeMessage, SafeMessageDisappearingSettings, SafePermissionPolicySet, SafeSigner, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, XmtpEnv };
2654
+ export { AccountAlreadyAssociatedError, ApiUrls, Client, ClientNotInitializedError, CodecNotFoundError, Conversation, Conversations, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_DELAY, DecodedMessage, Dm, Group, GroupNotFoundError, HistorySyncUrls, InboxReassignError, InvalidGroupMembershipChangeError, MissingContentTypeError, SignerUnavailableError, StreamFailedError, StreamInvalidRetryAttemptsError, StreamNotFoundError, Utils, createStream, fromContentTypeId, fromEncodedContent, fromSafeConsent, fromSafeContentTypeId, fromSafeCreateDmOptions, fromSafeCreateGroupOptions, fromSafeEncodedContent, fromSafeGroupMember, fromSafeListConversationsOptions, fromSafeListMessagesOptions, fromSafeMessageDisappearingSettings, fromSafePermissionPolicySet, fromSafeSendMessageOpts, toContentTypeId, toEncodedContent, toSafeApiStats, toSafeConsent, toSafeContentTypeId, toSafeConversation, toSafeConversationDebugInfo, toSafeCreateDmOptions, toSafeCreateGroupOptions, toSafeEncodedContent, toSafeGroupMember, toSafeHmacKey, toSafeIdentityStats, toSafeInboxState, toSafeInstallation, toSafeKeyPackageStatus, toSafeListConversationsOptions, toSafeListMessagesOptions, toSafeMessage, toSafeMessageDisappearingSettings, toSafePermissionPolicySet, toSafeSendMessageOpts, toSafeSigner };
2655
+ export type { AsyncStreamProxy, ClientOptions, ContentOptions, EOASigner, ExtractCodecContentTypes, HmacKeys, MessageDeliveryStatus, MessageKind, NetworkOptions, OtherOptions, SCWSigner, SafeApiStats, SafeConsent, SafeContentTypeId, SafeConversation, SafeConversationDebugInfo, SafeCreateDmOptions, SafeCreateGroupOptions, SafeEncodedContent, SafeGroupMember, SafeHmacKey, SafeHmacKeys, SafeIdentityStats, SafeInboxState, SafeInstallation, SafeKeyPackageStatus, SafeListConversationsOptions, SafeListMessagesOptions, SafeMessage, SafeMessageDisappearingSettings, SafePermissionPolicySet, SafeSendMessageOpts, SafeSigner, SafeXMTPCursor, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, XmtpEnv };