EthWallet.Transaction (eth_wallet v0.1.1)
Tx about Ethereum.
Summary
Types
Functions
Link to this function
build_tx(to_str, value, data, nonce, gas_price, gas_limit)
Link to this function
encode_unsigned(n)
iex(80)> :binary.encode_unsigned(12345)
"09"
iex(81)> "09" <> <<0>>
<<48, 57, 0>>
iex(83)> 48 * 256 + 57
12345
Link to this function
hash_for_signing(tx, chain_id \\ nil)
Link to this function
serialize(tx, include_vrs \\ true)
Link to this function
sign_tx(tx, private_key, chain_id \\ nil)
https://b10c.me/blog/006-evolution-of-the-bitcoin-signature-length/
https://bitcoin.stackexchange.com/questions/12554/why-the-signature-is-always-65-13232-bytes-long
Bitcoin: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S]
Attetion: SigHash Flag should be append to the last in finally signature.
Ethereum: R <> S <> V (V = recid + chainID * 2 + 35)
Link to this function