Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elchapo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elchapo

  • 0.1.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Elchapo

Ruby API for Ethereum & Bitcoin Blockchain networks

Ethereum

IPC Connection

Have a look at this blog post for a detail description about Connect to Ethereum node using IPC

Installation

Once you've verified that Ruby is installed:

gem install elchapo

require 'elchapo'

IPC Client for Ethereum

eth_client = Ethereum::Connection.new("/root/.ethereum/rinkeby/geth.ipc")

RPC Client for Ethereum

eth_client = Ethereum::HttpConnection.new("http://0.0.0.0:8545")

RPC Client for Bitcoin

btc_client = Bitcoin::HttpConnection.new("http://127.0.0.1:18333", user: "foo", pass: "bar")

After you create the connection client, you can use all these Ethereum eth commands & Bitcoin RPC commands.

https://github.com/ethereum/wiki/wiki/JSON-RPC

https://github.com/ethereum/go-ethereum/wiki/Management-APIs

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

eth_client.eth_accounts

btc_client.getinfo

You can pass parameters as method arguments,

btc_client.sendtoaddress("awl2llkjalwo209ao23rjaslkjv30", 0.1)

Make sure you are using underscore instead of capitals. Eg: getBalance => get_balance

client.get_balance("ACCOUNT NUMBER")

This gem is inspired from ethereum.rb

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Elchapo project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 02 Jan 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc