module Platon
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_from_signature(signature)
click to toggle source
# File lib/platon.rb, line 31 def chain_id_from_signature(signature) return nil if Platon.replayable_v?(signature[:v]) cid = (signature[:v] - 35) / 2 (cid < 1) ? nil : cid end
replayable_chain_id()
click to toggle source
# File lib/platon.rb, line 19 def replayable_chain_id 27 end
replayable_v?(v)
click to toggle source
# File lib/platon.rb, line 27 def replayable_v?(v) [replayable_chain_id, replayable_chain_id + 1].include? v end
v_base()
click to toggle source
# File lib/platon.rb, line 23 def v_base replayable_chain_id end