From cb827bc46360f704acf35aedf10c5f40445823ec Mon Sep 17 00:00:00 2001 From: Ukeje Chukwuemeriwo Goodness Date: Sun, 18 Feb 2024 14:15:46 +0100 Subject: [PATCH] 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 --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e8dba8090..160998b360 100644 --- a/README.md +++ b/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