Ruby SDK for insight.bitpay.com
Add this line to your application's Gemfile:
gem 'insight_bitpay'
And then execute:
$ bundle
Or install it yourself as:
$ gem install insight_bitpay
insight_api = Insight::API.new(network: 'btc')
# For testnet3
insight_api = Insight::API.new(network: 'tbtc')
You can also change the Blockchain using:
insight_api.network = 'tbtc'
You can use any of these methods with the initialized object or simply by calling:
Insight.block(hash)
Insight.block_raw(hash)
Insight.transaction(hash)
Insight.push_transaction(hex)
Insight.address(address)
Insight.address_balance(address)
Insight.address_total_received(address)
Insight.address_total_sent(address)
Insight.address_unconfirmed_balance(address)
Insight.address_unspent_transactions(address, params = nil)
Insight.estimatefee(nbBlocks = 2)
To bump the version you can use the ./bump
python script, just write it in the terminal to see the options.
- Fork it ( https://github.com/genaromadrid/insight-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request