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

Function uploadOneTimeKeys

keyserver/src/utils/identity-utils.js:101–120  ·  view source on GitHub ↗
(
  identityInfo: IdentityInfo,
  contentOneTimeKeys: $ReadOnlyArray<string>,
  notifOneTimeKeys: $ReadOnlyArray<string>,
)

Source from the content-addressed store, hash-verified

99}
100
101async function uploadOneTimeKeys(
102 identityInfo: IdentityInfo,
103 contentOneTimeKeys: $ReadOnlyArray<string>,
104 notifOneTimeKeys: $ReadOnlyArray<string>,
105): Promise<void> {
106 const [rustAPI, deviceID] = await Promise.all([
107 getRustAPI(),
108 getContentSigningKey(),
109 ]);
110
111 await authVerifiedEndpoint(
112 rustAPI.uploadOneTimeKeys(
113 identityInfo.userId,
114 deviceID,
115 identityInfo.accessToken,
116 contentOneTimeKeys,
117 notifOneTimeKeys,
118 ),
119 );
120}
121
122async function publishPrekeys(
123 deviceID: string,

Callers 1

uploadNewOneTimeKeysFunction · 0.90

Calls 4

getRustAPIFunction · 0.90
getContentSigningKeyFunction · 0.90
authVerifiedEndpointFunction · 0.85
uploadOneTimeKeysMethod · 0.45

Tested by

no test coverage detected