adrianmcli / adrianmcli/simple-js-blockchain

Show example usage

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Something like this, perhaps:

```js
const { genesisBlock, blockAddTx, mineBlock } = require('./lib')

const newTx = { from: "Alice", to: "Bob", amount: 20 }
const newGenesisBlock = blockAddTx(genesisBlock, newTx)
const minedBlock = mineBlock(newGenesisBlock, 0)

console.log(minedBlock)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.