GithubHelp home page GithubHelp logo

go-web3's Introduction

Ethereum Go Client

This is a Ethereum compatible Go Client which implements the Eth JSON RPC Module, Personal JSON RPC Module and NET JSON RPC Module.

Status

This package is currently under active development. It is not already stable and the infrastructure is not complete and there are still several RPCs left to implement and the API is not stable yet.

Contribute!

In Progress =

TODO List

  • web3_clientVersion
  • web3_sha3
  • net_version
  • net_peerCount
  • net_listening
  • eth_protocolVersion
  • eth_syncing
  • eth_coinbase
  • eth_mining
  • eth_hashrate
  • eth_gasPrice
  • eth_accounts
  • eth_blockNumber
  • eth_getBalance
  • eth_getStorageAt (deprecated)
  • eth_getTransactionCount
  • eth_getBlockTransactionCountByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_getCode
  • eth_sign
  • eth_sendTransaction
  • eth_sendRawTransaction
  • eth_call
  • eth_estimateGas
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getTransactionByHash
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getTransactionReceipt
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getCompilers
  • eth_compileLLL
  • eth_compileSolidity (deprecated)
  • eth_compileSerpent
  • eth_newFilter
  • eth_newBlockFilter
  • eth_newPendingTransactionFilter
  • eth_uninstallFilter
  • eth_getFilterChanges
  • eth_getFilterLogs
  • eth_getLogs
  • eth_getWork
  • eth_submitWork
  • eth_submitHashrate
  • db_putString
  • db_getString
  • db_putHex
  • db_getHex
  • shh_post
  • shh_version
  • shh_newIdentity
  • shh_hasIdentity
  • shh_newGroup
  • shh_addToGroup
  • shh_newFilter
  • shh_uninstallFilter
  • shh_getFilterChanges
  • shh_getMessages
  • personal_listAccounts
  • personal_newAccount
  • personal_sendTransaction
  • personal_unlockAccount

Installation

go get

go get -u github.com/regcostajr/go-web3

glide

glide get github.com/regcostajr/go-web3

Usage

import (
	web3 "github.com/regcostajr/go-web3"
	"github.com/regcostajr/go-web3/eth/block"
	"github.com/regcostajr/go-web3/providers"
)

func test() {

	web3Client := web3.NewWeb3(providers.NewHTTPProvider("http://127.0.0.1:8545", 10))
	balance, err := web3Client.Eth.GetBalance("0x00035DB1C858Fe4C2772a779C6fEF0FdB850dE42", block.LATEST)

	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(balance)

}

More samples in the 'examples' directory.

Requirements

  • go ^1.8.3

Go installation instructions.

Testing

go test -v test/*.go

License

Package go-web3 is licensed under the GPLv3 License.

go-web3's People

Contributors

alexlitz avatar jeromelaurens avatar regcostajr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.