# blockjschain

> An advanced library to implement, deploy and use blockchains in NodeJS.

Latest version **1.0.4** (published 2021-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install blockjschain
pnpm add blockjschain
yarn add blockjschain
bun add blockjschain
```

## 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.0.4 |
| Published | 2021-09-20 |
| First published | 2021-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Arjun Dashrath |
| Maintainers | arjundashrath |
| Keywords | Blockchain, NodeJS, Data, Structure |

## Links

- npm: https://www.npmjs.com/package/blockjschain
- Repository: https://github.com/arjundashrath/BlockJSchain
- Homepage: https://github.com/arjundashrath/BlockJSchain#readme
- Issues: https://github.com/arjundashrath/BlockJSchain/issues
- npm.io page: https://npm.io/package/blockjschain

## Dependencies (2)

- [hash.js](https://npm.io/package/hash.js.md) ^1.1.7
- [objects-to-csv-file](https://npm.io/package/objects-to-csv-file.md) ^1.0.1

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2021-09-20
- 1.0.3 — 2021-09-14
- 1.0.2 — 2021-09-14
- 1.0.1 — 2021-09-14
- 1.0.0 — 2021-09-14

## README

# BlockJSchain
An advanced library to implement, deploy and use blockchains in NodeJS.

### Installation
#### Using npm

`npm i blockjschain`

### Supported Methods and Usage

Import the class by

`var blk = require('blockjschain')`

Initialize by creating an object of the class by

`var bjsc = new blk()`

Alter the mining difficulty of the blocks by providing the preceeding zeros during the object initialization. If parameter is left blank, default value of '0000' is selected

eg. `var bjsc = new blk('00000')`

Call a method with the created object

eg. `bjsc.mine_block('Data')`


|Methods|Syntax|Usage|
|-------|------|-----|
|mine_block|`mine_block(optional parameter)`|Mine blocks by passing optional data as parameter|
|check_chain_integrity|`check_chain_integrity()`|Returns a boolean value: True if the chain is valid, False if the chain has been tampered with|
|get_chain|`get_chain()`|Returns the entire chain, the chain returned can be accessed like an array using indexes|
|chain_csv|`chain_csv(filename.csv)`|Exports the data of the blockchain to a csv file|
|chain_length|`chain_length()`|Returns count of blocks in the blockchain|

---

_Contributions are always welcomed_
[Github](https://github.com/arjundashrath/BlockJSchain)

_Reach out to me_
_arjundashrath@gmail.com_

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