├── logs
└── .gitignore
├── .env.example
├── .eslintignore
├── Dockerfile
├── client
├── static
│ └── logo.png
├── scss
│ ├── _variables.scss
│ └── index.scss
├── components
│ ├── 404.vue
│ ├── Navbar.vue
│ ├── partials
│ │ ├── Transactions.vue
│ │ └── SendForm.vue
│ ├── Transaction.vue
│ ├── Address.vue
│ ├── Wallets.vue
│ ├── Spinner.vue
│ ├── Block.vue
│ ├── Status.vue
│ └── Toast.vue
├── index.html
├── main.js
├── App.vue
├── router.js
├── vuex
│ └── toast.js
├── ws.js
└── store.js
├── .babelrc
├── src
├── bus.js
├── errors.js
├── config.js
├── lib
│ ├── chain.js
│ ├── wallet.js
│ ├── block.js
│ └── transaction.js
├── index.js
├── miner.js
├── peers.js
├── store.js
└── server.js
├── .travis.yml
├── .postcssrc.js
├── .editorconfig
├── .gitignore
├── process.yml
├── .github
└── workflows
│ └── test.yml
├── .eslintrc.js
├── test
├── unit
│ └── lib
│ │ ├── wallet.js
│ │ ├── block.js
│ │ └── transaction.js
└── feature
│ └── store.js
├── LICENSE.md
├── docker-compose.yml
├── .snyk
├── README.md
└── package.json
/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_ENV=local
2 | SENTRY_DSN=some-dsn
3 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/front/config/*.js
3 | test
4 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:8-alpine
2 |
3 | WORKDIR /app
4 |
5 | EXPOSE 3001 3002 3003
6 |
--------------------------------------------------------------------------------
/client/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vedmant/my-little-bitcoin/HEAD/client/static/logo.png
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env"],
3 | "plugins": ["@babel/plugin-transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/src/bus.js:
--------------------------------------------------------------------------------
1 | const EventEmitter = require('events')
2 |
3 | class Bus extends EventEmitter {
4 | }
5 |
6 | module.exports = new Bus()
7 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 14
5 |
6 | cache: yarn
7 |
8 | before_script:
9 | - yarn
10 |
11 | script:
12 | - yarn test
13 |
--------------------------------------------------------------------------------
/client/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | // Body
2 | $body-bg: #f5f8fa;
3 |
4 | // Typography
5 | $font-family-sans-serif: "Raleway", sans-serif;
6 | $font-size-base: 0.85rem;
7 |
--------------------------------------------------------------------------------
/client/components/404.vue:
--------------------------------------------------------------------------------
1 |
2 | Error 404
4 |
5 |
6 | Page not found.
7 |
| 8 | | {{ moment(tx.time * 1000).format('YYYY-MM-DD h:mm:ss a') }} | 9 ||
|
12 |
13 |
16 | No Inputs (Newly Generated Coins)
17 | |
18 | 19 | |
20 |
21 |
24 | {{ output.amount }} MLB
22 | |
25 |
| Block | 16 |
17 | |
20 |
| Confirmations | 23 |24 | {{ lastBlock.index - transaction.block.index + 1 }} 25 | Unconfirmed 26 | | 27 |
| Size | 30 |{{ JSON.stringify(transaction.transaction).length }} (bytes) | 31 |
| Recieved Time | 34 |{{ moment(transaction.transaction.time * 1000).format('YYYY-MM-DD h:mm:ss a') }} | 35 |
| Address | 14 |{{ this.$route.params.address }} | 15 |
| Public Key | 18 |{{ publicKey }} | 19 |
| No. Transactions | 31 |{{ address.totalTransactions }} | 32 |
| Total Received | 35 |{{ address.totalRecieved }} | 36 |
| Final Balance | 39 |{{ address.balance }} | 40 |
| Name | 13 |Address | 14 |Balance | 15 |Total Received | 16 |Total Sent | 17 |Actions | 18 |
|---|---|---|---|---|---|
| {{ wallet.name }} | 21 |{{ wallet.balance }} | 23 |{{ wallet.totalRecieved }} | 24 |{{ wallet.totalSent }} | 25 |
| Number Of Transactions | 14 |{{ block.transactions ? block.transactions.length : '' }} | 15 |
| Output Total | 18 |{{ totalOutput }} | 19 |
| Height | 22 |{{ block.index }} | 23 |
| Timestamp | 26 |{{ moment(block.time * 1000).format('YYYY-MM-DD h:mm:ss a') }} | 27 |
| Block Reward | 30 |{{ blockReward }} | 31 |
| Nonce | 34 |{{ block.nonce }} | 35 |
| Hash | 47 ||
| Previous Block | 51 |
| Height | 20 |Age | 21 |Transactions | 22 |Total Sent | 23 |Size | 24 |
|---|---|---|---|---|
| {{ moment(block.time * 1000).from(time * 1000) }} | 28 |{{ block.transactions.length }} | 29 |{{ totalOutput(block) }} | 30 |{{ Number(JSON.stringify(block).length / 1024).toFixed(2) }} kB | 31 |