# @pierogi.dev/get_geth_connections

> This package is just only a selector of preset addresses of the [Geth](https://github.com/ethereum/go-ethereum) using [web3.js](https://github.com/ChainSafe/web3.js).

Latest version **1.0.1** (published 2022-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pierogi.dev/get_geth_connections
pnpm add @pierogi.dev/get_geth_connections
yarn add @pierogi.dev/get_geth_connections
bun add @pierogi.dev/get_geth_connections
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-09-21 |
| First published | 2022-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pierogi.dev |

## Links

- npm: https://www.npmjs.com/package/@pierogi.dev/get_geth_connections
- npm.io page: https://npm.io/package/@pierogi.dev/get_geth_connections

## Dependencies (2)

- [web3](https://npm.io/package/web3.md) ^1.8.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.2

## Recent versions

- 1.0.1 (latest) — 2022-09-21
- 1.0.0 — 2022-09-09

## README

# About
This package is  just only a selector of preset addresses of the [Geth](https://github.com/ethereum/go-ethereum) using [web3.js](https://github.com/ChainSafe/web3.js).

# Usage
Prepare a .env file like below according to your development environment using the Geth and the web3.js.  
```shell
GETH_VPN_HTTP_API_ADDRESS=http://171.1.1.1:8545
GETH_VPN_SOCKET_API_ADDRESS=ws://171.1.1.1:8546
GETH_LAN_HTTP_API_ADDRESS=http://192.168.1.1:8545
GETH_LAN_SOCKET_API_ADDRESS=ws://192.168.1.1:8546
```
And use the module like below.
```javascript
import {gethVpnHttpClient, gethVpnSocketClient, gethHttpClient, gethSocketClient} from "@pierogi.dev/get_geth_connections";

//Get a block information from a http api of the Geth.
let blockInfo = gethHttpClient.getBlock('15000000');

//Get a new block information from a socket api of the Geth via vpn.
gethVpnSocketClient.subscribe('newBlockHeaders', (error: Error, result: T) => {
    console.log(result);
});
```

---
_Source: https://npm.io/package/@pierogi.dev/get_geth_connections · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
