@algorandfoundation/algokit-client-generator 4.0.0-beta.5 → 4.0.0-beta.7
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/client/app-client.js +15 -0
- package/client/app-client.js.map +1 -1
- package/client/app-client.mjs +15 -0
- package/client/app-client.mjs.map +1 -1
- package/client/app-types.js +26 -84
- package/client/app-types.js.map +1 -1
- package/client/app-types.mjs +27 -85
- package/client/app-types.mjs.map +1 -1
- package/client/imports.js +1 -0
- package/client/imports.js.map +1 -1
- package/client/imports.mjs +1 -0
- package/client/imports.mjs.map +1 -1
- package/client/params-factory.js +1 -1
- package/client/params-factory.js.map +1 -1
- package/client/params-factory.mjs +1 -1
- package/client/params-factory.mjs.map +1 -1
- package/package.json +3 -3
- package/schema/arc56.schema.json.js +353 -555
- package/schema/arc56.schema.json.js.map +1 -1
- package/schema/arc56.schema.json.mjs +351 -555
- package/schema/arc56.schema.json.mjs.map +1 -1
- package/util/sanitization.js +12 -7
- package/util/sanitization.js.map +1 -1
- package/util/sanitization.mjs +12 -7
- package/util/sanitization.mjs.map +1 -1
|
@@ -1,415 +1,6 @@
|
|
|
1
|
-
var $ref = "#/definitions/Arc56Contract";
|
|
2
1
|
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
3
2
|
var definitions = {
|
|
4
|
-
ABIType: {
|
|
5
|
-
description: "An ABI-encoded type",
|
|
6
|
-
type: "string"
|
|
7
|
-
},
|
|
8
|
-
AVMBytes: {
|
|
9
|
-
"const": "AVMBytes",
|
|
10
|
-
description: "Raw byteslice without the length prefixed that is specified in ARC-4",
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
AVMString: {
|
|
14
|
-
"const": "AVMString",
|
|
15
|
-
description: "A utf-8 string without the length prefix that is specified in ARC-4",
|
|
16
|
-
type: "string"
|
|
17
|
-
},
|
|
18
|
-
AVMType: {
|
|
19
|
-
anyOf: [
|
|
20
|
-
{
|
|
21
|
-
$ref: "#/definitions/AVMBytes"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
$ref: "#/definitions/AVMString"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
$ref: "#/definitions/AVMUint64"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
description: "A native AVM type"
|
|
31
|
-
},
|
|
32
|
-
AVMUint64: {
|
|
33
|
-
"const": "AVMUint64",
|
|
34
|
-
description: "A 64-bit unsigned integer",
|
|
35
|
-
type: "string"
|
|
36
|
-
},
|
|
37
|
-
Arc56Contract: {
|
|
38
|
-
description: "Describes the entire contract. This interface is an extension of the interface described in ARC-4",
|
|
39
|
-
properties: {
|
|
40
|
-
arcs: {
|
|
41
|
-
description: "The ARCs used and/or supported by this contract. All contracts implicity support ARC4 and ARC56",
|
|
42
|
-
items: {
|
|
43
|
-
type: "number"
|
|
44
|
-
},
|
|
45
|
-
type: "array"
|
|
46
|
-
},
|
|
47
|
-
bareActions: {
|
|
48
|
-
description: "Supported bare actions for the contract. An action is a combination of call/create and an OnComplete",
|
|
49
|
-
properties: {
|
|
50
|
-
call: {
|
|
51
|
-
description: "OnCompletes this method allows when appID !== 0",
|
|
52
|
-
items: {
|
|
53
|
-
"enum": [
|
|
54
|
-
"NoOp",
|
|
55
|
-
"OptIn",
|
|
56
|
-
"CloseOut",
|
|
57
|
-
"ClearState",
|
|
58
|
-
"UpdateApplication",
|
|
59
|
-
"DeleteApplication"
|
|
60
|
-
],
|
|
61
|
-
type: "string"
|
|
62
|
-
},
|
|
63
|
-
type: "array"
|
|
64
|
-
},
|
|
65
|
-
create: {
|
|
66
|
-
description: "OnCompletes this method allows when appID === 0",
|
|
67
|
-
items: {
|
|
68
|
-
"enum": [
|
|
69
|
-
"NoOp",
|
|
70
|
-
"OptIn",
|
|
71
|
-
"DeleteApplication"
|
|
72
|
-
],
|
|
73
|
-
type: "string"
|
|
74
|
-
},
|
|
75
|
-
type: "array"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
required: [
|
|
79
|
-
"create",
|
|
80
|
-
"call"
|
|
81
|
-
],
|
|
82
|
-
type: "object"
|
|
83
|
-
},
|
|
84
|
-
byteCode: {
|
|
85
|
-
description: "The compiled bytecode for the application. MUST be omitted if included as part of ARC23",
|
|
86
|
-
properties: {
|
|
87
|
-
approval: {
|
|
88
|
-
description: "The approval program",
|
|
89
|
-
type: "string"
|
|
90
|
-
},
|
|
91
|
-
clear: {
|
|
92
|
-
description: "The clear program",
|
|
93
|
-
type: "string"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
required: [
|
|
97
|
-
"approval",
|
|
98
|
-
"clear"
|
|
99
|
-
],
|
|
100
|
-
type: "object"
|
|
101
|
-
},
|
|
102
|
-
compilerInfo: {
|
|
103
|
-
description: "Information used to get the given byteCode and/or PC values in sourceInfo. MUST be given if byteCode or PC values are present",
|
|
104
|
-
properties: {
|
|
105
|
-
compiler: {
|
|
106
|
-
description: "The name of the compiler",
|
|
107
|
-
"enum": [
|
|
108
|
-
"algod",
|
|
109
|
-
"puya"
|
|
110
|
-
],
|
|
111
|
-
type: "string"
|
|
112
|
-
},
|
|
113
|
-
compilerVersion: {
|
|
114
|
-
description: "Compiler version information",
|
|
115
|
-
properties: {
|
|
116
|
-
commitHash: {
|
|
117
|
-
type: "string"
|
|
118
|
-
},
|
|
119
|
-
major: {
|
|
120
|
-
type: "number"
|
|
121
|
-
},
|
|
122
|
-
minor: {
|
|
123
|
-
type: "number"
|
|
124
|
-
},
|
|
125
|
-
patch: {
|
|
126
|
-
type: "number"
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
required: [
|
|
130
|
-
"major",
|
|
131
|
-
"minor",
|
|
132
|
-
"patch"
|
|
133
|
-
],
|
|
134
|
-
type: "object"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
required: [
|
|
138
|
-
"compiler",
|
|
139
|
-
"compilerVersion"
|
|
140
|
-
],
|
|
141
|
-
type: "object"
|
|
142
|
-
},
|
|
143
|
-
desc: {
|
|
144
|
-
description: "Optional, user-friendly description for the interface",
|
|
145
|
-
type: "string"
|
|
146
|
-
},
|
|
147
|
-
events: {
|
|
148
|
-
description: "ARC-28 events that MAY be emitted by this contract",
|
|
149
|
-
items: {
|
|
150
|
-
$ref: "#/definitions/Event"
|
|
151
|
-
},
|
|
152
|
-
type: "array"
|
|
153
|
-
},
|
|
154
|
-
methods: {
|
|
155
|
-
description: "All of the methods that the contract implements",
|
|
156
|
-
items: {
|
|
157
|
-
$ref: "#/definitions/Method"
|
|
158
|
-
},
|
|
159
|
-
type: "array"
|
|
160
|
-
},
|
|
161
|
-
name: {
|
|
162
|
-
description: "A user-friendly name for the contract",
|
|
163
|
-
type: "string"
|
|
164
|
-
},
|
|
165
|
-
networks: {
|
|
166
|
-
additionalProperties: {
|
|
167
|
-
properties: {
|
|
168
|
-
appID: {
|
|
169
|
-
description: "The app ID of the deployed contract in this network",
|
|
170
|
-
type: "number"
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
required: [
|
|
174
|
-
"appID"
|
|
175
|
-
],
|
|
176
|
-
type: "object"
|
|
177
|
-
},
|
|
178
|
-
description: "Optional object listing the contract instances across different networks. The key is the base64 genesis hash of the network, and the value contains information about the deployed contract in the network indicated by the key. A key containing the human-readable name of the network MAY be included, but the corresponding genesis hash key MUST also be define",
|
|
179
|
-
type: "object"
|
|
180
|
-
},
|
|
181
|
-
scratchVariables: {
|
|
182
|
-
additionalProperties: {
|
|
183
|
-
properties: {
|
|
184
|
-
slot: {
|
|
185
|
-
type: "number"
|
|
186
|
-
},
|
|
187
|
-
type: {
|
|
188
|
-
anyOf: [
|
|
189
|
-
{
|
|
190
|
-
$ref: "#/definitions/ABIType"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
$ref: "#/definitions/AVMType"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
$ref: "#/definitions/StructName"
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
required: [
|
|
202
|
-
"slot",
|
|
203
|
-
"type"
|
|
204
|
-
],
|
|
205
|
-
type: "object"
|
|
206
|
-
},
|
|
207
|
-
description: "The scratch variables used during runtime",
|
|
208
|
-
type: "object"
|
|
209
|
-
},
|
|
210
|
-
source: {
|
|
211
|
-
description: "The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23",
|
|
212
|
-
properties: {
|
|
213
|
-
approval: {
|
|
214
|
-
description: "The approval program",
|
|
215
|
-
type: "string"
|
|
216
|
-
},
|
|
217
|
-
clear: {
|
|
218
|
-
description: "The clear program",
|
|
219
|
-
type: "string"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
required: [
|
|
223
|
-
"approval",
|
|
224
|
-
"clear"
|
|
225
|
-
],
|
|
226
|
-
type: "object"
|
|
227
|
-
},
|
|
228
|
-
sourceInfo: {
|
|
229
|
-
description: "Information about the TEAL programs",
|
|
230
|
-
properties: {
|
|
231
|
-
approval: {
|
|
232
|
-
description: "Approval program information",
|
|
233
|
-
items: {
|
|
234
|
-
$ref: "#/definitions/SourceInfo"
|
|
235
|
-
},
|
|
236
|
-
type: "array"
|
|
237
|
-
},
|
|
238
|
-
clear: {
|
|
239
|
-
description: "Clear program information",
|
|
240
|
-
items: {
|
|
241
|
-
$ref: "#/definitions/SourceInfo"
|
|
242
|
-
},
|
|
243
|
-
type: "array"
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
required: [
|
|
247
|
-
"approval",
|
|
248
|
-
"clear"
|
|
249
|
-
],
|
|
250
|
-
type: "object"
|
|
251
|
-
},
|
|
252
|
-
state: {
|
|
253
|
-
properties: {
|
|
254
|
-
keys: {
|
|
255
|
-
description: "Mapping of human-readable names to StorageKey objects",
|
|
256
|
-
properties: {
|
|
257
|
-
box: {
|
|
258
|
-
additionalProperties: {
|
|
259
|
-
$ref: "#/definitions/StorageKey"
|
|
260
|
-
},
|
|
261
|
-
type: "object"
|
|
262
|
-
},
|
|
263
|
-
global: {
|
|
264
|
-
additionalProperties: {
|
|
265
|
-
$ref: "#/definitions/StorageKey"
|
|
266
|
-
},
|
|
267
|
-
type: "object"
|
|
268
|
-
},
|
|
269
|
-
local: {
|
|
270
|
-
additionalProperties: {
|
|
271
|
-
$ref: "#/definitions/StorageKey"
|
|
272
|
-
},
|
|
273
|
-
type: "object"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
required: [
|
|
277
|
-
"global",
|
|
278
|
-
"local",
|
|
279
|
-
"box"
|
|
280
|
-
],
|
|
281
|
-
type: "object"
|
|
282
|
-
},
|
|
283
|
-
maps: {
|
|
284
|
-
description: "Mapping of human-readable names to StorageMap objects",
|
|
285
|
-
properties: {
|
|
286
|
-
box: {
|
|
287
|
-
additionalProperties: {
|
|
288
|
-
$ref: "#/definitions/StorageMap"
|
|
289
|
-
},
|
|
290
|
-
type: "object"
|
|
291
|
-
},
|
|
292
|
-
global: {
|
|
293
|
-
additionalProperties: {
|
|
294
|
-
$ref: "#/definitions/StorageMap"
|
|
295
|
-
},
|
|
296
|
-
type: "object"
|
|
297
|
-
},
|
|
298
|
-
local: {
|
|
299
|
-
additionalProperties: {
|
|
300
|
-
$ref: "#/definitions/StorageMap"
|
|
301
|
-
},
|
|
302
|
-
type: "object"
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
required: [
|
|
306
|
-
"global",
|
|
307
|
-
"local",
|
|
308
|
-
"box"
|
|
309
|
-
],
|
|
310
|
-
type: "object"
|
|
311
|
-
},
|
|
312
|
-
schema: {
|
|
313
|
-
description: "Defines the values that should be used for GlobalNumUint, GlobalNumByteSlice, LocalNumUint, and LocalNumByteSlice when creating the application",
|
|
314
|
-
properties: {
|
|
315
|
-
global: {
|
|
316
|
-
properties: {
|
|
317
|
-
bytes: {
|
|
318
|
-
type: "number"
|
|
319
|
-
},
|
|
320
|
-
ints: {
|
|
321
|
-
type: "number"
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
required: [
|
|
325
|
-
"ints",
|
|
326
|
-
"bytes"
|
|
327
|
-
],
|
|
328
|
-
type: "object"
|
|
329
|
-
},
|
|
330
|
-
local: {
|
|
331
|
-
properties: {
|
|
332
|
-
bytes: {
|
|
333
|
-
type: "number"
|
|
334
|
-
},
|
|
335
|
-
ints: {
|
|
336
|
-
type: "number"
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
required: [
|
|
340
|
-
"ints",
|
|
341
|
-
"bytes"
|
|
342
|
-
],
|
|
343
|
-
type: "object"
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
required: [
|
|
347
|
-
"global",
|
|
348
|
-
"local"
|
|
349
|
-
],
|
|
350
|
-
type: "object"
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
required: [
|
|
354
|
-
"schema",
|
|
355
|
-
"keys",
|
|
356
|
-
"maps"
|
|
357
|
-
],
|
|
358
|
-
type: "object"
|
|
359
|
-
},
|
|
360
|
-
structs: {
|
|
361
|
-
additionalProperties: {
|
|
362
|
-
items: {
|
|
363
|
-
$ref: "#/definitions/StructField"
|
|
364
|
-
},
|
|
365
|
-
type: "array"
|
|
366
|
-
},
|
|
367
|
-
description: "Named structs use by the application. Each struct field appears in the same order as ABI encoding.",
|
|
368
|
-
type: "object"
|
|
369
|
-
},
|
|
370
|
-
templateVariables: {
|
|
371
|
-
additionalProperties: {
|
|
372
|
-
properties: {
|
|
373
|
-
type: {
|
|
374
|
-
anyOf: [
|
|
375
|
-
{
|
|
376
|
-
$ref: "#/definitions/ABIType"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
$ref: "#/definitions/AVMType"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
$ref: "#/definitions/StructName"
|
|
383
|
-
}
|
|
384
|
-
],
|
|
385
|
-
description: "The type of the template variable"
|
|
386
|
-
},
|
|
387
|
-
value: {
|
|
388
|
-
description: "If given, the the base64 encoded value used for the given app/program",
|
|
389
|
-
type: "string"
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
required: [
|
|
393
|
-
"type"
|
|
394
|
-
],
|
|
395
|
-
type: "object"
|
|
396
|
-
},
|
|
397
|
-
description: "A mapping of template variable names as they appear in the teal (not including TMPL_ prefix) to their respecive types and values (if applicable)",
|
|
398
|
-
type: "object"
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
required: [
|
|
402
|
-
"arcs",
|
|
403
|
-
"name",
|
|
404
|
-
"structs",
|
|
405
|
-
"methods",
|
|
406
|
-
"state",
|
|
407
|
-
"bareActions"
|
|
408
|
-
],
|
|
409
|
-
type: "object"
|
|
410
|
-
},
|
|
411
3
|
Event: {
|
|
412
|
-
description: "ARC-28 event",
|
|
413
4
|
properties: {
|
|
414
5
|
args: {
|
|
415
6
|
description: "The arguments of the event, in order",
|
|
@@ -424,17 +15,14 @@ var definitions = {
|
|
|
424
15
|
type: "string"
|
|
425
16
|
},
|
|
426
17
|
struct: {
|
|
427
|
-
|
|
428
|
-
|
|
18
|
+
description: "If the type is a struct, the name of the struct",
|
|
19
|
+
type: "string"
|
|
429
20
|
},
|
|
430
21
|
type: {
|
|
431
|
-
|
|
432
|
-
|
|
22
|
+
description: "The type of the argument. The `struct` field should also be checked to determine if this arg is a struct.",
|
|
23
|
+
type: "string"
|
|
433
24
|
}
|
|
434
25
|
},
|
|
435
|
-
required: [
|
|
436
|
-
"type"
|
|
437
|
-
],
|
|
438
26
|
type: "object"
|
|
439
27
|
},
|
|
440
28
|
type: "array"
|
|
@@ -448,10 +36,6 @@ var definitions = {
|
|
|
448
36
|
type: "string"
|
|
449
37
|
}
|
|
450
38
|
},
|
|
451
|
-
required: [
|
|
452
|
-
"name",
|
|
453
|
-
"args"
|
|
454
|
-
],
|
|
455
39
|
type: "object"
|
|
456
40
|
},
|
|
457
41
|
Method: {
|
|
@@ -464,12 +48,12 @@ var definitions = {
|
|
|
464
48
|
description: "OnCompletes this method allows when appID !== 0",
|
|
465
49
|
items: {
|
|
466
50
|
"enum": [
|
|
51
|
+
"ClearState",
|
|
52
|
+
"CloseOut",
|
|
53
|
+
"DeleteApplication",
|
|
467
54
|
"NoOp",
|
|
468
55
|
"OptIn",
|
|
469
|
-
"
|
|
470
|
-
"ClearState",
|
|
471
|
-
"UpdateApplication",
|
|
472
|
-
"DeleteApplication"
|
|
56
|
+
"UpdateApplication"
|
|
473
57
|
],
|
|
474
58
|
type: "string"
|
|
475
59
|
},
|
|
@@ -479,19 +63,15 @@ var definitions = {
|
|
|
479
63
|
description: "OnCompletes this method allows when appID === 0",
|
|
480
64
|
items: {
|
|
481
65
|
"enum": [
|
|
66
|
+
"DeleteApplication",
|
|
482
67
|
"NoOp",
|
|
483
|
-
"OptIn"
|
|
484
|
-
"DeleteApplication"
|
|
68
|
+
"OptIn"
|
|
485
69
|
],
|
|
486
70
|
type: "string"
|
|
487
71
|
},
|
|
488
72
|
type: "array"
|
|
489
73
|
}
|
|
490
74
|
},
|
|
491
|
-
required: [
|
|
492
|
-
"create",
|
|
493
|
-
"call"
|
|
494
|
-
],
|
|
495
75
|
type: "object"
|
|
496
76
|
},
|
|
497
77
|
args: {
|
|
@@ -502,39 +82,34 @@ var definitions = {
|
|
|
502
82
|
description: "The default value that clients should use.",
|
|
503
83
|
properties: {
|
|
504
84
|
data: {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
85
|
+
anyOf: [
|
|
86
|
+
{
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
properties: {
|
|
89
|
+
},
|
|
90
|
+
type: "number"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "string"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
description: "Base64 encoded bytes or uint64"
|
|
510
97
|
},
|
|
511
98
|
source: {
|
|
512
99
|
description: "Where the default value is coming from\n- box: The data key signifies the box key to read the value from\n- global: The data key signifies the global state key to read the value from\n- local: The data key signifies the local state key to read the value from (for the sender)\n- literal: the value is a literal and should be passed directly as the argument",
|
|
513
100
|
"enum": [
|
|
514
101
|
"box",
|
|
515
102
|
"global",
|
|
516
|
-
"
|
|
517
|
-
"
|
|
103
|
+
"literal",
|
|
104
|
+
"local"
|
|
518
105
|
],
|
|
519
106
|
type: "string"
|
|
520
107
|
},
|
|
521
108
|
type: {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
$ref: "#/definitions/ABIType"
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
$ref: "#/definitions/AVMType"
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
description: "How the data is encoded. This is the encoding for the data provided here, not the arg type"
|
|
109
|
+
description: "How the data is encoded. This is the encoding for the data provided here, not the arg type",
|
|
110
|
+
type: "string"
|
|
531
111
|
}
|
|
532
112
|
},
|
|
533
|
-
required: [
|
|
534
|
-
"data",
|
|
535
|
-
"type",
|
|
536
|
-
"source"
|
|
537
|
-
],
|
|
538
113
|
type: "object"
|
|
539
114
|
},
|
|
540
115
|
desc: {
|
|
@@ -546,17 +121,14 @@ var definitions = {
|
|
|
546
121
|
type: "string"
|
|
547
122
|
},
|
|
548
123
|
struct: {
|
|
549
|
-
|
|
550
|
-
|
|
124
|
+
description: "If the type is a struct, the name of the struct",
|
|
125
|
+
type: "string"
|
|
551
126
|
},
|
|
552
127
|
type: {
|
|
553
|
-
|
|
554
|
-
|
|
128
|
+
description: "The type of the argument. The `struct` field should also be checked to determine if this arg is a struct.",
|
|
129
|
+
type: "string"
|
|
555
130
|
}
|
|
556
131
|
},
|
|
557
|
-
required: [
|
|
558
|
-
"type"
|
|
559
|
-
],
|
|
560
132
|
type: "object"
|
|
561
133
|
},
|
|
562
134
|
type: "array"
|
|
@@ -624,11 +196,6 @@ var definitions = {
|
|
|
624
196
|
type: "number"
|
|
625
197
|
}
|
|
626
198
|
},
|
|
627
|
-
required: [
|
|
628
|
-
"key",
|
|
629
|
-
"readBytes",
|
|
630
|
-
"writeBytes"
|
|
631
|
-
],
|
|
632
199
|
type: "object"
|
|
633
200
|
},
|
|
634
201
|
innerTransactionCount: {
|
|
@@ -646,47 +213,58 @@ var definitions = {
|
|
|
646
213
|
type: "string"
|
|
647
214
|
},
|
|
648
215
|
struct: {
|
|
649
|
-
|
|
650
|
-
|
|
216
|
+
description: "If the type is a struct, the name of the struct",
|
|
217
|
+
type: "string"
|
|
651
218
|
},
|
|
652
219
|
type: {
|
|
653
|
-
|
|
654
|
-
|
|
220
|
+
description: "The type of the return value, or \"void\" to indicate no return value. The `struct` field should also be checked to determine if this return value is a struct.",
|
|
221
|
+
type: "string"
|
|
655
222
|
}
|
|
656
223
|
},
|
|
657
|
-
required: [
|
|
658
|
-
"type"
|
|
659
|
-
],
|
|
660
224
|
type: "object"
|
|
661
225
|
}
|
|
662
226
|
},
|
|
663
|
-
required: [
|
|
664
|
-
"name",
|
|
665
|
-
"args",
|
|
666
|
-
"returns",
|
|
667
|
-
"actions"
|
|
668
|
-
],
|
|
669
227
|
type: "object"
|
|
670
228
|
},
|
|
671
|
-
|
|
229
|
+
ProgramSourceInfo: {
|
|
672
230
|
properties: {
|
|
673
|
-
|
|
674
|
-
description: "The
|
|
675
|
-
|
|
231
|
+
pcOffsetMethod: {
|
|
232
|
+
description: "How the program counter offset is calculated\n- none: The pc values in sourceInfo are not offset\n- cblocks: The pc values in sourceInfo are offset by the PC of the first op following the last cblock at the top of the program",
|
|
233
|
+
"enum": [
|
|
234
|
+
"cblocks",
|
|
235
|
+
"none"
|
|
236
|
+
],
|
|
237
|
+
type: "string"
|
|
676
238
|
},
|
|
239
|
+
sourceInfo: {
|
|
240
|
+
description: "The source information for the program",
|
|
241
|
+
items: {
|
|
242
|
+
$ref: "#/definitions/SourceInfo"
|
|
243
|
+
},
|
|
244
|
+
type: "array"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
type: "object"
|
|
248
|
+
},
|
|
249
|
+
SourceInfo: {
|
|
250
|
+
properties: {
|
|
677
251
|
errorMessage: {
|
|
678
|
-
description: "A human-readable string that describes the error when the program fails at
|
|
252
|
+
description: "A human-readable string that describes the error when the program fails at the given PC",
|
|
679
253
|
type: "string"
|
|
680
254
|
},
|
|
681
255
|
pc: {
|
|
682
|
-
description: "The program counter
|
|
256
|
+
description: "The program counter value(s). Could be offset if pcOffsetMethod is not \"none\"",
|
|
683
257
|
items: {
|
|
684
258
|
type: "number"
|
|
685
259
|
},
|
|
686
260
|
type: "array"
|
|
687
261
|
},
|
|
262
|
+
source: {
|
|
263
|
+
description: "The original source file and line number that corresponds to the given PC. RECOMMENDED to be used for development purposes, but not required for clients",
|
|
264
|
+
type: "string"
|
|
265
|
+
},
|
|
688
266
|
teal: {
|
|
689
|
-
description: "The line
|
|
267
|
+
description: "The TEAL line number that corresponds to the given PC. RECOMMENDED to be used for development purposes, but not required for clients",
|
|
690
268
|
type: "number"
|
|
691
269
|
}
|
|
692
270
|
},
|
|
@@ -704,39 +282,14 @@ var definitions = {
|
|
|
704
282
|
type: "string"
|
|
705
283
|
},
|
|
706
284
|
keyType: {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
$ref: "#/definitions/ABIType"
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
$ref: "#/definitions/AVMType"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
$ref: "#/definitions/StructName"
|
|
716
|
-
}
|
|
717
|
-
],
|
|
718
|
-
description: "The type of the key"
|
|
285
|
+
description: "The type of the key",
|
|
286
|
+
type: "string"
|
|
719
287
|
},
|
|
720
288
|
valueType: {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
$ref: "#/definitions/ABIType"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
$ref: "#/definitions/AVMType"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
$ref: "#/definitions/StructName"
|
|
730
|
-
}
|
|
731
|
-
],
|
|
732
|
-
description: "The type of the value"
|
|
289
|
+
description: "The type of the value",
|
|
290
|
+
type: "string"
|
|
733
291
|
}
|
|
734
292
|
},
|
|
735
|
-
required: [
|
|
736
|
-
"keyType",
|
|
737
|
-
"valueType",
|
|
738
|
-
"key"
|
|
739
|
-
],
|
|
740
293
|
type: "object"
|
|
741
294
|
},
|
|
742
295
|
StorageMap: {
|
|
@@ -747,42 +300,18 @@ var definitions = {
|
|
|
747
300
|
type: "string"
|
|
748
301
|
},
|
|
749
302
|
keyType: {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
$ref: "#/definitions/ABIType"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
$ref: "#/definitions/AVMType"
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
$ref: "#/definitions/StructName"
|
|
759
|
-
}
|
|
760
|
-
],
|
|
761
|
-
description: "The type of the keys in the map"
|
|
303
|
+
description: "The type of the keys in the map",
|
|
304
|
+
type: "string"
|
|
762
305
|
},
|
|
763
306
|
prefix: {
|
|
764
307
|
description: "The base64-encoded prefix of the map keys",
|
|
765
308
|
type: "string"
|
|
766
309
|
},
|
|
767
310
|
valueType: {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
$ref: "#/definitions/ABIType"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
$ref: "#/definitions/AVMType"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
$ref: "#/definitions/StructName"
|
|
777
|
-
}
|
|
778
|
-
],
|
|
779
|
-
description: "The type of the values in the map"
|
|
311
|
+
description: "The type of the values in the map",
|
|
312
|
+
type: "string"
|
|
780
313
|
}
|
|
781
314
|
},
|
|
782
|
-
required: [
|
|
783
|
-
"keyType",
|
|
784
|
-
"valueType"
|
|
785
|
-
],
|
|
786
315
|
type: "object"
|
|
787
316
|
},
|
|
788
317
|
StructField: {
|
|
@@ -794,38 +323,305 @@ var definitions = {
|
|
|
794
323
|
},
|
|
795
324
|
type: {
|
|
796
325
|
anyOf: [
|
|
797
|
-
{
|
|
798
|
-
$ref: "#/definitions/ABIType"
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
$ref: "#/definitions/StructName"
|
|
802
|
-
},
|
|
803
326
|
{
|
|
804
327
|
items: {
|
|
805
328
|
$ref: "#/definitions/StructField"
|
|
806
329
|
},
|
|
807
330
|
type: "array"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
type: "string"
|
|
808
334
|
}
|
|
809
335
|
],
|
|
810
336
|
description: "The type of the struct field's value"
|
|
811
337
|
}
|
|
812
338
|
},
|
|
813
|
-
required: [
|
|
814
|
-
"name",
|
|
815
|
-
"type"
|
|
816
|
-
],
|
|
817
339
|
type: "object"
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
var description = "Describes the entire contract. This interface is an extension of the interface described in ARC-4";
|
|
343
|
+
var properties = {
|
|
344
|
+
arcs: {
|
|
345
|
+
description: "The ARCs used and/or supported by this contract. All contracts implicity support ARC4 and ARC56",
|
|
346
|
+
items: {
|
|
347
|
+
type: "number"
|
|
348
|
+
},
|
|
349
|
+
type: "array"
|
|
350
|
+
},
|
|
351
|
+
bareActions: {
|
|
352
|
+
description: "Supported bare actions for the contract. An action is a combination of call/create and an OnComplete",
|
|
353
|
+
properties: {
|
|
354
|
+
call: {
|
|
355
|
+
description: "OnCompletes this method allows when appID !== 0",
|
|
356
|
+
items: {
|
|
357
|
+
"enum": [
|
|
358
|
+
"ClearState",
|
|
359
|
+
"CloseOut",
|
|
360
|
+
"DeleteApplication",
|
|
361
|
+
"NoOp",
|
|
362
|
+
"OptIn",
|
|
363
|
+
"UpdateApplication"
|
|
364
|
+
],
|
|
365
|
+
type: "string"
|
|
366
|
+
},
|
|
367
|
+
type: "array"
|
|
368
|
+
},
|
|
369
|
+
create: {
|
|
370
|
+
description: "OnCompletes this method allows when appID === 0",
|
|
371
|
+
items: {
|
|
372
|
+
"enum": [
|
|
373
|
+
"DeleteApplication",
|
|
374
|
+
"NoOp",
|
|
375
|
+
"OptIn"
|
|
376
|
+
],
|
|
377
|
+
type: "string"
|
|
378
|
+
},
|
|
379
|
+
type: "array"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
type: "object"
|
|
383
|
+
},
|
|
384
|
+
byteCode: {
|
|
385
|
+
description: "The compiled bytecode for the application. MUST be omitted if included as part of ARC23",
|
|
386
|
+
properties: {
|
|
387
|
+
approval: {
|
|
388
|
+
description: "The approval program",
|
|
389
|
+
type: "string"
|
|
390
|
+
},
|
|
391
|
+
clear: {
|
|
392
|
+
description: "The clear program",
|
|
393
|
+
type: "string"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
type: "object"
|
|
397
|
+
},
|
|
398
|
+
compilerInfo: {
|
|
399
|
+
description: "Information used to get the given byteCode and/or PC values in sourceInfo. MUST be given if byteCode or PC values are present",
|
|
400
|
+
properties: {
|
|
401
|
+
compiler: {
|
|
402
|
+
description: "The name of the compiler",
|
|
403
|
+
"enum": [
|
|
404
|
+
"algod",
|
|
405
|
+
"puya"
|
|
406
|
+
],
|
|
407
|
+
type: "string"
|
|
408
|
+
},
|
|
409
|
+
compilerVersion: {
|
|
410
|
+
description: "Compiler version information",
|
|
411
|
+
properties: {
|
|
412
|
+
commitHash: {
|
|
413
|
+
type: "string"
|
|
414
|
+
},
|
|
415
|
+
major: {
|
|
416
|
+
type: "number"
|
|
417
|
+
},
|
|
418
|
+
minor: {
|
|
419
|
+
type: "number"
|
|
420
|
+
},
|
|
421
|
+
patch: {
|
|
422
|
+
type: "number"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
type: "object"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
type: "object"
|
|
429
|
+
},
|
|
430
|
+
desc: {
|
|
431
|
+
description: "Optional, user-friendly description for the interface",
|
|
432
|
+
type: "string"
|
|
433
|
+
},
|
|
434
|
+
events: {
|
|
435
|
+
description: "ARC-28 events that MAY be emitted by this contract",
|
|
436
|
+
items: {
|
|
437
|
+
$ref: "#/definitions/Event"
|
|
438
|
+
},
|
|
439
|
+
type: "array"
|
|
440
|
+
},
|
|
441
|
+
methods: {
|
|
442
|
+
description: "All of the methods that the contract implements",
|
|
443
|
+
items: {
|
|
444
|
+
$ref: "#/definitions/Method"
|
|
445
|
+
},
|
|
446
|
+
type: "array"
|
|
818
447
|
},
|
|
819
|
-
|
|
820
|
-
description: "
|
|
448
|
+
name: {
|
|
449
|
+
description: "A user-friendly name for the contract",
|
|
821
450
|
type: "string"
|
|
451
|
+
},
|
|
452
|
+
networks: {
|
|
453
|
+
additionalProperties: {
|
|
454
|
+
properties: {
|
|
455
|
+
appID: {
|
|
456
|
+
description: "The app ID of the deployed contract in this network",
|
|
457
|
+
type: "number"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
type: "object"
|
|
461
|
+
},
|
|
462
|
+
description: "Optional object listing the contract instances across different networks.\nThe key is the base64 genesis hash of the network, and the value contains\ninformation about the deployed contract in the network indicated by the\nkey. A key containing the human-readable name of the network MAY be\nincluded, but the corresponding genesis hash key MUST also be define",
|
|
463
|
+
type: "object"
|
|
464
|
+
},
|
|
465
|
+
scratchVariables: {
|
|
466
|
+
additionalProperties: {
|
|
467
|
+
properties: {
|
|
468
|
+
slot: {
|
|
469
|
+
type: "number"
|
|
470
|
+
},
|
|
471
|
+
type: {
|
|
472
|
+
type: "string"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
type: "object"
|
|
476
|
+
},
|
|
477
|
+
description: "The scratch variables used during runtime",
|
|
478
|
+
type: "object"
|
|
479
|
+
},
|
|
480
|
+
source: {
|
|
481
|
+
description: "The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23",
|
|
482
|
+
properties: {
|
|
483
|
+
approval: {
|
|
484
|
+
description: "The approval program",
|
|
485
|
+
type: "string"
|
|
486
|
+
},
|
|
487
|
+
clear: {
|
|
488
|
+
description: "The clear program",
|
|
489
|
+
type: "string"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
type: "object"
|
|
493
|
+
},
|
|
494
|
+
sourceInfo: {
|
|
495
|
+
description: "Information about the TEAL programs",
|
|
496
|
+
properties: {
|
|
497
|
+
approval: {
|
|
498
|
+
$ref: "#/definitions/ProgramSourceInfo",
|
|
499
|
+
description: "Approval program information"
|
|
500
|
+
},
|
|
501
|
+
clear: {
|
|
502
|
+
$ref: "#/definitions/ProgramSourceInfo",
|
|
503
|
+
description: "Clear program information"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
type: "object"
|
|
507
|
+
},
|
|
508
|
+
state: {
|
|
509
|
+
properties: {
|
|
510
|
+
keys: {
|
|
511
|
+
description: "Mapping of human-readable names to StorageKey objects",
|
|
512
|
+
properties: {
|
|
513
|
+
box: {
|
|
514
|
+
additionalProperties: {
|
|
515
|
+
$ref: "#/definitions/StorageKey"
|
|
516
|
+
},
|
|
517
|
+
type: "object"
|
|
518
|
+
},
|
|
519
|
+
global: {
|
|
520
|
+
additionalProperties: {
|
|
521
|
+
$ref: "#/definitions/StorageKey"
|
|
522
|
+
},
|
|
523
|
+
type: "object"
|
|
524
|
+
},
|
|
525
|
+
local: {
|
|
526
|
+
additionalProperties: {
|
|
527
|
+
$ref: "#/definitions/StorageKey"
|
|
528
|
+
},
|
|
529
|
+
type: "object"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
type: "object"
|
|
533
|
+
},
|
|
534
|
+
maps: {
|
|
535
|
+
description: "Mapping of human-readable names to StorageMap objects",
|
|
536
|
+
properties: {
|
|
537
|
+
box: {
|
|
538
|
+
additionalProperties: {
|
|
539
|
+
$ref: "#/definitions/StorageMap"
|
|
540
|
+
},
|
|
541
|
+
type: "object"
|
|
542
|
+
},
|
|
543
|
+
global: {
|
|
544
|
+
additionalProperties: {
|
|
545
|
+
$ref: "#/definitions/StorageMap"
|
|
546
|
+
},
|
|
547
|
+
type: "object"
|
|
548
|
+
},
|
|
549
|
+
local: {
|
|
550
|
+
additionalProperties: {
|
|
551
|
+
$ref: "#/definitions/StorageMap"
|
|
552
|
+
},
|
|
553
|
+
type: "object"
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
type: "object"
|
|
557
|
+
},
|
|
558
|
+
schema: {
|
|
559
|
+
description: "Defines the values that should be used for GlobalNumUint, GlobalNumByteSlice, LocalNumUint, and LocalNumByteSlice when creating the application",
|
|
560
|
+
properties: {
|
|
561
|
+
global: {
|
|
562
|
+
properties: {
|
|
563
|
+
bytes: {
|
|
564
|
+
type: "number"
|
|
565
|
+
},
|
|
566
|
+
ints: {
|
|
567
|
+
type: "number"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
type: "object"
|
|
571
|
+
},
|
|
572
|
+
local: {
|
|
573
|
+
properties: {
|
|
574
|
+
bytes: {
|
|
575
|
+
type: "number"
|
|
576
|
+
},
|
|
577
|
+
ints: {
|
|
578
|
+
type: "number"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
type: "object"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
type: "object"
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
type: "object"
|
|
588
|
+
},
|
|
589
|
+
structs: {
|
|
590
|
+
additionalProperties: {
|
|
591
|
+
items: {
|
|
592
|
+
$ref: "#/definitions/StructField"
|
|
593
|
+
},
|
|
594
|
+
type: "array"
|
|
595
|
+
},
|
|
596
|
+
description: "Named structs use by the application. Each struct field appears in the same order as ABI encoding.",
|
|
597
|
+
type: "object"
|
|
598
|
+
},
|
|
599
|
+
templateVariables: {
|
|
600
|
+
additionalProperties: {
|
|
601
|
+
properties: {
|
|
602
|
+
type: {
|
|
603
|
+
description: "The type of the template variable",
|
|
604
|
+
type: "string"
|
|
605
|
+
},
|
|
606
|
+
value: {
|
|
607
|
+
description: "If given, the the base64 encoded value used for the given app/program",
|
|
608
|
+
type: "string"
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
type: "object"
|
|
612
|
+
},
|
|
613
|
+
description: "A mapping of template variable names as they appear in the teal (not including TMPL_ prefix) to their respecive types and values (if applicable)",
|
|
614
|
+
type: "object"
|
|
822
615
|
}
|
|
823
616
|
};
|
|
617
|
+
var type = "object";
|
|
824
618
|
var arc56Schema = {
|
|
825
|
-
$ref: $ref,
|
|
826
619
|
$schema: $schema,
|
|
827
|
-
definitions: definitions
|
|
620
|
+
definitions: definitions,
|
|
621
|
+
description: description,
|
|
622
|
+
properties: properties,
|
|
623
|
+
type: type
|
|
828
624
|
};
|
|
829
625
|
|
|
830
|
-
export { $
|
|
626
|
+
export { $schema, arc56Schema as default, definitions, description, properties, type };
|
|
831
627
|
//# sourceMappingURL=arc56.schema.json.mjs.map
|