module Eth
originally lifted from github.com/lian/bitcoin-ruby thanks to everyone there for figuring this out
Constants
- BYTE_ZERO
- UINT_MAX
- UnsignedTx
- VERSION
Public Class Methods
chain_id()
click to toggle source
# File lib/eth.rb, line 28 def chain_id configuration.chain_id end
chain_id_from_signature(signature)
click to toggle source
# File lib/eth.rb, line 44 def chain_id_from_signature(signature) return nil if Eth.replayable_v?(signature[:v]) cid = (signature[:v] - 35) / 2 (cid < 1) ? nil : cid end
configure() { |configuration| ... }
click to toggle source
# File lib/eth.rb, line 20 def configure yield(configuration) end
replayable_chain_id()
click to toggle source
# File lib/eth.rb, line 24 def replayable_chain_id 27 end
replayable_v?(v)
click to toggle source
# File lib/eth.rb, line 36 def replayable_v?(v) [replayable_chain_id, replayable_chain_id + 1].include? v end
tx_data_hex?()
click to toggle source
# File lib/eth.rb, line 40 def tx_data_hex? !!configuration.tx_data_hex end
v_base()
click to toggle source
# File lib/eth.rb, line 32 def v_base replayable_chain_id end
Private Class Methods
configuration()
click to toggle source
# File lib/eth.rb, line 53 def configuration @configuration ||= Configuration.new end