GroupsV2: Better group invite behavior
This commit is contained in:
parent
b9ff4f07d3
commit
d51a0b5ece
24 changed files with 1408 additions and 313 deletions
|
@ -9,6 +9,7 @@ import {
|
|||
GroupSecretParams,
|
||||
ProfileKey,
|
||||
ProfileKeyCiphertext,
|
||||
ProfileKeyCredential,
|
||||
ProfileKeyCredentialPresentation,
|
||||
ProfileKeyCredentialRequestContext,
|
||||
ProfileKeyCredentialResponse,
|
||||
|
@ -220,6 +221,29 @@ export function getAuthCredentialPresentation(
|
|||
return compatArrayToArrayBuffer(presentation.serialize());
|
||||
}
|
||||
|
||||
export function createProfileKeyCredentialPresentation(
|
||||
clientZkProfileCipher: ClientZkProfileOperations,
|
||||
profileKeyCredentialBase64: string,
|
||||
groupSecretParamsBase64: string
|
||||
): ArrayBuffer {
|
||||
const profileKeyCredentialArray = base64ToCompatArray(
|
||||
profileKeyCredentialBase64
|
||||
);
|
||||
const profileKeyCredential = new ProfileKeyCredential(
|
||||
profileKeyCredentialArray
|
||||
);
|
||||
const secretParams = new GroupSecretParams(
|
||||
base64ToCompatArray(groupSecretParamsBase64)
|
||||
);
|
||||
|
||||
const presentation = clientZkProfileCipher.createProfileKeyCredentialPresentation(
|
||||
secretParams,
|
||||
profileKeyCredential
|
||||
);
|
||||
|
||||
return compatArrayToArrayBuffer(presentation.serialize());
|
||||
}
|
||||
|
||||
export function getClientZkAuthOperations(
|
||||
serverPublicParamsBase64: string
|
||||
): ClientZkAuthOperations {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue