All Projects → m-bo-one → ethereumd-proxy

m-bo-one / ethereumd-proxy

Licence: MIT license
Proxy client-server for Ethereum node using bitcoin JSON-RPC interface.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ethereumd-proxy

gonano
An implementation of the Nano cryptocurrency in Go
Stars: ✭ 34 (+61.9%)
Mutual labels:  protocol
gofins
gofins is fins client written by Go to communicate with omron PLC
Stars: ✭ 55 (+161.9%)
Mutual labels:  protocol
http2-client
A native HTTP2 client in Haskell
Stars: ✭ 41 (+95.24%)
Mutual labels:  protocol
procbridge
A super-lightweight IPC (Inter-Process Communication) protocol over TCP socket.
Stars: ✭ 118 (+461.9%)
Mutual labels:  protocol
diaspora federation
A library that provides functionalities needed for the diaspora* federation protocol.
Stars: ✭ 97 (+361.9%)
Mutual labels:  protocol
Metis
测试题小程序 包含后端api接口 可能会改成gitbook应用了吧
Stars: ✭ 79 (+276.19%)
Mutual labels:  sanic
network
Monorepo containing all the main components of Streamr Network.
Stars: ✭ 522 (+2385.71%)
Mutual labels:  protocol
sanic-wtf
Sanic meets WTForms
Stars: ✭ 24 (+14.29%)
Mutual labels:  sanic
rust-cdp
🔨 Chrome DevTools Protocol toolkit for Rust
Stars: ✭ 25 (+19.05%)
Mutual labels:  protocol
Socket-Programming-With-C
✉️ Learn Network Protocol and Network Programming
Stars: ✭ 147 (+600%)
Mutual labels:  protocol
go-mcproto
Minecraft Protocol implementation in Go
Stars: ✭ 33 (+57.14%)
Mutual labels:  protocol
json-head
JSON microservice for performing HEAD requests
Stars: ✭ 31 (+47.62%)
Mutual labels:  sanic
go.pkt
📨 Go libraries for capturing, injecting, filtering, encoding and decoding network packets
Stars: ✭ 119 (+466.67%)
Mutual labels:  protocol
433MHz Tx Rx
Arduino based 433MHz Tx and Rx combo using Manchester protocol
Stars: ✭ 27 (+28.57%)
Mutual labels:  protocol
fixp-specification
FIXP - FIX performance session layer specification
Stars: ✭ 40 (+90.48%)
Mutual labels:  protocol
osdp-python
A Python control panel implementation of the Open Supervised Device Protocol (OSDP)
Stars: ✭ 28 (+33.33%)
Mutual labels:  protocol
WPA2-CCMP-Authentication-Protocol
Authentication protocol using Advanced Encryption Standard. Information security is the primary goal here.
Stars: ✭ 106 (+404.76%)
Mutual labels:  protocol
BiliLiveLib
Library to access Bilibili Live.
Stars: ✭ 18 (-14.29%)
Mutual labels:  protocol
laminar
A simple semi-reliable UDP protocol for multiplayer games
Stars: ✭ 717 (+3314.29%)
Mutual labels:  protocol
ArianeeMaster
Smart contracts & tools for Arianee Protocol
Stars: ✭ 30 (+42.86%)
Mutual labels:  protocol

Latest version released on PyPi Test coverage MIT License

ethereumd-proxy

Proxy client-server for Ethereum node using JSON-RPC interface.

Why?

Mostly popular cryptocurrencies usually are forks of Bitcoin and all of them support Bitcoin protocol for communication with their full nodes. Ethereum go hard by own way and made own API for that. This library is a proxy to Ethereum node which implement many API methods like in bitcoind. Also it have signals like blocknotify and walletnotify. All these features are implemented by ethereumd-proxy using polling and other techniques behind the scene.

Installation

Python 3.5+ required.

First you need Geth/Parity or any other ethereum node (for listening). Tested on Geth 1.6.7 and used in production.

Installation

$ pip install ethereumd-proxy

Usage

It is the same as bitcoin-cli. Except it is not a node runner, just simple proxy for listening actual node.

Available command list:

$ ethereum-cli -help

To start proxy server use:

$ ethereum-cli -datadir=<path_to_your_dir_with_node_and_ethereum.conf> -daemon

To stop server:

$ ethereum-cli -datadir=<path_to_your_dir_with_node_and_ethereum.conf> stop

Also can be used as python client connector:

import asyncio
import ethereumd

loop = asyncio.get_event_loop()

async def go():
    client = await ethereumd.create_ethereumd_proxy(
        'http://localhost:8545', loop=loop)

    val = await client.validateaddress('0x6cace0528324a8afc2b157ceba3cdd2a27c4e21f')
    print(val)  # will print {'isvalid': True, 'address': '0x6cace0528324a8afc2b157ceba3cdd2a27c4e21f', 'scriptPubKey': 'hex', 'ismine': False, 'iswatchonly': False, 'isscript': False, 'pubkey': '0x6cace0528324a8afc2b157ceba3cdd2a27c4e21f', 'iscompressed': False, 'timestamp': None}

    address = await client.getnewaddress(passphrase='admin')
    print(address)  # will print address like '0x137dd92be1d986eb3af023d0fb6fa8436c3ee5f8'

loop.run_until_complete(go())

Implemented JSON-RPC methods

Util Wallet Blockchain
validateaddress getbalance getblockhash
estimatefee settxfee getdifficulty
  listaccounts getblockcount
  gettransaction getbestblockhash
  sendfrom getblock
  sendtoaddress  
  walletlock  
  walletpassphrase  
  getnewaddress  

Planned add more methods as soon as possible. Read help of some method first before use!

Sample of ethereum.conf

#
# ETHEREUMD-PROXY options (for controlling a running proxy process)
#

# Local server address for ethereumd-proxy RPC:
#ethpconnect=127.0.0.1

# Local server port for ethereumd-proxy RPC:
#ethpport=9500

#
# JSON-RPC options (for controlling a running ethereum process)
#

# You can use go-ethereum to send commands to ethereum
# running on another host using this option:
#rpcconnect=127.0.0.1

# Listen for RPC connections on this TCP port:
#rpcport=8545

# Listen for RPC connections on this unix/ipc socket:
#ipcconnect=~/.ethereum/geth/geth.ipc

#
# Signals options (for controlling a script management process)
#

# Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
#walletnotify=
# Execute command when the best block changes (%s in cmd is replaced by block hash)
#blocknotify=
# Execute command when a relevant alert is received (%s in cmd is replaced by message)
# TODO: add notification of long fork
#alertnotify=

Copy it to your datadir folder or use direct path to it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].