@koredev/kore-web-sdk 11.26.0-rc.35334e6 → 11.26.0-rc.60e98f8
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/components/secureChannel/secureChannel.d.ts +75 -0
- package/dist/components/secureChannel/secureChannelController.d.ts +36 -0
- package/dist/esm/kore-web-sdk-chat.min.js +1 -1
- package/dist/esm/kore-web-sdk-widgets.js +1 -1
- package/dist/esm/plugins/agent-desktop.js +1 -1
- package/dist/esm/plugins/kore-graph-templates-plugin.js +1 -1
- package/dist/esm/plugins/v2-kore-web-sdk-widgets.js +1 -1
- package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -1
- package/dist/umd/kore-web-sdk-umd-widgets.js +1 -1
- package/dist/umd/plugins/agent-desktop-umd.js +1 -1
- package/dist/umd/plugins/kore-graph-templates-plugin-umd.js +1 -1
- package/dist/umd/plugins/v2-kore-web-sdk-widgets.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export default SecureChannel;
|
|
2
|
+
export namespace STATE {
|
|
3
|
+
const INIT: string;
|
|
4
|
+
const AWAITING_RESPONSE: string;
|
|
5
|
+
const AWAITING_ACK: string;
|
|
6
|
+
const SECURE: string;
|
|
7
|
+
const FAILED: string;
|
|
8
|
+
}
|
|
9
|
+
export namespace MSG {
|
|
10
|
+
const INIT_1: string;
|
|
11
|
+
export { INIT_1 as INIT };
|
|
12
|
+
export const RESPONSE: string;
|
|
13
|
+
export const COMPLETE: string;
|
|
14
|
+
export const ACK: string;
|
|
15
|
+
export const ENVELOPE: string;
|
|
16
|
+
export const REKEY_SIGNAL: string;
|
|
17
|
+
export const REKEY_ACK: string;
|
|
18
|
+
export const CAPABILITIES: string;
|
|
19
|
+
}
|
|
20
|
+
declare class SecureChannel {
|
|
21
|
+
constructor({ pinnedPublicKeyPem, sessionId, expectedSigningKeyId }?: {
|
|
22
|
+
pinnedPublicKeyPem: any;
|
|
23
|
+
sessionId: any;
|
|
24
|
+
expectedSigningKeyId: any;
|
|
25
|
+
});
|
|
26
|
+
pinnedPublicKeyPem: string;
|
|
27
|
+
expectedSigningKeyId: any;
|
|
28
|
+
sessionId: any;
|
|
29
|
+
state: string;
|
|
30
|
+
privateKey: CryptoKey | null;
|
|
31
|
+
publicKeyRaw: Uint8Array | null;
|
|
32
|
+
c2sNonce: Uint8Array | null;
|
|
33
|
+
s2cNonce: Uint8Array | null;
|
|
34
|
+
sharedSecret: Uint8Array | null;
|
|
35
|
+
salt: Uint8Array | null;
|
|
36
|
+
generation: number;
|
|
37
|
+
k_c2s: CryptoKey | null;
|
|
38
|
+
k_s2c: CryptoKey | null;
|
|
39
|
+
c2sSeq: bigint;
|
|
40
|
+
s2cSeq: bigint;
|
|
41
|
+
outboundLock: Promise<void>;
|
|
42
|
+
inboundLock: Promise<void>;
|
|
43
|
+
initiateHandshake(): Promise<{
|
|
44
|
+
type: string;
|
|
45
|
+
version: string;
|
|
46
|
+
clientPublicKey: string;
|
|
47
|
+
c2sNonce: string;
|
|
48
|
+
sessionId: any;
|
|
49
|
+
}>;
|
|
50
|
+
handleResponse(msg: any): Promise<{
|
|
51
|
+
type: string;
|
|
52
|
+
iv: string;
|
|
53
|
+
ciphertext: string;
|
|
54
|
+
tag: string;
|
|
55
|
+
}>;
|
|
56
|
+
handleAck(msg: any): Promise<void>;
|
|
57
|
+
encryptOutgoing(plainObj: any): Promise<{
|
|
58
|
+
type: string;
|
|
59
|
+
gen: number;
|
|
60
|
+
iv: string;
|
|
61
|
+
ciphertext: string;
|
|
62
|
+
tag: string;
|
|
63
|
+
}>;
|
|
64
|
+
decryptIncoming(envelope: any): Promise<any>;
|
|
65
|
+
handleRekeySignal(controlMsg: any): Promise<{
|
|
66
|
+
type: string;
|
|
67
|
+
gen: number;
|
|
68
|
+
iv: string;
|
|
69
|
+
ciphertext: string;
|
|
70
|
+
tag: string;
|
|
71
|
+
}>;
|
|
72
|
+
isSecure(): boolean;
|
|
73
|
+
isFailed(): boolean;
|
|
74
|
+
installGeneration(gen: any): Promise<void>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default SecureChannelController;
|
|
2
|
+
declare class SecureChannelController {
|
|
3
|
+
constructor({ config, rawSend }?: {
|
|
4
|
+
config: any;
|
|
5
|
+
rawSend: any;
|
|
6
|
+
});
|
|
7
|
+
config: any;
|
|
8
|
+
rawSend: any;
|
|
9
|
+
channel: SecureChannel | null;
|
|
10
|
+
handshakeTimer: NodeJS.Timeout | null;
|
|
11
|
+
_inbound: Promise<void>;
|
|
12
|
+
_outboundQueue: any[];
|
|
13
|
+
isSecure(): boolean;
|
|
14
|
+
isRelevant(message: any): boolean;
|
|
15
|
+
reset(reason: any): void;
|
|
16
|
+
_clearTimer(): void;
|
|
17
|
+
_armTimer(): void;
|
|
18
|
+
processOutgoing(frame: any): Promise<any>;
|
|
19
|
+
_isProtocolFrame(frame: any): boolean;
|
|
20
|
+
_flushOutbound(): void;
|
|
21
|
+
processIncoming(frame: any): Promise<{
|
|
22
|
+
handled: boolean;
|
|
23
|
+
plaintext?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
handled: boolean;
|
|
26
|
+
plaintext: any;
|
|
27
|
+
}>;
|
|
28
|
+
_handleIncoming(frame: any): Promise<{
|
|
29
|
+
handled: boolean;
|
|
30
|
+
plaintext?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
handled: boolean;
|
|
33
|
+
plaintext: any;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
import SecureChannel from "./secureChannel.js";
|