https://github.com/naruno/blockchain-lab
A fully functional blockchain lab.
https://github.com/naruno/blockchain-lab
blockchain blockchain-lab laboratory naruno
Last synced: about 1 year ago
JSON representation
A fully functional blockchain lab.
- Host: GitHub
- URL: https://github.com/naruno/blockchain-lab
- Owner: Naruno
- License: mpl-2.0
- Created: 2022-01-04T13:57:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T22:14:31.000Z (over 3 years ago)
- Last Synced: 2024-10-29T06:06:08.450Z (over 1 year ago)
- Topics: blockchain, blockchain-lab, laboratory, naruno
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 4
- Watchers: 0
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blockchain Lab | [](https://colab.research.google.com/github/Naruno/Blockchain-Lab/blob/master/blockchain_lab.ipynb) [](https://ssh.cloud.google.com/cloudshell/open?shellonly=true&cloudshell_git_repo=https://github.com/Naruno/Blockchain-Lab&cloudshell_tutorial=blockchain_lab.md)
A fully functional blockchain lab.
# Install
```
pip3 install blockchain_lab
```
# Using
## In another script
You can give these parameters in blockchain_lab()
- Node number with "node_number"
- Security circle number with "security_circle_number"
- Path with "path"
### Docker | Create & Delete
```python
from blockchain_lab import blockchain_lab
blockchain_lab().create_docker()
```
```python
from blockchain_lab import blockchain_lab
blockchain_lab().delete_docker()
```
### Local | Create & Delete
```python
from blockchain_lab import blockchain_lab
blockchain_lab().create_local()
```
```python
from blockchain_lab import blockchain_lab
blockchain_lab().delete_local()
```
### Status
```python
from blockchain_lab import blockchain_lab
blockchain_lab.status()
```
### Test with a transaction
```python
from blockchain_lab import blockchain_lab
blockchain_lab.send_transaction(receiver = "naruno", amount = 5000, data = "blockchain-lab")
```
## In command line
You can give these parameters in command line arguments of
create and delete functions.
- Node number with "-nn" or "--nodenumber"
- Security circle number with "-scn" or "--securitycirclenumber"
- Path with "-p" or "--path"
### Docker | Create & Delete
```console
blockchain_lab_create_docker
```
```console
blockchain_lab_delete_docker
```
### Local | Create & Delete
```console
blockchain_lab_create_local
```
```console
blockchain_lab_delete_local
```
### Status
```console
blockchain_lab_status
```
### Test with a transaction
```console
blockchain_lab_send_transaction -r naruno -a 5000 -d blockchain-lab
```