Class: Peatio::Bitgo::Blockchain

Inherits:
Peatio::Blockchain::Abstract
  • Object
show all
Defined in:
lib/peatio/bitgo/blockchain.rb

Overview

TODO: Processing of unconfirmed transactions from mempool isn’t supported now.

Constant Summary collapse

DEFAULT_FEATURES =
{case_sensitive: true, cash_addr_format: false}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(custom_features = {}) ⇒ Blockchain

Returns a new instance of Blockchain.



9
10
11
12
# File 'lib/peatio/bitgo/blockchain.rb', line 9

def initialize(custom_features = {})
  @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
  @settings = {}
end

Instance Method Details

#configure(settings = {}) ⇒ Object



14
15
16
17
18
# File 'lib/peatio/bitgo/blockchain.rb', line 14

def configure(settings = {})
  # Clean client state during configure.
  @client = nil
  @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
end