forked from crescent-network/asset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
assetlist.schema.json
144 lines (144 loc) · 4.57 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
{
"$id": "https://osmosis.zone/assetlists.schema.json",
"$schema": "https://json-schema.org/draft-07/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",
"display"
],
"properties": {
"kind": {
"type": "string",
"enum": ["sdk.coin", "cw20", "snip20", "erc20"],
"default": "sdk.coin",
"description": "The potential options for type of asset. By default, assumes sdk.coin"
},
"description": {
"type": "string",
"description": "A short description of the asset"
},
"address": {
"type": "string"
},
"denom_units": {
"type": "array",
"items": {
"$ref": "#/$defs/denom_unit"
}
},
"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",
"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": "The coingecko id to fetch asset data from coingecko v3 api. See https://api.coingecko.com/api/v3/coins/list"
}
},
"if": {
"properties": {
"kind": {
"enum": [
"cw20",
"snip20"
]
}
},
"required": [
"kind"
]
},
"then": {
"required": [
"address"
]
}
},
"denom_unit": {
"type": "object",
"properties": {
"denom": {
"type": "string"
},
"exponent": {
"type": "integer"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"denom",
"exponent"
]
}
}
}