import { PeerInfoType } from '@tezos-x/octez.connect-types'; import { KeyPair } from '@tezos-x/octez.connect-utils'; import { SessionKeys } from '@stablelib/x25519-session'; import { ClientEvents } from './ClientEvents'; /** * @internalapi * * */ export declare abstract class CommunicationClient { protected keyPair?: KeyPair | undefined; constructor(keyPair?: KeyPair | undefined); eventHandlers: Map; protected isMobileOS: () => boolean; /** * Get the public key */ getPublicKey(): Promise; /** * get the public key hash */ getPublicKeyHash(): Promise; /** * Create a cryptobox server * * @param otherPublicKey * @param selfKeypair */ protected createCryptoBoxServer(otherPublicKey: string, selfKeypair: KeyPair): Promise; /** * Create a cryptobox client * * @param otherPublicKey * @param selfKeypair */ protected createCryptoBoxClient(otherPublicKey: string, selfKeypair: KeyPair): Promise; /** * Encrypt a message for a specific publicKey (receiver, asymmetric) * * @param recipientPublicKey * @param message */ protected encryptMessageAsymmetric(recipientPublicKey: string, message: string): Promise; abstract unsubscribeFromEncryptedMessages(): Promise; abstract unsubscribeFromEncryptedMessage(senderPublicKey: string): Promise; abstract sendMessage(message: string, peer?: PeerInfoType): Promise; }