@okxweb3/coin-ethereum
Version:
An Ethereum SDK for building Web3 wallets and applications.
26 lines (25 loc) • 795 B
TypeScript
export interface EthEncryptedData {
version: string;
nonce: string;
ephemPublicKey: string;
ciphertext: string;
}
export declare function encrypt({ publicKey, data, version, }: {
publicKey: string;
data: string;
version: string;
}): EthEncryptedData;
export declare function encryptSafely({ publicKey, data, version, }: {
publicKey: string;
data: unknown;
version: string;
}): EthEncryptedData;
export declare function decrypt({ encryptedData, privateKey, }: {
encryptedData: EthEncryptedData;
privateKey: string;
}): string;
export declare function decryptSafely({ encryptedData, privateKey, }: {
encryptedData: EthEncryptedData;
privateKey: string;
}): string;
export declare function getEncryptionPublicKey(privateKey: string): string;