Class: CryptocoinPayable::Adapters::Bitcoin
- Inherits:
-
Base
- Object
- Base
- CryptocoinPayable::Adapters::Bitcoin
show all
- Defined in:
- lib/cryptocoin_payable/adapters/bitcoin.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#convert_main_to_subunit, #convert_subunit_to_main, #fetch_rate
Class Method Details
.coin_symbol ⇒ Object
9
10
11
|
# File 'lib/cryptocoin_payable/adapters/bitcoin.rb', line 9
def self.coin_symbol
'BTC'
end
|
.subunit_in_main ⇒ Object
5
6
7
|
# File 'lib/cryptocoin_payable/adapters/bitcoin.rb', line 5
def self.subunit_in_main
100_000_000
end
|
Instance Method Details
#create_address(id) ⇒ Object
19
20
21
|
# File 'lib/cryptocoin_payable/adapters/bitcoin.rb', line 19
def create_address(id)
super.to_address(network: network)
end
|
#fetch_transactions(address) ⇒ Object
13
14
15
16
17
|
# File 'lib/cryptocoin_payable/adapters/bitcoin.rb', line 13
def fetch_transactions(address)
fetch_block_explorer_transactions(address)
rescue StandardError
fetch_block_cypher_transactions(address)
end
|