
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
An official Ruby gem for interacting with the Blockchain.info API.
This gem was recently updated to support additional functionality of the Blockchain API. As part of this process, the archticture was changed. Rather than calling static methods under the Blockchain module, applications can now create instances of different classes supporting different Blockchain API endpoints. Calling the static methods will still work, but these have been deprecated.
Installation via RubyGems:
$ gem install blockchain
Manual installation:
$ git clone https://github.com/blockchain/api-v1-client-ruby
$ cd api-v1-client-ruby
$ rake install
To use the wallet
and createwallet
functionality, you'll also need an instance of service-my-wallet.
The gem consists of the following functionality:
blockexplorer
(docs) (api/blockchain_api)createwallet
(docs) (api/create_wallet)exchangerates
(docs) (api/exchange_rates_api)pushtx
(docs) (pushtx)receive
(docs) (api/api_receive)statistics
(docs) (api/charts_api)wallet
(docs) (api/blockchain_wallet_api)The main module is called Blockchain
Every class instance creates an instance of the client class, which is used to make calls to the API. The client instance will be created with a default base url if none is provided. You can also provide an API code when creating an instance of any class. For example:
require 'Blockchain'
# creates a block explorer instance pointing to the default base url, https://blockchain.info/, with no api code
explorer = Blockchain::BlockExplorer.new
# creates a block explorer pointing to an alternative base url and using an api code
explorer = Blockchain::BlockExplorer.new('http://some-other-url.com/', 'api-code')
All functions may raise exceptions caused by incorrectly passed parameters or other problems. If a call is rejected server-side, the APIException
exception will be raised.
It is possible to set arbitrary connection timeouts.
require 'Blockchain'
Blockchain::TIMEOUT_SECONDS = 5 #time out after 5 seconds
In order to prevent abuse some API methods require an API key approved with some basic contact information and a description of its intended use. Please request an API key here.
The same API key can be used to bypass the request limiter.
FAQs
Unknown package
We found that blockchain demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.