module Blockchain
Constants
- DEFAULT_BASE_URL
- DEFAULT_UNSPENT_TRANSACTIONS_PER_REQUEST
- DEFAULT_WALLET_URL
- MAX_TRANSACTIONS_PER_MULTI_REQUEST
- MAX_TRANSACTIONS_PER_REQUEST
- TIMEOUT_SECONDS
- VERSION
Public Class Methods
create_wallet(password, api_code, url, priv: nil, label: nil, email: nil)
click to toggle source
# File lib/blockchain/createwallet.rb, line 37 def self.create_wallet(password, api_code, url, priv: nil, label: nil, email: nil) warn "[DEPRECATED] avoid use of static methods, use an instance of WalletCreator class instead." Blockchain::WalletCreator.new(url, api_code).create_wallet(password, priv, label, email) end
get(api_code = nil)
click to toggle source
# File lib/blockchain/statistics.rb, line 46 def self.get(api_code = nil) Blockchain::StatisticsExplorer.new(nil, api_code).proxy('get_statistics') end
get_address(address, api_code = nil, limit = MAX_TRANSACTIONS_PER_REQUEST, offset = 0, filter = FilterType::REMOVE_UNSPENDABLE)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 146 def self.get_address(address, api_code = nil, limit = MAX_TRANSACTIONS_PER_REQUEST, offset = 0, filter = FilterType::REMOVE_UNSPENDABLE) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, address, limit, offset, filter) end
get_block(hash_or_index, api_code = nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 134 def self.get_block(hash_or_index, api_code = nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, hash_or_index) end
get_block_height(height, api_code = nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 142 def self.get_block_height(height, api_code = nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, height) end
get_blocks(api_code = nil, time: nil, pool_name: nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 161 def self.get_blocks(api_code = nil, time: nil, pool_name: nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, time, pool_name) end
get_latest_block(api_code = nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 165 def self.get_latest_block(api_code = nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__) end
get_ticker(api_code = nil)
click to toggle source
# File lib/blockchain/exchangerates.rb, line 50 def self.get_ticker(api_code = nil) Blockchain::ExchangeRateExplorer.new(nil, api_code).proxy(__method__) end
get_tx(hash_or_index, api_code = nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 138 def self.get_tx(hash_or_index, api_code = nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, hash_or_index) end
get_unconfirmed_tx(api_code = nil)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 157 def self.get_unconfirmed_tx(api_code = nil) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__) end
get_unspent_outputs(address_array, api_code = nil, limit = DEFAULT_UNSPENT_TRANSACTIONS_PER_REQUEST, confirmations = 0)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 152 def self.get_unspent_outputs(address_array, api_code = nil, limit = DEFAULT_UNSPENT_TRANSACTIONS_PER_REQUEST, confirmations = 0) Blockchain::BlockExplorer.new(nil, api_code).proxy(__method__, limit, confirmations) end
pushtx(tx, api_code = nil)
click to toggle source
# File lib/blockchain/pushtx.rb, line 25 def self.pushtx(tx, api_code = nil) Blockchain::PushTx.new(nil, api_code).proxy(__method__, tx) end
to_btc(ccy, value, api_code = nil)
click to toggle source
# File lib/blockchain/exchangerates.rb, line 54 def self.to_btc(ccy, value, api_code = nil) Blockchain::ExchangeRateExplorer.new(nil, api_code).proxy(__method__, ccy, value) end