@xmtp/node-sdk 3.2.0-rc2 → 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 +64 -126
- package/dist/index.js +239 -210
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
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
|
*
|
|
@@ -314,7 +314,7 @@ declare class Conversation<ContentTypes = unknown> {
|
|
|
314
314
|
*
|
|
315
315
|
* @returns The HMAC keys for this conversation
|
|
316
316
|
*/
|
|
317
|
-
getHmacKeys():
|
|
317
|
+
getHmacKeys(): _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
|
|
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;
|
|
@@ -743,15 +728,11 @@ type Signer = {
|
|
|
743
728
|
getChainId: GetChainId;
|
|
744
729
|
};
|
|
745
730
|
|
|
746
|
-
type
|
|
747
|
-
...C,
|
|
748
|
-
GroupUpdatedCodec,
|
|
749
|
-
TextCodec
|
|
750
|
-
][number] extends ContentCodec<infer T> ? T : never;
|
|
731
|
+
type ExtractCodecContentType<C> = C extends ContentCodec<infer T> ? T : never;
|
|
751
732
|
/**
|
|
752
733
|
* Client for interacting with the XMTP network
|
|
753
734
|
*/
|
|
754
|
-
declare class Client<ContentTypes =
|
|
735
|
+
declare class Client<ContentTypes = unknown> {
|
|
755
736
|
#private;
|
|
756
737
|
/**
|
|
757
738
|
* Creates a new XMTP client instance
|
|
@@ -780,7 +761,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
780
761
|
*/
|
|
781
762
|
static create<ContentCodecs extends ContentCodec[] = []>(signer: Signer, options?: Omit<ClientOptions, "codecs"> & {
|
|
782
763
|
codecs?: ContentCodecs;
|
|
783
|
-
}): Promise<Client<
|
|
764
|
+
}): Promise<Client<ExtractCodecContentType<[...ContentCodecs, GroupUpdatedCodec, TextCodec][number]>>>;
|
|
784
765
|
/**
|
|
785
766
|
* Creates a new client instance with an identifier
|
|
786
767
|
*
|
|
@@ -793,7 +774,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
793
774
|
*/
|
|
794
775
|
static build<ContentCodecs extends ContentCodec[] = []>(identifier: Identifier, options?: Omit<ClientOptions, "codecs"> & {
|
|
795
776
|
codecs?: ContentCodecs;
|
|
796
|
-
}): Promise<Client<
|
|
777
|
+
}): Promise<Client<ExtractCodecContentType<[...ContentCodecs, GroupUpdatedCodec, TextCodec][number]>>>;
|
|
797
778
|
/**
|
|
798
779
|
* Gets the client options
|
|
799
780
|
*/
|
|
@@ -830,12 +811,6 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
830
811
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
831
812
|
*/
|
|
832
813
|
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
814
|
/**
|
|
840
815
|
* Gets the preferences manager for this client
|
|
841
816
|
*
|
|
@@ -843,24 +818,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
843
818
|
*/
|
|
844
819
|
get preferences(): Preferences;
|
|
845
820
|
/**
|
|
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
|
|
821
|
+
* Creates signature text for creating a new inbox
|
|
864
822
|
*
|
|
865
823
|
* WARNING: This function should be used with caution. It is only provided
|
|
866
824
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -871,10 +829,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
871
829
|
* @returns The signature text
|
|
872
830
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
873
831
|
*/
|
|
874
|
-
|
|
832
|
+
unsafe_createInboxSignatureText(): Promise<string | null | undefined>;
|
|
875
833
|
/**
|
|
876
|
-
*
|
|
877
|
-
* client's inbox
|
|
834
|
+
* Creates signature text for adding a new account to the client's inbox
|
|
878
835
|
*
|
|
879
836
|
* WARNING: This function should be used with caution. It is only provided
|
|
880
837
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -890,10 +847,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
890
847
|
* @returns The signature text
|
|
891
848
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
892
849
|
*/
|
|
893
|
-
|
|
850
|
+
unsafe_addAccountSignatureText(newAccountIdentifier: Identifier, allowInboxReassign?: boolean): Promise<string | undefined>;
|
|
894
851
|
/**
|
|
895
|
-
*
|
|
896
|
-
* client's inbox
|
|
852
|
+
* Creates signature text for removing an account from the client's inbox
|
|
897
853
|
*
|
|
898
854
|
* WARNING: This function should be used with caution. It is only provided
|
|
899
855
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -905,10 +861,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
905
861
|
* @returns The signature text
|
|
906
862
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
907
863
|
*/
|
|
908
|
-
|
|
864
|
+
unsafe_removeAccountSignatureText(identifier: Identifier): Promise<string | undefined>;
|
|
909
865
|
/**
|
|
910
|
-
*
|
|
911
|
-
*
|
|
866
|
+
* Creates signature text for revoking all other installations of the
|
|
867
|
+
* client's inbox
|
|
912
868
|
*
|
|
913
869
|
* WARNING: This function should be used with caution. It is only provided
|
|
914
870
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -919,10 +875,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
919
875
|
* @returns The signature text
|
|
920
876
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
921
877
|
*/
|
|
922
|
-
|
|
878
|
+
unsafe_revokeAllOtherInstallationsSignatureText(): Promise<string | undefined>;
|
|
923
879
|
/**
|
|
924
|
-
*
|
|
925
|
-
*
|
|
880
|
+
* Creates signature text for revoking specific installations of the
|
|
881
|
+
* client's inbox
|
|
926
882
|
*
|
|
927
883
|
* WARNING: This function should be used with caution. It is only provided
|
|
928
884
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -934,10 +890,10 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
934
890
|
* @returns The signature text
|
|
935
891
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
936
892
|
*/
|
|
937
|
-
|
|
893
|
+
unsafe_revokeInstallationsSignatureText(installationIds: Uint8Array[]): Promise<string | undefined>;
|
|
938
894
|
/**
|
|
939
|
-
*
|
|
940
|
-
*
|
|
895
|
+
* Creates signature text for changing the recovery identifier for this
|
|
896
|
+
* client's inbox
|
|
941
897
|
*
|
|
942
898
|
* WARNING: This function should be used with caution. It is only provided
|
|
943
899
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -949,9 +905,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
949
905
|
* @returns The signature text
|
|
950
906
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
951
907
|
*/
|
|
952
|
-
|
|
908
|
+
unsafe_changeRecoveryIdentifierSignatureText(identifier: Identifier): Promise<string | undefined>;
|
|
953
909
|
/**
|
|
954
|
-
*
|
|
910
|
+
* Adds a signature for a specific request type
|
|
955
911
|
*
|
|
956
912
|
* WARNING: This function should be used with caution. It is only provided
|
|
957
913
|
* for use in special cases where the provided workflows do not meet the
|
|
@@ -961,9 +917,26 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
961
917
|
* `removeAccount`, `revokeAllOtherInstallations`, or `revokeInstallations`
|
|
962
918
|
* methods instead.
|
|
963
919
|
*
|
|
920
|
+
* @param signatureType - The type of signature request
|
|
921
|
+
* @param signatureText - The text to sign
|
|
922
|
+
* @param signer - The signer to use
|
|
964
923
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
965
924
|
*/
|
|
966
|
-
|
|
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>;
|
|
967
940
|
/**
|
|
968
941
|
* Registers the client with the XMTP network
|
|
969
942
|
*
|
|
@@ -987,8 +960,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
987
960
|
*
|
|
988
961
|
* @param newAccountSigner - The signer for the new account
|
|
989
962
|
* @param allowInboxReassign - Whether to allow inbox reassignment
|
|
990
|
-
* @throws {AccountAlreadyAssociatedError} if the account is already associated with an inbox ID
|
|
991
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
|
|
992
966
|
* @throws {SignerUnavailableError} if no signer is available
|
|
993
967
|
*/
|
|
994
968
|
unsafe_addAccount(newAccountSigner: Signer, allowInboxReassign?: boolean): Promise<void>;
|
|
@@ -999,6 +973,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
999
973
|
*
|
|
1000
974
|
* @param identifier - The identifier of the account to remove
|
|
1001
975
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
976
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1002
977
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1003
978
|
*/
|
|
1004
979
|
removeAccount(identifier: Identifier): Promise<void>;
|
|
@@ -1008,6 +983,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1008
983
|
* Requires a signer, use `Client.create` to create a client with a signer.
|
|
1009
984
|
*
|
|
1010
985
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
986
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1011
987
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1012
988
|
*/
|
|
1013
989
|
revokeAllOtherInstallations(): Promise<void>;
|
|
@@ -1019,25 +995,9 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1019
995
|
* @param installationIds - The installation IDs to revoke
|
|
1020
996
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
1021
997
|
* @throws {SignerUnavailableError} if no signer is available
|
|
998
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1022
999
|
*/
|
|
1023
1000
|
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
1001
|
/**
|
|
1042
1002
|
* Changes the recovery identifier for the client's inbox
|
|
1043
1003
|
*
|
|
@@ -1046,6 +1006,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1046
1006
|
* @param identifier - The new recovery identifier
|
|
1047
1007
|
* @throws {ClientNotInitializedError} if the client is not initialized
|
|
1048
1008
|
* @throws {SignerUnavailableError} if no signer is available
|
|
1009
|
+
* @throws {GenerateSignatureError} if the signature cannot be generated
|
|
1049
1010
|
*/
|
|
1050
1011
|
changeRecoveryIdentifier(identifier: Identifier): Promise<void>;
|
|
1051
1012
|
/**
|
|
@@ -1140,7 +1101,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1140
1101
|
* @param options - Optional network options
|
|
1141
1102
|
* @returns Whether the address is authorized
|
|
1142
1103
|
*/
|
|
1143
|
-
static isAddressAuthorized(inboxId: string, address: string,
|
|
1104
|
+
static isAddressAuthorized(inboxId: string, address: string, options?: NetworkOptions): Promise<boolean>;
|
|
1144
1105
|
/**
|
|
1145
1106
|
* Checks if an installation is authorized for an inbox
|
|
1146
1107
|
*
|
|
@@ -1149,7 +1110,7 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1149
1110
|
* @param options - Optional network options
|
|
1150
1111
|
* @returns Whether the installation is authorized
|
|
1151
1112
|
*/
|
|
1152
|
-
static isInstallationAuthorized(inboxId: string, installation: Uint8Array,
|
|
1113
|
+
static isInstallationAuthorized(inboxId: string, installation: Uint8Array, options?: NetworkOptions): Promise<boolean>;
|
|
1153
1114
|
/**
|
|
1154
1115
|
* Gets the version of the Node bindings
|
|
1155
1116
|
*/
|
|
@@ -1159,27 +1120,4 @@ declare class Client<ContentTypes = ExtractCodecContentTypes> {
|
|
|
1159
1120
|
declare const generateInboxId: (identifier: Identifier) => string;
|
|
1160
1121
|
declare const getInboxIdForIdentifier: (identifier: Identifier, env?: XmtpEnv) => Promise<string | null>;
|
|
1161
1122
|
|
|
1162
|
-
|
|
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, CodecNotFoundError, Conversation, Conversations, DecodedMessage, Dm, Group, HistorySyncUrls, InboxReassignError, InvalidGroupMembershipChangeError, MissingContentTypeError, SignerUnavailableError, generateInboxId, getInboxIdForIdentifier };
|
|
1185
|
-
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 };
|