Rallet

Build Status Code Climate

A generalized JSONRPC client for crypto currencies.

Installation

Add this line to your application's Gemfile:

gem 'rallet'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rallet

Usage

Rallet allows you to access all json rpc commands of your -virtual currency wallet- however, it is better to use allowed methods by adding it to specific usage.

JSONRPC Basic Usage (for all currencies)

client = Rallet::Client.new('http://user:pass@localhost:2082')
# get info command
client.request 'getinfo'

All wallets which accepts same api calls of Bitcoin.

btc = Rallet::Wallets::Common.new('http://user:pass@localhost:2082')

# get info command
btc.getinfo

All getters can be used without get prefix(ruby style) All setters can be used with '=' & without set prefix(ruby style)

btc.info

Adding Support For Currency Specific Usage

Rallet allows you to add your favorite currency commands to its usage. Create a file:

your_fav_currency.rb

Paste the code block for your fav currency:

module Rallet
  module Wallets
    class YOUR_CURRENCY_CODE < ::Rallet::Wallets::Common
      # add any other methods which not listed at ::Rallet::Wallets::Common class
    end
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright © 2015 Mustafa Turan. See LICENSE for details.