-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathopenapi.yaml
99 lines (96 loc) · 2.5 KB
/
openapi.yaml
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
openapi: 3.0.1
info:
title: Ergo Platform Genuine Tokens Verification
description: 'See [EIP-21](https://github.com/ergoplatform/eips/blob/master/eip-0021.md) for full information'
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
tags:
- name: tokenVerification
description: APIs implementing EIP-21
externalDocs:
description: EIP-21
url: https://github.com/ergoplatform/eips/blob/master/eip-0021.md
paths:
/tokens/check/{tokenId}/{tokenName}:
get:
tags:
- tokenVerification
summary: Check a token verification
operationId: checkToken
parameters:
- name: tokenId
in: path
description: ID of token to return
required: true
schema:
type: string
- name: tokenName
in: path
description: ID of token to return
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/CheckResponse'
/tokens/listGenuine:
get:
tags:
- tokenVerification
summary: Lists all genuine tokens known
operationId: listGenuine
responses:
200:
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GenuineToken'
/tokens/listBlocked:
get:
tags:
- tokenVerification
summary: Lists all blocked tokens
operationId: listBlocked
responses:
200:
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
components:
schemas:
CheckResponse:
type: object
properties:
genuine:
type: integer
description: Flag with 0 unknown, 1 verified, 2 suspicious, 3 blocked (see EIP-21)
format: int32
token:
anyOf:
- $ref: '#/components/schemas/GenuineToken'
nullable: true
GenuineToken:
type: object
properties:
tokenId:
type: string
tokenName:
type: string
uniqueName:
type: boolean
issuer:
type: string
nullable: true