An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Blockchain Lab | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Naruno/Blockchain-Lab/blob/master/blockchain_lab.ipynb) [![Open in Cloud Shell](https://img.shields.io/badge/Google-Open%20In%20Cloud%20Shell-blue)](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
```