Skip to content

jaynagpaul/go-web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-web3

GoDoc Go Report Card

A wrapper for web3 to be used with GopherJS. Tries to enforce best practices. Methods are called asynchronously to maintain support for metamask and mist.

Documentation

GoDoc

Getting Started

$ go get -u github.com/jaynagpaul/go-web3 $ go get -u github.com/gopherjs/gopherjs

import "github.com/jaynagpaul/go-web3"

func main() {
    // Check if injected by browser
    w3 := web3.NewWeb3()
    w3.Version.GetEthereum(func(ver, err) {
        if err != nil {
            println(err)
        } else {
            println(ver) // Prints the version to the developer console.
        }
    })
    // TODO
}

gopherjs build

More Examples

One More

TODO

  • Framework for testing.
  • Finalize API.
  • Examples