@jokio/sdk
Version:
pure js/ts sdk for building decentralised localfirst web apps. Provides tts ai model integrations, realtime p2p communication & crypto encryptions.
10 lines (9 loc) • 464 B
TypeScript
export declare class CryptoService {
createSessionKeyPair(): Promise<CryptoKeyPair>;
exportPublicKey(publicKey: CryptoKey): Promise<string>;
deriveAESKey(privateKey: CryptoKey, publicKeyString: string): Promise<CryptoKey>;
exportRawKey(key: CryptoKey): Promise<string>;
encrypt(text: string, key: CryptoKey): Promise<string>;
decrypt(encryptedText: string, key: CryptoKey): Promise<string>;
hashString(text: string): Promise<string>;
}