@aifinpay/deployments 1.1.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,392 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "AiFinPay payment deployment registry",
4
+ "description": "Schema for the versioned contract deployment registry files.",
5
+ "type": "object",
6
+ "required": [
7
+ "$schema",
8
+ "version",
9
+ "description",
10
+ "schemaVersion",
11
+ "generatedAt",
12
+ "ecosystem",
13
+ "protocolVersion",
14
+ "source",
15
+ "deployments",
16
+ "sourceArtifact"
17
+ ],
18
+ "properties": {
19
+ "$schema": {
20
+ "type": "string",
21
+ "format": "uri-reference"
22
+ },
23
+ "version": {
24
+ "type": "string"
25
+ },
26
+ "description": {
27
+ "type": "string"
28
+ },
29
+ "schemaVersion": {
30
+ "type": "integer",
31
+ "minimum": 1
32
+ },
33
+ "generatedAt": {
34
+ "type": "string",
35
+ "format": "date-time"
36
+ },
37
+ "ecosystem": {
38
+ "enum": ["evm", "solana", "casper", "aptos", "near"]
39
+ },
40
+ "protocolVersion": {
41
+ "type": "string"
42
+ },
43
+ "source": {
44
+ "type": "object",
45
+ "required": ["repo"],
46
+ "properties": {
47
+ "repo": {
48
+ "type": "string"
49
+ },
50
+ "commit": {
51
+ "type": "string"
52
+ },
53
+ "path": {
54
+ "type": "string"
55
+ },
56
+ "url": {
57
+ "type": "string",
58
+ "format": "uri"
59
+ },
60
+ "localPath": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "additionalProperties": true
65
+ },
66
+ "governance": {
67
+ "$ref": "#/$defs/governance"
68
+ },
69
+ "deployments": {
70
+ "type": "array"
71
+ },
72
+ "sourceArtifact": {
73
+ "type": "object",
74
+ "required": ["path", "retrievedAt"],
75
+ "properties": {
76
+ "path": {
77
+ "type": ["string", "null"]
78
+ },
79
+ "retrievedAt": {
80
+ "type": "string",
81
+ "format": "date"
82
+ },
83
+ "note": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "additionalProperties": true
88
+ }
89
+ },
90
+ "allOf": [
91
+ {
92
+ "if": {
93
+ "properties": {
94
+ "ecosystem": {
95
+ "const": "evm"
96
+ }
97
+ },
98
+ "required": ["ecosystem"]
99
+ },
100
+ "then": {
101
+ "required": ["governance"],
102
+ "properties": {
103
+ "source": {
104
+ "required": ["commit", "path"]
105
+ },
106
+ "deployments": {
107
+ "items": {
108
+ "$ref": "#/$defs/evmDeployment"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "if": {
116
+ "properties": {
117
+ "ecosystem": {
118
+ "const": "solana"
119
+ }
120
+ },
121
+ "required": ["ecosystem"]
122
+ },
123
+ "then": {
124
+ "properties": {
125
+ "source": {
126
+ "required": ["commit", "path"]
127
+ },
128
+ "deployments": {
129
+ "items": {
130
+ "$ref": "#/$defs/solanaDeployment"
131
+ }
132
+ }
133
+ }
134
+ }
135
+ },
136
+ {
137
+ "if": {
138
+ "properties": {
139
+ "ecosystem": {
140
+ "const": "casper"
141
+ }
142
+ },
143
+ "required": ["ecosystem"]
144
+ },
145
+ "then": {
146
+ "properties": {
147
+ "source": {
148
+ "required": ["url"]
149
+ },
150
+ "deployments": {
151
+ "items": {
152
+ "$ref": "#/$defs/casperDeployment"
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ ],
159
+ "$defs": {
160
+ "governance": {
161
+ "type": "object",
162
+ "required": ["prod", "testnet"],
163
+ "properties": {
164
+ "prod": {
165
+ "$ref": "#/$defs/governanceConfig"
166
+ },
167
+ "testnet": {
168
+ "$ref": "#/$defs/governanceConfig"
169
+ }
170
+ },
171
+ "additionalProperties": true
172
+ },
173
+ "governanceConfig": {
174
+ "type": "object",
175
+ "required": ["safe", "version", "threshold", "owners"],
176
+ "properties": {
177
+ "safe": {
178
+ "type": "string"
179
+ },
180
+ "version": {
181
+ "type": "string"
182
+ },
183
+ "threshold": {
184
+ "type": "integer",
185
+ "minimum": 1
186
+ },
187
+ "owners": {
188
+ "type": "array",
189
+ "items": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ },
194
+ "additionalProperties": true
195
+ },
196
+ "evmDeployment": {
197
+ "type": "object",
198
+ "required": [
199
+ "chain",
200
+ "chainId",
201
+ "environment",
202
+ "testnet",
203
+ "settlementEnabled",
204
+ "runtimeCodeHash",
205
+ "contracts",
206
+ "assets",
207
+ "safe"
208
+ ],
209
+ "properties": {
210
+ "chain": {
211
+ "type": "string"
212
+ },
213
+ "chainId": {
214
+ "type": "integer",
215
+ "minimum": 0
216
+ },
217
+ "environment": {
218
+ "enum": ["dev", "prod"]
219
+ },
220
+ "testnet": {
221
+ "type": "boolean"
222
+ },
223
+ "settlementEnabled": {
224
+ "type": "boolean"
225
+ },
226
+ "runtimeCodeHash": {
227
+ "type": "string"
228
+ },
229
+ "contracts": {
230
+ "type": "object",
231
+ "required": [
232
+ "splitter",
233
+ "tokenList",
234
+ "profiles",
235
+ "admin",
236
+ "signer",
237
+ "pauser",
238
+ "treasury"
239
+ ],
240
+ "properties": {
241
+ "splitter": {
242
+ "type": "string"
243
+ },
244
+ "tokenList": {
245
+ "type": "string"
246
+ },
247
+ "profiles": {
248
+ "type": "string"
249
+ },
250
+ "admin": {
251
+ "type": "string"
252
+ },
253
+ "signer": {
254
+ "type": "string"
255
+ },
256
+ "pauser": {
257
+ "type": "string"
258
+ },
259
+ "treasury": {
260
+ "type": "string"
261
+ }
262
+ },
263
+ "additionalProperties": true
264
+ },
265
+ "assets": {
266
+ "type": "array",
267
+ "items": {
268
+ "type": "object",
269
+ "required": ["symbol", "name", "address"],
270
+ "properties": {
271
+ "symbol": {
272
+ "type": "string"
273
+ },
274
+ "name": {
275
+ "type": "string"
276
+ },
277
+ "address": {
278
+ "type": "string"
279
+ }
280
+ },
281
+ "additionalProperties": true
282
+ }
283
+ },
284
+ "safe": {
285
+ "type": "object",
286
+ "required": ["address", "version", "threshold"],
287
+ "properties": {
288
+ "address": {
289
+ "type": "string"
290
+ },
291
+ "version": {
292
+ "type": "string"
293
+ },
294
+ "threshold": {
295
+ "type": "integer",
296
+ "minimum": 1
297
+ },
298
+ "owners": {
299
+ "type": "array",
300
+ "items": {
301
+ "type": "string"
302
+ }
303
+ }
304
+ },
305
+ "additionalProperties": true
306
+ },
307
+ "_route": {
308
+ "type": "string"
309
+ },
310
+ "_routeDescription": {
311
+ "type": "string"
312
+ }
313
+ },
314
+ "additionalProperties": true
315
+ },
316
+ "solanaDeployment": {
317
+ "type": "object",
318
+ "required": [
319
+ "cluster",
320
+ "environment",
321
+ "testnet",
322
+ "settlementEnabled",
323
+ "programId",
324
+ "idl",
325
+ "sourceArtifact"
326
+ ],
327
+ "properties": {
328
+ "cluster": {
329
+ "enum": ["mainnet", "devnet"]
330
+ },
331
+ "environment": {
332
+ "enum": ["dev", "prod"]
333
+ },
334
+ "testnet": {
335
+ "type": "boolean"
336
+ },
337
+ "settlementEnabled": {
338
+ "type": "boolean"
339
+ },
340
+ "programId": {
341
+ "type": "string"
342
+ },
343
+ "idl": {
344
+ "type": "object",
345
+ "required": ["name", "version"],
346
+ "properties": {
347
+ "name": {
348
+ "type": "string"
349
+ },
350
+ "version": {
351
+ "type": "string"
352
+ }
353
+ },
354
+ "additionalProperties": true
355
+ },
356
+ "sourceArtifact": {
357
+ "type": "string"
358
+ }
359
+ },
360
+ "additionalProperties": true
361
+ },
362
+ "casperDeployment": {
363
+ "type": "object",
364
+ "required": [
365
+ "network",
366
+ "environment",
367
+ "testnet",
368
+ "settlementEnabled",
369
+ "version"
370
+ ],
371
+ "properties": {
372
+ "network": {
373
+ "type": "string"
374
+ },
375
+ "environment": {
376
+ "enum": ["testnet", "mainnet"]
377
+ },
378
+ "testnet": {
379
+ "type": "boolean"
380
+ },
381
+ "settlementEnabled": {
382
+ "type": "boolean"
383
+ },
384
+ "version": {
385
+ "type": "string"
386
+ }
387
+ },
388
+ "additionalProperties": true
389
+ }
390
+ },
391
+ "additionalProperties": true
392
+ }