Replace typescript compiler with native tsgo compiler

This commit is contained in:
Jamie
2026-03-17 14:38:10 -07:00
committed by GitHub
parent 3851a3905a
commit 023ae37492
207 changed files with 1819 additions and 1270 deletions

View File

@@ -224,9 +224,10 @@ export function updateCallLinkAdminKeyByRoomId(
}
function assertRoomIdMatchesRootKey(roomId: string, rootKey: string): void {
const derivedRoomId = Bytes.toHex(
CallLinkRootKey.parse(rootKey).deriveRoomId()
);
const parsedRoomId = CallLinkRootKey.parse(rootKey).deriveRoomId();
// @ts-expect-error needs ringrtc update
const derivedRoomIdBytes: Uint8Array<ArrayBuffer> = parsedRoomId;
const derivedRoomId = Bytes.toHex(derivedRoomIdBytes);
strictAssert(
roomId === derivedRoomId,
'passed roomId must match roomId derived from root key'

View File

@@ -15,19 +15,21 @@ export function getAllKTAcis(db: ReadableDB): Array<AciString> {
export function getKTAccountData(
db: ReadableDB,
aci: AciString
): Uint8Array | undefined {
): Uint8Array<ArrayBuffer> | undefined {
const [query, params] = sql`
SELECT data
FROM key_transparency_account_data
WHERE aci IS ${aci}
`;
return db.prepare(query, { pluck: true }).get<Uint8Array>(params);
return db
.prepare(query, { pluck: true })
.get<Uint8Array<ArrayBuffer>>(params);
}
export function setKTAccountData(
db: WritableDB,
aci: AciString,
data: Uint8Array
data: Uint8Array<ArrayBuffer>
): void {
const [query, params] = sql`
INSERT OR REPLACE INTO key_transparency_account_data