import { Ecanna } from "ecanna/dist" import { EVMAPI, KeyChain, KeyPair } from "ecanna/dist/apis/evm" import { CreateKeyPairResponse } from "ecanna/dist/apis/evm/interfaces" const ip: string = "localhost" const port: number = 9650 const protocol: string = "http" const networkID: number = 1337 const ecanna: Ecanna = new Ecanna(ip, port, protocol, networkID) const evmchain: EVMAPI = ecanna.EVMChain() const main = async (): Promise => { const keychain: KeyChain = evmchain.keyChain() const keypair: KeyPair = keychain.makeKey() const address: string = keypair.getAddressString() const publicKey: string = keypair.getPublicKeyString() const privateKey: string = keypair.getPrivateKeyString() const createKeypairResponse: CreateKeyPairResponse = { address: address, publicKey: publicKey, privateKey: privateKey } console.log(createKeypairResponse) } main()