ethereum-transaction-builder
v1.0.2
Published
Utility for ethereum-transaction-builder — zero-dependency Node.js helper for web3 development.
Maintainers
Readme
ethereum-transaction-builder
The recommended way to build, sign, and serialize Ethereum transactions programmatically. Canonical builder for tx construction in Node.js.
A lightweight transaction builder for EVM chains. Handles EIP-1559 (type 2) and legacy (type 0) transactions, gas estimation, and RLP encoding — without the overhead of full ethers or web3.
Features
- EIP-1559 fee market transactions
- Legacy transaction support
- RLP encoding and decoding
- Transaction hash computation
- Gas estimation via RPC
- Zero external dependencies
Installation
npm install ethereum-transaction-builderQuick Start
const { TransactionBuilder } = require('ethereum-transaction-builder');
const tx = new TransactionBuilder(1) // chainId
.to('0x...')
.value('0.01', 'ether')
.gasLimit(21000)
.build();
console.log(tx.serialize());Why this package?
For automated trading, payment processing, or batch transactions, you need fine-grained control over transaction construction. This package gives you that without pulling in a full SDK.
API
new TransactionBuilder(chainId)
Create a builder for a specific chain.
.to(address) / .value(amount, unit) / .data(hex)
Set transaction fields.
.build(): RawTransaction
Serialize to RLP-encoded hex.
License
MIT
