-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
295 lines (295 loc) · 8.95 KB
/
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
{
"$id": "manifest.schema.json",
"title": "Manifest schema for Ledger Live App",
"type": "object",
"properties": {
"id": {
"description": "The identification of your application.",
"type": "string",
"minLength": 1,
"maxLength": 50,
"pattern": "^([a-z]|[A-Z]|[0-9]|_|-)*$",
"errorMessage": {
"pattern": "${0#}"
}
},
"private": {
"description": "Privacy of this manifest (optional)",
"type": "boolean"
},
"name": {
"description": "Name of your application, will be showed as title in LL",
"type": "string",
"minLength": 1,
"maxLength": 50,
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be -> alphabetic only | max chars : 20 | min chars : 1"
}
},
"isDapp": { "type": "boolean" },
"url": {
"description": "The url of the eth-dapp-browser, either running locally or at https://dapp-browser.apps.ledger.com for the production version",
"type": "string",
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be an URL"
}
},
"homepageUrl": {
"description": "The homepage of your service. For instance, https://www.google.fr/",
"type": "string",
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be an URL"
}
},
"supportUrl": {
"description": "The support URL of your service. (optional)",
"type": "string",
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be an URL"
}
},
"icon": {
"description": "A link to the icon displayed in the Ledger Live Discover section. Will be hosted on Ledger CDN before being released in production. (optional)",
"type": "string",
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be an URL or blank"
}
},
"params": {
"description": "dappUrl is the URL of your DApp; nanoApp is the plugin needed to clear sign your DApp; dappName should be the same as nanoApp; networks is the list of networks supported by your DApp, Ledger Live currently only support mainnet, BSC and Polygon, the nodeURL param will be set by Ledger in prod to use your node, for testing purposes, you can replace it with your own.",
"type": "object",
"properties": {
"dappUrl": {
"type": "string"
},
"nanoApp": {
"type": "string"
},
"dappName": {
"type": "string"
},
"networks": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"currency": {
"enum": [
"ethereum",
"bitcoin",
"ethereum_goerli",
"ethereum_ropsten",
"polkadot",
"bsc",
"algorand",
"polygon",
"litecoin",
"ripple",
"bitcoin_cash",
"binance_coin",
"tether",
"tron",
"stellar",
"dogecoin",
"digibyte",
"tezos",
"elrond"
],
"errorMessage": {
"enum": "must be equal to one of the allowed values : ethereum, bitcoin, polkadot"
}
},
"chainID": {
"type": "number"
},
"nodeURL": {
"type": "string",
"pattern": "^.*$",
"errorMessage": {
"pattern": "${0#} must be an URL"
}
}
},
"required": ["currency", "chainID", "nodeURL"],
"additionalProperties": {
"not": true,
"errorMessage": "extra property are not allowed, please remove the property ${0#}"
}
}
}
},
"required": ["dappUrl", "nanoApp", "dappName", "networks"],
"additionalProperties": {
"not": true,
"errorMessage": "extra property are not allowed, please remove the property ${0#}"
}
},
"platform": {
"description": "To set the platform (desktop, mobile, iOS, Android) on which your service is available. By default, you should set the value to 'all' ",
"enum": ["desktop", "mobile", "all"],
"errorMessage": {
"enum": "must be equal to one of the allowed values : desktop, mobile, all"
}
},
"apiVersion": {
"description": "The API version, by default 0.0.1",
"type": "string"
},
"manifestVersion": {
"description": "The manifest version. By default should be 1",
"type": "string"
},
"branch": {
"description": "The specific branch used by Ledger to deploy the changes. Can take the values stable | experimental | debug | soon. By default, you should set it to “stable“. The value “soon” will mark your app as “Coming soon” and it won’t be usable.",
"enum": ["stable", "experimental", "soon", "debug"],
"errorMessage": {
"enum": "must be equal to one of the allowed values : stable, experimental, soon, debug "
}
},
"categories": {
"description": "A JSON array of metadata information about your application. For instance : [“staking“,“defi“]. You can add as many as you want. It is not used for the moment but will be used for filtering in the future.",
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"lend",
"buy",
"sell",
"nft",
"yield",
"bridge",
"card",
"swap",
"farm",
"staking",
"debug",
"referral",
"portfolio",
"streaming",
"exchange",
"defi",
"tools",
"lending",
"gift cards"
],
"errorMessage": {
"enum": "must be equal to one of the allowed values : lend, yield, swap, farm, staking, defi"
}
}
},
"currencies": {
"description": "A JSON array of the currency/network being used by your application. For instance [”ethereum”,”polygon”]. Leave blank if the App does not require any currency.",
"oneOf": [
{
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"ethereum",
"bitcoin",
"ethereum_goerli",
"ethereum_ropsten",
"polkadot",
"bsc",
"algorand",
"polygon",
"litecoin",
"ripple",
"bitcoin_cash",
"binance_coin",
"tether",
"tron",
"stellar",
"dogecoin",
"digibyte",
"tezos",
"elrond"
]
},
"errorMessage": {
"oneOf": " Must be type of array with a least 1 value or a string equal to \"*\" "
}
},
{
"type": "string",
"enum": ["*"]
}
],
"errorMessage": {
"oneOf": "Must be type of array with a least 1 value or a string equal to \"*\" "
}
},
"content": {
"description": "A description of your service. It will be displayed on the entry card of your application. Type: i18n strings.",
"type": "object",
"properties": {
"shortDescription": {
"type": "object",
"minProperties": 1,
"propertyNames": {
"pattern": "^[a-z]{2}$",
"type": "string",
"errorMessage": {
"pattern": "must be i18n property in lowercase e.g fr | en"
}
}
},
"description": {
"type": "object",
"minProperties": 1,
"propertyNames": {
"type": "string",
"pattern": "^[a-z]{2}$",
"errorMessage": {
"pattern": "must be i18n property in lowercase e.g fr | en"
}
}
}
},
"required": ["shortDescription", "description"],
"additionalProperties": {
"not": true,
"errorMessage": "extra property are not allowed, please remove the property ${0#}"
}
},
"permissions": {
"type": "array"
},
"domains": {
"type": "array"
}
},
"if": {
"properties": { "isDapp": { "const": false } }
},
"then": {},
"else": {
"required": ["params"]
},
"required": [
"id",
"name",
"url",
"homepageUrl",
"platform",
"apiVersion",
"manifestVersion",
"branch",
"categories",
"currencies",
"content",
"permissions",
"domains"
],
"additionalProperties": {
"not": true,
"errorMessage": "extra property are not allowed, please remove the property ${0#}"
}
}