@secrecy/lib 1.40.0-fix-dashboard-lp-tech-fixes.1 → 1.40.0

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.
@@ -10,6 +10,7 @@ import { SecrecyWalletClient } from './SecrecyWalletClient.js';
10
10
  import { SecrecyPayClient } from './SecrecyPayClient.js';
11
11
  import { SecrecyUserClient } from './SecrecyUserClient.js';
12
12
  import { SecrecyPseudonymClient } from './SecrecyPseudonymClient.js';
13
+ import { decryptAnonymous } from '../crypto/index.js';
13
14
  export const encryptName = async (name, nameKey) => {
14
15
  const { data } = await encryptSecretStream(sodium.from_hex(nameKey), sodium.from_string(name));
15
16
  const nameEncrypted = sodium.to_hex(data);
@@ -48,6 +49,9 @@ export class SecrecyClient extends BaseClient {
48
49
  get publicKey() {
49
50
  return this.#keys.publicKey;
50
51
  }
52
+ decryptAnonymous(data) {
53
+ return decryptAnonymous(data, this.#keys);
54
+ }
51
55
  async logout(sessionId) {
52
56
  nodesCache.clear();
53
57
  dataCache.clear();
@@ -25,5 +25,6 @@ export declare class SecrecyClient extends BaseClient {
25
25
  pseudonym: SecrecyPseudonymClient;
26
26
  constructor(uaSession: string, uaKeys: KeyPair, uaJwt: string);
27
27
  get publicKey(): string;
28
+ decryptAnonymous(data: Uint8Array): Uint8Array;
28
29
  logout(sessionId?: string | null | undefined): Promise<void>;
29
30
  }
@@ -390,8 +390,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
390
390
  lastReset: Date;
391
391
  uploadBandwidth: bigint;
392
392
  downloadBandwidth: bigint;
393
- hasDatabase: boolean;
394
- storageUsage: number;
395
393
  };
396
394
  _output_out: {
397
395
  id: string;
@@ -400,8 +398,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
400
398
  lastReset: Date;
401
399
  uploadBandwidth: bigint;
402
400
  downloadBandwidth: bigint;
403
- hasDatabase: boolean;
404
- storageUsage: number;
405
401
  };
406
402
  }, unknown>>;
407
403
  };
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.40.0-fix-dashboard-lp-tech-fixes.1",
5
+ "version": "1.40.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@secrecy/lib-utils": "^1.0.18",
77
- "@secrecy/trpc-api-types": "1.33.0-fix-dashboard-lp-tech-fixes.3",
77
+ "@secrecy/trpc-api-types": "1.33.0-dev.5",
78
78
  "@trpc/client": "10.45.2",
79
79
  "@trpc/server": "10.45.2",
80
80
  "@types/libsodium-wrappers-sumo": "^0.7.8",