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