@magnaflow/eoa-wallet
v1.0.2
Published
EOA wallet management library for multi-chain address generation and key derivation
Maintainers
Readme
@magnaflow/eoa-wallet
Mnemonic validation and multi-chain address derivation utilities for EVM and Tron.
What It Provides
- Mnemonic validation and normalization helpers
- EVM and Tron address derivation
- Standard derivation path helpers
- Tron address conversion utilities
viemclient creation from a mnemonic
Install
npm install @magnaflow/eoa-walletKey Exports
validateMnemonicPhrasenormalizeMnemonicderiveEvmAddressderiveTronAddressderiveAddressderiveZeroAddressInvalidMnemonicErrorDerivationErrorInvalidInputErrorUnsupportedChainErrorDERIVATION_PATH_BASEbuildDerivationPathtronAddressToEthereumAddresscreateEvmClientsFromMnemonic
Example
import { deriveAddress, createEvmClientsFromMnemonic } from '@magnaflow/eoa-wallet';
import { bsc } from 'viem/chains';
const derived = deriveAddress(process.env.MNEMONIC!, 'evm', { index: 0 });
const { account, publicClient, walletClient } = createEvmClientsFromMnemonic(
process.env.MNEMONIC!,
bsc,
'https://bsc-dataseed.binance.org',
);Notes
- This package exposes only the APIs exported from
src/index.ts. - Some older examples that reference helpers such as
createAccountFromMnemonicare no longer valid for the current package surface.
Development
bunx nx run eoa-wallet:lint
bunx nx run eoa-wallet:test
bunx nx run eoa-wallet:buildLicense
This package is part of the merchant-v2-sdk monorepo and is covered by the root MIT license.
See ../../LICENSE for details.
