forked from osmosis-labs/assetlists
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassetlist.schema.json
225 lines (225 loc) · 7.13 KB
/
assetlist.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
{
"$id": "https://osmosis.zone/assetlists.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Asset Lists",
"description": "Asset lists are a similar mechanism to allow frontends and other UIs to fetch metadata associated with Cosmos SDK denoms, especially for assets sent over IBC.",
"type": "object",
"required": [
"chain_id",
"assets"
],
"properties": {
"chain_id": {
"type": "string"
},
"assets": {
"type": "array",
"items": {
"$ref": "#/$defs/asset"
}
}
},
"$defs": {
"asset": {
"type": "object",
"required": [
"denom_units",
"base",
"name",
"display",
"symbol"
],
"properties": {
"description": {
"type": "string",
"description": "[OPTIONAL] A short description of the asset"
},
"denom_units": {
"type": "array",
"items": {
"$ref": "#/$defs/denom_unit"
}
},
"type_asset": {
"type": "string",
"enum": ["sdk.coin", "cw20", "snip20", "erc20"],
"default": "sdk.coin",
"description": "[OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin"
},
"address": {
"type": "string",
"description": "[OPTIONAL] The address of the asset. Only required for type_asset : cw20, snip20"
},
"base": {
"type": "string",
"description": "The base unit of the asset. Must be in denom_units."
},
"name": {
"type": "string",
"description": "The project name of the asset. For example Bitcoin."
},
"display": {
"type": "string",
"description": "The human friendly unit of the asset. Must be in denom_units."
},
"symbol": {
"type": "string",
"description": "The symbol of an asset. For example BTC."
},
"ibc": {
"type": "object",
"description": "[OPTIONAL] IBC Channel between src and dst between chain",
"properties": {
"source_channel": {
"type": "string"
},
"dst_channel": {
"type": "string"
},
"source_denom": {
"type": "string"
}
},
"required": [
"source_channel",
"dst_channel",
"source_denom"
]
},
"logo_URIs": {
"type": "object",
"properties": {
"png": {
"type": "string",
"format": "uri-reference"
},
"svg": {
"type": "string",
"format": "uri-reference"
}
}
},
"coingecko_id": {
"type": "string",
"description": "[OPTIONAL] The coingecko id to fetch asset data from coingecko v3 api. See https://api.coingecko.com/api/v3/coins/list"
},
"keywords": {
"type": "array",
"maxContains": 20,
"items": {
"type": "string"
},
"if": {
"contains": {
"type": "string",
"pattern": "^osmosis-main$"
}
},
"then": {
"contains": {
"type": "string",
"pattern": "^osmosis-frontier$"
}
},
"if": {
"contains": {
"type": "string",
"pattern": "^osmosis-info$"
}
},
"then": {
"contains": {
"type": "string",
"pattern": "^osmosis-frontier$"
}
}
},
"pools": {
"type": "object",
"description": "[OPTIONAL] A list of primary Osmosis liquidity pools paired with various popular tokens.",
"properties": {
"OSMO": {
"type": "number",
"description": "The primary Osmosis liquidity pool containing this token paired with the OSMO token."
},
"ATOM": {
"type": "number"
},
"USDC.axl": {
"type": "number"
},
"SCRT": {
"type": "number"
},
"JUNO": {
"type": "number"
},
"STARS": {
"type": "number"
}
},
"additionalProperties": false,
"minProperties": 1
}
},
"if": {
"properties": {
"type_asset": {
"enum": [
"cw20",
"snip20"
]
}
},
"required": [
"type_asset"
]
},
"then": {
"required": [
"address"
]
},
"if": {
"properties": {
"keywords": {
"type": "array",
"contains": {
"type": "string",
"pattern": "^osmosis-frontier$"
}
}
},
"required": [
"keywords"
]
},
"then": {
"required": [
"pools"
]
}
},
"denom_unit": {
"type": "object",
"properties": {
"denom": {
"type": "string"
},
"exponent": {
"type": "integer"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"denom",
"exponent"
]
}
}
}