MCPcopy Create free account
hub / github.com/CommE2E/comm / getInboundKeysForUserDevice

Function getInboundKeysForUserDevice

keyserver/src/utils/identity-utils.js:154–177  ·  view source on GitHub ↗
(
  userID: string,
  deviceID: string,
)

Source from the content-addressed store, hash-verified

152}
153
154async function getInboundKeysForUserDevice(
155 userID: string,
156 deviceID: string,
157): Promise<InboundKeyInfoResponse> {
158 const [authDeviceID, identityInfo, rustAPI] = await Promise.all([
159 getContentSigningKey(),
160 verifyUserLoggedIn(),
161 getRustAPI(),
162 ]);
163
164 if (!identityInfo) {
165 throw new ServerError('account_not_registered_on_identity_service');
166 }
167
168 return authVerifiedEndpoint(
169 rustAPI.getInboundKeysForUserDevice(
170 identityInfo.userId,
171 authDeviceID,
172 identityInfo.accessToken,
173 userID,
174 deviceID,
175 ),
176 );
177}
178
179export {
180 findUserIdentities,

Callers 1

keyserverAuthResponderFunction · 0.90

Calls 4

getContentSigningKeyFunction · 0.90
verifyUserLoggedInFunction · 0.90
getRustAPIFunction · 0.90
authVerifiedEndpointFunction · 0.85

Tested by

no test coverage detected