Module: Eth
- Defined in:
- lib/eth/open_ssl.rb,
lib/eth.rb,
lib/eth/tx.rb,
lib/eth/key.rb,
lib/eth/sedes.rb,
lib/eth/utils.rb,
lib/eth/version.rb
Overview
Defined Under Namespace
Modules: Sedes, Utils
Classes: Configuration, Key, OpenSsl, Tx
Constant Summary
collapse
- UnsignedTx =
Tx.exclude([:v, :r, :s])
- VERSION =
"0.4.0"
Class Method Summary
collapse
Class Method Details
.chain_id ⇒ Object
23
24
25
|
# File 'lib/eth.rb', line 23
def chain_id
configuration.chain_id
end
|
15
16
17
|
# File 'lib/eth.rb', line 15
def configure
yield(configuration)
end
|
.prevent_replays? ⇒ Boolean
35
36
37
|
# File 'lib/eth.rb', line 35
def prevent_replays?
!chain_id.nil?
end
|
.replayable_chain_id ⇒ Object
19
20
21
|
# File 'lib/eth.rb', line 19
def replayable_chain_id
27
end
|
.replayable_v?(v) ⇒ Boolean
39
40
41
|
# File 'lib/eth.rb', line 39
def replayable_v?(v)
[replayable_chain_id, replayable_chain_id + 1].include? v
end
|
.tx_data_hex? ⇒ Boolean
43
44
45
|
# File 'lib/eth.rb', line 43
def tx_data_hex?
!!configuration.tx_data_hex
end
|
.v_base ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/eth.rb', line 27
def v_base
if chain_id
(chain_id * 2) + 35
else
replayable_chain_id
end
end
|