-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
176 lines (175 loc) · 3.91 KB
/
swagger.json
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "CryptoKeep API",
"description": "Methods for using different blockchain tokens & coins: ETH, MKN Token, BTC, LTC, BNB",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
},
"host": "vh6o5auivh.execute-api.eu-central-1.amazonaws.com",
"basePath": "/prod/",
"tags": [
{
"name": "Wallet",
"description": "API for interacting with app"
}
],
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/loginWithMnemonic": {
"post": {
"tags": [
"Wallet"
],
"description": "Method used to login to wallet. Mnemonic converted to seed, and all wallet addresses are derived from it.",
"parameters": [
{
"name": "mnemonic",
"in": "body",
"description": "Mnemonic phrase",
"schema": {
"$ref": "#/definitions/Mnemonic"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Message informing about successful login",
"schema": {
"$ref": "#/definitions/MnemonicResponse"
}
}
}
}
},
"/blockchains/{currency_name}": {
"parameters": [
{
"name": "currency_name",
"in": "path",
"required": true,
"description": "Currency ticker that we want to get info (e.g. 'ETH', 'MKN', 'BTC', 'LTC' or 'BNB')",
"type": "string"
}
],
"get": {
"tags": [
"Wallet"
],
"summary": "Get blockchain details",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Blockchain"
}
},
"404": {
"description": "Currency not found"
}
}
}
},
"/sendCurrency": {
"post": {
"tags": [
"Wallet"
],
"description": "Send currency from wallet to another account",
"parameters": [
{
"name": "receiver",
"in": "body",
"description": "Receiver parameters",
"schema": {
"$ref": "#/definitions/SendCurrencyRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Message with 'status'='success' and 'result' has the link to transaction",
"schema": {
"$ref": "#/definitions/SendCurrencyResponse"
}
},
"400": {
"description": "Message with 'status'='error' and 'result' with an error message",
"schema": {
"$ref": "#/definitions/SendCurrencyResponse"
}
}
}
}
}
},
"definitions": {
"Mnemonic": {
"properties": {
"mnemonic": {
"type": "string"
}
}
},
"MnemonicResponse": {
"properties": {
"status": {
"type": "string"
}
}
},
"Blockchain": {
"properties": {
"imagePath": {
"type": "string"
},
"fullName": {
"type": "string"
},
"address": {
"type": "number"
},
"balance": {
"type": "number"
}
}
},
"SendCurrencyRequest": {
"properties": {
"to": {
"type": "string"
},
"amount": {
"type": "number"
}
}
},
"SendCurrencyResponse": {
"properties": {
"result": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}