https://github.com/jaynagpaul/go-web3
A wrapper for web3.js to be used with GopherJS.
https://github.com/jaynagpaul/go-web3
ethereum gopherjs gopherjs-bindings solidity web3
Last synced: 5 months ago
JSON representation
A wrapper for web3.js to be used with GopherJS.
- Host: GitHub
- URL: https://github.com/jaynagpaul/go-web3
- Owner: jaynagpaul
- License: apache-2.0
- Created: 2017-08-15T19:56:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T03:01:06.000Z (almost 9 years ago)
- Last Synced: 2024-06-20T16:51:01.307Z (almost 2 years ago)
- Topics: ethereum, gopherjs, gopherjs-bindings, solidity, web3
- Language: Go
- Homepage: http://godoc.org/github.com/jaynagpaul/go-web3
- Size: 11.7 KB
- Stars: 10
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-web3
[](https://godoc.org/github.com/jaynagpaul/go-web3) [](https://goreportcard.com/report/github.com/jaynagpaul/go-web3)
A wrapper for [web3](https://github.com/ethereum/web3.js/) to be used with [GopherJS](https://github.com/gopherjs/gopherjs).
Tries to enforce best practices. Methods are called asynchronously to maintain support for metamask and mist.
## Documentation
[GoDoc](https://godoc.org/github.com/jaynagpaul/go-web3)
## Getting Started
`$ go get -u github.com/jaynagpaul/go-web3`
`$ go get -u github.com/gopherjs/gopherjs`
```Go
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](https://godoc.org/github.com/jaynagpaul/go-web3#pkg-examples)
[One More](https://github.com/jaynagpaul/go-web3/tree/master/example)
## TODO
* Framework for testing.
* Finalize API.
* Examples