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>

29 lines (27 loc) 912 B
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const require_runtime = require('../_virtual/_rolldown/runtime.cjs'); let _interchainjs_types = require("@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: _interchainjs_types.HDPath.eth().toString(), prefix: "xpla" }]; return { privateKeyConfig: { algo: "secp256k1", passphrase }, publicKeyConfig: { compressed: true }, addressConfig: { strategy: "cosmos_evm" }, derivations: addrDerivation, message: { hash: "keccak256" } }; } //#endregion exports.createCosmosEvmConfig = createCosmosEvmConfig;