Module: Bitcoin
- Defined in:
- lib/block_io/extended_bitcoinrb.rb
Defined Under Namespace
Modules: Secp256k1 Classes: ChainParams, Key
Class Method Summary collapse
-
.chain_params ⇒ Object
current network chain params.
-
.chain_params=(name) ⇒ Object
set network chain params.
Class Method Details
.chain_params ⇒ Object
current network chain params.
13 14 15 16 |
# File 'lib/block_io/extended_bitcoinrb.rb', line 13 def self.chain_params return @current_chain if @current_chain return (@current_chain = Bitcoin::ChainParams.get(@chain_param.to_s)) end |
.chain_params=(name) ⇒ Object
set network chain params
6 7 8 9 10 |
# File 'lib/block_io/extended_bitcoinrb.rb', line 6 def self.chain_params=(name) raise "chain params for #{name} is not defined." unless %i(BTC DOGE LTC BTCTEST DOGETEST LTCTEST).include?(name.to_sym) @current_chain = nil @chain_param = name.to_sym end |