@algorandfoundation/algokit-client-generator 2.6.0 → 3.0.0-beta.1
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.
- package/bin/cli.mjs +4 -0
- package/cli.d.ts +0 -1
- package/cli.js +47 -49
- package/cli.js.map +1 -1
- package/cli.mjs +56 -0
- package/cli.mjs.map +1 -0
- package/client/app-types.d.ts +0 -1
- package/client/app-types.js +92 -97
- package/client/app-types.js.map +1 -1
- package/client/app-types.mjs +135 -0
- package/client/app-types.mjs.map +1 -0
- package/client/call-client.d.ts +0 -1
- package/client/call-client.js +145 -143
- package/client/call-client.js.map +1 -1
- package/client/call-client.mjs +320 -0
- package/client/call-client.mjs.map +1 -0
- package/client/call-composer-types.d.ts +0 -1
- package/client/call-composer-types.js +60 -62
- package/client/call-composer-types.js.map +1 -1
- package/client/call-composer-types.mjs +122 -0
- package/client/call-composer-types.mjs.map +1 -0
- package/client/call-composer.d.ts +0 -1
- package/client/call-composer.js +76 -78
- package/client/call-composer.js.map +1 -1
- package/client/call-composer.mjs +128 -0
- package/client/call-composer.mjs.map +1 -0
- package/client/call-factory.d.ts +0 -1
- package/client/call-factory.js +62 -62
- package/client/call-factory.js.map +1 -1
- package/client/call-factory.mjs +121 -0
- package/client/call-factory.mjs.map +1 -0
- package/client/deploy-types.d.ts +1 -2
- package/client/deploy-types.js +42 -40
- package/client/deploy-types.js.map +1 -1
- package/client/deploy-types.mjs +94 -0
- package/client/deploy-types.mjs.map +1 -0
- package/client/generate.d.ts +2 -2
- package/client/generate.js +28 -27
- package/client/generate.js.map +1 -1
- package/client/generate.mjs +36 -0
- package/client/generate.mjs.map +1 -0
- package/client/generator-context.d.ts +7 -2
- package/client/generator-context.js +39 -38
- package/client/generator-context.js.map +1 -1
- package/client/generator-context.mjs +21 -0
- package/client/generator-context.mjs.map +1 -0
- package/client/helpers/get-call-config-summary.d.ts +1 -2
- package/client/helpers/get-call-config-summary.js +8 -25
- package/client/helpers/get-call-config-summary.js.map +1 -1
- package/client/helpers/get-call-config-summary.mjs +55 -0
- package/client/helpers/get-call-config-summary.mjs.map +1 -0
- package/client/helpers/get-equivalent-type.d.ts +0 -1
- package/client/helpers/get-equivalent-type.js +21 -20
- package/client/helpers/get-equivalent-type.js.map +1 -1
- package/client/helpers/get-equivalent-type.mjs +57 -0
- package/client/helpers/get-equivalent-type.mjs.map +1 -0
- package/client/imports.d.ts +0 -1
- package/client/imports.js +4 -4
- package/client/imports.js.map +1 -1
- package/client/imports.mjs +28 -0
- package/client/imports.mjs.map +1 -0
- package/client/utility-types.d.ts +0 -1
- package/client/utility-types.js +27 -25
- package/client/utility-types.js.map +1 -1
- package/client/utility-types.mjs +48 -0
- package/client/utility-types.mjs.map +1 -0
- package/dev.d.ts +0 -1
- package/index.d.ts +0 -1
- package/index.js +14 -12
- package/index.js.map +1 -1
- package/index.mjs +4 -0
- package/index.mjs.map +1 -0
- package/output/writer.d.ts +0 -1
- package/output/writer.js +45 -38
- package/output/writer.js.map +1 -1
- package/output/writer.mjs +140 -0
- package/output/writer.mjs.map +1 -0
- package/package.json +9 -4
- package/schema/application.schema.json.js +375 -0
- package/schema/application.schema.json.js.map +1 -0
- package/schema/application.schema.json.mjs +364 -0
- package/schema/application.schema.json.mjs.map +1 -0
- package/schema/contract.schema.json.js +160 -0
- package/schema/contract.schema.json.js.map +1 -0
- package/schema/contract.schema.json.mjs +149 -0
- package/schema/contract.schema.json.mjs.map +1 -0
- package/schema/load.d.ts +0 -1
- package/schema/load.js +16 -41
- package/schema/load.js.map +1 -1
- package/schema/load.mjs +23 -0
- package/schema/load.mjs.map +1 -0
- package/tests/approval-tests.spec.d.ts +0 -1
- package/tests/util.d.ts +1 -0
- package/util/boom.d.ts +0 -1
- package/util/boom.js +4 -4
- package/util/boom.js.map +1 -1
- package/util/boom.mjs +6 -0
- package/util/boom.mjs.map +1 -0
- package/util/color-console.d.ts +0 -1
- package/util/color-console.js +12 -13
- package/util/color-console.js.map +1 -1
- package/util/color-console.mjs +17 -0
- package/util/color-console.mjs.map +1 -0
- package/util/not-falsy.d.ts +0 -1
- package/util/sanitization.d.ts +12 -6
- package/util/sanitization.js +54 -15
- package/util/sanitization.js.map +1 -1
- package/util/sanitization.mjs +54 -0
- package/util/sanitization.mjs.map +1 -0
- package/bin/cli.js +0 -4
- package/cli.d.ts.map +0 -1
- package/client/app-types.d.ts.map +0 -1
- package/client/call-client.d.ts.map +0 -1
- package/client/call-composer-types.d.ts.map +0 -1
- package/client/call-composer.d.ts.map +0 -1
- package/client/call-factory.d.ts.map +0 -1
- package/client/deploy-types.d.ts.map +0 -1
- package/client/generate.d.ts.map +0 -1
- package/client/generator-context.d.ts.map +0 -1
- package/client/helpers/get-call-config-summary.d.ts.map +0 -1
- package/client/helpers/get-equivalent-type.d.ts.map +0 -1
- package/client/imports.d.ts.map +0 -1
- package/client/utility-types.d.ts.map +0 -1
- package/dev.d.ts.map +0 -1
- package/dev.js +0 -5
- package/dev.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/output/writer.d.ts.map +0 -1
- package/schema/application.schema.json +0 -354
- package/schema/contract.schema.json +0 -139
- package/schema/load.d.ts.map +0 -1
- package/tests/approval-tests.spec.d.ts.map +0 -1
- package/tests/approval-tests.spec.js +0 -24
- package/tests/approval-tests.spec.js.map +0 -1
- package/util/boom.d.ts.map +0 -1
- package/util/color-console.d.ts.map +0 -1
- package/util/not-falsy.d.ts.map +0 -1
- package/util/not-falsy.js +0 -6
- package/util/not-falsy.js.map +0 -1
- package/util/sanitization.d.ts.map +0 -1
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var $schema = "http://json-schema.org/draft-07/schema";
|
|
6
|
+
var title = "AlgoAppSpec";
|
|
7
|
+
var type = "object";
|
|
8
|
+
var required = [
|
|
9
|
+
"contract",
|
|
10
|
+
"schema",
|
|
11
|
+
"source",
|
|
12
|
+
"state"
|
|
13
|
+
];
|
|
14
|
+
var additionalProperties = true;
|
|
15
|
+
var properties = {
|
|
16
|
+
hints: {
|
|
17
|
+
type: "object",
|
|
18
|
+
additionalProperties: {
|
|
19
|
+
$ref: "#/definitions/Hint"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
source: {
|
|
23
|
+
$ref: "#/definitions/AppSources"
|
|
24
|
+
},
|
|
25
|
+
contract: {
|
|
26
|
+
$ref: "contract.schema.json"
|
|
27
|
+
},
|
|
28
|
+
schema: {
|
|
29
|
+
$ref: "#/definitions/SchemaSpec"
|
|
30
|
+
},
|
|
31
|
+
state: {
|
|
32
|
+
$ref: "#/definitions/StateSchemaSpec"
|
|
33
|
+
},
|
|
34
|
+
bare_call_config: {
|
|
35
|
+
$ref: "#/definitions/CallConfig"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var definitions = {
|
|
39
|
+
AVMType: {
|
|
40
|
+
description: "AVM data type",
|
|
41
|
+
"enum": [
|
|
42
|
+
"uint64",
|
|
43
|
+
"bytes"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
DeclaredSchemaValueSpec: {
|
|
47
|
+
type: "object",
|
|
48
|
+
required: [
|
|
49
|
+
"type",
|
|
50
|
+
"key"
|
|
51
|
+
],
|
|
52
|
+
additionalProperties: true,
|
|
53
|
+
properties: {
|
|
54
|
+
type: {
|
|
55
|
+
description: "The type of the value",
|
|
56
|
+
$ref: "#/definitions/AVMType"
|
|
57
|
+
},
|
|
58
|
+
key: {
|
|
59
|
+
description: "The name of the key",
|
|
60
|
+
type: "string"
|
|
61
|
+
},
|
|
62
|
+
descr: {
|
|
63
|
+
description: "A description of the variable",
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
"static": {
|
|
67
|
+
description: "Whether the value is set statically (at create time only) or dynamically",
|
|
68
|
+
type: "boolean"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
ReservedSchemaValueSpec: {
|
|
73
|
+
type: "object",
|
|
74
|
+
required: [
|
|
75
|
+
"type"
|
|
76
|
+
],
|
|
77
|
+
properties: {
|
|
78
|
+
type: {
|
|
79
|
+
description: "The type of the value",
|
|
80
|
+
$ref: "#/definitions/AVMType"
|
|
81
|
+
},
|
|
82
|
+
descr: {
|
|
83
|
+
description: "A description of the variable",
|
|
84
|
+
type: "string"
|
|
85
|
+
},
|
|
86
|
+
max_keys: {
|
|
87
|
+
description: "The maximum number of slots to reserve",
|
|
88
|
+
type: "integer"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
StateSchemaSpec: {
|
|
93
|
+
type: "object",
|
|
94
|
+
additionalProperties: true,
|
|
95
|
+
required: [
|
|
96
|
+
"global",
|
|
97
|
+
"local"
|
|
98
|
+
],
|
|
99
|
+
properties: {
|
|
100
|
+
global: {
|
|
101
|
+
$ref: "#/definitions/StateSchema"
|
|
102
|
+
},
|
|
103
|
+
local: {
|
|
104
|
+
$ref: "#/definitions/StateSchema"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
StateSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
additionalProperties: true,
|
|
111
|
+
required: [
|
|
112
|
+
"num_byte_slices",
|
|
113
|
+
"num_uints"
|
|
114
|
+
],
|
|
115
|
+
properties: {
|
|
116
|
+
num_uints: {
|
|
117
|
+
type: "integer"
|
|
118
|
+
},
|
|
119
|
+
num_byte_slices: {
|
|
120
|
+
type: "integer"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
SchemaSpec: {
|
|
125
|
+
description: "The schema for global and local storage",
|
|
126
|
+
type: "object",
|
|
127
|
+
additionalProperties: true,
|
|
128
|
+
properties: {
|
|
129
|
+
global: {
|
|
130
|
+
$ref: "#/definitions/Schema"
|
|
131
|
+
},
|
|
132
|
+
local: {
|
|
133
|
+
$ref: "#/definitions/Schema"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
Schema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
additionalProperties: true,
|
|
140
|
+
properties: {
|
|
141
|
+
declared: {
|
|
142
|
+
type: "object",
|
|
143
|
+
additionalProperties: {
|
|
144
|
+
$ref: "#/definitions/DeclaredSchemaValueSpec"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
reserved: {
|
|
148
|
+
type: "object",
|
|
149
|
+
additionalProperties: {
|
|
150
|
+
$ref: "#/definitions/ReservedSchemaValueSpec"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
AppSources: {
|
|
156
|
+
type: "object",
|
|
157
|
+
additionalProperties: true,
|
|
158
|
+
properties: {
|
|
159
|
+
approval: {
|
|
160
|
+
type: "string"
|
|
161
|
+
},
|
|
162
|
+
clear: {
|
|
163
|
+
type: "string"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
Hint: {
|
|
168
|
+
type: "object",
|
|
169
|
+
additionalProperties: true,
|
|
170
|
+
properties: {
|
|
171
|
+
read_only: {
|
|
172
|
+
type: "boolean"
|
|
173
|
+
},
|
|
174
|
+
structs: {
|
|
175
|
+
type: "object",
|
|
176
|
+
properties: {
|
|
177
|
+
output: {
|
|
178
|
+
$ref: "#/definitions/Struct"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
additionalProperties: {
|
|
182
|
+
$ref: "#/definitions/Struct"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
default_arguments: {
|
|
186
|
+
additionalProperties: {
|
|
187
|
+
$ref: "#/definitions/DefaultArgument"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
call_config: {
|
|
191
|
+
$ref: "#/definitions/CallConfig"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
CallConfig: {
|
|
196
|
+
type: "object",
|
|
197
|
+
additionalProperties: false,
|
|
198
|
+
properties: {
|
|
199
|
+
no_op: {
|
|
200
|
+
$ref: "#/definitions/CallConfigValue"
|
|
201
|
+
},
|
|
202
|
+
opt_in: {
|
|
203
|
+
$ref: "#/definitions/CallConfigValue"
|
|
204
|
+
},
|
|
205
|
+
close_out: {
|
|
206
|
+
$ref: "#/definitions/CallConfigValue"
|
|
207
|
+
},
|
|
208
|
+
update_application: {
|
|
209
|
+
$ref: "#/definitions/CallConfigValue"
|
|
210
|
+
},
|
|
211
|
+
delete_application: {
|
|
212
|
+
$ref: "#/definitions/CallConfigValue"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
CallConfigValue: {
|
|
217
|
+
"enum": [
|
|
218
|
+
"NEVER",
|
|
219
|
+
"CALL",
|
|
220
|
+
"CREATE",
|
|
221
|
+
"ALL"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
Struct: {
|
|
225
|
+
type: "object",
|
|
226
|
+
additionalProperties: true,
|
|
227
|
+
required: [
|
|
228
|
+
"name",
|
|
229
|
+
"elements"
|
|
230
|
+
],
|
|
231
|
+
properties: {
|
|
232
|
+
name: {
|
|
233
|
+
type: "string"
|
|
234
|
+
},
|
|
235
|
+
elements: {
|
|
236
|
+
type: "array",
|
|
237
|
+
items: {
|
|
238
|
+
$ref: "#/definitions/StructElement"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
FieldName: {
|
|
244
|
+
type: "string"
|
|
245
|
+
},
|
|
246
|
+
ABIType: {
|
|
247
|
+
type: "string"
|
|
248
|
+
},
|
|
249
|
+
StructElement: {
|
|
250
|
+
type: "array",
|
|
251
|
+
minItems: 2,
|
|
252
|
+
items: [
|
|
253
|
+
{
|
|
254
|
+
$ref: "#/definitions/FieldName"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
$ref: "#/definitions/ABIType"
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
DefaultArgument: {
|
|
262
|
+
description: "Defines a strategy for obtaining a default value for a given ABI arg.",
|
|
263
|
+
oneOf: [
|
|
264
|
+
{
|
|
265
|
+
type: "object",
|
|
266
|
+
required: [
|
|
267
|
+
"source",
|
|
268
|
+
"data"
|
|
269
|
+
],
|
|
270
|
+
additionalProperties: true,
|
|
271
|
+
properties: {
|
|
272
|
+
source: {
|
|
273
|
+
description: "The default value should be fetched by invoking an ABI method",
|
|
274
|
+
"enum": [
|
|
275
|
+
"abi-method"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
data: {
|
|
279
|
+
description: "The contract of the ABI method to invoke.",
|
|
280
|
+
$ref: "contract.schema.json#/definitions/ContractMethod"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: "object",
|
|
286
|
+
required: [
|
|
287
|
+
"source",
|
|
288
|
+
"data"
|
|
289
|
+
],
|
|
290
|
+
additionalProperties: true,
|
|
291
|
+
properties: {
|
|
292
|
+
source: {
|
|
293
|
+
description: "The default value should be fetched from global state",
|
|
294
|
+
"enum": [
|
|
295
|
+
"global-state"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
data: {
|
|
299
|
+
description: "The key of the state variable",
|
|
300
|
+
type: "string"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
type: "object",
|
|
306
|
+
required: [
|
|
307
|
+
"source",
|
|
308
|
+
"data"
|
|
309
|
+
],
|
|
310
|
+
additionalProperties: true,
|
|
311
|
+
properties: {
|
|
312
|
+
source: {
|
|
313
|
+
description: "The default value should be fetched from the local state of the sender user",
|
|
314
|
+
"enum": [
|
|
315
|
+
"local-state"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
data: {
|
|
319
|
+
description: "The key of the state variable",
|
|
320
|
+
type: "string"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
type: "object",
|
|
326
|
+
required: [
|
|
327
|
+
"source",
|
|
328
|
+
"data"
|
|
329
|
+
],
|
|
330
|
+
additionalProperties: true,
|
|
331
|
+
properties: {
|
|
332
|
+
source: {
|
|
333
|
+
description: "The default value is a constant.",
|
|
334
|
+
"enum": [
|
|
335
|
+
"constant"
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
data: {
|
|
339
|
+
description: "The static default value to use.",
|
|
340
|
+
anyOf: [
|
|
341
|
+
{
|
|
342
|
+
type: "string"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
type: "number"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
type: "integer"
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
var appJsonSchema = {
|
|
358
|
+
$schema: $schema,
|
|
359
|
+
title: title,
|
|
360
|
+
type: type,
|
|
361
|
+
required: required,
|
|
362
|
+
additionalProperties: additionalProperties,
|
|
363
|
+
properties: properties,
|
|
364
|
+
definitions: definitions
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
exports.$schema = $schema;
|
|
368
|
+
exports.additionalProperties = additionalProperties;
|
|
369
|
+
exports.default = appJsonSchema;
|
|
370
|
+
exports.definitions = definitions;
|
|
371
|
+
exports.properties = properties;
|
|
372
|
+
exports.required = required;
|
|
373
|
+
exports.title = title;
|
|
374
|
+
exports.type = type;
|
|
375
|
+
//# sourceMappingURL=application.schema.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.schema.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
var $schema = "http://json-schema.org/draft-07/schema";
|
|
2
|
+
var title = "AlgoAppSpec";
|
|
3
|
+
var type = "object";
|
|
4
|
+
var required = [
|
|
5
|
+
"contract",
|
|
6
|
+
"schema",
|
|
7
|
+
"source",
|
|
8
|
+
"state"
|
|
9
|
+
];
|
|
10
|
+
var additionalProperties = true;
|
|
11
|
+
var properties = {
|
|
12
|
+
hints: {
|
|
13
|
+
type: "object",
|
|
14
|
+
additionalProperties: {
|
|
15
|
+
$ref: "#/definitions/Hint"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
source: {
|
|
19
|
+
$ref: "#/definitions/AppSources"
|
|
20
|
+
},
|
|
21
|
+
contract: {
|
|
22
|
+
$ref: "contract.schema.json"
|
|
23
|
+
},
|
|
24
|
+
schema: {
|
|
25
|
+
$ref: "#/definitions/SchemaSpec"
|
|
26
|
+
},
|
|
27
|
+
state: {
|
|
28
|
+
$ref: "#/definitions/StateSchemaSpec"
|
|
29
|
+
},
|
|
30
|
+
bare_call_config: {
|
|
31
|
+
$ref: "#/definitions/CallConfig"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var definitions = {
|
|
35
|
+
AVMType: {
|
|
36
|
+
description: "AVM data type",
|
|
37
|
+
"enum": [
|
|
38
|
+
"uint64",
|
|
39
|
+
"bytes"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
DeclaredSchemaValueSpec: {
|
|
43
|
+
type: "object",
|
|
44
|
+
required: [
|
|
45
|
+
"type",
|
|
46
|
+
"key"
|
|
47
|
+
],
|
|
48
|
+
additionalProperties: true,
|
|
49
|
+
properties: {
|
|
50
|
+
type: {
|
|
51
|
+
description: "The type of the value",
|
|
52
|
+
$ref: "#/definitions/AVMType"
|
|
53
|
+
},
|
|
54
|
+
key: {
|
|
55
|
+
description: "The name of the key",
|
|
56
|
+
type: "string"
|
|
57
|
+
},
|
|
58
|
+
descr: {
|
|
59
|
+
description: "A description of the variable",
|
|
60
|
+
type: "string"
|
|
61
|
+
},
|
|
62
|
+
"static": {
|
|
63
|
+
description: "Whether the value is set statically (at create time only) or dynamically",
|
|
64
|
+
type: "boolean"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
ReservedSchemaValueSpec: {
|
|
69
|
+
type: "object",
|
|
70
|
+
required: [
|
|
71
|
+
"type"
|
|
72
|
+
],
|
|
73
|
+
properties: {
|
|
74
|
+
type: {
|
|
75
|
+
description: "The type of the value",
|
|
76
|
+
$ref: "#/definitions/AVMType"
|
|
77
|
+
},
|
|
78
|
+
descr: {
|
|
79
|
+
description: "A description of the variable",
|
|
80
|
+
type: "string"
|
|
81
|
+
},
|
|
82
|
+
max_keys: {
|
|
83
|
+
description: "The maximum number of slots to reserve",
|
|
84
|
+
type: "integer"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
StateSchemaSpec: {
|
|
89
|
+
type: "object",
|
|
90
|
+
additionalProperties: true,
|
|
91
|
+
required: [
|
|
92
|
+
"global",
|
|
93
|
+
"local"
|
|
94
|
+
],
|
|
95
|
+
properties: {
|
|
96
|
+
global: {
|
|
97
|
+
$ref: "#/definitions/StateSchema"
|
|
98
|
+
},
|
|
99
|
+
local: {
|
|
100
|
+
$ref: "#/definitions/StateSchema"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
StateSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
additionalProperties: true,
|
|
107
|
+
required: [
|
|
108
|
+
"num_byte_slices",
|
|
109
|
+
"num_uints"
|
|
110
|
+
],
|
|
111
|
+
properties: {
|
|
112
|
+
num_uints: {
|
|
113
|
+
type: "integer"
|
|
114
|
+
},
|
|
115
|
+
num_byte_slices: {
|
|
116
|
+
type: "integer"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
SchemaSpec: {
|
|
121
|
+
description: "The schema for global and local storage",
|
|
122
|
+
type: "object",
|
|
123
|
+
additionalProperties: true,
|
|
124
|
+
properties: {
|
|
125
|
+
global: {
|
|
126
|
+
$ref: "#/definitions/Schema"
|
|
127
|
+
},
|
|
128
|
+
local: {
|
|
129
|
+
$ref: "#/definitions/Schema"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
Schema: {
|
|
134
|
+
type: "object",
|
|
135
|
+
additionalProperties: true,
|
|
136
|
+
properties: {
|
|
137
|
+
declared: {
|
|
138
|
+
type: "object",
|
|
139
|
+
additionalProperties: {
|
|
140
|
+
$ref: "#/definitions/DeclaredSchemaValueSpec"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
reserved: {
|
|
144
|
+
type: "object",
|
|
145
|
+
additionalProperties: {
|
|
146
|
+
$ref: "#/definitions/ReservedSchemaValueSpec"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
AppSources: {
|
|
152
|
+
type: "object",
|
|
153
|
+
additionalProperties: true,
|
|
154
|
+
properties: {
|
|
155
|
+
approval: {
|
|
156
|
+
type: "string"
|
|
157
|
+
},
|
|
158
|
+
clear: {
|
|
159
|
+
type: "string"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
Hint: {
|
|
164
|
+
type: "object",
|
|
165
|
+
additionalProperties: true,
|
|
166
|
+
properties: {
|
|
167
|
+
read_only: {
|
|
168
|
+
type: "boolean"
|
|
169
|
+
},
|
|
170
|
+
structs: {
|
|
171
|
+
type: "object",
|
|
172
|
+
properties: {
|
|
173
|
+
output: {
|
|
174
|
+
$ref: "#/definitions/Struct"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
additionalProperties: {
|
|
178
|
+
$ref: "#/definitions/Struct"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
default_arguments: {
|
|
182
|
+
additionalProperties: {
|
|
183
|
+
$ref: "#/definitions/DefaultArgument"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
call_config: {
|
|
187
|
+
$ref: "#/definitions/CallConfig"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
CallConfig: {
|
|
192
|
+
type: "object",
|
|
193
|
+
additionalProperties: false,
|
|
194
|
+
properties: {
|
|
195
|
+
no_op: {
|
|
196
|
+
$ref: "#/definitions/CallConfigValue"
|
|
197
|
+
},
|
|
198
|
+
opt_in: {
|
|
199
|
+
$ref: "#/definitions/CallConfigValue"
|
|
200
|
+
},
|
|
201
|
+
close_out: {
|
|
202
|
+
$ref: "#/definitions/CallConfigValue"
|
|
203
|
+
},
|
|
204
|
+
update_application: {
|
|
205
|
+
$ref: "#/definitions/CallConfigValue"
|
|
206
|
+
},
|
|
207
|
+
delete_application: {
|
|
208
|
+
$ref: "#/definitions/CallConfigValue"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
CallConfigValue: {
|
|
213
|
+
"enum": [
|
|
214
|
+
"NEVER",
|
|
215
|
+
"CALL",
|
|
216
|
+
"CREATE",
|
|
217
|
+
"ALL"
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
Struct: {
|
|
221
|
+
type: "object",
|
|
222
|
+
additionalProperties: true,
|
|
223
|
+
required: [
|
|
224
|
+
"name",
|
|
225
|
+
"elements"
|
|
226
|
+
],
|
|
227
|
+
properties: {
|
|
228
|
+
name: {
|
|
229
|
+
type: "string"
|
|
230
|
+
},
|
|
231
|
+
elements: {
|
|
232
|
+
type: "array",
|
|
233
|
+
items: {
|
|
234
|
+
$ref: "#/definitions/StructElement"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
FieldName: {
|
|
240
|
+
type: "string"
|
|
241
|
+
},
|
|
242
|
+
ABIType: {
|
|
243
|
+
type: "string"
|
|
244
|
+
},
|
|
245
|
+
StructElement: {
|
|
246
|
+
type: "array",
|
|
247
|
+
minItems: 2,
|
|
248
|
+
items: [
|
|
249
|
+
{
|
|
250
|
+
$ref: "#/definitions/FieldName"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
$ref: "#/definitions/ABIType"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
DefaultArgument: {
|
|
258
|
+
description: "Defines a strategy for obtaining a default value for a given ABI arg.",
|
|
259
|
+
oneOf: [
|
|
260
|
+
{
|
|
261
|
+
type: "object",
|
|
262
|
+
required: [
|
|
263
|
+
"source",
|
|
264
|
+
"data"
|
|
265
|
+
],
|
|
266
|
+
additionalProperties: true,
|
|
267
|
+
properties: {
|
|
268
|
+
source: {
|
|
269
|
+
description: "The default value should be fetched by invoking an ABI method",
|
|
270
|
+
"enum": [
|
|
271
|
+
"abi-method"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
data: {
|
|
275
|
+
description: "The contract of the ABI method to invoke.",
|
|
276
|
+
$ref: "contract.schema.json#/definitions/ContractMethod"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
type: "object",
|
|
282
|
+
required: [
|
|
283
|
+
"source",
|
|
284
|
+
"data"
|
|
285
|
+
],
|
|
286
|
+
additionalProperties: true,
|
|
287
|
+
properties: {
|
|
288
|
+
source: {
|
|
289
|
+
description: "The default value should be fetched from global state",
|
|
290
|
+
"enum": [
|
|
291
|
+
"global-state"
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
data: {
|
|
295
|
+
description: "The key of the state variable",
|
|
296
|
+
type: "string"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
type: "object",
|
|
302
|
+
required: [
|
|
303
|
+
"source",
|
|
304
|
+
"data"
|
|
305
|
+
],
|
|
306
|
+
additionalProperties: true,
|
|
307
|
+
properties: {
|
|
308
|
+
source: {
|
|
309
|
+
description: "The default value should be fetched from the local state of the sender user",
|
|
310
|
+
"enum": [
|
|
311
|
+
"local-state"
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
data: {
|
|
315
|
+
description: "The key of the state variable",
|
|
316
|
+
type: "string"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
type: "object",
|
|
322
|
+
required: [
|
|
323
|
+
"source",
|
|
324
|
+
"data"
|
|
325
|
+
],
|
|
326
|
+
additionalProperties: true,
|
|
327
|
+
properties: {
|
|
328
|
+
source: {
|
|
329
|
+
description: "The default value is a constant.",
|
|
330
|
+
"enum": [
|
|
331
|
+
"constant"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
data: {
|
|
335
|
+
description: "The static default value to use.",
|
|
336
|
+
anyOf: [
|
|
337
|
+
{
|
|
338
|
+
type: "string"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: "number"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
type: "integer"
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
var appJsonSchema = {
|
|
354
|
+
$schema: $schema,
|
|
355
|
+
title: title,
|
|
356
|
+
type: type,
|
|
357
|
+
required: required,
|
|
358
|
+
additionalProperties: additionalProperties,
|
|
359
|
+
properties: properties,
|
|
360
|
+
definitions: definitions
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
export { $schema, additionalProperties, appJsonSchema as default, definitions, properties, required, title, type };
|
|
364
|
+
//# sourceMappingURL=application.schema.json.mjs.map
|