-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.ts
More file actions
141 lines (127 loc) · 2.98 KB
/
index.ts
File metadata and controls
141 lines (127 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
export { run } from "@oclif/core";
// Base command for plugin extension
export { ConvosBaseCommand } from "./baseCommand.js";
// Identity management
export {
createIdentityStore,
type Identity,
type IdentityStore,
} from "./utils/identities.js";
// Client creation
export { createClientForIdentity } from "./utils/client.js";
// Config types
export type { ConvosConfig } from "./utils/config.js";
// Invite system
export {
createInviteSlug,
parseInvite,
verifyInvite,
verifyInviteSignature,
recoverInvitePublicKey,
inviteToSlug,
encryptConversationToken,
decryptConversationToken,
type InviteOptions,
type ParsedInvite,
} from "./utils/invite.js";
// Metadata / profiles
export {
parseAppData,
serializeAppData,
upsertProfile,
removeProfile,
getProfile,
type ConversationProfile,
type ConversationCustomMetadata,
} from "./utils/metadata.js";
// Profile messages (primary profile source)
export {
encodeProfileUpdate,
decodeProfileUpdate,
encodeProfileSnapshot,
decodeProfileSnapshot,
sendProfileUpdate,
sendProfileSnapshot,
buildProfileSnapshot,
resolveProfilesFromMessages,
isProfileMessage,
isProfileUpdateMessage,
isProfileSnapshotMessage,
ProfileUpdateCodec,
ProfileSnapshotCodec,
ContentTypeProfileUpdate,
ContentTypeProfileSnapshot,
MemberKind,
type ProfileUpdateContent,
type ProfileSnapshotContent,
type MemberProfileEntry,
type EncryptedProfileImageRef,
type ResolvedProfile,
type ProfileMetadataValue,
type ProfileMetadata,
} from "./utils/profileMessages.js";
// Join request content type
export {
JoinRequestCodec,
ContentTypeJoinRequest,
isJoinRequestMessage,
getJoinRequestContent,
type JoinRequestContent,
type JoinRequestProfile,
} from "./utils/joinRequest.js";
// Typing indicator content type
export {
TypingIndicatorCodec,
ContentTypeTypingIndicator,
isTypingIndicatorMessage,
getTypingIndicatorContent,
type TypingIndicatorContent,
} from "./utils/typingIndicator.js";
// Assistant attestation
export {
signAttestation,
verifyAttestation,
verifyAttestationWithJwks,
generateAttestationKeyPair,
buildJwks,
fetchJwks,
type Attestation,
type Jwks,
type JwksKey,
type Ed25519KeyPair,
} from "./utils/attestation.js";
// Image encryption
export {
encryptImage,
decryptImage,
fetchImageData,
generateGroupKey,
type EncryptedPayload,
} from "./utils/imageEncryption.js";
// Emoji utilities
export { emojiForIdentifier, EMOJIS } from "./utils/emoji.js";
// Random utilities
export { randomAlphanumeric } from "./utils/random.js";
// Re-export XMTP utilities for downstream consumers
export {
getAccountAddress,
toHexBytes,
isGroup,
isDm,
requireGroup,
requireDm,
formatSections,
formatHuman,
jsonStringify,
buildProfileMap,
buildProfileMapFromMessages,
getSenderProfile,
getSenderProfileFromResolved,
isDisplayableMessage,
normalizeMessageContent,
type ProfileMap,
type SenderProfile,
isTTY,
VALID_ENVS,
type Section,
} from "./utils/xmtp.js";