tessl install tessl/npm-walletconnect--types@2.21.0TypeScript type definitions and interfaces for the WalletConnect Protocol v2, enabling type-safe development across the WalletConnect ecosystem
Agent Success
Agent success rate when using this tile
70%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.19x
Baseline
Agent success rate without this tile
59%
Build a simple secure message exchange system that allows two peers to communicate securely using public-key cryptography. The system should generate cryptographic key pairs, establish a shared encryption key, and encrypt/decrypt messages between peers.
@generates
export interface Peer {
clientId: string;
publicKey: string;
privateKey: string;
}
export interface EncryptedMessage {
encryptedData: string;
senderPublicKey: string;
}
/**
* Generates a new peer with cryptographic key pair and client identifier
*/
export function generatePeer(): Promise<Peer>;
/**
* Establishes a shared encryption key between two peers
*/
export function establishSharedKey(
myPrivateKey: string,
theirPublicKey: string
): Promise<string>;
/**
* Encrypts a message for a specific recipient
*/
export function encryptMessage(
message: string,
myPrivateKey: string,
theirPublicKey: string
): Promise<EncryptedMessage>;
/**
* Decrypts a received encrypted message
*/
export function decryptMessage(
encrypted: EncryptedMessage,
myPrivateKey: string
): Promise<string>;Provides TypeScript interfaces for WalletConnect cryptographic operations including key pair generation, encryption, and decryption.
@satisfied-by