@xmtp/node-sdk 3.1.0 → 3.1.1-dev.438f403
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 +66 -94
- package/dist/index.js +265 -210
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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,
|
|
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,
|
|
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
|
|
|
@@ -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 |
|
|
121
|
+
get error(): Error | null;
|
|
122
122
|
get isDone(): boolean;
|
|
123
123
|
callback: StreamCallback<T>;
|
|
124
124
|
next: () => Promise<ResolveValue<T>>;
|
|
125
|
-
return: (value?: T) => {
|
|
125
|
+
return: (value?: T) => Promise<{
|
|
126
126
|
done: boolean;
|
|
127
127
|
value: T | undefined;
|
|
128
|
-
}
|
|
129
|
-
end: () => {
|
|
128
|
+
}>;
|
|
129
|
+
end: () => Promise<{
|
|
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
|
|
237
|
+
stream(callback?: StreamCallback<DecodedMessage<ContentTypes>>): AsyncStream<DecodedMessage<ContentTypes>>;
|
|
238
238
|
/**
|
|
239
239
|
* Publishes pending messages that were sent optimistically
|
|
240
240
|
*
|
|
@@ -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
|
|
597
|
+
stream(callback?: StreamCallback<Group<ContentTypes> | Dm<ContentTypes>>): 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
|
|
604
|
+
streamGroups(callback?: StreamCallback<Group<ContentTypes>>): 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
|
|
611
|
+
streamDms(callback?: StreamCallback<Dm<ContentTypes>>): 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[]
|
|
618
|
+
streamAllMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, conversationType?: ConversationType, consentStates?: ConsentState[]): 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[]
|
|
625
|
+
streamAllGroupMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[]): 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[]
|
|
632
|
+
streamAllDmMessages(callback?: StreamCallback<DecodedMessage<ContentTypes>>, consentStates?: ConsentState[]): Promise<AsyncStream<DecodedMessage<ContentTypes>>>;
|
|
633
633
|
/**
|
|
634
634
|
* Retrieves HMAC keys for all conversations
|
|
635
635
|
*
|
|
@@ -638,21 +638,6 @@ 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
|
-
|
|
656
641
|
type PreferenceUpdate = {
|
|
657
642
|
type: string;
|
|
658
643
|
HmacKeyUpdate?: {
|
|
@@ -717,14 +702,14 @@ declare class Preferences {
|
|
|
717
702
|
* @param callback - Optional callback function for handling stream updates
|
|
718
703
|
* @returns Stream instance for consent updates
|
|
719
704
|
*/
|
|
720
|
-
streamConsent(callback?: StreamCallback<Consent[]
|
|
705
|
+
streamConsent(callback?: StreamCallback<Consent[]>): AsyncStream<Consent[]>;
|
|
721
706
|
/**
|
|
722
707
|
* Creates a stream of user preference updates
|
|
723
708
|
*
|
|
724
709
|
* @param callback - Optional callback function for handling stream updates
|
|
725
710
|
* @returns Stream instance for preference updates
|
|
726
711
|
*/
|
|
727
|
-
streamPreferences(callback?: StreamCallback<PreferenceUpdate
|
|
712
|
+
streamPreferences(callback?: StreamCallback<PreferenceUpdate>): AsyncStream<PreferenceUpdate>;
|
|
728
713
|
}
|
|
729
714
|
|
|
730
715
|
type SignMessage = (message: string) => Promise<Uint8Array> | Uint8Array;
|
|
@@ -830,12 +815,6 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
830
815
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
831
816
|
*/
|
|
832
817
|
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;
|
|
839
818
|
/**
|
|
840
819
|
* Gets the preferences manager for this client
|
|
841
820
|
*
|
|
@@ -843,24 +822,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
843
822
|
*/
|
|
844
823
|
get preferences(): Preferences;
|
|
845
824
|
/**
|
|
846
|
-
*
|
|
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
|
|
825
|
+
* Creates signature text for creating a new inbox
|
|
864
826
|
*
|
|
865
827
|
* WARNING: This function should be used with caution. It is only provided
|
|
866
828
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -871,10 +833,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
871
833
|
* @returns The signature text
|
|
872
834
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
873
835
|
*/
|
|
874
|
-
|
|
836
|
+
unsafe_createInboxSignatureText(): Promise<string | null | undefined>;
|
|
875
837
|
/**
|
|
876
|
-
*
|
|
877
|
-
* client's inbox
|
|
838
|
+
* Creates signature text for adding a new account to the client's inbox
|
|
878
839
|
*
|
|
879
840
|
* WARNING: This function should be used with caution. It is only provided
|
|
880
841
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -890,10 +851,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
890
851
|
* @returns The signature text
|
|
891
852
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
892
853
|
*/
|
|
893
|
-
|
|
854
|
+
unsafe_addAccountSignatureText(newAccountIdentifier: Identifier, allowInboxReassign?: boolean): Promise<string | undefined>;
|
|
894
855
|
/**
|
|
895
|
-
*
|
|
896
|
-
* client's inbox
|
|
856
|
+
* Creates signature text for removing an account from the client's inbox
|
|
897
857
|
*
|
|
898
858
|
* WARNING: This function should be used with caution. It is only provided
|
|
899
859
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -905,10 +865,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
905
865
|
* @returns The signature text
|
|
906
866
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
907
867
|
*/
|
|
908
|
-
|
|
868
|
+
unsafe_removeAccountSignatureText(identifier: Identifier): Promise<string | undefined>;
|
|
909
869
|
/**
|
|
910
|
-
*
|
|
911
|
-
*
|
|
870
|
+
* Creates signature text for revoking all other installations of the
|
|
871
|
+
* client's inbox
|
|
912
872
|
*
|
|
913
873
|
* WARNING: This function should be used with caution. It is only provided
|
|
914
874
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -919,10 +879,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
919
879
|
* @returns The signature text
|
|
920
880
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
921
881
|
*/
|
|
922
|
-
|
|
882
|
+
unsafe_revokeAllOtherInstallationsSignatureText(): Promise<string | undefined>;
|
|
923
883
|
/**
|
|
924
|
-
*
|
|
925
|
-
*
|
|
884
|
+
* Creates signature text for revoking specific installations of the
|
|
885
|
+
* client's inbox
|
|
926
886
|
*
|
|
927
887
|
* WARNING: This function should be used with caution. It is only provided
|
|
928
888
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -934,10 +894,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
934
894
|
* @returns The signature text
|
|
935
895
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
936
896
|
*/
|
|
937
|
-
|
|
897
|
+
unsafe_revokeInstallationsSignatureText(installationIds: Uint8Array[]): Promise<string | undefined>;
|
|
938
898
|
/**
|
|
939
|
-
*
|
|
940
|
-
*
|
|
899
|
+
* Creates signature text for changing the recovery identifier for this
|
|
900
|
+
* client's inbox
|
|
941
901
|
*
|
|
942
902
|
* WARNING: This function should be used with caution. It is only provided
|
|
943
903
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -949,9 +909,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
949
909
|
* @returns The signature text
|
|
950
910
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
951
911
|
*/
|
|
952
|
-
|
|
912
|
+
unsafe_changeRecoveryIdentifierSignatureText(identifier: Identifier): Promise<string | undefined>;
|
|
953
913
|
/**
|
|
954
|
-
*
|
|
914
|
+
* Adds a signature for a specific request type
|
|
955
915
|
*
|
|
956
916
|
* WARNING: This function should be used with caution. It is only provided
|
|
957
917
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -961,9 +921,26 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
961
921
|
* `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
|
|
962
922
|
* methods instead.
|
|
963
923
|
*
|
|
924
|
+
* @param signatureType - The type of signature request
|
|
925
|
+
* @param signatureText - The text to sign
|
|
926
|
+
* @param signer - The signer to use
|
|
964
927
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
965
928
|
*/
|
|
966
|
-
|
|
929
|
+
unsafe_addSignature(signatureType: SignatureRequestType, signatureText: string, signer: Signer): Promise<void>;
|
|
930
|
+
/**
|
|
931
|
+
* Applies all pending signatures
|
|
932
|
+
*
|
|
933
|
+
* WARNING: This function should be used with caution. It is only provided
|
|
934
|
+
* for use in special cases where the provided workflows do not meet the
|
|
935
|
+
* requirements of an application.
|
|
936
|
+
*
|
|
937
|
+
* It is highly recommended to use the `register`, `unsafe_addAccount`,
|
|
938
|
+
* `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
|
|
939
|
+
* methods instead.
|
|
940
|
+
*
|
|
941
|
+
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
942
|
+
*/
|
|
943
|
+
unsafe_applySignatures(): Promise<void>;
|
|
967
944
|
/**
|
|
968
945
|
* Registers the client with the XMTP network
|
|
969
946
|
*
|
|
@@ -987,8 +964,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
987
964
|
*
|
|
988
965
|
* @param newAccountSigner - The signer for the new account
|
|
989
966
|
* @param allowInboxReassign - Whether to allow inbox reassignment
|
|
990
|
-
* @throws {AccountAlreadyAssociatedError} if the account is already associated with an inbox ID
|
|
991
967
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
968
|
+
* @throws {AccountAlreadyAssociatedError} if the account is already associated with an inbox ID
|
|
969
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
992
970
|
* @throws {SignerUnavailableError} if no signer is available
|
|
993
971
|
*/
|
|
994
972
|
unsafe_addAccount(newAccountSigner: Signer, allowInboxReassign?: boolean): Promise<void>;
|
|
@@ -999,6 +977,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
999
977
|
*
|
|
1000
978
|
* @param identifier - The identifier of the account to remove
|
|
1001
979
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
980
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1002
981
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1003
982
|
*/
|
|
1004
983
|
removeAccount(identifier: Identifier): Promise<void>;
|
|
@@ -1008,6 +987,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1008
987
|
* Requires a signer, use `Client.create` to create a client with a signer.
|
|
1009
988
|
*
|
|
1010
989
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
990
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1011
991
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1012
992
|
*/
|
|
1013
993
|
revokeAllOtherInstallations(): Promise<void>;
|
|
@@ -1019,25 +999,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1019
999
|
* @param installationIds - The installation IDs to revoke
|
|
1020
1000
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
1021
1001
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1002
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1022
1003
|
*/
|
|
1023
1004
|
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[]>;
|
|
1041
1005
|
/**
|
|
1042
1006
|
* Changes the recovery identifier for the client's inbox
|
|
1043
1007
|
*
|
|
@@ -1046,6 +1010,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1046
1010
|
* @param identifier - The new recovery identifier
|
|
1047
1011
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
1048
1012
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1013
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1049
1014
|
*/
|
|
1050
1015
|
changeRecoveryIdentifier(identifier: Identifier): Promise<void>;
|
|
1051
1016
|
/**
|
|
@@ -1140,7 +1105,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1140
1105
|
* @param options - Optional network options
|
|
1141
1106
|
* @returns Whether the address is authorized
|
|
1142
1107
|
*/
|
|
1143
|
-
static isAddressAuthorized(inboxId: string, address: string,
|
|
1108
|
+
static isAddressAuthorized(inboxId: string, address: string, options?: NetworkOptions): Promise<boolean>;
|
|
1144
1109
|
/**
|
|
1145
1110
|
* Checks if an installation is authorized for an inbox
|
|
1146
1111
|
*
|
|
@@ -1149,11 +1114,15 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1149
1114
|
* @param options - Optional network options
|
|
1150
1115
|
* @returns Whether the installation is authorized
|
|
1151
1116
|
*/
|
|
1152
|
-
static isInstallationAuthorized(inboxId: string, installation: Uint8Array,
|
|
1117
|
+
static isInstallationAuthorized(inboxId: string, installation: Uint8Array, options?: NetworkOptions): Promise<boolean>;
|
|
1153
1118
|
/**
|
|
1154
1119
|
* Gets the version of the Node bindings
|
|
1155
1120
|
*/
|
|
1156
1121
|
static get version(): string;
|
|
1122
|
+
apiStatistics(): _xmtp_node_bindings.ApiStats;
|
|
1123
|
+
apiIdentityStatistics(): _xmtp_node_bindings.IdentityStats;
|
|
1124
|
+
apiAggregateStatistics(): string;
|
|
1125
|
+
uploadDebugArchive(serverUrl?: string): Promise<string>;
|
|
1157
1126
|
}
|
|
1158
1127
|
|
|
1159
1128
|
declare const generateInboxId: (identifier: Identifier) => string;
|
|
@@ -1168,6 +1137,9 @@ declare class InboxReassignError extends Error {
|
|
|
1168
1137
|
declare class AccountAlreadyAssociatedError extends Error {
|
|
1169
1138
|
constructor(inboxId: string);
|
|
1170
1139
|
}
|
|
1140
|
+
declare class GenerateSignatureError extends Error {
|
|
1141
|
+
constructor(signatureType: SignatureRequestType);
|
|
1142
|
+
}
|
|
1171
1143
|
declare class InvalidGroupMembershipChangeError extends Error {
|
|
1172
1144
|
constructor(messageId: string);
|
|
1173
1145
|
}
|
|
@@ -1181,4 +1153,4 @@ declare class ClientNotInitializedError extends Error {
|
|
|
1181
1153
|
constructor();
|
|
1182
1154
|
}
|
|
1183
1155
|
|
|
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 };
|
|
1156
|
+
export { AccountAlreadyAssociatedError, ApiUrls, AsyncStream, Client, ClientNotInitializedError, type ClientOptions, CodecNotFoundError, Conversation, Conversations, DecodedMessage, Dm, type ExtractCodecContentTypes, GenerateSignatureError, Group, HistorySyncUrls, InboxReassignError, InvalidGroupMembershipChangeError, MissingContentTypeError, type NetworkOptions, type OtherOptions, type PreferenceUpdate, type Signer, SignerUnavailableError, type StorageOptions, type StreamCallback, type XmtpEnv, generateInboxId, getInboxIdForIdentifier };
|