mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Added Command for using Geth as a Module in Go
Many users use Geth to interact with EVM blockchains over their go programs with the go get command. I added the command for adding geth as a Go project dependency
This commit is contained in:
parent
593e303485
commit
cb827bc463
1 changed files with 17 additions and 1 deletions
18
README.md
18
README.md
|
|
@ -17,18 +17,24 @@ archives are published at https://geth.ethereum.org/downloads/.
|
|||
For prerequisites and detailed build instructions please read the [Installation Instructions](https://geth.ethereum.org/docs/getting-started/installing-geth).
|
||||
|
||||
Building `geth` requires both a Go (version 1.19 or later) and a C compiler. You can install
|
||||
them using your favourite package manager. Once the dependencies are installed, run
|
||||
them using your favourite package manager. Once the dependencies are installed, run:
|
||||
|
||||
```shell
|
||||
make geth
|
||||
```
|
||||
|
||||
if you have go installed, you
|
||||
|
||||
or, to build the full suite of utilities:
|
||||
|
||||
```shell
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Executables
|
||||
|
||||
The go-ethereum project comes with several wrappers/executables found in the `cmd`
|
||||
|
|
@ -196,6 +202,16 @@ connect via HTTP, WS or IPC to a `geth` node configured with the above flags and
|
|||
need to speak [JSON-RPC](https://www.jsonrpc.org/specification) on all transports. You
|
||||
can reuse the same connection for multiple requests!
|
||||
|
||||
|
||||
Also, you can add geth as a project dependency in your Go apps with this command:
|
||||
|
||||
|
||||
```
|
||||
go get github.com/ethereum/go-ethereum@latest
|
||||
```
|
||||
|
||||
|
||||
|
||||
**Note: Please understand the security implications of opening up an HTTP/WS based
|
||||
transport before doing so! Hackers on the internet are actively trying to subvert
|
||||
Ethereum nodes with exposed APIs! Further, all browser tabs can access locally
|
||||
|
|
|
|||
Loading…
Reference in a new issue