refactor(types): Strengthen Type Safety in Signal Handling & Core Utilities (#1764)

* refactor(types): Strengthen Type Safety in Signal Handling & Core Utilities

* chore: revert typescript and move types to libsignal

* chore: update libsignal dependency resolution and checksum

* fix: a minor regression

* chore: update libsignal resolution and checksum
This commit is contained in:
João Lucas de Oliveira Lopes
2025-09-13 09:24:57 -03:00
committed by GitHub
parent e305d4848e
commit 421ca2eb92
9 changed files with 33 additions and 37 deletions
-1
View File
@@ -1,4 +1,3 @@
/* @ts-ignore */
import { decrypt, encrypt } from 'libsignal/src/crypto'
import { SenderKeyMessage } from './sender-key-message'
import { SenderKeyName } from './sender-key-name'
-1
View File
@@ -1,5 +1,4 @@
import * as nodeCrypto from 'crypto'
/* @ts-ignore */
import { generateKeyPair } from 'libsignal/src/curve'
type KeyPairType = ReturnType<typeof generateKeyPair>
+1 -2
View File
@@ -1,4 +1,3 @@
/* @ts-ignore */
import { calculateMAC } from 'libsignal/src/crypto'
import { SenderMessageKey } from './sender-message-key'
@@ -8,7 +7,7 @@ export class SenderChainKey {
private readonly iteration: number
private readonly chainKey: Buffer
constructor(iteration: number, chainKey: any) {
constructor(iteration: number, chainKey: Uint8Array | Buffer) {
this.iteration = iteration
if (Buffer.isBuffer(chainKey)) {
// backported from @MartinSchere's PR
-1
View File
@@ -1,4 +1,3 @@
/* @ts-ignore */
import { calculateSignature, verifySignature } from 'libsignal/src/curve'
import { proto } from '../../../WAProto/index.js'
import { CiphertextMessage } from './ciphertext-message'
-1
View File
@@ -1,4 +1,3 @@
/* @ts-ignore */
import { deriveSecrets } from 'libsignal/src/crypto'
export class SenderMessageKey {