@xmtp/browser-sdk 6.5.0 → 7.0.0-dev.57a7203

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,6 +1,6 @@
1
1
  import * as _xmtp_wasm_bindings from '@xmtp/wasm-bindings';
2
- import { ContentTypeId as ContentTypeId$1, DeliveryStatus, GroupMessageKind, Reaction, DecodedMessage as DecodedMessage$1, LeaveRequest, ReadReceipt, Attachment, RemoteAttachment, TransactionReference, WalletSendCalls, Actions, Intent, MultiRemoteAttachment, GroupUpdated, DeletedMessage, 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, 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, Reply, SendMessageOpts, SignatureRequestHandle, SortDirection, TransactionMetadata, TransactionReference, UserPreferenceUpdate, WalletCall, WalletSendCalls } from '@xmtp/wasm-bindings';
2
+ import { ContentTypeId as ContentTypeId$1, DeliveryStatus, GroupMessageKind, Reaction, DecodedMessage as DecodedMessage$1, LeaveRequest, ReadReceipt, Attachment, RemoteAttachment, TransactionReference, WalletSendCalls, Actions, Intent, MultiRemoteAttachment, GroupUpdated, DeletedMessage, Backend, LogLevel, WorkerConfigOptions, WasmVisibilityConfirmationOptions, Identifier, Conversations as Conversations$1, ConsentState, ListConversationsOptions, CreateGroupOptions, CreateDmOptions, Conversation as Conversation$1, ConversationType, Message, Client as Client$1, Consent, ConsentEntityType, UserPreferenceUpdate, SignatureRequestHandle, KeyPackageStatus, ArchiveOptions, AvailableArchiveInfo, ArchiveMetadata, GroupSyncSummary, GroupMember, PermissionUpdateType, PermissionPolicy, MetadataField, EncodedContent, SendMessageOpts, SendOpts, Reply, ListMessagesOptions, MessageDisappearingSettings, HmacKey, ConversationDebugInfo, GroupPermissionsOptions, PermissionPolicySet, GroupMetadata, ApiStats, IdentityStats, InboxState } from '@xmtp/wasm-bindings';
3
+ export { Action, ActionStyle, Actions, ApiStats, ArchiveMetadata, ArchiveOptions, Attachment, AvailableArchiveInfo, Backend, BackendBuilder, BackupElementSelectionOption, 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, Reply, SendMessageOpts, SendOpts, SignatureRequestHandle, SortDirection, TransactionMetadata, TransactionReference, UserPreferenceUpdate, WalletCall, WalletSendCalls, WorkerConfigOptions, WorkerIntervalOverride, WorkerKind } from '@xmtp/wasm-bindings';
4
4
  import { ContentCodec, ContentTypeId } from '@xmtp/content-type-primitives';
5
5
 
6
6
  type ResolveValue<T> = {
@@ -82,33 +82,6 @@ type StreamValueMutator<T = unknown, V = T> = (value: T) => V | Promise<V>;
82
82
  */
83
83
  declare const createStream: <T = unknown, V = T>(streamFunction: StreamFunction<T>, streamValueMutator?: StreamValueMutator<T, V | undefined>, options?: StreamOptions<T, V>) => Promise<AsyncStreamProxy<V>>;
84
84
 
85
- /**
86
- * Pre-configured URLs for the XMTP network based on the environment
87
- *
88
- * @constant
89
- * @property {string} local - The local URL for the XMTP network
90
- * @property {string} dev - The development URL for the XMTP network
91
- * @property {string} production - The production URL for the XMTP network
92
- */
93
- declare const ApiUrls: {
94
- readonly local: "http://localhost:5557";
95
- readonly dev: "https://api.dev.xmtp.network:5558";
96
- readonly production: "https://api.production.xmtp.network:5558";
97
- };
98
- /**
99
- * Pre-configured URLs for the XMTP history sync service based on the environment
100
- *
101
- * @constant
102
- * @property {string} local - The local URL for the XMTP history sync service
103
- * @property {string} dev - The development URL for the XMTP history sync service
104
- * @property {string} production - The production URL for the XMTP history sync service
105
- */
106
- declare const HistorySyncUrls: {
107
- readonly local: "http://localhost:5558";
108
- readonly dev: "https://message-history.dev.ephemera.network";
109
- readonly production: "https://message-history.production.ephemera.network";
110
- };
111
-
112
85
  declare class CodecRegistry {
113
86
  #private;
114
87
  constructor(codecs: ContentCodec[]);
@@ -158,7 +131,8 @@ declare class DecodedMessage<ContentTypes = unknown> {
158
131
  constructor(codecRegistry: CodecRegistry, message: DecodedMessage$1);
159
132
  }
160
133
 
161
- type XmtpEnv = keyof typeof ApiUrls;
134
+ type VisibilityConfirmationOptions = WasmVisibilityConfirmationOptions;
135
+ type XmtpEnv = "local" | "dev" | "production" | "testnet-staging" | "testnet-dev" | "testnet" | "mainnet";
162
136
  /**
163
137
  * Network options
164
138
  */
@@ -172,15 +146,28 @@ type NetworkOptions = {
172
146
  * specific endpoint
173
147
  */
174
148
  apiUrl?: string;
149
+ /**
150
+ * gatewayHost can be used to override the gateway endpoint
151
+ */
152
+ gatewayHost?: string;
153
+ /**
154
+ * Custom app version
155
+ */
156
+ appVersion?: string;
157
+ };
158
+ /**
159
+ * Device sync options
160
+ */
161
+ type DeviceSyncOptions = {
175
162
  /**
176
163
  * historySyncUrl can be used to override the `env` flag and connect to a
177
164
  * specific endpoint for syncing history
178
165
  */
179
166
  historySyncUrl?: string | null;
180
167
  /**
181
- * gatewayHost can be used to override the gateway endpoint
168
+ * Disable device sync
182
169
  */
183
- gatewayHost?: string | null;
170
+ disableDeviceSync?: boolean;
184
171
  };
185
172
  type ContentOptions = {
186
173
  /**
@@ -229,19 +216,28 @@ type OtherOptions = {
229
216
  */
230
217
  loggingLevel?: LogLevel;
231
218
  /**
232
- * Disable automatic registration when creating a client
219
+ * Tuning for the background worker scheduler (intervals, jitter, per-worker
220
+ * overrides, and disabled workers). All fields are optional; omitting this
221
+ * object preserves the default worker behavior.
222
+ *
223
+ * Intervals are specified in nanoseconds.
233
224
  */
234
- disableAutoRegister?: boolean;
225
+ workerConfig?: WorkerConfigOptions;
235
226
  /**
236
- * Disable device sync
227
+ * Disable automatic registration when creating a client
237
228
  */
238
- disableDeviceSync?: boolean;
229
+ disableAutoRegister?: boolean;
239
230
  /**
240
- * Custom app version
231
+ * Options for waiting until client registration is visible on the network.
232
+ *
233
+ * When set, `registerIdentity` will wait for the specified quorum of nodes
234
+ * to confirm the registration before resolving.
241
235
  */
242
- appVersion?: string;
236
+ waitForRegistrationVisible?: VisibilityConfirmationOptions;
243
237
  };
244
- type ClientOptions = NetworkOptions & ContentOptions & StorageOptions & OtherOptions;
238
+ type ClientOptions = (NetworkOptions | {
239
+ backend: Backend;
240
+ }) & DeviceSyncOptions & ContentOptions & StorageOptions & OtherOptions;
245
241
  type EnrichedReply<T = unknown, U = unknown> = {
246
242
  referenceId: string;
247
243
  content: T;
@@ -283,6 +279,8 @@ type SafeSigner = {
283
279
  chainId: bigint;
284
280
  blockNumber?: bigint;
285
281
  };
282
+ declare const createEOASigner: (key?: `0x${string}`) => Signer;
283
+ declare const createSCWSigner: (address: `0x${string}`, signMessage: (message: string) => Promise<string> | string, chainId: bigint) => Signer;
286
284
  declare const toSafeSigner: (signer: Signer, signature: Uint8Array) => Promise<SafeSigner>;
287
285
 
288
286
  declare class WorkerConversations {
@@ -337,10 +335,11 @@ declare class WorkerPreferences {
337
335
 
338
336
  declare class WorkerClient {
339
337
  #private;
340
- constructor(client: Client$1);
338
+ constructor(client: Client$1, env: XmtpEnv);
341
339
  static create(identifier: Identifier, options?: Omit<ClientOptions, "codecs">): Promise<WorkerClient>;
342
340
  get libxmtpVersion(): string;
343
341
  get appVersion(): string;
342
+ get env(): XmtpEnv;
344
343
  get accountIdentifier(): Identifier;
345
344
  get inboxId(): string;
346
345
  get installationId(): string;
@@ -350,6 +349,8 @@ declare class WorkerClient {
350
349
  get debugInformation(): WorkerDebugInformation;
351
350
  get preferences(): WorkerPreferences;
352
351
  canMessage(identifiers: Identifier[]): Promise<Map<string, boolean>>;
352
+ fetchLatestInboxUpdatesCount(inboxIds: string[]): Promise<Record<string, number>>;
353
+ fetchOwnInboxUpdatesCount(): Promise<number>;
353
354
  addSignature(signatureRequest: SignatureRequestHandle, signer: SafeSigner): Promise<void>;
354
355
  applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
355
356
  processSignatureRequest(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise<void>;
@@ -359,13 +360,20 @@ declare class WorkerClient {
359
360
  revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
360
361
  revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
361
362
  changeRecoveryIdentifierSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
362
- registerIdentity(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise<void>;
363
+ registerIdentity(signer: SafeSigner, signatureRequest: SignatureRequestHandle, visibilityConfirmationOptions?: VisibilityConfirmationOptions): Promise<void>;
363
364
  getInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
364
365
  signWithInstallationKey(signatureText: string): Uint8Array<ArrayBufferLike>;
365
366
  verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): boolean;
366
367
  verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): boolean;
367
368
  fetchKeyPackageStatuses(installationIds: string[]): Promise<Map<string, KeyPackageStatus>>;
368
- sendSyncRequest(): Promise<void>;
369
+ sendSyncRequest(options: ArchiveOptions, serverUrl: string): Promise<void>;
370
+ sendSyncArchive(options: ArchiveOptions, serverUrl: string, pin: string): Promise<void>;
371
+ processSyncArchive(archivePin?: string | null): Promise<void>;
372
+ listAvailableArchives(daysCutoff: number): AvailableArchiveInfo[];
373
+ createArchive(opts: ArchiveOptions, key: Uint8Array): Promise<Uint8Array>;
374
+ importArchive(data: Uint8Array, key: Uint8Array): Promise<void>;
375
+ archiveMetadata(data: Uint8Array, key: Uint8Array): Promise<ArchiveMetadata>;
376
+ syncAllDeviceSyncGroups(): Promise<GroupSyncSummary>;
369
377
  }
370
378
 
371
379
  declare class WorkerConversation {
@@ -407,18 +415,18 @@ declare class WorkerConversation {
407
415
  publishMessages(): Promise<void>;
408
416
  processStreamedMessage(envelopeBytes: Uint8Array): Promise<Message[]>;
409
417
  send(encodedContent: EncodedContent, opts?: SendMessageOpts): Promise<string>;
410
- sendText(text: string, isOptimistic?: boolean): Promise<string>;
411
- sendMarkdown(markdown: string, isOptimistic?: boolean): Promise<string>;
412
- sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise<string>;
413
- sendReadReceipt(isOptimistic?: boolean): Promise<string>;
414
- sendReply(reply: Reply, isOptimistic?: boolean): Promise<string>;
415
- sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise<string>;
416
- sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise<string>;
417
- sendActions(actions: Actions, isOptimistic?: boolean): Promise<string>;
418
- sendIntent(intent: Intent, isOptimistic?: boolean): Promise<string>;
419
- sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise<string>;
420
- sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise<string>;
421
- sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise<string>;
418
+ sendText(text: string, opts?: SendOpts): Promise<string>;
419
+ sendMarkdown(markdown: string, opts?: SendOpts): Promise<string>;
420
+ sendReaction(reaction: Reaction, opts?: SendOpts): Promise<string>;
421
+ sendReadReceipt(opts?: SendOpts): Promise<string>;
422
+ sendReply(reply: Reply, opts?: SendOpts): Promise<string>;
423
+ sendTransactionReference(transactionReference: TransactionReference, opts?: SendOpts): Promise<string>;
424
+ sendWalletSendCalls(walletSendCalls: WalletSendCalls, opts?: SendOpts): Promise<string>;
425
+ sendActions(actions: Actions, opts?: SendOpts): Promise<string>;
426
+ sendIntent(intent: Intent, opts?: SendOpts): Promise<string>;
427
+ sendAttachment(attachment: Attachment, opts?: SendOpts): Promise<string>;
428
+ sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, opts?: SendOpts): Promise<string>;
429
+ sendRemoteAttachment(remoteAttachment: RemoteAttachment, opts?: SendOpts): Promise<string>;
422
430
  messages(options?: ListMessagesOptions): Promise<DecodedMessage$1[]>;
423
431
  countMessages(options?: ListMessagesOptions): Promise<bigint>;
424
432
  consentState(): ConsentState;
@@ -463,6 +471,7 @@ type ClientAction = {
463
471
  id: string;
464
472
  result: {
465
473
  appVersion: string;
474
+ env: string;
466
475
  inboxId: string;
467
476
  installationId: string;
468
477
  installationIdBytes: Uint8Array;
@@ -551,6 +560,7 @@ type ClientAction = {
551
560
  data: {
552
561
  signer: SafeSigner;
553
562
  signatureRequestId: string;
563
+ waitForRegistrationVisible?: VisibilityConfirmationOptions;
554
564
  };
555
565
  } | {
556
566
  action: "client.addAccount";
@@ -608,6 +618,18 @@ type ClientAction = {
608
618
  data: {
609
619
  identifiers: Identifier[];
610
620
  };
621
+ } | {
622
+ action: "client.fetchLatestInboxUpdatesCount";
623
+ id: string;
624
+ result: Record<string, number>;
625
+ data: {
626
+ inboxIds: string[];
627
+ };
628
+ } | {
629
+ action: "client.fetchOwnInboxUpdatesCount";
630
+ id: string;
631
+ result: number;
632
+ data: Record<string, never>;
611
633
  } | {
612
634
  action: "client.getInboxIdByIdentifier";
613
635
  id: string;
@@ -650,6 +672,61 @@ type ClientAction = {
650
672
  action: "client.sendSyncRequest";
651
673
  id: string;
652
674
  result: undefined;
675
+ data: {
676
+ options: ArchiveOptions;
677
+ serverUrl: string;
678
+ };
679
+ } | {
680
+ action: "client.sendSyncArchive";
681
+ id: string;
682
+ result: undefined;
683
+ data: {
684
+ options: ArchiveOptions;
685
+ serverUrl: string;
686
+ pin: string;
687
+ };
688
+ } | {
689
+ action: "client.processSyncArchive";
690
+ id: string;
691
+ result: undefined;
692
+ data: {
693
+ archivePin?: string | null;
694
+ };
695
+ } | {
696
+ action: "client.listAvailableArchives";
697
+ id: string;
698
+ result: AvailableArchiveInfo[];
699
+ data: {
700
+ daysCutoff: number;
701
+ };
702
+ } | {
703
+ action: "client.createArchive";
704
+ id: string;
705
+ result: Uint8Array;
706
+ data: {
707
+ opts: ArchiveOptions;
708
+ key: Uint8Array;
709
+ };
710
+ } | {
711
+ action: "client.importArchive";
712
+ id: string;
713
+ result: undefined;
714
+ data: {
715
+ data: Uint8Array;
716
+ key: Uint8Array;
717
+ };
718
+ } | {
719
+ action: "client.archiveMetadata";
720
+ id: string;
721
+ result: ArchiveMetadata;
722
+ data: {
723
+ data: Uint8Array;
724
+ key: Uint8Array;
725
+ };
726
+ } | {
727
+ action: "client.syncAllDeviceSyncGroups";
728
+ id: string;
729
+ result: GroupSyncSummary;
653
730
  data: undefined;
654
731
  };
655
732
 
@@ -807,7 +884,7 @@ type ConversationAction = {
807
884
  data: {
808
885
  id: string;
809
886
  text: string;
810
- isOptimistic?: boolean;
887
+ opts?: SendOpts;
811
888
  };
812
889
  } | {
813
890
  action: "conversation.sendMarkdown";
@@ -816,7 +893,7 @@ type ConversationAction = {
816
893
  data: {
817
894
  id: string;
818
895
  markdown: string;
819
- isOptimistic?: boolean;
896
+ opts?: SendOpts;
820
897
  };
821
898
  } | {
822
899
  action: "conversation.sendReaction";
@@ -825,7 +902,7 @@ type ConversationAction = {
825
902
  data: {
826
903
  id: string;
827
904
  reaction: Reaction;
828
- isOptimistic?: boolean;
905
+ opts?: SendOpts;
829
906
  };
830
907
  } | {
831
908
  action: "conversation.sendReadReceipt";
@@ -833,7 +910,7 @@ type ConversationAction = {
833
910
  result: string;
834
911
  data: {
835
912
  id: string;
836
- isOptimistic?: boolean;
913
+ opts?: SendOpts;
837
914
  };
838
915
  } | {
839
916
  action: "conversation.sendReply";
@@ -842,7 +919,7 @@ type ConversationAction = {
842
919
  data: {
843
920
  id: string;
844
921
  reply: Reply;
845
- isOptimistic?: boolean;
922
+ opts?: SendOpts;
846
923
  };
847
924
  } | {
848
925
  action: "conversation.sendTransactionReference";
@@ -851,7 +928,7 @@ type ConversationAction = {
851
928
  data: {
852
929
  id: string;
853
930
  transactionReference: TransactionReference;
854
- isOptimistic?: boolean;
931
+ opts?: SendOpts;
855
932
  };
856
933
  } | {
857
934
  action: "conversation.sendWalletSendCalls";
@@ -860,7 +937,7 @@ type ConversationAction = {
860
937
  data: {
861
938
  id: string;
862
939
  walletSendCalls: WalletSendCalls;
863
- isOptimistic?: boolean;
940
+ opts?: SendOpts;
864
941
  };
865
942
  } | {
866
943
  action: "conversation.sendActions";
@@ -869,7 +946,7 @@ type ConversationAction = {
869
946
  data: {
870
947
  id: string;
871
948
  actions: Actions;
872
- isOptimistic?: boolean;
949
+ opts?: SendOpts;
873
950
  };
874
951
  } | {
875
952
  action: "conversation.sendIntent";
@@ -878,7 +955,7 @@ type ConversationAction = {
878
955
  data: {
879
956
  id: string;
880
957
  intent: Intent;
881
- isOptimistic?: boolean;
958
+ opts?: SendOpts;
882
959
  };
883
960
  } | {
884
961
  action: "conversation.sendAttachment";
@@ -887,7 +964,7 @@ type ConversationAction = {
887
964
  data: {
888
965
  id: string;
889
966
  attachment: Attachment;
890
- isOptimistic?: boolean;
967
+ opts?: SendOpts;
891
968
  };
892
969
  } | {
893
970
  action: "conversation.sendMultiRemoteAttachment";
@@ -896,7 +973,7 @@ type ConversationAction = {
896
973
  data: {
897
974
  id: string;
898
975
  multiRemoteAttachment: MultiRemoteAttachment;
899
- isOptimistic?: boolean;
976
+ opts?: SendOpts;
900
977
  };
901
978
  } | {
902
979
  action: "conversation.sendRemoteAttachment";
@@ -905,7 +982,7 @@ type ConversationAction = {
905
982
  data: {
906
983
  id: string;
907
984
  remoteAttachment: RemoteAttachment;
908
- isOptimistic?: boolean;
985
+ opts?: SendOpts;
909
986
  };
910
987
  };
911
988
 
@@ -1435,8 +1512,10 @@ declare class Conversation<ContentTypes = unknown> {
1435
1512
  * @param options - Optional send options
1436
1513
  * @param options.shouldPush - Indicates whether this message should be
1437
1514
  * included in push notifications
1438
- * @param options.isOptimistic - Indicates whether this message should be
1515
+ * @param options.optimistic - Indicates whether this message should be
1439
1516
  * sent optimistically and published later via `publishMessages`
1517
+ * @param options.idempotencyKey - Optional idempotency key; re-sending
1518
+ * identical content with the same key produces the same deduplicated message id
1440
1519
  * @returns Promise that resolves with the message ID after it has been sent
1441
1520
  */
1442
1521
  send(content: EncodedContent, options?: SendMessageOpts): Promise<string>;
@@ -1444,97 +1523,97 @@ declare class Conversation<ContentTypes = unknown> {
1444
1523
  * Sends a text message
1445
1524
  *
1446
1525
  * @param text - The text to send
1447
- * @param isOptimistic - Whether to send the message optimistically
1526
+ * @param opts - Send options (optimistic delivery, idempotency key)
1448
1527
  * @returns Promise that resolves with the message ID after it has been sent
1449
1528
  */
1450
- sendText(text: string, isOptimistic?: boolean): Promise<string>;
1529
+ sendText(text: string, opts?: SendOpts): Promise<string>;
1451
1530
  /**
1452
1531
  * Sends a markdown message
1453
1532
  *
1454
1533
  * @param markdown - The markdown to send
1455
- * @param isOptimistic - Whether to send the message optimistically
1534
+ * @param opts - Send options (optimistic delivery, idempotency key)
1456
1535
  * @returns Promise that resolves with the message ID after it has been sent
1457
1536
  */
1458
- sendMarkdown(markdown: string, isOptimistic?: boolean): Promise<string>;
1537
+ sendMarkdown(markdown: string, opts?: SendOpts): Promise<string>;
1459
1538
  /**
1460
1539
  * Sends a reaction message
1461
1540
  *
1462
1541
  * @param reaction - The reaction to send
1463
- * @param isOptimistic - Whether to send the message optimistically
1542
+ * @param opts - Send options (optimistic delivery, idempotency key)
1464
1543
  * @returns Promise that resolves with the message ID after it has been sent
1465
1544
  */
1466
- sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise<string>;
1545
+ sendReaction(reaction: Reaction, opts?: SendOpts): Promise<string>;
1467
1546
  /**
1468
1547
  * Sends a read receipt message
1469
1548
  *
1470
- * @param isOptimistic - Whether to send the message optimistically
1549
+ * @param opts - Send options (optimistic delivery, idempotency key)
1471
1550
  * @returns Promise that resolves with the message ID after it has been sent
1472
1551
  */
1473
- sendReadReceipt(isOptimistic?: boolean): Promise<string>;
1552
+ sendReadReceipt(opts?: SendOpts): Promise<string>;
1474
1553
  /**
1475
1554
  * Sends a reply message
1476
1555
  *
1477
1556
  * @param reply - The reply to send
1478
- * @param isOptimistic - Whether to send the message optimistically
1557
+ * @param opts - Send options (optimistic delivery, idempotency key)
1479
1558
  * @returns Promise that resolves with the message ID after it has been sent
1480
1559
  */
1481
- sendReply(reply: Reply, isOptimistic?: boolean): Promise<string>;
1560
+ sendReply(reply: Reply, opts?: SendOpts): Promise<string>;
1482
1561
  /**
1483
1562
  * Sends a transaction reference message
1484
1563
  *
1485
1564
  * @param transactionReference - The transaction reference to send
1486
- * @param isOptimistic - Whether to send the message optimistically
1565
+ * @param opts - Send options (optimistic delivery, idempotency key)
1487
1566
  * @returns Promise that resolves with the message ID after it has been sent
1488
1567
  */
1489
- sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise<string>;
1568
+ sendTransactionReference(transactionReference: TransactionReference, opts?: SendOpts): Promise<string>;
1490
1569
  /**
1491
1570
  * Sends a wallet send calls message
1492
1571
  *
1493
1572
  * @param walletSendCalls - The wallet send calls to send
1494
- * @param isOptimistic - Whether to send the message optimistically
1573
+ * @param opts - Send options (optimistic delivery, idempotency key)
1495
1574
  * @returns Promise that resolves with the message ID after it has been sent
1496
1575
  */
1497
- sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise<string>;
1576
+ sendWalletSendCalls(walletSendCalls: WalletSendCalls, opts?: SendOpts): Promise<string>;
1498
1577
  /**
1499
1578
  * Sends an actions message
1500
1579
  *
1501
1580
  * @param actions - The actions to send
1502
- * @param isOptimistic - Whether to send the message optimistically
1581
+ * @param opts - Send options (optimistic delivery, idempotency key)
1503
1582
  * @returns Promise that resolves with the message ID after it has been sent
1504
1583
  */
1505
- sendActions(actions: Actions, isOptimistic?: boolean): Promise<string>;
1584
+ sendActions(actions: Actions, opts?: SendOpts): Promise<string>;
1506
1585
  /**
1507
1586
  * Sends an intent message
1508
1587
  *
1509
1588
  * @param intent - The intent to send
1510
- * @param isOptimistic - Whether to send the message optimistically
1589
+ * @param opts - Send options (optimistic delivery, idempotency key)
1511
1590
  * @returns Promise that resolves with the message ID after it has been sent
1512
1591
  */
1513
- sendIntent(intent: Intent, isOptimistic?: boolean): Promise<string>;
1592
+ sendIntent(intent: Intent, opts?: SendOpts): Promise<string>;
1514
1593
  /**
1515
1594
  * Sends an attachment message
1516
1595
  *
1517
1596
  * @param attachment - The attachment to send
1518
- * @param isOptimistic - Whether to send the message optimistically
1597
+ * @param opts - Send options (optimistic delivery, idempotency key)
1519
1598
  * @returns Promise that resolves with the message ID after it has been sent
1520
1599
  */
1521
- sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise<string>;
1600
+ sendAttachment(attachment: Attachment, opts?: SendOpts): Promise<string>;
1522
1601
  /**
1523
1602
  * Sends a multi remote attachment message
1524
1603
  *
1525
1604
  * @param multiRemoteAttachment - The multi remote attachment to send
1526
- * @param isOptimistic - Whether to send the message optimistically
1605
+ * @param opts - Send options (optimistic delivery, idempotency key)
1527
1606
  * @returns Promise that resolves with the message ID after it has been sent
1528
1607
  */
1529
- sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise<string>;
1608
+ sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, opts?: SendOpts): Promise<string>;
1530
1609
  /**
1531
1610
  * Sends a remote attachment message
1532
1611
  *
1533
1612
  * @param remoteAttachment - The remote attachment to send
1534
- * @param isOptimistic - Whether to send the message optimistically
1613
+ * @param opts - Send options (optimistic delivery, idempotency key)
1535
1614
  * @returns Promise that resolves with the message ID after it has been sent
1536
1615
  */
1537
- sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise<string>;
1616
+ sendRemoteAttachment(remoteAttachment: RemoteAttachment, opts?: SendOpts): Promise<string>;
1538
1617
  /**
1539
1618
  * Lists messages in this conversation
1540
1619
  *
@@ -2197,6 +2276,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
2197
2276
  * Gets the app version used by the client
2198
2277
  */
2199
2278
  get appVersion(): string | undefined;
2279
+ /**
2280
+ * Gets the XMTP environment used by this client
2281
+ */
2282
+ get env(): XmtpEnv | undefined;
2200
2283
  /**
2201
2284
  * Creates signature text for creating a new inbox
2202
2285
  *
@@ -2367,21 +2450,45 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
2367
2450
  /**
2368
2451
  * Revokes specific installations of the client's inbox without a client
2369
2452
  *
2370
- * @param env - The environment to use
2371
2453
  * @param signer - The signer to use
2372
2454
  * @param inboxId - The inbox ID to revoke installations for
2373
2455
  * @param installationIds - The installation IDs to revoke
2456
+ * @param backend - Optional `Backend` instance created with `createBackend()`
2457
+ */
2458
+ static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], backend?: Backend): Promise<void>;
2459
+ /**
2460
+ * Revokes specific installations of the client's inbox without a client
2461
+ *
2462
+ * @param signer - The signer to use
2463
+ * @param inboxId - The inbox ID to revoke installations for
2464
+ * @param installationIds - The installation IDs to revoke
2465
+ * @param env - The environment to use
2466
+ * @param gatewayHost - Optional gateway host
2467
+ * @deprecated Pass a `Backend` instance created with `createBackend()` instead
2468
+ * of `XmtpEnv` and `gatewayHost`.
2374
2469
  */
2375
2470
  static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise<void>;
2471
+ /**
2472
+ * Fetches the inbox states for the specified inbox IDs from the network
2473
+ * without a client
2474
+ *
2475
+ * @param inboxIds - The inbox IDs to get the state for
2476
+ * @param backend - Optional `Backend` instance created with `createBackend()`
2477
+ * @returns The inbox states for the specified inbox IDs
2478
+ */
2479
+ static fetchInboxStates(inboxIds: string[], backend?: Backend): Promise<InboxState[]>;
2376
2480
  /**
2377
2481
  * Fetches the inbox states for the specified inbox IDs from the network
2378
2482
  * without a client
2379
2483
  *
2380
2484
  * @param inboxIds - The inbox IDs to get the state for
2381
2485
  * @param env - The environment to use
2486
+ * @param gatewayHost - Optional gateway host
2382
2487
  * @returns The inbox states for the specified inbox IDs
2488
+ * @deprecated Pass a `Backend` instance created with `createBackend()` instead
2489
+ * of `XmtpEnv` and `gatewayHost`.
2383
2490
  */
2384
- static fetchInboxStates(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<_xmtp_wasm_bindings.InboxState[]>;
2491
+ static fetchInboxStates(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<InboxState[]>;
2385
2492
  /**
2386
2493
  * Changes the recovery identifier for the client's inbox
2387
2494
  *
@@ -2404,14 +2511,58 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
2404
2511
  * @returns Whether the client can message the identifiers
2405
2512
  */
2406
2513
  canMessage(identifiers: Identifier[]): Promise<Map<string, boolean>>;
2514
+ /**
2515
+ * Fetches the latest inbox updates count for the specified inbox IDs
2516
+ *
2517
+ * @param inboxIds - The inbox IDs to check
2518
+ * @returns Map of inbox IDs to their updates count
2519
+ */
2520
+ fetchLatestInboxUpdatesCount(inboxIds: string[]): Promise<Map<string, number>>;
2521
+ /**
2522
+ * Fetches the latest inbox updates count for the client's inbox
2523
+ *
2524
+ * @returns The latest inbox updates count
2525
+ */
2526
+ fetchOwnInboxUpdatesCount(): Promise<number>;
2527
+ /**
2528
+ * Checks if the specified identifiers can be messaged
2529
+ *
2530
+ * @param identifiers - The identifiers to check
2531
+ * @param backend - Optional `Backend` instance created with `createBackend()`
2532
+ * @returns Map of identifiers to whether they can be messaged
2533
+ */
2534
+ static canMessage(identifiers: Identifier[], backend?: Backend): Promise<Map<string, boolean>>;
2407
2535
  /**
2408
2536
  * Checks if the specified identifiers can be messaged
2409
2537
  *
2410
2538
  * @param identifiers - The identifiers to check
2411
2539
  * @param env - Optional XMTP environment
2412
2540
  * @returns Map of identifiers to whether they can be messaged
2541
+ * @deprecated Pass a `Backend` instance created with `createBackend()` instead
2542
+ * of `XmtpEnv`.
2413
2543
  */
2414
2544
  static canMessage(identifiers: Identifier[], env?: XmtpEnv): Promise<Map<string, boolean>>;
2545
+ /**
2546
+ * Fetches the latest inbox updates count for the specified inbox IDs
2547
+ * without a client
2548
+ *
2549
+ * @param inboxIds - The inbox IDs to check
2550
+ * @param backend - Optional `Backend` instance created with `createBackend()`
2551
+ * @returns Map of inbox IDs to their updates count
2552
+ */
2553
+ static fetchLatestInboxUpdatesCount(inboxIds: string[], backendOrEnv?: Backend | XmtpEnv): Promise<Map<string, number>>;
2554
+ /**
2555
+ * Fetches the latest inbox updates count for the specified inbox IDs
2556
+ * without a client
2557
+ *
2558
+ * @param inboxIds - The inbox IDs to check
2559
+ * @param env - Optional XMTP environment
2560
+ * @param gatewayHost - Optional gateway host
2561
+ * @returns Map of inbox IDs to their updates count
2562
+ * @deprecated Pass a `Backend` instance created with `createBackend()` instead
2563
+ * of `XmtpEnv` and `gatewayHost`.
2564
+ */
2565
+ static fetchLatestInboxUpdatesCount(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise<Map<string, number>>;
2415
2566
  /**
2416
2567
  * Fetches the inbox ID for a given identifier from the local database
2417
2568
  * If not found, fetches from the network
@@ -2455,9 +2606,67 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
2455
2606
  /**
2456
2607
  * Send a sync request to other devices on the network
2457
2608
  *
2609
+ * @param options - Archive options specifying what to sync (defaults to consent and messages)
2610
+ * @param serverUrl - The server URL for the sync request (defaults to environment-specific URL)
2458
2611
  * @returns Promise that resolves when the sync request is sent
2459
2612
  */
2460
- sendSyncRequest(): Promise<void>;
2613
+ sendSyncRequest(options?: ArchiveOptions, serverUrl?: string): Promise<void>;
2614
+ /**
2615
+ * Send a sync archive to the sync group
2616
+ *
2617
+ * @param pin - The pin used for reference when importing
2618
+ * @param options - Archive options specifying what to sync (defaults to consent and messages)
2619
+ * @param serverUrl - The server URL for the sync archive (defaults to environment-specific URL)
2620
+ * @returns Promise that resolves when the sync archive is sent
2621
+ */
2622
+ sendSyncArchive(pin: string, options?: ArchiveOptions, serverUrl?: string): Promise<void>;
2623
+ /**
2624
+ * Process a sync archive that matches the pin given
2625
+ *
2626
+ * @param archivePin - Optional pin to match. If not provided, processes the last archive sent
2627
+ * @returns Promise that resolves when the archive is processed
2628
+ */
2629
+ processSyncArchive(archivePin?: string | null): Promise<void>;
2630
+ /**
2631
+ * List the archives available for import in the sync group
2632
+ *
2633
+ * You may need to manually sync the sync group before calling
2634
+ * this function to see recently uploaded archives.
2635
+ *
2636
+ * @param daysCutoff - Number of days to look back for archives
2637
+ * @returns Promise that resolves with array of available archive information
2638
+ */
2639
+ listAvailableArchives(daysCutoff: number): Promise<AvailableArchiveInfo[]>;
2640
+ /**
2641
+ * Export archive data to bytes for later restoration
2642
+ *
2643
+ * @param key - Encryption key for the archive
2644
+ * @param opts - Archive options specifying what to include (defaults to consent and messages)
2645
+ * @returns Promise that resolves with the archive data as bytes
2646
+ */
2647
+ createArchive(key: Uint8Array, opts?: ArchiveOptions): Promise<Uint8Array>;
2648
+ /**
2649
+ * Import an archive from bytes
2650
+ *
2651
+ * @param data - The archive data as bytes
2652
+ * @param key - Encryption key for the archive
2653
+ * @returns Promise that resolves when the archive is imported
2654
+ */
2655
+ importArchive(data: Uint8Array, key: Uint8Array): Promise<void>;
2656
+ /**
2657
+ * Load the metadata for an archive to see what it contains
2658
+ *
2659
+ * @param data - The archive data as bytes
2660
+ * @param key - Encryption key for the archive
2661
+ * @returns Promise that resolves with the archive metadata
2662
+ */
2663
+ archiveMetadata(data: Uint8Array, key: Uint8Array): Promise<ArchiveMetadata>;
2664
+ /**
2665
+ * Manually sync all device sync groups
2666
+ *
2667
+ * @returns Promise that resolves with a summary of the sync operation
2668
+ */
2669
+ syncAllDeviceSyncGroups(): Promise<GroupSyncSummary>;
2461
2670
  }
2462
2671
 
2463
2672
  declare class Opfs {
@@ -2476,6 +2685,8 @@ declare class Opfs {
2476
2685
  clearAll(): Promise<void>;
2477
2686
  }
2478
2687
 
2688
+ declare const createBackend: (options?: NetworkOptions) => Promise<Backend>;
2689
+
2479
2690
  /**
2480
2691
  * Generates an inbox ID for a given identifier
2481
2692
  *
@@ -2485,14 +2696,13 @@ declare class Opfs {
2485
2696
  */
2486
2697
  declare const generateInboxId: (identifier: Identifier, nonce?: bigint) => Promise<string>;
2487
2698
  /**
2488
- * Gets the inbox ID for a specific identifier and optional environment
2699
+ * Gets the inbox ID for a specific identifier using a Backend
2489
2700
  *
2701
+ * @param backend - The Backend instance for API communication
2490
2702
  * @param identifier - The identifier to get the inbox ID for
2491
- * @param env - Optional XMTP environment configuration (default: "dev")
2492
- * @param gatewayHost - Optional gateway host override
2493
2703
  * @returns Promise that resolves with the inbox ID for the identifier
2494
2704
  */
2495
- declare const getInboxIdForIdentifier: (identifier: Identifier, env?: XmtpEnv, gatewayHost?: string) => Promise<string | undefined>;
2705
+ declare const getInboxIdForIdentifier: (backend: Backend, identifier: Identifier) => Promise<string | undefined>;
2496
2706
 
2497
2707
  /**
2498
2708
  * Gets the name of a metadata field
@@ -2502,6 +2712,38 @@ declare const getInboxIdForIdentifier: (identifier: Identifier, env?: XmtpEnv, g
2502
2712
  */
2503
2713
  declare const metadataFieldName: (field: MetadataField) => Promise<string>;
2504
2714
 
2715
+ /**
2716
+ * Pre-configured URLs for the XMTP network based on the environment
2717
+ *
2718
+ * @deprecated Use `createBackend()` instead.
2719
+ * @constant
2720
+ * @property {string} local - The local URL for the XMTP network
2721
+ * @property {string} dev - The development URL for the XMTP network
2722
+ * @property {string} production - The production URL for the XMTP network
2723
+ */
2724
+ declare const ApiUrls: {
2725
+ readonly local: "http://localhost:5557";
2726
+ readonly dev: "https://api.dev.xmtp.network:5558";
2727
+ readonly production: "https://api.production.xmtp.network:5558";
2728
+ };
2729
+ /**
2730
+ * Pre-configured URLs for the XMTP history sync service based on the environment
2731
+ *
2732
+ * @constant
2733
+ * @property {string} local - The local URL for the XMTP history sync service
2734
+ * @property {string} dev - The development URL for the XMTP history sync service
2735
+ * @property {string} production - The production URL for the XMTP history sync service
2736
+ */
2737
+ declare const HistorySyncUrls: {
2738
+ readonly local: "http://localhost:5558";
2739
+ readonly dev: "https://message-history.dev.ephemera.network";
2740
+ readonly production: "https://message-history.production.ephemera.network";
2741
+ readonly "testnet-staging": "https://message-history.dev.ephemera.network";
2742
+ readonly "testnet-dev": "https://message-history.dev.ephemera.network";
2743
+ readonly testnet: "https://message-history.dev.ephemera.network";
2744
+ readonly mainnet: "https://message-history.production.ephemera.network";
2745
+ };
2746
+
2505
2747
  declare const encodeActions: (actions: _xmtp_wasm_bindings.Actions) => Promise<_xmtp_wasm_bindings.EncodedContent>;
2506
2748
  declare const encodeAttachment: (attachment: _xmtp_wasm_bindings.Attachment) => Promise<_xmtp_wasm_bindings.EncodedContent>;
2507
2749
  declare const encodeIntent: (intent: _xmtp_wasm_bindings.Intent) => Promise<_xmtp_wasm_bindings.EncodedContent>;
@@ -2577,5 +2819,5 @@ declare const isIntent: (m: DecodedMessage) => m is DecodedMessage<Intent>;
2577
2819
  declare const isActions: (m: DecodedMessage) => m is DecodedMessage<Actions>;
2578
2820
  declare const isMarkdown: (m: DecodedMessage) => m is DecodedMessage<string>;
2579
2821
 
2580
- 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, isActions, isAttachment, isGroupUpdated, isIntent, isLeaveRequest, isMarkdown, isMultiRemoteAttachment, isReaction, isReadReceipt, isRemoteAttachment, isReply, isText, isTextReply, isTransactionReference, isWalletSendCalls, metadataFieldName, toSafeConversation, toSafeSigner };
2581
- export type { AsyncStreamProxy, BuiltInContentTypes, ClientOptions, ContentOptions, EOASigner, EnrichedReply, ExtractCodecContentTypes, HmacKeys, LastReadTimes, NetworkOptions, OtherOptions, SCWSigner, SafeConversation, SafeSigner, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, XmtpEnv };
2822
+ 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, createBackend, createEOASigner, createSCWSigner, createStream, decryptAttachment, encodeActions, encodeAttachment, encodeIntent, encodeMarkdown, encodeMultiRemoteAttachment, encodeReaction, encodeReadReceipt, encodeRemoteAttachment, encodeText, encodeTransactionReference, encodeWalletSendCalls, encryptAttachment, generateInboxId, getInboxIdForIdentifier, isActions, isAttachment, isGroupUpdated, isIntent, isLeaveRequest, isMarkdown, isMultiRemoteAttachment, isReaction, isReadReceipt, isRemoteAttachment, isReply, isText, isTextReply, isTransactionReference, isWalletSendCalls, metadataFieldName, toSafeConversation, toSafeSigner };
2823
+ export type { AsyncStreamProxy, BuiltInContentTypes, ClientOptions, ContentOptions, DeviceSyncOptions, EOASigner, EnrichedReply, ExtractCodecContentTypes, HmacKeys, LastReadTimes, NetworkOptions, OtherOptions, SCWSigner, SafeConversation, SafeSigner, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, VisibilityConfirmationOptions, XmtpEnv };