Class: Straight::Blockchain::Adapter
- Inherits:
-
Object
- Object
- Straight::Blockchain::Adapter
- Includes:
- Singleton
- Defined in:
- lib/straight/blockchain_adapter.rb
Overview
A base class, providing guidance for the interfaces of all blockchain adapters as well as supplying some useful methods.
Direct Known Subclasses
BiteasyAdapter, BlockchainInfoAdapter, InsightAdapter, MyceliumAdapter
Defined Under Namespace
Classes: BitcoinAddressInvalid, RequestError
Constant Summary collapse
- MAX_TRIES =
How much times try to connect to servers if ReadTimeout error appears
5
Instance Method Summary collapse
- #fetch_balance_for(address) ⇒ Object
- #fetch_transaction(tid) ⇒ Object
- #fetch_transactions_for(address) ⇒ Object
Instance Method Details
#fetch_balance_for(address) ⇒ Object
30 31 32 |
# File 'lib/straight/blockchain_adapter.rb', line 30 def fetch_balance_for(address) raise "Please implement #fetch_balance_for in #{self.to_s}" end |
#fetch_transaction(tid) ⇒ Object
22 23 24 |
# File 'lib/straight/blockchain_adapter.rb', line 22 def fetch_transaction(tid) raise "Please implement #fetch_transaction in #{self.to_s}" end |
#fetch_transactions_for(address) ⇒ Object
26 27 28 |
# File 'lib/straight/blockchain_adapter.rb', line 26 def fetch_transactions_for(address) raise "Please implement #fetch_transactions_for in #{self.to_s}" end |