@secrecy/lib 1.79.1 → 1.79.2

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.
@@ -9,11 +9,15 @@ export class SecrecyGroupClient {
9
9
  if (!groupIdentity) {
10
10
  throw new Error('Group identity not found');
11
11
  }
12
+ const groupPriv = this.#client.keyPairs[groupIdentity.identityPubKey];
13
+ if (!groupPriv) {
14
+ throw new Error('Group private key not found');
15
+ }
12
16
  const opts = {
13
17
  pubKey: input.pubKey,
14
18
  role: input.role,
15
19
  id: input.id,
16
- encPriv: sodium.to_hex(encryptCryptoBox(sodium.from_hex(groupIdentity.identityPubKey), input.pubKey, this.#client.currentIdentityPrivateKey)),
20
+ encPriv: sodium.to_hex(encryptCryptoBox(sodium.from_hex(groupPriv), input.pubKey, this.#client.currentIdentityPrivateKey)),
17
21
  };
18
22
  return this.#client.apiClient.group.addMember.mutate({
19
23
  ...opts,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.79.1",
5
+ "version": "1.79.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"