-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
40 lines (30 loc) · 893 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from flask import Flask, session
from flask import jsonify
from flask import request, Blueprint
from flask_restx import fields, Resource, Api
from flask_cors import CORS, cross_origin
#from pytezos.rpc import tzkt
#from conseil.api import ConseilApi
from datetime import timedelta
import requests
import json
import time
import urllib
import sys
# ROUTES
from routes.atomic_swap import api as atomic_swap
from routes.keys import api as keys
app = Flask(__name__)
app.secret_key = 'session_key'
cors = CORS(app, supports_credentials=True)
api = Api()
api = Api(version = 'v1.0.0',
title = 'Atomic Swap Module',
description= 'On-chain FA1.2:Tezos Atomic Swap',
contact='[email protected]')
# NAMESPACES
api.add_namespace(atomic_swap)
api.add_namespace(keys)
api.init_app(app)
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')