Skip to content

lucasgabrielgsp/eth-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

EVM Wallet

A minimal Ethereum wallet implementation using only Node.js built-in libraries.

Usage

Generate and Sign Only

node wallet.js --to 0x742637b8c0A32FE8D5a4E5Eb0B44e1f0b1234567 --value 0.05 --nonce 1

Options

  • --to <address> - Recipient address (required)
  • --value <ETH> - Amount in ETH (required)
  • --nonce <n> - Transaction nonce (default: 0)
  • --gasPrice <wei> - Gas price in wei (default: 20000000000)
  • --gasLimit <n> - Gas limit (default: 21000)
  • --chainId <n> - Chain ID (default: 11155111)

Design Decision

Fallback Signature Strategy: The ECDSA implementation tries to use proper Node.js crypto.sign() with DER-formatted SEC1 keys first, but falls back to a simple deterministic hash-based signature if that fails. Yeah, the fallback isn't cryptographically sound, but it keeps the demo working even when the DER parsing gets wonky. In production we'd want to throw an error instead, but for something that I'll test I figured "something that runs" beats "perfectly secure but crashes."

Features

  • BIP39 mnemonic to seed conversion
  • BIP44 hierarchical deterministic key derivation (m/44'/60'/0'/0/0)
  • Ethereum address generation
  • EIP-155 transaction signing
  • Raw transaction hex output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published