Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/balintsoos/blockchain
:link: Blockchain in Node.js with Typescript
https://github.com/balintsoos/blockchain
blockchain crypto eslint jasmine nodejs typescript
Last synced: 6 days ago
JSON representation
:link: Blockchain in Node.js with Typescript
- Host: GitHub
- URL: https://github.com/balintsoos/blockchain
- Owner: balintsoos
- License: mit
- Created: 2019-09-16T20:46:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-17T23:29:13.000Z (over 3 years ago)
- Last Synced: 2023-03-01T18:46:21.308Z (almost 2 years ago)
- Topics: blockchain, crypto, eslint, jasmine, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :link: blockchain
Blockchain in Node.js with Typescript
> Inspired by ['Bitcoin ₿ in 100 Seconds // Build your Own Blockchain'](https://www.youtube.com/watch?v=qF7dkrce-mQ)
## How to set up
Install dependencies
```
$ nvm install
$ npm install
```Build
```
$ npm run build
```Run the example
```
$ npm run example
```## Example
```js
const satoshi = createWallet();
const bob = createWallet();const chain = createChain({
sender: 'genesis',
receiver: satoshi.publicKey,
amount: 100,
});const transaction = {
sender: satoshi.publicKey,
receiver: bob.publicKey,
amount: 5,
};const signature = createSignature(transaction, satoshi.privateKey);
addBlock(chain, transaction, signature);
```## Used Technologies
- [Node.js](https://nodejs.org/)
- [Typescript](https://www.typescriptlang.org/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Jasmine](https://jasmine.github.io/)
- [GitHub Actions](https://github.com/features/actions)## License
[MIT](./LICENSE)