UNPKG

linea-mcp

Version:

A Model Context Protocol server for interacting with the Linea blockchain

53 lines 1.67 kB
import { ethers } from 'ethers'; /** * Service for managing cryptographic keys and wallets */ declare class KeyManagementService { private encryptionKey; private defaultPrivateKey; /** * Create a new KeyManagementService instance */ constructor(); /** * Generate a new random wallet * @returns A new Wallet instance */ generateWallet(): ethers.Wallet; /** * Get the default wallet from environment variable * @returns The default wallet or a random one if not configured */ getDefaultWallet(): ethers.Wallet; /** * Create a wallet from a private key * @param privateKey The private key to create the wallet from * @returns A Wallet instance */ createWalletFromPrivateKey(privateKey: string): ethers.Wallet; /** * Encrypt a private key for secure storage * @param privateKey The private key to encrypt * @returns The encrypted private key */ encryptPrivateKey(privateKey: string): string; /** * Decrypt a stored private key * @param encryptedKey The encrypted private key * @returns The decrypted private key */ decryptPrivateKey(encryptedKey: string): string; /** * Create a wallet from an encrypted private key * @param encryptedKey The encrypted private key * @returns A Wallet instance */ createWalletFromEncryptedKey(encryptedKey: string): ethers.Wallet; /** * Generate a secure encryption key * @returns A new random encryption key */ static generateEncryptionKey(): string; } export default KeyManagementService; //# sourceMappingURL=keyManagement.d.ts.map