@algorandfoundation/algokit-client-generator 4.0.0-beta.2 → 4.0.0-beta.3

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 (37) hide show
  1. package/client/app-client.js +34 -19
  2. package/client/app-client.js.map +1 -1
  3. package/client/app-client.mjs +34 -19
  4. package/client/app-client.mjs.map +1 -1
  5. package/client/app-factory.js +34 -17
  6. package/client/app-factory.js.map +1 -1
  7. package/client/app-factory.mjs +34 -17
  8. package/client/app-factory.mjs.map +1 -1
  9. package/client/app-types.js +11 -7
  10. package/client/app-types.js.map +1 -1
  11. package/client/app-types.mjs +11 -7
  12. package/client/app-types.mjs.map +1 -1
  13. package/client/call-composer-types.js +2 -2
  14. package/client/call-composer-types.js.map +1 -1
  15. package/client/call-composer-types.mjs +2 -2
  16. package/client/call-composer-types.mjs.map +1 -1
  17. package/client/call-composer.js +16 -14
  18. package/client/call-composer.js.map +1 -1
  19. package/client/call-composer.mjs +16 -14
  20. package/client/call-composer.mjs.map +1 -1
  21. package/client/generate.js +4 -4
  22. package/client/generate.js.map +1 -1
  23. package/client/generate.mjs +4 -4
  24. package/client/generate.mjs.map +1 -1
  25. package/client/helpers/get-equivalent-type.js +7 -3
  26. package/client/helpers/get-equivalent-type.js.map +1 -1
  27. package/client/helpers/get-equivalent-type.mjs +7 -3
  28. package/client/helpers/get-equivalent-type.mjs.map +1 -1
  29. package/client/imports.js +3 -2
  30. package/client/imports.js.map +1 -1
  31. package/client/imports.mjs +3 -2
  32. package/client/imports.mjs.map +1 -1
  33. package/package.json +4 -3
  34. package/schema/arc56.schema.json.js +106 -55
  35. package/schema/arc56.schema.json.js.map +1 -1
  36. package/schema/arc56.schema.json.mjs +106 -55
  37. package/schema/arc56.schema.json.mjs.map +1 -1
@@ -10,12 +10,35 @@ var definitions = {
10
10
  type: "string"
11
11
  },
12
12
  AVMBytes: {
13
- "const": "bytes",
13
+ "const": "AVMBytes",
14
14
  description: "Raw byteslice without the length prefixed that is specified in ARC-4",
15
15
  type: "string"
16
16
  },
17
+ AVMString: {
18
+ "const": "AVMString",
19
+ description: "A utf-8 string without the length prefix that is specified in ARC-4",
20
+ type: "string"
21
+ },
22
+ AVMType: {
23
+ anyOf: [
24
+ {
25
+ $ref: "#/definitions/AVMBytes"
26
+ },
27
+ {
28
+ $ref: "#/definitions/AVMString"
29
+ },
30
+ {
31
+ $ref: "#/definitions/AVMUint64"
32
+ }
33
+ ],
34
+ description: "A native AVM type"
35
+ },
36
+ AVMUint64: {
37
+ "const": "AVMUint64",
38
+ description: "A 64-bit unsigned integer",
39
+ type: "string"
40
+ },
17
41
  Arc56Contract: {
18
- additionalProperties: false,
19
42
  description: "Describes the entire contract. This interface is an extension of the interface described in ARC-4",
20
43
  properties: {
21
44
  arcs: {
@@ -26,7 +49,6 @@ var definitions = {
26
49
  type: "array"
27
50
  },
28
51
  bareActions: {
29
- additionalProperties: false,
30
52
  description: "Supported bare actions for the contract. An action is a combination of call/create and an OnComplete",
31
53
  properties: {
32
54
  call: {
@@ -64,7 +86,6 @@ var definitions = {
64
86
  type: "object"
65
87
  },
66
88
  byteCode: {
67
- additionalProperties: false,
68
89
  description: "The compiled bytecode for the application. MUST be omitted if included as part of ARC23",
69
90
  properties: {
70
91
  approval: {
@@ -83,7 +104,6 @@ var definitions = {
83
104
  type: "object"
84
105
  },
85
106
  compilerInfo: {
86
- additionalProperties: false,
87
107
  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
108
  properties: {
89
109
  compiler: {
@@ -95,10 +115,9 @@ var definitions = {
95
115
  type: "string"
96
116
  },
97
117
  compilerVersion: {
98
- additionalProperties: false,
99
118
  description: "Compiler version information",
100
119
  properties: {
101
- commit: {
120
+ commitHash: {
102
121
  type: "string"
103
122
  },
104
123
  major: {
@@ -149,8 +168,6 @@ var definitions = {
149
168
  },
150
169
  networks: {
151
170
  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
171
  properties: {
155
172
  appID: {
156
173
  description: "The app ID of the deployed contract in this network",
@@ -162,12 +179,11 @@ var definitions = {
162
179
  ],
163
180
  type: "object"
164
181
  },
165
- description: "Optional object listing the contract instances across different networks",
182
+ 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",
166
183
  type: "object"
167
184
  },
168
185
  scratchVariables: {
169
186
  additionalProperties: {
170
- additionalProperties: false,
171
187
  properties: {
172
188
  slot: {
173
189
  type: "number"
@@ -178,7 +194,7 @@ var definitions = {
178
194
  $ref: "#/definitions/ABIType"
179
195
  },
180
196
  {
181
- $ref: "#/definitions/AVMBytes"
197
+ $ref: "#/definitions/AVMType"
182
198
  },
183
199
  {
184
200
  $ref: "#/definitions/StructName"
@@ -196,7 +212,6 @@ var definitions = {
196
212
  type: "object"
197
213
  },
198
214
  source: {
199
- additionalProperties: false,
200
215
  description: "The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23",
201
216
  properties: {
202
217
  approval: {
@@ -215,7 +230,6 @@ var definitions = {
215
230
  type: "object"
216
231
  },
217
232
  sourceInfo: {
218
- additionalProperties: false,
219
233
  description: "Information about the TEAL programs",
220
234
  properties: {
221
235
  approval: {
@@ -240,10 +254,8 @@ var definitions = {
240
254
  type: "object"
241
255
  },
242
256
  state: {
243
- additionalProperties: false,
244
257
  properties: {
245
258
  keys: {
246
- additionalProperties: false,
247
259
  description: "Mapping of human-readable names to StorageKey objects",
248
260
  properties: {
249
261
  box: {
@@ -273,7 +285,6 @@ var definitions = {
273
285
  type: "object"
274
286
  },
275
287
  maps: {
276
- additionalProperties: false,
277
288
  description: "Mapping of human-readable names to StorageMap objects",
278
289
  properties: {
279
290
  box: {
@@ -303,11 +314,9 @@ var definitions = {
303
314
  type: "object"
304
315
  },
305
316
  schema: {
306
- additionalProperties: false,
307
317
  description: "Defines the values that should be used for GlobalNumUint, GlobalNumByteSlice, LocalNumUint, and LocalNumByteSlice when creating the application",
308
318
  properties: {
309
319
  global: {
310
- additionalProperties: false,
311
320
  properties: {
312
321
  bytes: {
313
322
  type: "number"
@@ -323,7 +332,6 @@ var definitions = {
323
332
  type: "object"
324
333
  },
325
334
  local: {
326
- additionalProperties: false,
327
335
  properties: {
328
336
  bytes: {
329
337
  type: "number"
@@ -355,14 +363,16 @@ var definitions = {
355
363
  },
356
364
  structs: {
357
365
  additionalProperties: {
358
- $ref: "#/definitions/StructFields"
366
+ items: {
367
+ $ref: "#/definitions/StructField"
368
+ },
369
+ type: "array"
359
370
  },
360
- description: "Named structs use by the application",
371
+ description: "Named structs use by the application. Each struct field appears in the same order as ABI encoding.",
361
372
  type: "object"
362
373
  },
363
374
  templateVariables: {
364
375
  additionalProperties: {
365
- additionalProperties: false,
366
376
  properties: {
367
377
  type: {
368
378
  anyOf: [
@@ -370,7 +380,7 @@ var definitions = {
370
380
  $ref: "#/definitions/ABIType"
371
381
  },
372
382
  {
373
- $ref: "#/definitions/AVMBytes"
383
+ $ref: "#/definitions/AVMType"
374
384
  },
375
385
  {
376
386
  $ref: "#/definitions/StructName"
@@ -403,13 +413,11 @@ var definitions = {
403
413
  type: "object"
404
414
  },
405
415
  Event: {
406
- additionalProperties: false,
407
416
  description: "ARC-28 event",
408
417
  properties: {
409
418
  args: {
410
419
  description: "The arguments of the event, in order",
411
420
  items: {
412
- additionalProperties: false,
413
421
  properties: {
414
422
  desc: {
415
423
  description: "Optional, user-friendly description for the argument",
@@ -425,7 +433,7 @@ var definitions = {
425
433
  },
426
434
  type: {
427
435
  $ref: "#/definitions/ABIType",
428
- description: "The type of the argument"
436
+ description: "The type of the argument. The `struct` field should also be checked to determine if this return value is a struct."
429
437
  }
430
438
  },
431
439
  required: [
@@ -451,11 +459,9 @@ var definitions = {
451
459
  type: "object"
452
460
  },
453
461
  Method: {
454
- additionalProperties: false,
455
462
  description: "Describes a method in the contract. This interface is an extension of the interface described in ARC-4",
456
463
  properties: {
457
464
  actions: {
458
- additionalProperties: false,
459
465
  description: "an action is a combination of call/create and an OnComplete",
460
466
  properties: {
461
467
  call: {
@@ -495,11 +501,45 @@ var definitions = {
495
501
  args: {
496
502
  description: "The arguments of the method, in order",
497
503
  items: {
498
- additionalProperties: false,
499
504
  properties: {
500
505
  defaultValue: {
501
- description: "The default value that clients should use. MUST be base64 encoded bytes",
502
- type: "string"
506
+ description: "The default value that clients should use.",
507
+ properties: {
508
+ data: {
509
+ description: "Base64 encoded bytes or uint64",
510
+ type: [
511
+ "string",
512
+ "number"
513
+ ]
514
+ },
515
+ source: {
516
+ 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",
517
+ "enum": [
518
+ "box",
519
+ "global",
520
+ "local",
521
+ "literal"
522
+ ],
523
+ type: "string"
524
+ },
525
+ type: {
526
+ anyOf: [
527
+ {
528
+ $ref: "#/definitions/ABIType"
529
+ },
530
+ {
531
+ $ref: "#/definitions/AVMType"
532
+ }
533
+ ],
534
+ description: "How the data is encoded. This is the encoding for the data provided here, not the arg type"
535
+ }
536
+ },
537
+ required: [
538
+ "data",
539
+ "type",
540
+ "source"
541
+ ],
542
+ type: "object"
503
543
  },
504
544
  desc: {
505
545
  description: "Optional, user-friendly description for the argument",
@@ -515,7 +555,7 @@ var definitions = {
515
555
  },
516
556
  type: {
517
557
  $ref: "#/definitions/ABIType",
518
- description: "The type of the argument"
558
+ description: "The type of the argument. The `struct` field should also be checked to determine if this arg is a struct."
519
559
  }
520
560
  },
521
561
  required: [
@@ -545,7 +585,6 @@ var definitions = {
545
585
  type: "boolean"
546
586
  },
547
587
  recommendations: {
548
- additionalProperties: false,
549
588
  description: "Information that clients can use when calling the method",
550
589
  properties: {
551
590
  accounts: {
@@ -570,7 +609,6 @@ var definitions = {
570
609
  type: "array"
571
610
  },
572
611
  boxes: {
573
- additionalProperties: false,
574
612
  description: "Recommended box references to include",
575
613
  properties: {
576
614
  app: {
@@ -605,7 +643,6 @@ var definitions = {
605
643
  type: "object"
606
644
  },
607
645
  returns: {
608
- additionalProperties: false,
609
646
  description: "Information about the method's return value",
610
647
  properties: {
611
648
  desc: {
@@ -618,7 +655,7 @@ var definitions = {
618
655
  },
619
656
  type: {
620
657
  $ref: "#/definitions/ABIType",
621
- description: "The type of the return value, or \"void\" to indicate no return value."
658
+ 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."
622
659
  }
623
660
  },
624
661
  required: [
@@ -636,7 +673,6 @@ var definitions = {
636
673
  type: "object"
637
674
  },
638
675
  SourceInfo: {
639
- additionalProperties: true,
640
676
  properties: {
641
677
  disassembledTeal: {
642
678
  description: "The line of the dissasembled TEAL this line of pre-compiled TEAL corresponds to",
@@ -661,7 +697,6 @@ var definitions = {
661
697
  type: "object"
662
698
  },
663
699
  StorageKey: {
664
- additionalProperties: false,
665
700
  description: "Describes a single key in app storage",
666
701
  properties: {
667
702
  desc: {
@@ -678,7 +713,7 @@ var definitions = {
678
713
  $ref: "#/definitions/ABIType"
679
714
  },
680
715
  {
681
- $ref: "#/definitions/AVMBytes"
716
+ $ref: "#/definitions/AVMType"
682
717
  },
683
718
  {
684
719
  $ref: "#/definitions/StructName"
@@ -692,7 +727,7 @@ var definitions = {
692
727
  $ref: "#/definitions/ABIType"
693
728
  },
694
729
  {
695
- $ref: "#/definitions/AVMBytes"
730
+ $ref: "#/definitions/AVMType"
696
731
  },
697
732
  {
698
733
  $ref: "#/definitions/StructName"
@@ -709,7 +744,6 @@ var definitions = {
709
744
  type: "object"
710
745
  },
711
746
  StorageMap: {
712
- additionalProperties: false,
713
747
  description: "Describes a mapping of key-value pairs in storage",
714
748
  properties: {
715
749
  desc: {
@@ -722,7 +756,7 @@ var definitions = {
722
756
  $ref: "#/definitions/ABIType"
723
757
  },
724
758
  {
725
- $ref: "#/definitions/AVMBytes"
759
+ $ref: "#/definitions/AVMType"
726
760
  },
727
761
  {
728
762
  $ref: "#/definitions/StructName"
@@ -740,7 +774,7 @@ var definitions = {
740
774
  $ref: "#/definitions/ABIType"
741
775
  },
742
776
  {
743
- $ref: "#/definitions/AVMBytes"
777
+ $ref: "#/definitions/AVMType"
744
778
  },
745
779
  {
746
780
  $ref: "#/definitions/StructName"
@@ -755,18 +789,35 @@ var definitions = {
755
789
  ],
756
790
  type: "object"
757
791
  },
758
- StructFields: {
759
- additionalProperties: {
760
- anyOf: [
761
- {
762
- $ref: "#/definitions/ABIType"
763
- },
764
- {
765
- $ref: "#/definitions/StructFields"
766
- }
767
- ]
792
+ StructField: {
793
+ description: "Information about a single field in a struct",
794
+ properties: {
795
+ name: {
796
+ description: "The name of the struct field",
797
+ type: "string"
798
+ },
799
+ type: {
800
+ anyOf: [
801
+ {
802
+ $ref: "#/definitions/ABIType"
803
+ },
804
+ {
805
+ $ref: "#/definitions/StructName"
806
+ },
807
+ {
808
+ items: {
809
+ $ref: "#/definitions/StructField"
810
+ },
811
+ type: "array"
812
+ }
813
+ ],
814
+ description: "The type of the struct field's value"
815
+ }
768
816
  },
769
- description: "Mapping of named structs to the ABI type of their fields",
817
+ required: [
818
+ "name",
819
+ "type"
820
+ ],
770
821
  type: "object"
771
822
  },
772
823
  StructName: {
@@ -1 +1 @@
1
- {"version":3,"file":"arc56.schema.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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