Create offline-tx-signing.md

Provides a detailed guide on preparing, signing and broadcasting transactions in an offline/online setup using geth.
This commit is contained in:
kirito201922 2025-12-25 21:24:04 +01:00 committed by GitHub
parent 27b3a6087e
commit c8cd481327
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,15 @@
# Offline transaction signing with Geth
Signing transactions offline improves security by keeping your private keys off of internetconnected machines.
## Prerequisites
- A machine with geth installed (airgapped or offline).
- A machine with network access to broadcast the signed transaction.
- The accounts private key or keystore file.
## Steps
1. **Prepare the unsigned transaction** on an online machine using:
```bash
geth --exec "eth.signTransaction({to: '0x...', value: web3.utils.toWei('1', 'ether'), gas: 21000, gasPrice: web3.utils.toWei('1', 'gwei'), nonce: web3.eth.getTransactionCount('0xYourAddress')})" attach