@xmtp/node-sdk 3.2.0 → 3.2.1-dev.cb2628c

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