@freesignal/protocol 0.5.2 → 0.5.4

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.
package/dist/node.d.ts CHANGED
@@ -78,5 +78,6 @@ declare class SessionMap implements LocalStorage<string, KeySession> {
78
78
  has(key: string): Promise<boolean>;
79
79
  delete(key: string): Promise<boolean>;
80
80
  clear(): Promise<void>;
81
+ entries(): Promise<Iterable<[string, KeySession]>>;
81
82
  }
82
83
  export {};
package/dist/node.js CHANGED
@@ -286,4 +286,7 @@ class SessionMap {
286
286
  this.cache.clear();
287
287
  return this.storage.clear();
288
288
  }
289
+ entries() {
290
+ throw new Error("Method not implemented.");
291
+ }
289
292
  }
package/dist/types.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * You should have received a copy of the GNU General Public License
17
17
  * along with this program. If not, see <https://www.gnu.org/licenses/>
18
18
  */
19
- import { LocalStorage, Encodable, KeyExchangeData } from "@freesignal/interfaces";
19
+ import type { LocalStorage, Encodable, KeyExchangeData } from "@freesignal/interfaces";
20
20
  import { EncryptionKeys, KeySession } from "./double-ratchet";
21
21
  export declare function encryptData(session: KeySession, data: Uint8Array): EncryptedData;
22
22
  export declare function decryptData(session: KeySession, encryptedData: Uint8Array): Uint8Array;
@@ -174,6 +174,6 @@ export declare class AsyncMap<K, V> implements LocalStorage<K, V> {
174
174
  has(key: K): Promise<boolean>;
175
175
  delete(key: K): Promise<boolean>;
176
176
  clear(): Promise<void>;
177
- entries(): ArrayIterator<[K, V]>;
177
+ entries(): Promise<Iterable<[K, V]>>;
178
178
  }
179
179
  export {};
package/dist/types.js CHANGED
@@ -456,7 +456,9 @@ class AsyncMap {
456
456
  });
457
457
  }
458
458
  entries() {
459
- return Array.from(this.map.entries()).values();
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ return this.map.entries();
461
+ });
460
462
  }
461
463
  }
462
464
  exports.AsyncMap = AsyncMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freesignal/protocol",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Signal Protocol implementation in javascript",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Christian Braghette",