Skip to content

Commit c19633f

Browse files
Created the client files, declared client side routes
1 parent b414896 commit c19633f

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from flask import Flask, render_template
2+
3+
4+
class Transaction:
5+
def __init__(self, sender_address, sender_private_key, recipient_address, value):
6+
self.sender_address = sender_address
7+
self.sender_private_key = sender_private_key
8+
self.recipient_address = recipient_address
9+
self.value = value
10+
11+
12+
app = Flask(__name__)
13+
14+
15+
@app.route("/")
16+
def index():
17+
return render_template('./index.html')
18+
19+
20+
@app.route("/make_transaction")
21+
def make_transaction():
22+
return render_template('./make_transaction.html')
23+
24+
25+
@app.route("/view_transaction")
26+
def view_transaction():
27+
return render_template('./view_transaction.html')
28+
29+
30+
@app.route("/new_wallet")
31+
def new_wallet():
32+
return ''
33+
34+
35+
if __name__ == '__main__':
36+
from argparse import ArgumentParser
37+
38+
parser = ArgumentParser()
39+
parser.add_argument('-p', '--port', default=8081, type=int, help='port to listen to')
40+
args = parser.parse_args()
41+
port = args.port
42+
43+
app.run(host='127.0.0.1', port=port, debug=True)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Blockchain Front</title>
9+
<link rel="stylesheet" href="static/vendor/bootstrap/css/bootstrap.min.css">
10+
<link rel="stylesheet" href="/static/vendor/DataTables/css/datatables.min.css">
11+
<link rel="stylesheet" href="/static/vendor/font-awesome/font-awesome.min.css">
12+
<link rel="stylesheet" href="/static/css/custom.css">
13+
</head>
14+
<body>
15+
<p2>This is the client</p2>
16+
<script src="/static/vendor/jquery/jquery.min.js"></script>
17+
<script src="/static/vendor/DataTables/js/datatables.min.js"></script>
18+
<script src="/static/vendor/bootstrap/js/bootstrap.bundle.js"></script>
19+
<script src="/static/vendor/DataTables/js/ellipsis.js"></script>
20+
21+
<script>
22+
$(function (){
23+
24+
});
25+
</script>
26+
</body>
27+
</html>

blockchain_client/templates/make_transaction.html

Whitespace-only changes.

blockchain_client/templates/view_transaction.html

Whitespace-only changes.

0 commit comments

Comments
 (0)