Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= bitcoin-client {}[https://travis-ci.org/sinisterchipmunk/bitcoin-client] {}[https://codeclimate.com/github/sinisterchipmunk/bitcoin-client] {}[https://coveralls.io/r/sinisterchipmunk/bitcoin-client]
Provides a Ruby library to the complete Bitcoin JSON-RPC API. Implements all methods listed at {https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list}[https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list]. Also supports customizing the host and port number to connect to.
== Installation
On Ruby 1.9, you can just install the gem and start using it. On 1.8, the 'json' gem is also required, so you'll need to install that first:
gem install json
Or, if you're using Bundler (and you should be), just add it to the Gemfile:
gem 'json', '~> 1.5.3'
== Usage
As with most Ruby gems, you first need to require the library into your project:
require 'bitcoin'
After doing this, the simplest possible usage looks like this:
Bitcoin('username', 'password').balance
Or, if you prefer a somewhat more explicit representation, the following code performs the exact same task:
client = Bitcoin::Client.new('username', 'password') client.balance
The third and final way to use the library is by taking advantage of a simple DSL:
include Bitcoin
username 'username' password 'password'
balance
accounts
The RPC method names available to you are exactly the same as those listed on the Bitcoin wiki (again, that's {https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list}[https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list]). Some aliases have been added to make them more "ruby-ish," but none of the original names have been changed.
== Host, Port and SSL
Here are several examples of how you can change the host information:
Bitcoin('username', 'password', :host => 'example.com', :port => 38332, :ssl => true)
client = Bitcoin::Client.new('username', 'password', :host => 'example.com') client.port = 38332 client.ssl = true client.ssl?
include Bitcoin host 'example.com' port 38332 ssl?
ssl true ssl?
You should see the Bitcoin::Client class documentation if you'd like to see the other options and methods that are made available.
== Donations
If you found this library useful and feel inclined to compensate me for my trouble, I'm certainly not going to turn you down!
Bitcoin donations can be sent to:
1HawYer58J9Vy3iju1w7jsRVci5tzaxkwn
Thanks!
FAQs
Unknown package
We found that bitcoin-client 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.