Update for @signalapp/libsignal-client rename
This commit is contained in:
parent
d18ed40a23
commit
5a107e1bc3
28 changed files with 56 additions and 64 deletions
|
@ -80,7 +80,7 @@
|
|||
"@evanhahn/lottie-web-light": "5.8.1",
|
||||
"@popperjs/core": "2.9.2",
|
||||
"@react-spring/web": "9.4.1",
|
||||
"@signalapp/signal-client": "0.12.4",
|
||||
"@signalapp/libsignal-client": "0.15.0",
|
||||
"@sindresorhus/is": "0.8.0",
|
||||
"@types/fabric": "4.5.3",
|
||||
"abort-controller": "3.0.0",
|
||||
|
@ -189,7 +189,7 @@
|
|||
"@chanzuckerberg/axe-storybook-testing": "3.0.2",
|
||||
"@electron/fuses": "1.5.0",
|
||||
"@mixer/parallel-prettier": "2.0.1",
|
||||
"@signalapp/mock-server": "1.2.0",
|
||||
"@signalapp/mock-server": "1.2.1",
|
||||
"@storybook/addon-actions": "5.1.11",
|
||||
"@storybook/addon-knobs": "5.1.11",
|
||||
"@storybook/addons": "5.1.11",
|
||||
|
@ -330,7 +330,7 @@
|
|||
}
|
||||
],
|
||||
"mergeASARs": true,
|
||||
"singleArchFiles": "node_modules/{@signalapp/signal-client/prebuilds/**,ringrtc/build/**,sharp/**}",
|
||||
"singleArchFiles": "node_modules/{@signalapp/libsignal-client/prebuilds/**,ringrtc/build/**,sharp/**}",
|
||||
"target": [
|
||||
{
|
||||
"target": "zip",
|
||||
|
@ -477,7 +477,7 @@
|
|||
"!node_modules/better-sqlite3/deps/*",
|
||||
"!node_modules/better-sqlite3/src/*",
|
||||
"node_modules/better-sqlite3/build/Release/better_sqlite3.node",
|
||||
"node_modules/@signalapp/signal-client/prebuilds/${platform}-${arch}/*.node",
|
||||
"node_modules/@signalapp/libsignal-client/prebuilds/${platform}-${arch}/*.node",
|
||||
"node_modules/ringrtc/build/${platform}/*${arch}*.node",
|
||||
"node_modules/mac-screen-capture-permissions/build/Release/*.node",
|
||||
"!**/node_modules/react-dom/*/*.development.js",
|
||||
|
|
|
@ -29,8 +29,8 @@ const bundleDefaults = {
|
|||
bundle: true,
|
||||
external: [
|
||||
// Native libraries
|
||||
'@signalapp/signal-client',
|
||||
'@signalapp/signal-client/zkgroup',
|
||||
'@signalapp/libsignal-client',
|
||||
'@signalapp/libsignal-client/zkgroup',
|
||||
'better-sqlite3',
|
||||
'electron',
|
||||
'fs-xattr',
|
||||
|
|
|
@ -12,7 +12,10 @@ const {
|
|||
optionalDependencies = {},
|
||||
} = require('../package.json');
|
||||
|
||||
const SKIPPED_DEPENDENCIES = new Set(['ringrtc', '@signalapp/signal-client']);
|
||||
const SKIPPED_DEPENDENCIES = new Set([
|
||||
'ringrtc',
|
||||
'@signalapp/libsignal-client',
|
||||
]);
|
||||
|
||||
const rootDir = join(__dirname, '..');
|
||||
const nodeModulesPath = join(rootDir, 'node_modules');
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Buffer } from 'buffer';
|
|||
import pProps from 'p-props';
|
||||
import { chunk } from 'lodash';
|
||||
import Long from 'long';
|
||||
import { HKDF } from '@signalapp/signal-client';
|
||||
import { HKDF } from '@signalapp/libsignal-client';
|
||||
|
||||
import * as Bytes from './Bytes';
|
||||
import { calculateAgreement, generateKeyPair } from './Curve';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as client from '@signalapp/signal-client';
|
||||
import * as client from '@signalapp/libsignal-client';
|
||||
|
||||
import * as Bytes from './Bytes';
|
||||
import { constantTimeEqual } from './Crypto';
|
||||
|
|
|
@ -13,7 +13,7 @@ import type {
|
|||
SessionRecord,
|
||||
SignedPreKeyRecord,
|
||||
Uuid,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import {
|
||||
IdentityKeyStore,
|
||||
PreKeyStore,
|
||||
|
@ -22,7 +22,7 @@ import {
|
|||
SenderKeyStore,
|
||||
SessionStore,
|
||||
SignedPreKeyStore,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import { freezePreKey, freezeSignedPreKey } from './SignalProtocolStore';
|
||||
import { Address } from './types/Address';
|
||||
import { QualifiedAddress } from './types/QualifiedAddress';
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
SenderKeyRecord,
|
||||
SessionRecord,
|
||||
SignedPreKeyRecord,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import * as Bytes from './Bytes';
|
||||
import { constantTimeEqual } from './Crypto';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
values,
|
||||
} from 'lodash';
|
||||
import Long from 'long';
|
||||
import type { ClientZkGroupCipher } from '@signalapp/signal-client/zkgroup';
|
||||
import type { ClientZkGroupCipher } from '@signalapp/libsignal-client/zkgroup';
|
||||
import { v4 as getGuid } from 'uuid';
|
||||
import LRU from 'lru-cache';
|
||||
import PQueue from 'p-queue';
|
||||
|
|
|
@ -13,7 +13,7 @@ import { createStream } from 'rotating-file-stream';
|
|||
import {
|
||||
initLogger,
|
||||
LogLevel as SignalClientLogLevel,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import {
|
||||
LogLevel,
|
||||
|
@ -137,7 +137,7 @@ initLogger(
|
|||
} else if (file) {
|
||||
fileString = ` ${file}`;
|
||||
}
|
||||
const logString = `@signalapp/signal-client ${message} ${target}${fileString}`;
|
||||
const logString = `@signalapp/libsignal-client ${message} ${target}${fileString}`;
|
||||
|
||||
if (level === SignalClientLogLevel.Trace) {
|
||||
log.trace(logString);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { last, sortBy } from 'lodash';
|
||||
import { AuthCredentialResponse } from '@signalapp/signal-client/zkgroup';
|
||||
import { AuthCredentialResponse } from '@signalapp/libsignal-client/zkgroup';
|
||||
|
||||
import { getClientZkAuthOperations } from '../util/zkgroup';
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ describe('Crypto', () => {
|
|||
const result = deriveSecrets(input, salt, info);
|
||||
assert.lengthOf(result, 3);
|
||||
result.forEach(part => {
|
||||
// This is a smoke test; HKDF is tested as part of @signalapp/signal-client.
|
||||
// This is a smoke test; HKDF is tested as part of @signalapp/libsignal-client.
|
||||
assert.instanceOf(part, Uint8Array);
|
||||
assert.strictEqual(part.byteLength, 32);
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
Direction,
|
||||
SenderKeyRecord,
|
||||
SessionRecord,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import { signal } from '../protobuf/compiled';
|
||||
import { sessionStructureToBytes } from '../util/sessionTranslation';
|
||||
|
|
2
ts/textsecure.d.ts
vendored
2
ts/textsecure.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2020-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { UnidentifiedSenderMessageContent } from '@signalapp/signal-client';
|
||||
import { UnidentifiedSenderMessageContent } from '@signalapp/libsignal-client';
|
||||
|
||||
import MessageSender from './textsecure/SendMessage';
|
||||
import SyncRequest from './textsecure/SyncRequest';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { EventEmitter } from 'events';
|
||||
import { noop } from 'lodash';
|
||||
import { Readable } from 'stream';
|
||||
import type { HsmEnclaveClient } from '@signalapp/signal-client';
|
||||
import type { HsmEnclaveClient } from '@signalapp/libsignal-client';
|
||||
import type { connection as WebSocket } from 'websocket';
|
||||
import Long from 'long';
|
||||
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import ProxyAgent from 'proxy-agent';
|
||||
import { HsmEnclaveClient, PublicKey } from '@signalapp/signal-client';
|
||||
import { HsmEnclaveClient } from '@signalapp/libsignal-client';
|
||||
import type { connection as WebSocket } from 'websocket';
|
||||
|
||||
import * as Bytes from '../Bytes';
|
||||
import { prefixPublicKey } from '../Curve';
|
||||
import type { AbortableProcess } from '../util/AbortableProcess';
|
||||
import * as durations from '../util/durations';
|
||||
import { getBasicAuth } from '../util/getBasicAuth';
|
||||
|
@ -32,7 +31,7 @@ export type CDSSocketManagerOptionsType = Readonly<{
|
|||
export type CDSResponseType = CDSSocketDictionaryType;
|
||||
|
||||
export class CDSSocketManager {
|
||||
private readonly publicKey: PublicKey;
|
||||
private readonly publicKey: Buffer;
|
||||
|
||||
private readonly codeHashes: Array<Buffer>;
|
||||
|
||||
|
@ -41,9 +40,7 @@ export class CDSSocketManager {
|
|||
private retryAfter?: number;
|
||||
|
||||
constructor(private readonly options: CDSSocketManagerOptionsType) {
|
||||
this.publicKey = PublicKey.deserialize(
|
||||
Buffer.from(prefixPublicKey(Bytes.fromHex(options.publicKey)))
|
||||
);
|
||||
this.publicKey = Buffer.from(Bytes.fromHex(options.publicKey));
|
||||
this.codeHashes = options.codeHashes.map(hash =>
|
||||
Buffer.from(Bytes.fromHex(hash))
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@ import type {
|
|||
SealedSenderDecryptionResult,
|
||||
SenderCertificate,
|
||||
UnidentifiedSenderMessageContent,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import {
|
||||
CiphertextMessageType,
|
||||
DecryptionErrorMessage,
|
||||
|
@ -28,7 +28,7 @@ import {
|
|||
signalDecrypt,
|
||||
signalDecryptPreKey,
|
||||
SignalMessage,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import {
|
||||
IdentityKeys,
|
||||
|
|
|
@ -12,7 +12,7 @@ import { z } from 'zod';
|
|||
import type {
|
||||
CiphertextMessage,
|
||||
PlaintextContent,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import {
|
||||
CiphertextMessageType,
|
||||
ProtocolAddress,
|
||||
|
@ -20,7 +20,7 @@ import {
|
|||
SenderCertificate,
|
||||
signalEncrypt,
|
||||
UnidentifiedSenderMessageContent,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import type { WebAPIType, MessageType } from './WebAPI';
|
||||
import type { SendMetadataType, SendOptionsType } from './SendMessage';
|
||||
|
|
|
@ -10,11 +10,11 @@ import { z } from 'zod';
|
|||
import type { Dictionary } from 'lodash';
|
||||
import Long from 'long';
|
||||
import PQueue from 'p-queue';
|
||||
import type { PlaintextContent } from '@signalapp/signal-client';
|
||||
import type { PlaintextContent } from '@signalapp/libsignal-client';
|
||||
import {
|
||||
ProtocolAddress,
|
||||
SenderKeyDistributionMessage,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import { GLOBAL_ZONE } from '../SignalProtocolStore';
|
||||
import { assert } from '../util/assert';
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
processPreKeyBundle,
|
||||
ProtocolAddress,
|
||||
PublicKey,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
|
||||
import {
|
||||
UnregisteredUserError,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
/* eslint-disable max-classes-per-file */
|
||||
|
||||
import type { PublicKey } from '@signalapp/signal-client';
|
||||
import type { PublicKey } from '@signalapp/libsignal-client';
|
||||
|
||||
import type { SignalService as Proto } from '../protobuf';
|
||||
import type {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2019-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { PrivateKey, PublicKey } from '@signalapp/signal-client';
|
||||
import { PrivateKey, PublicKey } from '@signalapp/libsignal-client';
|
||||
|
||||
export function keyPair(): Record<string, Buffer> {
|
||||
const privKey = PrivateKey.generate();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2020-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { ProfileKeyCredentialRequestContext } from '@signalapp/signal-client/zkgroup';
|
||||
import type { ProfileKeyCredentialRequestContext } from '@signalapp/libsignal-client/zkgroup';
|
||||
import { SEALED_SENDER } from '../types/SealedSender';
|
||||
import * as Errors from '../types/errors';
|
||||
import type {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import {
|
||||
DecryptionErrorMessage,
|
||||
PlaintextContent,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import { isNumber } from 'lodash';
|
||||
|
||||
import * as Bytes from '../Bytes';
|
||||
|
|
|
@ -77,7 +77,7 @@ const excludedFilesRegexp = RegExp(
|
|||
'^.github/.+',
|
||||
|
||||
// Modules we trust
|
||||
'^node_modules/@signalapp/signal-client/.+',
|
||||
'^node_modules/@signalapp/libsignal-client/.+',
|
||||
'^node_modules/core-js-pure/.+',
|
||||
'^node_modules/core-js/.+',
|
||||
'^node_modules/fbjs/.+',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { PublicKey, Fingerprint } from '@signalapp/signal-client';
|
||||
import { PublicKey, Fingerprint } from '@signalapp/libsignal-client';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { UUID } from '../types/UUID';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
sealedSenderMultiRecipientEncrypt,
|
||||
SenderCertificate,
|
||||
UnidentifiedSenderMessageContent,
|
||||
} from '@signalapp/signal-client';
|
||||
} from '@signalapp/libsignal-client';
|
||||
import * as Bytes from '../Bytes';
|
||||
import { senderCertificateService } from '../services/senderCertificate';
|
||||
import type { SendLogCallbackType } from '../textsecure/OutgoingMessage';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2020-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { ProfileKeyCredentialRequestContext } from '@signalapp/signal-client/zkgroup';
|
||||
import type { ProfileKeyCredentialRequestContext } from '@signalapp/libsignal-client/zkgroup';
|
||||
import {
|
||||
AuthCredential,
|
||||
ClientZkAuthOperations,
|
||||
|
@ -17,11 +17,11 @@ import {
|
|||
ServerPublicParams,
|
||||
UuidCiphertext,
|
||||
NotarySignature,
|
||||
} from '@signalapp/signal-client/zkgroup';
|
||||
} from '@signalapp/libsignal-client/zkgroup';
|
||||
import { UUID } from '../types/UUID';
|
||||
import type { UUIDStringType } from '../types/UUID';
|
||||
|
||||
export * from '@signalapp/signal-client/zkgroup';
|
||||
export * from '@signalapp/libsignal-client/zkgroup';
|
||||
|
||||
// Scenarios
|
||||
|
||||
|
|
34
yarn.lock
34
yarn.lock
|
@ -1364,12 +1364,20 @@
|
|||
"@react-spring/shared" "~9.4.0"
|
||||
"@react-spring/types" "~9.4.0"
|
||||
|
||||
"@signalapp/mock-server@1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-1.2.0.tgz#1f17c39f113f2bc2d8ba51d2abd47607415df174"
|
||||
integrity sha512-BbnYwSSPti6D2osZri8c8qMAP9Br4vLpc0Cbzet/BLEW5Jrex2g4ux1+sEQtTOoueIf3uieX7l/cWFgw2mJWDg==
|
||||
"@signalapp/libsignal-client@0.15.0":
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/libsignal-client/-/libsignal-client-0.15.0.tgz#e35c949e390d76497acad7ac8b033a68899ae11e"
|
||||
integrity sha512-DtSv1S/WFGQ+QT1YLuueP99A9Yg1viWJyKyyW+MJ/jM9U+7jNVNCswY+pJnd2VGc3R85x5Kvn/VXYtFrQx8FrA==
|
||||
dependencies:
|
||||
"@signalapp/signal-client" "0.12.1"
|
||||
node-gyp-build "^4.2.3"
|
||||
uuid "^8.3.0"
|
||||
|
||||
"@signalapp/mock-server@1.2.1":
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-1.2.1.tgz#20fd9f1efded52155ad3d55b7e739d4bfcf1953f"
|
||||
integrity sha512-TR2l3+6rSQ3+jXGhrPTQ/QIk1ygKro5CrEg4X8A8j68V/uPxoa1b8a4EGBS6swHxw26Wh1l0DZUPoOGXhdM9Qg==
|
||||
dependencies:
|
||||
"@signalapp/libsignal-client" "0.15.0"
|
||||
debug "^4.3.2"
|
||||
long "^4.0.0"
|
||||
micro "^9.3.4"
|
||||
|
@ -1380,22 +1388,6 @@
|
|||
uuid "^8.3.2"
|
||||
ws "^8.4.2"
|
||||
|
||||
"@signalapp/signal-client@0.12.1":
|
||||
version "0.12.1"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/signal-client/-/signal-client-0.12.1.tgz#d587811e76308e53376f14fc294f8d0c0af39d91"
|
||||
integrity sha512-45BJHLVvCU1BMzLL4ZRFnJ5xGUwryozstwpw/VpEDD0Asb5WoZA+G42/Urnr0TbIWg+LYBwEpc7cKZ48SgOodQ==
|
||||
dependencies:
|
||||
node-gyp-build "^4.2.3"
|
||||
uuid "^8.3.0"
|
||||
|
||||
"@signalapp/signal-client@0.12.4":
|
||||
version "0.12.4"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/signal-client/-/signal-client-0.12.4.tgz#19023456c9249db6afb01762b1841e18cc3614be"
|
||||
integrity sha512-52XpJO2Xng4G+cV4ocV2uvzkSomVRodsyuILAx++o/A0jR4bup/thbvpJ/abi1oHOggdJJ0jn2nKgPl/2UAC2A==
|
||||
dependencies:
|
||||
node-gyp-build "^4.2.3"
|
||||
uuid "^8.3.0"
|
||||
|
||||
"@sindresorhus/is@0.8.0":
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.8.0.tgz#073aee40b0aab2d4ace33c0a2a2672a37da6fa12"
|
||||
|
|
Loading…
Reference in a new issue