-
Notifications
You must be signed in to change notification settings - Fork 23
/
token.schema.json
188 lines (188 loc) · 5.15 KB
/
token.schema.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
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "src/schemas/token.schema.json",
"type": "object",
"description": "Metadata for a single token in a token list",
"additionalProperties": false,
"examples": [
{
"address": "0x1654653399040a61",
"contractName": "FlowToken",
"path": {
"vault": "/storage/flowTokenVault",
"balance": "/public/flowTokenBalance",
"receiver": "/public/flowTokenReceiver"
},
"symbol": "FLOW",
"name": "Flow",
"decimals": 8,
"logoURI": "https://cdn.jsdelivr.net/gh/FlowFans/flow-token-list@main/token-registry/FLOW/logo.svg",
"tags": ["utility-token"],
"extensions": {
"website": "https://www.onflow.org",
"twitter": "https://twitter.com/flow_blockchain",
"discord": "http://discord.gg/flow"
}
}
],
"definitions": {
"TagIdentifier": {
"type": "string",
"description": "The unique identifier of a tag",
"minLength": 1,
"maxLength": 20,
"pattern": "^[\\-\\w]+$",
"examples": ["compound", "stablecoin"]
}
},
"properties": {
"address": {
"description": "The contract address",
"examples": ["0x1654653399040a61"],
"pattern": "^0x[0-9a-fA-F]{16}$",
"type": "string"
},
"contractName": {
"description": "The name of the token contract",
"examples": ["FlowToken"],
"minLength": 1,
"maxLength": 20,
"pattern": "^[a-zA-Z0-9+\\-%/$.]+$",
"type": "string"
},
"path": {
"type": "object",
"description": "The paths of the vault",
"examples": [
{
"vault": "/storage/flowTokenVault",
"balance": "/public/flowTokenBalance",
"receiver": "/public/flowTokenReceiver"
}
],
"required": ["vault", "balance", "receiver"],
"properties": {
"vault": {
"type": "string",
"description": "The path of Provider",
"pattern": "^/storage/[a-zA-Z0-9+\\-%/$.]+$",
"examples": ["/storage/flowTokenVault"]
},
"balance": {
"type": "string",
"description": "The path of Balance",
"pattern": "^/public/[a-zA-Z0-9+\\-%/$.]+$",
"examples": ["/public/flowTokenBalance"]
},
"receiver": {
"type": "string",
"description": "The path of Receiver",
"pattern": "^/public/[a-zA-Z0-9+\\-%/$.]+$",
"examples": ["/public/flowTokenReceiver"]
}
},
"additionalProperties": false
},
"symbol": {
"type": "string",
"description": "The symbol for the token; must be alphanumeric",
"pattern": "^[a-zA-Z0-9+\\-%/$.]+$",
"minLength": 1,
"maxLength": 20,
"examples": ["FLOW"]
},
"name": {
"type": "string",
"description": "The name of the token",
"minLength": 1,
"maxLength": 40,
"pattern": "^[ \\w.'+\\-%/À-ÖØ-öø-ÿ:&\\[\\]\\(\\)]+$",
"examples": ["Flow"]
},
"decimals": {
"type": "integer",
"description": "The number of decimals for the token balance",
"minimum": 0,
"maximum": 255,
"examples": [8]
},
"logoURI": {
"type": "string",
"description": "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64",
"format": "uri",
"examples": [
"https://cdn.jsdelivr.net/gh/FlowFans/flow-token-list@main/token-registry/FLOW/logo.svg"
]
},
"tags": {
"type": "array",
"description": "An array of tag identifiers associated with the token; tags are defined at the list level",
"items": {
"$ref": "#/definitions/TagIdentifier"
},
"maxItems": 10,
"examples": ["stablecoin", "compound"]
},
"extensions": {
"type": "object",
"properties": {
"website": {
"type": "string",
"format": "uri"
},
"twitter": {
"type": "string",
"format": "uri"
},
"discord": {
"type": "string",
"format": "uri"
},
"explorer": {
"type": "string",
"format": "uri"
},
"github": {
"type": "string",
"format": "uri"
},
"medium": {
"type": "string",
"format": "uri"
},
"tgann": {
"type": "string",
"format": "uri"
},
"tggroup": {
"type": "string",
"format": "uri"
},
"address": {
"type": "string"
},
"bridgeContract": {
"type": "string"
},
"assetContract": {
"type": "string"
},
"imageUrl": {
"type": "string"
},
"description": {
"type": "string"
},
"coingeckoId": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[\\-\\w]+$"
}
},
"required": [],
"additionalProperties": false
}
},
"required": ["address", "contractName", "path", "symbol", "name", "decimals"]
}