@xmtp/node-sdk 3.1.0-dev.51bc782 → 3.1.1

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, EncodedContent } from '@xmtp/content-type-primitives';
2
2
  import * as _xmtp_node_bindings from '@xmtp/node-bindings';
3
- import { LogLevel, Message, Conversation as Conversation$1, ListMessagesOptions, ConsentState, PermissionUpdateType, PermissionPolicy, MetadataField, Identifier, Conversations as Conversations$1, CreateGroupOptions, CreateDmOptions, ListConversationsOptions, ConversationType, Client as Client$1, Consent, ConsentEntityType, SignatureRequestType } from '@xmtp/node-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, KeyPackageStatus, Lifetime, ListConversationsOptions, ListMessagesOptions, LogLevel, LogOptions, Message, MessageDisappearingSettings, MetadataField, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, SignatureRequestType, SortDirection } from '@xmtp/node-bindings';
3
+ import { LogLevel, Message, Conversation as Conversation$1, ListMessagesOptions, ConsentState, PermissionUpdateType, PermissionPolicy, MetadataField, Identifier, Conversations as Conversations$1, CreateGroupOptions, CreateDmOptions, ListConversationsOptions, ConversationType, Client as Client$1, Consent, ConsentEntityType, SignatureRequestHandle } from '@xmtp/node-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, KeyPackageStatus, Lifetime, ListConversationsOptions, ListMessagesOptions, LogLevel, LogOptions, Message, MessageDisappearingSettings, MetadataField, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, SignatureRequestHandle, SortDirection } from '@xmtp/node-bindings';
5
5
  import { GroupUpdatedCodec } from '@xmtp/content-type-group-updated';
6
6
  import { TextCodec } from '@xmtp/content-type-text';
7
7
 
@@ -118,18 +118,18 @@ declare class AsyncStream<T> {
118
118
  onReturn: (() => void) | undefined;
119
119
  onError: ((error: Error) => void) | undefined;
120
120
  constructor();
121
- get error(): Error | null;
121
+ get error(): Error | undefined;
122
122
  get isDone(): boolean;
123
123
  callback: StreamCallback<T>;
124
124
  next: () => Promise<ResolveValue<T>>;
125
- return: (value?: T) => Promise<{
125
+ return: (value?: T) => {
126
126
  done: boolean;
127
127
  value: T | undefined;
128
- }>;
129
- end: () => Promise<{
128
+ };
129
+ end: () => {
130
130
  done: boolean;
131
131
  value: T | undefined;
132
- }>;
132
+ };
133
133
  [Symbol.asyncIterator](): this;
134
134
  }
135
135
 
@@ -234,7 +234,7 @@ declare class Conversation<ContentTypes = unknown> {
234
234
  * @param callback - Optional callback function for handling new stream values
235
235
  * @returns Stream instance for new messages
236
236
  */
237
- stream(callback?: StreamCallback<DecodedMessage<ContentTypes>>): AsyncStream<DecodedMessage<ContentTypes>>;
237
+ stream(callback?: StreamCallback<DecodedMessage<ContentTypes>>, onFail?: () => void): AsyncStream<DecodedMessage<ContentTypes>>;
238
238
  /**
239
239
  * Publishes pending messages that were sent optimistically
240
240
  *
@@ -314,7 +314,7 @@ declare class Conversation<ContentTypes = unknown> {
314
314
  *
315
315
  * @returns The HMAC keys for this conversation
316
316
  */
317
- getHmacKeys(): _xmtp_node_bindings.HmacKey[];
317
+ getHmacKeys(): Record<string, _xmtp_node_bindings.HmacKey[]>;
318
318
  /**
319
319
  * Retrieves information for this conversation to help with debugging
320
320
  *
@@ -594,42 +594,42 @@ declare class Conversations<ContentTypes = unknown> {
594
594
  * @param callback - Optional callback function for handling new stream value
595
595
  * @returns Stream instance for new conversations
596
596
  */
597
- stream(callback?: StreamCallback<Group<ContentTypes> | Dm<ContentTypes>>): AsyncStream<Group<ContentTypes> | Dm<ContentTypes>>;
597
+ stream(callback?: StreamCallback<Group<ContentTypes> | Dm<ContentTypes>>, onFail?: () => void): AsyncStream<Group<ContentTypes> | Dm<ContentTypes>>;
598
598
  /**
599
599
  * Creates a stream for new group conversations
600
600
  *
601
601
  * @param callback - Optional callback function for handling new stream value
602
602
  * @returns Stream instance for new group conversations
603
603
  */
604
- streamGroups(callback?: StreamCallback<Group<ContentTypes>>): AsyncStream<Group<ContentTypes>>;
604
+ streamGroups(callback?: StreamCallback<Group<ContentTypes>>, onFail?: () => void): AsyncStream<Group<ContentTypes>>;
605
605
  /**
606
606
  * Creates a stream for new DM conversations
607
607
  *
608
608
  * @param callback - Optional callback function for handling new stream value
609
609
  * @returns Stream instance for new DM conversations
610
610
  */
611
- streamDms(callback?: StreamCallback<Dm<ContentTypes>>): AsyncStream<Dm<ContentTypes>>;
611
+ streamDms(callback?: StreamCallback<Dm<ContentTypes>>, onFail?: () => void): AsyncStream<Dm<ContentTypes>>;
612
612
  /**
613
613
  * Creates a stream for all new messages
614
614
  *
615
615
  * @param callback - Optional callback function for handling new stream value
616
616
  * @returns Stream instance for new messages
617
617
  */
618
- streamAllMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, conversationType?: ConversationType, consentStates?: ConsentState[]): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
618
+ streamAllMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, conversationType?: ConversationType, consentStates?: ConsentState[], onFail?: () => void): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
619
619
  /**
620
620
  * Creates a stream for all new group messages
621
621
  *
622
622
  * @param callback - Optional callback function for handling new stream value
623
623
  * @returns Stream instance for new group messages
624
624
  */
625
- streamAllGroupMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[]): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
625
+ streamAllGroupMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[], onFail?: () => void): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
626
626
  /**
627
627
  * Creates a stream for all new DM messages
628
628
  *
629
629
  * @param callback - Optional callback function for handling new stream value
630
630
  * @returns Stream instance for new DM messages
631
631
  */
632
- streamAllDmMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[]): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
632
+ streamAllDmMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[], onFail?: () => void): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
633
633
  /**
634
634
  * Retrieves HMAC keys for all conversations
635
635
  *
@@ -638,6 +638,21 @@ declare class Conversations<ContentTypes = unknown> {
638
638
  hmacKeys(): Record<string, _xmtp_node_bindings.HmacKey[]>;
639
639
  }
640
640
 
641
+ /**
642
+ * Debug information helpers for the client
643
+ *
644
+ * This class is not intended to be initialized directly.
645
+ */
646
+ declare class DebugInformation {
647
+ #private;
648
+ constructor(client: Client$1, options?: ClientOptions);
649
+ apiStatistics(): _xmtp_node_bindings.ApiStats;
650
+ apiIdentityStatistics(): _xmtp_node_bindings.IdentityStats;
651
+ apiAggregateStatistics(): string;
652
+ clearAllStatistics(): void;
653
+ uploadDebugArchive(serverUrl?: string): Promise<string>;
654
+ }
655
+
641
656
  type PreferenceUpdate = {
642
657
  type: string;
643
658
  HmacKeyUpdate?: {
@@ -702,14 +717,14 @@ declare class Preferences {
702
717
  * @param callback - Optional callback function for handling stream updates
703
718
  * @returns Stream instance for consent updates
704
719
  */
705
- streamConsent(callback?: StreamCallback<Consent[]>): AsyncStream<Consent[]>;
720
+ streamConsent(callback?: StreamCallback<Consent[]>, onFail?: () => void): AsyncStream<Consent[]>;
706
721
  /**
707
722
  * Creates a stream of user preference updates
708
723
  *
709
724
  * @param callback - Optional callback function for handling stream updates
710
725
  * @returns Stream instance for preference updates
711
726
  */
712
- streamPreferences(callback?: StreamCallback<PreferenceUpdate>): AsyncStream<PreferenceUpdate>;
727
+ streamPreferences(callback?: StreamCallback<PreferenceUpdate>, onFail?: () => void): AsyncStream<PreferenceUpdate>;
713
728
  }
714
729
 
715
730
  type SignMessage = (message: string) => Promise<Uint8Array> | Uint8Array;
@@ -728,11 +743,15 @@ type Signer = {
728
743
  getChainId: GetChainId;
729
744
  };
730
745
 
731
- type ExtractCodecContentType<C> = C extends ContentCodec<infer T> ? T : never;
746
+ type ExtractCodecContentTypes<C extends ContentCodec[] = []> = [
747
+ ...C,
748
+ GroupUpdatedCodec,
749
+ TextCodec
750
+ ][number] extends ContentCodec<infer T> ? T : never;
732
751
  /**
733
752
  * Client for interacting with the XMTP network
734
753
  */
735
- declare class Client<ContentTypes = unknown> {
754
+ declare class Client<ContentTypes = ExtractCodecContentTypes> {
736
755
  #private;
737
756
  /**
738
757
  * Creates a new XMTP client instance
@@ -761,7 +780,7 @@ declare class Client<ContentTypes = unknown> {
761
780
  */
762
781
  static create<ContentCodecs extends ContentCodec[] = []>(signer: Signer, options?: Omit<ClientOptions, "codecs"> & {
763
782
  codecs?: ContentCodecs;
764
- }): Promise<Client<ExtractCodecContentType<[...ContentCodecs, GroupUpdatedCodec, TextCodec][number]>>>;
783
+ }): Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>;
765
784
  /**
766
785
  * Creates a new client instance with an identifier
767
786
  *
@@ -774,7 +793,7 @@ declare class Client<ContentTypes = unknown> {
774
793
  */
775
794
  static build<ContentCodecs extends ContentCodec[] = []>(identifier: Identifier, options?: Omit<ClientOptions, "codecs"> & {
776
795
  codecs?: ContentCodecs;
777
- }): Promise<Client<ExtractCodecContentType<[...ContentCodecs, GroupUpdatedCodec, TextCodec][number]>>>;
796
+ }): Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>;
778
797
  /**
779
798
  * Gets the client options
780
799
  */
@@ -811,6 +830,12 @@ declare class Client<ContentTypes = unknown> {
811
830
  * @throws {ClientNotInitializedError} if the client is not initialized
812
831
  */
813
832
  get conversations(): Conversations<ContentTypes>;
833
+ /**
834
+ * Gets the debug information helpersfor this client
835
+ *
836
+ * @throws {ClientNotInitializedError} if the client is not initialized
837
+ */
838
+ get debugInformation(): DebugInformation;
814
839
  /**
815
840
  * Gets the preferences manager for this client
816
841
  *
@@ -818,7 +843,24 @@ declare class Client<ContentTypes = unknown> {
818
843
  */
819
844
  get preferences(): Preferences;
820
845
  /**
821
- * Creates signature text for creating a new inbox
846
+ * Adds a signature to a signature request using the client's signer (or the
847
+ * provided signer)
848
+ *
849
+ * WARNING: This function should be used with caution. It is only provided
850
+ * for use in special cases where the provided workflows do not meet the
851
+ * requirements of an application.
852
+ *
853
+ * It is highly recommended to use the `register`, `unsafe_addAccount`,
854
+ * `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
855
+ * methods instead.
856
+ *
857
+ * @param signatureRequest - The signature request to add the signature to
858
+ * @throws {ClientNotInitializedError} if the client is not initialized
859
+ * @throws {SignerUnavailableError} if no signer is available
860
+ */
861
+ unsafe_addSignature(signatureRequest: SignatureRequestHandle, signer?: Signer): Promise<void>;
862
+ /**
863
+ * Returns a signature request handler for creating a new inbox
822
864
  *
823
865
  * WARNING: This function should be used with caution. It is only provided
824
866
  * for use in special cases where the provided workflows do not meet the
@@ -829,9 +871,10 @@ declare class Client<ContentTypes = unknown> {
829
871
  * @returns The signature text
830
872
  * @throws {ClientNotInitializedError} if the client is not initialized
831
873
  */
832
- unsafe_createInboxSignatureText(): Promise<string | null | undefined>;
874
+ unsafe_createInboxSignatureRequest(): Promise<SignatureRequestHandle | null>;
833
875
  /**
834
- * Creates signature text for adding a new account to the client's inbox
876
+ * Returns a signature request handler for adding a new account to the
877
+ * client's inbox
835
878
  *
836
879
  * WARNING: This function should be used with caution. It is only provided
837
880
  * for use in special cases where the provided workflows do not meet the
@@ -847,9 +890,10 @@ declare class Client<ContentTypes = unknown> {
847
890
  * @returns The signature text
848
891
  * @throws {ClientNotInitializedError} if the client is not initialized
849
892
  */
850
- unsafe_addAccountSignatureText(newAccountIdentifier: Identifier, allowInboxReassign?: boolean): Promise<string | undefined>;
893
+ unsafe_addAccountSignatureRequest(newAccountIdentifier: Identifier, allowInboxReassign?: boolean): Promise<SignatureRequestHandle>;
851
894
  /**
852
- * Creates signature text for removing an account from the client's inbox
895
+ * Returns a signature request handler for removing an account from the
896
+ * client's inbox
853
897
  *
854
898
  * WARNING: This function should be used with caution. It is only provided
855
899
  * for use in special cases where the provided workflows do not meet the
@@ -861,10 +905,10 @@ declare class Client<ContentTypes = unknown> {
861
905
  * @returns The signature text
862
906
  * @throws {ClientNotInitializedError} if the client is not initialized
863
907
  */
864
- unsafe_removeAccountSignatureText(identifier: Identifier): Promise<string | undefined>;
908
+ unsafe_removeAccountSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
865
909
  /**
866
- * Creates signature text for revoking all other installations of the
867
- * client's inbox
910
+ * Returns a signature request handler for revoking all other installations
911
+ * of the client's inbox
868
912
  *
869
913
  * WARNING: This function should be used with caution. It is only provided
870
914
  * for use in special cases where the provided workflows do not meet the
@@ -875,10 +919,10 @@ declare class Client<ContentTypes = unknown> {
875
919
  * @returns The signature text
876
920
  * @throws {ClientNotInitializedError} if the client is not initialized
877
921
  */
878
- unsafe_revokeAllOtherInstallationsSignatureText(): Promise<string | undefined>;
922
+ unsafe_revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle>;
879
923
  /**
880
- * Creates signature text for revoking specific installations of the
881
- * client's inbox
924
+ * Returns a signature request handler for revoking specific installations
925
+ * of the client's inbox
882
926
  *
883
927
  * WARNING: This function should be used with caution. It is only provided
884
928
  * for use in special cases where the provided workflows do not meet the
@@ -890,10 +934,10 @@ declare class Client<ContentTypes = unknown> {
890
934
  * @returns The signature text
891
935
  * @throws {ClientNotInitializedError} if the client is not initialized
892
936
  */
893
- unsafe_revokeInstallationsSignatureText(installationIds: Uint8Array[]): Promise<string | undefined>;
937
+ unsafe_revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
894
938
  /**
895
- * Creates signature text for changing the recovery identifier for this
896
- * client's inbox
939
+ * Returns a signature request handler for changing the recovery identifier
940
+ * for this client's inbox
897
941
  *
898
942
  * WARNING: This function should be used with caution. It is only provided
899
943
  * for use in special cases where the provided workflows do not meet the
@@ -905,9 +949,9 @@ declare class Client<ContentTypes = unknown> {
905
949
  * @returns The signature text
906
950
  * @throws {ClientNotInitializedError} if the client is not initialized
907
951
  */
908
- unsafe_changeRecoveryIdentifierSignatureText(identifier: Identifier): Promise<string | undefined>;
952
+ unsafe_changeRecoveryIdentifierSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
909
953
  /**
910
- * Adds a signature for a specific request type
954
+ * Applies a signature request to the client
911
955
  *
912
956
  * WARNING: This function should be used with caution. It is only provided
913
957
  * for use in special cases where the provided workflows do not meet the
@@ -917,26 +961,9 @@ declare class Client<ContentTypes = unknown> {
917
961
  * `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
918
962
  * methods instead.
919
963
  *
920
- * @param signatureType - The type of signature request
921
- * @param signatureText - The text to sign
922
- * @param signer - The signer to use
923
964
  * @throws {ClientNotInitializedError} if the client is not initialized
924
965
  */
925
- unsafe_addSignature(signatureType: SignatureRequestType, signatureText: string, signer: Signer): Promise<void>;
926
- /**
927
- * Applies all pending signatures
928
- *
929
- * WARNING: This function should be used with caution. It is only provided
930
- * for use in special cases where the provided workflows do not meet the
931
- * requirements of an application.
932
- *
933
- * It is highly recommended to use the `register`, `unsafe_addAccount`,
934
- * `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
935
- * methods instead.
936
- *
937
- * @throws {ClientNotInitializedError} if the client is not initialized
938
- */
939
- unsafe_applySignatures(): Promise<void>;
966
+ unsafe_applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
940
967
  /**
941
968
  * Registers the client with the XMTP network
942
969
  *
@@ -960,9 +987,8 @@ declare class Client<ContentTypes = unknown> {
960
987
  *
961
988
  * @param newAccountSigner - The signer for the new account
962
989
  * @param allowInboxReassign - Whether to allow inbox reassignment
963
- * @throws {ClientNotInitializedError} if the client is not initialized
964
990
  * @throws {AccountAlreadyAssociatedError} if the account is already associated with an inbox ID
965
- * @throws {GenerateSignatureError} if the signature cannot be generated
991
+ * @throws {ClientNotInitializedError} if the client is not initialized
966
992
  * @throws {SignerUnavailableError} if no signer is available
967
993
  */
968
994
  unsafe_addAccount(newAccountSigner: Signer, allowInboxReassign?: boolean): Promise<void>;
@@ -973,7 +999,6 @@ declare class Client<ContentTypes = unknown> {
973
999
  *
974
1000
  * @param identifier - The identifier of the account to remove
975
1001
  * @throws {ClientNotInitializedError} if the client is not initialized
976
- * @throws {GenerateSignatureError} if the signature cannot be generated
977
1002
  * @throws {SignerUnavailableError} if no signer is available
978
1003
  */
979
1004
  removeAccount(identifier: Identifier): Promise<void>;
@@ -983,7 +1008,6 @@ declare class Client<ContentTypes = unknown> {
983
1008
  * Requires a signer, use `Client.create` to create a client with a signer.
984
1009
  *
985
1010
  * @throws {ClientNotInitializedError} if the client is not initialized
986
- * @throws {GenerateSignatureError} if the signature cannot be generated
987
1011
  * @throws {SignerUnavailableError} if no signer is available
988
1012
  */
989
1013
  revokeAllOtherInstallations(): Promise<void>;
@@ -995,9 +1019,25 @@ declare class Client<ContentTypes = unknown> {
995
1019
  * @param installationIds - The installation IDs to revoke
996
1020
  * @throws {ClientNotInitializedError} if the client is not initialized
997
1021
  * @throws {SignerUnavailableError} if no signer is available
998
- * @throws {GenerateSignatureError} if the signature cannot be generated
999
1022
  */
1000
1023
  revokeInstallations(installationIds: Uint8Array[]): Promise<void>;
1024
+ /**
1025
+ * Revokes specific installations of the client's inbox without a client
1026
+ *
1027
+ * @param env - The environment to use
1028
+ * @param signer - The signer to use
1029
+ * @param inboxId - The inbox ID to revoke installations for
1030
+ * @param installationIds - The installation IDs to revoke
1031
+ */
1032
+ static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv): Promise<void>;
1033
+ /**
1034
+ * Gets the inbox state for the specified inbox IDs without a client
1035
+ *
1036
+ * @param env - The environment to use
1037
+ * @param inboxIds - The inbox IDs to get the state for
1038
+ * @returns The inbox state for the specified inbox IDs
1039
+ */
1040
+ static inboxStateFromInboxIds(inboxIds: string[], env?: XmtpEnv): Promise<_xmtp_node_bindings.InboxState[]>;
1001
1041
  /**
1002
1042
  * Changes the recovery identifier for the client's inbox
1003
1043
  *
@@ -1006,7 +1046,6 @@ declare class Client<ContentTypes = unknown> {
1006
1046
  * @param identifier - The new recovery identifier
1007
1047
  * @throws {ClientNotInitializedError} if the client is not initialized
1008
1048
  * @throws {SignerUnavailableError} if no signer is available
1009
- * @throws {GenerateSignatureError} if the signature cannot be generated
1010
1049
  */
1011
1050
  changeRecoveryIdentifier(identifier: Identifier): Promise<void>;
1012
1051
  /**
@@ -1101,7 +1140,7 @@ declare class Client<ContentTypes = unknown> {
1101
1140
  * @param options - Optional network options
1102
1141
  * @returns Whether the address is authorized
1103
1142
  */
1104
- static isAddressAuthorized(inboxId: string, address: string, options?: NetworkOptions): Promise<boolean>;
1143
+ static isAddressAuthorized(inboxId: string, address: string, env?: XmtpEnv): Promise<boolean>;
1105
1144
  /**
1106
1145
  * Checks if an installation is authorized for an inbox
1107
1146
  *
@@ -1110,7 +1149,7 @@ declare class Client<ContentTypes = unknown> {
1110
1149
  * @param options - Optional network options
1111
1150
  * @returns Whether the installation is authorized
1112
1151
  */
1113
- static isInstallationAuthorized(inboxId: string, installation: Uint8Array, options?: NetworkOptions): Promise<boolean>;
1152
+ static isInstallationAuthorized(inboxId: string, installation: Uint8Array, env?: XmtpEnv): Promise<boolean>;
1114
1153
  /**
1115
1154
  * Gets the version of the Node bindings
1116
1155
  */
@@ -1120,4 +1159,26 @@ declare class Client<ContentTypes = unknown> {
1120
1159
  declare const generateInboxId: (identifier: Identifier) => string;
1121
1160
  declare const getInboxIdForIdentifier: (identifier: Identifier, env?: XmtpEnv) => Promise<string | null>;
1122
1161
 
1123
- export { ApiUrls, AsyncStream, Client, type ClientOptions, Conversation, Conversations, DecodedMessage, Dm, Group, HistorySyncUrls, type NetworkOptions, type OtherOptions, type PreferenceUpdate, type Signer, type StorageOptions, type StreamCallback, type XmtpEnv, generateInboxId, getInboxIdForIdentifier };
1162
+ declare class CodecNotFoundError extends Error {
1163
+ constructor(contentType: ContentTypeId);
1164
+ }
1165
+ declare class InboxReassignError extends Error {
1166
+ constructor();
1167
+ }
1168
+ declare class AccountAlreadyAssociatedError extends Error {
1169
+ constructor(inboxId: string);
1170
+ }
1171
+ declare class InvalidGroupMembershipChangeError extends Error {
1172
+ constructor(messageId: string);
1173
+ }
1174
+ declare class MissingContentTypeError extends Error {
1175
+ constructor();
1176
+ }
1177
+ declare class SignerUnavailableError extends Error {
1178
+ constructor();
1179
+ }
1180
+ declare class ClientNotInitializedError extends Error {
1181
+ constructor();
1182
+ }
1183
+
1184
+ export { AccountAlreadyAssociatedError, ApiUrls, AsyncStream, Client, ClientNotInitializedError, type ClientOptions, CodecNotFoundError, Conversation, Conversations, DecodedMessage, Dm, type ExtractCodecContentTypes, Group, HistorySyncUrls, InboxReassignError, InvalidGroupMembershipChangeError, MissingContentTypeError, type NetworkOptions, type OtherOptions, type PreferenceUpdate, type Signer, SignerUnavailableError, type StorageOptions, type StreamCallback, type XmtpEnv, generateInboxId, getInboxIdForIdentifier };