Class: CryptocoinPayable::Adapters::BitcoinCash
- Inherits:
-
Bitcoin
- Object
- Base
- Bitcoin
- CryptocoinPayable::Adapters::BitcoinCash
show all
- Defined in:
- lib/cryptocoin_payable/adapters/bitcoin_cash.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Bitcoin
subunit_in_main
Methods inherited from Base
#convert_main_to_subunit, #convert_subunit_to_main, #fetch_rate
Class Method Details
.coin_symbol ⇒ Object
6
7
8
|
# File 'lib/cryptocoin_payable/adapters/bitcoin_cash.rb', line 6
def self.coin_symbol
'BCH'
end
|
Instance Method Details
#create_address(id) ⇒ Object
17
18
19
|
# File 'lib/cryptocoin_payable/adapters/bitcoin_cash.rb', line 17
def create_address(id)
CashAddr::Converter.to_cash_address(super)
end
|
#fetch_transactions(address) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/cryptocoin_payable/adapters/bitcoin_cash.rb', line 10
def fetch_transactions(address)
raise NetworkNotSupported if CryptocoinPayable.configuration.testnet
url = "https://#{prefix}blockexplorer.com/api/txs/?address=#{legacy_address(address)}"
parse_block_explorer_transactions(get_request(url).body, address)
end
|