UNPKG

@xpla/xpla

Version:

<p align="center"> <img src="https://user-images.githubusercontent.com/545047/188804067-28e67e5e-0214-4449-ab04-2e0c564a6885.svg" width="80"> </p>

27 lines (25 loc) 716 B
import { HDPath } from "@interchainjs/types"; //#region src/auth/config.ts /** * Creates a wallet configuration for Ethereum-style address derivation * @param passphrase - Optional passphrase for key derivation * @returns Wallet configuration object */ function createCosmosEvmConfig(derivations = [], passphrase) { const addrDerivation = derivations.length > 0 ? derivations : [{ hdPath: HDPath.eth().toString(), prefix: "xpla" }]; return { privateKeyConfig: { algo: "secp256k1", passphrase }, publicKeyConfig: { compressed: true }, addressConfig: { strategy: "cosmos_evm" }, derivations: addrDerivation, message: { hash: "keccak256" } }; } //#endregion export { createCosmosEvmConfig };