@algorandfoundation/algokit-client-generator 4.0.0-beta.1 → 4.0.0-beta.10

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