# @nova47sanz/etherscanner

> Receive all the ethereum transactions that have been included in the block, including 'internal' transactions and public reading the input value

Latest version **1.3.6** (published 2022-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nova47sanz/etherscanner
pnpm add @nova47sanz/etherscanner
yarn add @nova47sanz/etherscanner
bun add @nova47sanz/etherscanner
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.6 |
| Published | 2022-03-27 |
| First published | 2021-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 7 |
| Unpacked size | 37.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | kopacanova47@gmail.com |
| Maintainers | nova47sanz |
| Keywords | ethereum, javascript, API, Smart Contracts |

## Links

- npm: https://www.npmjs.com/package/@nova47sanz/etherscanner
- Repository: https://github.com/NovaSanchez/etherscanner
- Issues: https://github.com/NovaSanchez/etherscanner/issues
- npm.io page: https://npm.io/package/@nova47sanz/etherscanner

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [p-map](https://npm.io/package/p-map.md) ^1.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [request](https://npm.io/package/request.md) ^2.88.0
- [abi-decoder](https://npm.io/package/abi-decoder.md) ^2.4.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.1
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.5

## Recent versions

- 1.3.6 (latest) — 2022-03-27
- 1.3.5 — 2022-03-23
- 1.3.3 — 2022-03-16
- 1.3.2 — 2022-03-03
- 1.3.1 — 2022-03-03
- 1.2.3 — 2022-02-04
- 1.2.2 — 2022-02-04
- 1.2.1 — 2022-02-04
- 1.0.2 — 2021-11-22
- 1.0.1 — 2021-11-22
- 1.0.0 — 2021-11-22

## README

# EtherScanner

 Module for parse ethereum transactions or block and get from them all Eth transfers (normal and "internal")

## Installation

If you must.

```bash
npm install @nova47sanz/etherscanner
```

## Usage


```js
const EtherScanner = require('@nova47sanz/etherscanner');

const etherScanner = await EtherScanner(`http://localhost:6082`);

```

##### Get all transfers by transaction hash

```js
const result = await etherScanner.scanTransaction('0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274');
console.log(result);
```

result:
```json
[{
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"to": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"value": 10000000000000000,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": false,
	"type": ""
}, {
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"to": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"value": 12468329110548072,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": true,
	"type": "CALL"
}]

```

in case of internal tx calling SC in BlockChain:

```json
{
    "blockNumber": "",
    "blockHash": "",
    "to": "0xf53d56bf81d4ad997b9e70935270baba8efaefe7",
    "from": "0x3acf9c404fda9a69c559d1e816b9613145e89948",
    "value": 0.1,
    "hash": "0x21fbb3a548637bec8fdb7ebbe5fa2feaa6302e1872aef76a04de71e3ddb85e96",
    "type": "Token",
    "isSuicide": "none",
    "isInternal": true,
    "traceAddress": 1,
    "input": "0x23b872dd0000000000000000000000003acf9c404fda9a69c559d1e816b9613145e89948000000000000000000000000f53d56bf81d4ad997b9e70935270baba8efaefe700000000000000000000000000000000000000000000000000000000000186a0"
},
{
    "blockNumber": "",
    "blockHash": "",
    "to": "0xe0d0c4c35d30baa00a2c93004555db66b8ac7068",
    "from": "0x3acf9c404fda9a69c559d1e816b9613145e89948",
    "value": 1,
    "hash": "0x21fbb3a548637bec8fdb7ebbe5fa2feaa6302e1872aef76a04de71e3ddb85e96",
    "type": "Token",
    "isSuicide": "none",
    "isInternal": true,
    "traceAddress": 2,
    "input": "0x23b872dd0000000000000000000000003acf9c404fda9a69c559d1e816b9613145e89948000000000000000000000000e0d0c4c35d30baa00a2c93004555db66b8ac706800000000000000000000000000000000000000000000000000000000000f4240"
},..
```




type - "" || CALL || CREATION || SELFDESTRUCT

##### Get all transfers by block number

```js
etherScanner.scanBlock(1822433, (err, result) => {
	console.log(result);
});
```

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