@anuma/sdk 10.10.0 → 11.0.1

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.
@@ -9518,13 +9518,14 @@ declare function saveSetting(store: ChatStore, section: string, data: {
9518
9518
  }, signal?: AbortSignal): Promise<Setting>;
9519
9519
 
9520
9520
  /**
9521
- * AES-GCM keys derived from one wallet signature over `SIGN_MESSAGE`.
9521
+ * AES-GCM keys and the topic HMAC key derived from one wallet signature over `SIGN_MESSAGE`.
9522
9522
  * @public
9523
9523
  */
9524
9524
  interface MemoryKeyRing {
9525
9525
  keyId: string;
9526
9526
  v3: CryptoKey;
9527
9527
  v2: CryptoKey;
9528
+ topicHash: CryptoKey;
9528
9529
  }
9529
9530
  /**
9530
9531
  * Thrown when no supplied key decrypts a field.
@@ -9534,17 +9535,18 @@ declare class MemoryKeyError extends Error {
9534
9535
  constructor(message: string);
9535
9536
  }
9536
9537
  /**
9537
- * Derive the v3 and legacy v2 memory keys from a hex wallet signature.
9538
+ * Derive the v3 and legacy v2 memory keys and the topic HMAC key from a hex wallet signature.
9538
9539
  * @public
9539
9540
  */
9540
9541
  declare function deriveMemoryKeyRing(signatureHex: string): Promise<MemoryKeyRing>;
9541
9542
  /**
9542
- * Encrypt and decrypt callbacks for `createRemoteMemoryPersistence` under the canonical key.
9543
+ * Encrypt, decrypt and topic-hash callbacks for `createRemoteMemoryPersistence` under the canonical key.
9543
9544
  * @public
9544
9545
  */
9545
9546
  declare function memoryCipher(canonical: MemoryKeyRing): {
9546
9547
  encrypt: (plaintext: string) => Promise<string>;
9547
9548
  decrypt: (ciphertext: string) => Promise<string>;
9549
+ hashTopic: (normalized: string) => Promise<string>;
9548
9550
  };
9549
9551
  /**
9550
9552
  * Re-encrypt a local field under the canonical key.
@@ -12123,7 +12125,7 @@ interface RemoteMemoryWorkPersistence {
12123
12125
  releaseWork(kind: RemoteMemoryWorkKind, token: string): Promise<void>;
12124
12126
  }
12125
12127
 
12126
- /** The nearby private-memory row. Content and kind_value are plaintext ONLY on the device. */
12128
+ /** The nearby private-memory row. Content, kind_value and topic names are plaintext ONLY on the device. */
12127
12129
  interface RemoteMemoryRow {
12128
12130
  memory_id: string;
12129
12131
  content: string;
@@ -12244,8 +12246,10 @@ interface RemoteMemoryPersistenceOptions {
12244
12246
  keyId: string;
12245
12247
  encrypt: (plaintext: string) => Promise<string>;
12246
12248
  decrypt: (ciphertext: string) => Promise<string>;
12249
+ /** Keyed hash of a normalized topic name, as provided by `memoryCipher`. */
12250
+ hashTopic: (normalized: string) => Promise<string>;
12247
12251
  fetch?: typeof globalThis.fetch;
12248
- /** Cancellation for the initial account/key check. Individual operations take their own signal. */
12252
+ /** Cancellation for the initial account/key check and the background topic upgrade. Individual operations take their own signal. */
12249
12253
  signal?: AbortSignal;
12250
12254
  timeoutMs?: number;
12251
12255
  }
@@ -9518,13 +9518,14 @@ declare function saveSetting(store: ChatStore, section: string, data: {
9518
9518
  }, signal?: AbortSignal): Promise<Setting>;
9519
9519
 
9520
9520
  /**
9521
- * AES-GCM keys derived from one wallet signature over `SIGN_MESSAGE`.
9521
+ * AES-GCM keys and the topic HMAC key derived from one wallet signature over `SIGN_MESSAGE`.
9522
9522
  * @public
9523
9523
  */
9524
9524
  interface MemoryKeyRing {
9525
9525
  keyId: string;
9526
9526
  v3: CryptoKey;
9527
9527
  v2: CryptoKey;
9528
+ topicHash: CryptoKey;
9528
9529
  }
9529
9530
  /**
9530
9531
  * Thrown when no supplied key decrypts a field.
@@ -9534,17 +9535,18 @@ declare class MemoryKeyError extends Error {
9534
9535
  constructor(message: string);
9535
9536
  }
9536
9537
  /**
9537
- * Derive the v3 and legacy v2 memory keys from a hex wallet signature.
9538
+ * Derive the v3 and legacy v2 memory keys and the topic HMAC key from a hex wallet signature.
9538
9539
  * @public
9539
9540
  */
9540
9541
  declare function deriveMemoryKeyRing(signatureHex: string): Promise<MemoryKeyRing>;
9541
9542
  /**
9542
- * Encrypt and decrypt callbacks for `createRemoteMemoryPersistence` under the canonical key.
9543
+ * Encrypt, decrypt and topic-hash callbacks for `createRemoteMemoryPersistence` under the canonical key.
9543
9544
  * @public
9544
9545
  */
9545
9546
  declare function memoryCipher(canonical: MemoryKeyRing): {
9546
9547
  encrypt: (plaintext: string) => Promise<string>;
9547
9548
  decrypt: (ciphertext: string) => Promise<string>;
9549
+ hashTopic: (normalized: string) => Promise<string>;
9548
9550
  };
9549
9551
  /**
9550
9552
  * Re-encrypt a local field under the canonical key.
@@ -12123,7 +12125,7 @@ interface RemoteMemoryWorkPersistence {
12123
12125
  releaseWork(kind: RemoteMemoryWorkKind, token: string): Promise<void>;
12124
12126
  }
12125
12127
 
12126
- /** The nearby private-memory row. Content and kind_value are plaintext ONLY on the device. */
12128
+ /** The nearby private-memory row. Content, kind_value and topic names are plaintext ONLY on the device. */
12127
12129
  interface RemoteMemoryRow {
12128
12130
  memory_id: string;
12129
12131
  content: string;
@@ -12244,8 +12246,10 @@ interface RemoteMemoryPersistenceOptions {
12244
12246
  keyId: string;
12245
12247
  encrypt: (plaintext: string) => Promise<string>;
12246
12248
  decrypt: (ciphertext: string) => Promise<string>;
12249
+ /** Keyed hash of a normalized topic name, as provided by `memoryCipher`. */
12250
+ hashTopic: (normalized: string) => Promise<string>;
12247
12251
  fetch?: typeof globalThis.fetch;
12248
- /** Cancellation for the initial account/key check. Individual operations take their own signal. */
12252
+ /** Cancellation for the initial account/key check and the background topic upgrade. Individual operations take their own signal. */
12249
12253
  signal?: AbortSignal;
12250
12254
  timeoutMs?: number;
12251
12255
  }