@algorandfoundation/algorand-typescript 0.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/op-types.d.ts ADDED
@@ -0,0 +1,2102 @@
1
+ export declare enum Base64 {
2
+ URLEncoding = "URLEncoding",
3
+ StdEncoding = "StdEncoding"
4
+ }
5
+ export declare enum Ec {
6
+ BN254g1 = "BN254g1",
7
+ BN254g2 = "BN254g2",
8
+ BLS12_381g1 = "BLS12_381g1",
9
+ BLS12_381g2 = "BLS12_381g2"
10
+ }
11
+ export declare enum Ecdsa {
12
+ Secp256k1 = "Secp256k1",
13
+ Secp256r1 = "Secp256r1"
14
+ }
15
+ export declare enum VrfVerify {
16
+ VrfAlgorand = "VrfAlgorand"
17
+ }
18
+ export type AcctParamsType = {
19
+ /**
20
+ * Account balance in microalgos
21
+ */
22
+ acctBalance(a: Account | uint64): readonly [uint64, boolean];
23
+ /**
24
+ * Minimum required balance for account, in microalgos
25
+ */
26
+ acctMinBalance(a: Account | uint64): readonly [uint64, boolean];
27
+ /**
28
+ * Address the account is rekeyed to.
29
+ */
30
+ acctAuthAddr(a: Account | uint64): readonly [Account, boolean];
31
+ /**
32
+ * The total number of uint64 values allocated by this account in Global and Local States.
33
+ */
34
+ acctTotalNumUint(a: Account | uint64): readonly [uint64, boolean];
35
+ /**
36
+ * The total number of byte array values allocated by this account in Global and Local States.
37
+ */
38
+ acctTotalNumByteSlice(a: Account | uint64): readonly [uint64, boolean];
39
+ /**
40
+ * The number of extra app code pages used by this account.
41
+ */
42
+ acctTotalExtraAppPages(a: Account | uint64): readonly [uint64, boolean];
43
+ /**
44
+ * The number of existing apps created by this account.
45
+ */
46
+ acctTotalAppsCreated(a: Account | uint64): readonly [uint64, boolean];
47
+ /**
48
+ * The number of apps this account is opted into.
49
+ */
50
+ acctTotalAppsOptedIn(a: Account | uint64): readonly [uint64, boolean];
51
+ /**
52
+ * The number of existing ASAs created by this account.
53
+ */
54
+ acctTotalAssetsCreated(a: Account | uint64): readonly [uint64, boolean];
55
+ /**
56
+ * The numbers of ASAs held by this account (including ASAs this account created).
57
+ */
58
+ acctTotalAssets(a: Account | uint64): readonly [uint64, boolean];
59
+ /**
60
+ * The number of existing boxes created by this account's app.
61
+ */
62
+ acctTotalBoxes(a: Account | uint64): readonly [uint64, boolean];
63
+ /**
64
+ * The total number of bytes used by this account's app's box keys and values.
65
+ */
66
+ acctTotalBoxBytes(a: Account | uint64): readonly [uint64, boolean];
67
+ };
68
+ /**
69
+ * A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.
70
+ * @see Native TEAL opcode: [`addw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#addw)
71
+ */
72
+ export type AddwType = (a: uint64, b: uint64) => readonly [uint64, uint64];
73
+ /**
74
+ * Get or modify Global app state
75
+ */
76
+ export type AppGlobalType = {
77
+ /**
78
+ * delete key A from the global state of the current application
79
+ * @param state key.
80
+ * Deleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)
81
+ * @see Native TEAL opcode: [`app_global_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_del)
82
+ */
83
+ delete(a: bytes): void;
84
+ /**
85
+ * global state of the key A in the current application
86
+ * @param state key.
87
+ * * @return value. The value is zero (of type uint64) if the key does not exist.
88
+ * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)
89
+ */
90
+ getBytes(a: bytes): bytes;
91
+ /**
92
+ * global state of the key A in the current application
93
+ * @param state key.
94
+ * * @return value. The value is zero (of type uint64) if the key does not exist.
95
+ * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)
96
+ */
97
+ getUint64(a: bytes): uint64;
98
+ /**
99
+ * X is the global state of application A, key B. Y is 1 if key existed, else 0
100
+ * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.
101
+ * * @return did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
102
+ * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)
103
+ */
104
+ getExBytes(a: Application | uint64, b: bytes): readonly [bytes, boolean];
105
+ /**
106
+ * X is the global state of application A, key B. Y is 1 if key existed, else 0
107
+ * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.
108
+ * * @return did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
109
+ * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)
110
+ */
111
+ getExUint64(a: Application | uint64, b: bytes): readonly [uint64, boolean];
112
+ /**
113
+ * write B to key A in the global state of the current application
114
+ * @see Native TEAL opcode: [`app_global_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_put)
115
+ */
116
+ put(a: bytes, b: uint64 | bytes): void;
117
+ };
118
+ /**
119
+ * Get or modify Local app state
120
+ */
121
+ export type AppLocalType = {
122
+ /**
123
+ * delete key B from account A's local state of the current application
124
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.
125
+ * Deleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)
126
+ * @see Native TEAL opcode: [`app_local_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_del)
127
+ */
128
+ delete(a: Account | uint64, b: bytes): void;
129
+ /**
130
+ * local state of the key B in the current application in account A
131
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.
132
+ * * @return value. The value is zero (of type uint64) if the key does not exist.
133
+ * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)
134
+ */
135
+ getBytes(a: Account | uint64, b: bytes): bytes;
136
+ /**
137
+ * local state of the key B in the current application in account A
138
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.
139
+ * * @return value. The value is zero (of type uint64) if the key does not exist.
140
+ * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)
141
+ */
142
+ getUint64(a: Account | uint64, b: bytes): uint64;
143
+ /**
144
+ * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0
145
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.
146
+ * * @return did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
147
+ * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)
148
+ */
149
+ getExBytes(a: Account | uint64, b: Application | uint64, c: bytes): readonly [bytes, boolean];
150
+ /**
151
+ * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0
152
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.
153
+ * * @return did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
154
+ * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)
155
+ */
156
+ getExUint64(a: Account | uint64, b: Application | uint64, c: bytes): readonly [uint64, boolean];
157
+ /**
158
+ * write C to key B in account A's local state of the current application
159
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.
160
+ * @see Native TEAL opcode: [`app_local_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_put)
161
+ */
162
+ put(a: Account | uint64, b: bytes, c: uint64 | bytes): void;
163
+ };
164
+ /**
165
+ * 1 if account A is opted in to application B, else 0
166
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).
167
+ * * @return 1 if opted in and 0 otherwise.
168
+ * @see Native TEAL opcode: [`app_opted_in`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_opted_in)
169
+ */
170
+ export type AppOptedInType = (a: Account | uint64, b: Application | uint64) => boolean;
171
+ export type AppParamsType = {
172
+ /**
173
+ * Bytecode of Approval Program
174
+ */
175
+ appApprovalProgram(a: Application | uint64): readonly [bytes, boolean];
176
+ /**
177
+ * Bytecode of Clear State Program
178
+ */
179
+ appClearStateProgram(a: Application | uint64): readonly [bytes, boolean];
180
+ /**
181
+ * Number of uint64 values allowed in Global State
182
+ */
183
+ appGlobalNumUint(a: Application | uint64): readonly [uint64, boolean];
184
+ /**
185
+ * Number of byte array values allowed in Global State
186
+ */
187
+ appGlobalNumByteSlice(a: Application | uint64): readonly [uint64, boolean];
188
+ /**
189
+ * Number of uint64 values allowed in Local State
190
+ */
191
+ appLocalNumUint(a: Application | uint64): readonly [uint64, boolean];
192
+ /**
193
+ * Number of byte array values allowed in Local State
194
+ */
195
+ appLocalNumByteSlice(a: Application | uint64): readonly [uint64, boolean];
196
+ /**
197
+ * Number of Extra Program Pages of code space
198
+ */
199
+ appExtraProgramPages(a: Application | uint64): readonly [uint64, boolean];
200
+ /**
201
+ * Creator address
202
+ */
203
+ appCreator(a: Application | uint64): readonly [Account, boolean];
204
+ /**
205
+ * Address for which this application has authority
206
+ */
207
+ appAddress(a: Application | uint64): readonly [Account, boolean];
208
+ };
209
+ /**
210
+ * Ath LogicSig argument
211
+ * @see Native TEAL opcode: [`args`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#args)
212
+ */
213
+ export type ArgType = (a: uint64) => bytes;
214
+ export type AssetHoldingType = {
215
+ /**
216
+ * Amount of the asset unit held by this account
217
+ */
218
+ assetBalance(a: Account | uint64, b: Asset | uint64): readonly [uint64, boolean];
219
+ /**
220
+ * Is the asset frozen or not
221
+ */
222
+ assetFrozen(a: Account | uint64, b: Asset | uint64): readonly [boolean, boolean];
223
+ };
224
+ export type AssetParamsType = {
225
+ /**
226
+ * Total number of units of this asset
227
+ */
228
+ assetTotal(a: Asset | uint64): readonly [uint64, boolean];
229
+ /**
230
+ * See AssetParams.Decimals
231
+ */
232
+ assetDecimals(a: Asset | uint64): readonly [uint64, boolean];
233
+ /**
234
+ * Frozen by default or not
235
+ */
236
+ assetDefaultFrozen(a: Asset | uint64): readonly [boolean, boolean];
237
+ /**
238
+ * Asset unit name
239
+ */
240
+ assetUnitName(a: Asset | uint64): readonly [bytes, boolean];
241
+ /**
242
+ * Asset name
243
+ */
244
+ assetName(a: Asset | uint64): readonly [bytes, boolean];
245
+ /**
246
+ * URL with additional info about the asset
247
+ */
248
+ assetUrl(a: Asset | uint64): readonly [bytes, boolean];
249
+ /**
250
+ * Arbitrary commitment
251
+ */
252
+ assetMetadataHash(a: Asset | uint64): readonly [bytes, boolean];
253
+ /**
254
+ * Manager address
255
+ */
256
+ assetManager(a: Asset | uint64): readonly [Account, boolean];
257
+ /**
258
+ * Reserve address
259
+ */
260
+ assetReserve(a: Asset | uint64): readonly [Account, boolean];
261
+ /**
262
+ * Freeze address
263
+ */
264
+ assetFreeze(a: Asset | uint64): readonly [Account, boolean];
265
+ /**
266
+ * Clawback address
267
+ */
268
+ assetClawback(a: Asset | uint64): readonly [Account, boolean];
269
+ /**
270
+ * Creator address
271
+ */
272
+ assetCreator(a: Asset | uint64): readonly [Account, boolean];
273
+ };
274
+ /**
275
+ * balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted. Changes caused by inner transactions are observable immediately following `itxn_submit`
276
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).
277
+ * * @return value.
278
+ * @see Native TEAL opcode: [`balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#balance)
279
+ */
280
+ export type BalanceType = (a: Account | uint64) => uint64;
281
+ /**
282
+ * decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E
283
+ * *Warning*: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings. This opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings.
284
+ * Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See [RFC 4648 sections 4 and 5](https://rfc-editor.org/rfc/rfc4648.html#section-4). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\n` and `\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\r`, or `\n`.
285
+ * @see Native TEAL opcode: [`base64_decode`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#base64_decode)
286
+ */
287
+ export type Base64DecodeType = (e: Base64, a: bytes) => bytes;
288
+ /**
289
+ * The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4
290
+ * bitlen interprets arrays as big-endian integers, unlike setbit/getbit
291
+ * @see Native TEAL opcode: [`bitlen`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bitlen)
292
+ */
293
+ export type BitLengthType = (a: uint64 | bytes) => uint64;
294
+ export type BlockType = {
295
+ blkSeed(a: uint64): bytes;
296
+ blkTimestamp(a: uint64): uint64;
297
+ };
298
+ /**
299
+ * Get or modify box state
300
+ */
301
+ export type BoxType = {
302
+ /**
303
+ * create a box named A, of length B. Fail if the name A is empty or B exceeds 32,768. Returns 0 if A already existed, else 1
304
+ * Newly created boxes are filled with 0 bytes. `box_create` will fail if the referenced box already exists with a different size. Otherwise, existing boxes are unchanged by `box_create`.
305
+ * @see Native TEAL opcode: [`box_create`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_create)
306
+ */
307
+ create(a: bytes, b: uint64): boolean;
308
+ /**
309
+ * delete box named A if it exists. Return 1 if A existed, 0 otherwise
310
+ * @see Native TEAL opcode: [`box_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_del)
311
+ */
312
+ delete(a: bytes): boolean;
313
+ /**
314
+ * read C bytes from box A, starting at offset B. Fail if A does not exist, or the byte range is outside A's size.
315
+ * @see Native TEAL opcode: [`box_extract`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_extract)
316
+ */
317
+ extract(a: bytes, b: uint64, c: uint64): bytes;
318
+ /**
319
+ * X is the contents of box A if A exists, else ''. Y is 1 if A exists, else 0.
320
+ * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`
321
+ * @see Native TEAL opcode: [`box_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_get)
322
+ */
323
+ get(a: bytes): readonly [bytes, boolean];
324
+ /**
325
+ * X is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.
326
+ * @see Native TEAL opcode: [`box_len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_len)
327
+ */
328
+ length(a: bytes): readonly [uint64, boolean];
329
+ /**
330
+ * replaces the contents of box A with byte-array B. Fails if A exists and len(B) != len(box A). Creates A if it does not exist
331
+ * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`
332
+ * @see Native TEAL opcode: [`box_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_put)
333
+ */
334
+ put(a: bytes, b: bytes): void;
335
+ /**
336
+ * write byte-array C into box A, starting at offset B. Fail if A does not exist, or the byte range is outside A's size.
337
+ * @see Native TEAL opcode: [`box_replace`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_replace)
338
+ */
339
+ replace(a: bytes, b: uint64, c: bytes): void;
340
+ /**
341
+ * change the size of box named A to be of length B, adding zero bytes to end or removing bytes from the end, as needed. Fail if the name A is empty, A is not an existing box, or B exceeds 32,768.
342
+ * @see Native TEAL opcode: [`box_resize`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_resize)
343
+ */
344
+ resize(a: bytes, b: uint64): void;
345
+ /**
346
+ * set box A to contain its previous bytes up to index B, followed by D, followed by the original bytes of A that began at index B+C.
347
+ * Boxes are of constant length. If C < len(D), then len(D)-C bytes will be removed from the end. If C > len(D), zero bytes will be appended to the end to reach the box length.
348
+ * @see Native TEAL opcode: [`box_splice`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_splice)
349
+ */
350
+ splice(a: bytes, b: uint64, c: uint64, d: bytes): void;
351
+ };
352
+ /**
353
+ * The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers
354
+ * @see Native TEAL opcode: [`bsqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bsqrt)
355
+ */
356
+ export type BsqrtType = (a: biguint) => biguint;
357
+ /**
358
+ * converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.
359
+ * `btoi` fails if the input is longer than 8 bytes.
360
+ * @see Native TEAL opcode: [`btoi`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#btoi)
361
+ */
362
+ export type BtoiType = (a: bytes) => uint64;
363
+ /**
364
+ * zero filled byte-array of length A
365
+ * @see Native TEAL opcode: [`bzero`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bzero)
366
+ */
367
+ export type BzeroType = (a: uint64) => bytes;
368
+ /**
369
+ * join A and B
370
+ * `concat` fails if the result would be greater than 4096 bytes.
371
+ * @see Native TEAL opcode: [`concat`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#concat)
372
+ */
373
+ export type ConcatType = (a: bytes, b: bytes) => bytes;
374
+ /**
375
+ * W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)
376
+ * The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.
377
+ * @see Native TEAL opcode: [`divmodw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divmodw)
378
+ */
379
+ export type DivmodwType = (a: uint64, b: uint64, c: uint64, d: uint64) => readonly [uint64, uint64, uint64, uint64];
380
+ /**
381
+ * A,B / C. Fail if C == 0 or if result overflows.
382
+ * The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.
383
+ * @see Native TEAL opcode: [`divw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divw)
384
+ */
385
+ export type DivwType = (a: uint64, b: uint64, c: uint64) => uint64;
386
+ /**
387
+ * Elliptic Curve functions
388
+ */
389
+ export type EllipticCurveType = {
390
+ /**
391
+ * for curve points A and B, return the curve point A + B
392
+ * A and B are curve points in affine representation: field element X concatenated with field element Y. Field element `Z` is encoded as follows.
393
+ * For the base field elements (Fp), `Z` is encoded as a big-endian number and must be lower than the field modulus.
394
+ * For the quadratic field extension (Fp2), `Z` is encoded as the concatenation of the individual encoding of the coefficients. For an Fp2 element of the form `Z = Z0 + Z1 i`, where `i` is a formal quadratic non-residue, the encoding of Z is the concatenation of the encoding of `Z0` and `Z1` in this order. (`Z0` and `Z1` must be less than the field modulus).
395
+ * The point at infinity is encoded as `(X,Y) = (0,0)`.
396
+ * Groups G1 and G2 are denoted additively.
397
+ * Fails if A or B is not in G.
398
+ * A and/or B are allowed to be the point at infinity.
399
+ * Does _not_ check if A and B are in the main prime-order subgroup.
400
+ * @see Native TEAL opcode: [`ec_add`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_add)
401
+ */
402
+ add(g: Ec, a: bytes, b: bytes): bytes;
403
+ /**
404
+ * maps field element A to group G
405
+ * BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.
406
+ * G1 element inputs are base field elements and G2 element inputs are quadratic field elements, with nearly the same encoding rules (for field elements) as defined in `ec_add`. There is one difference of encoding rule: G1 element inputs do not need to be 0-padded if they fit in less than 32 bytes for BN254 and less than 48 bytes for BLS12-381. (As usual, the empty byte array represents 0.) G2 elements inputs need to be always have the required size.
407
+ * @see Native TEAL opcode: [`ec_map_to`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_map_to)
408
+ */
409
+ mapTo(g: Ec, a: bytes): bytes;
410
+ /**
411
+ * for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + ... + BnAn
412
+ * A is a list of concatenated points, encoded and checked as described in `ec_add`. B is a list of concatenated scalars which, unlike ec_scalar_mul, must all be exactly 32 bytes long.
413
+ * The name `ec_multi_scalar_mul` was chosen to reflect common usage, but a more consistent name would be `ec_multi_scalar_mul`. AVM values are limited to 4096 bytes, so `ec_multi_scalar_mul` is limited by the size of the points in the group being operated upon.
414
+ * @see Native TEAL opcode: [`ec_multi_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_multi_scalar_mul)
415
+ */
416
+ scalarMulMulti(g: Ec, a: bytes, b: bytes): bytes;
417
+ /**
418
+ * 1 if the product of the pairing of each point in A with its respective point in B is equal to the identity element of the target group Gt, else 0
419
+ * A and B are concatenated points, encoded and checked as described in `ec_add`. A contains points of the group G, B contains points of the associated group (G2 if G is G1, and vice versa). Fails if A and B have a different number of points, or if any point is not in its described group or outside the main prime-order subgroup - a stronger condition than other opcodes. AVM values are limited to 4096 bytes, so `ec_pairing_check` is limited by the size of the points in the groups being operated upon.
420
+ * @see Native TEAL opcode: [`ec_pairing_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_pairing_check)
421
+ */
422
+ pairingCheck(g: Ec, a: bytes, b: bytes): boolean;
423
+ /**
424
+ * for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.
425
+ * A is a curve point encoded and checked as described in `ec_add`. Scalar B is interpreted as a big-endian unsigned integer. Fails if B exceeds 32 bytes.
426
+ * @see Native TEAL opcode: [`ec_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_scalar_mul)
427
+ */
428
+ scalarMul(g: Ec, a: bytes, b: bytes): bytes;
429
+ /**
430
+ * 1 if A is in the main prime-order subgroup of G (including the point at infinity) else 0. Program fails if A is not in G at all.
431
+ * @see Native TEAL opcode: [`ec_subgroup_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_subgroup_check)
432
+ */
433
+ subgroupCheck(g: Ec, a: bytes): boolean;
434
+ };
435
+ /**
436
+ * decompress pubkey A into components X, Y
437
+ * The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.
438
+ * @see Native TEAL opcode: [`ecdsa_pk_decompress`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_decompress)
439
+ */
440
+ export type EcdsaPkDecompressType = (v: Ecdsa, a: bytes) => readonly [bytes, bytes];
441
+ /**
442
+ * for (data A, recovery id B, signature C, D) recover a public key
443
+ * S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.
444
+ * @see Native TEAL opcode: [`ecdsa_pk_recover`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_recover)
445
+ */
446
+ export type EcdsaPkRecoverType = (v: Ecdsa, a: bytes, b: uint64, c: bytes, d: bytes) => readonly [bytes, bytes];
447
+ /**
448
+ * for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}
449
+ * The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.
450
+ * @see Native TEAL opcode: [`ecdsa_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_verify)
451
+ */
452
+ export type EcdsaVerifyType = (v: Ecdsa, a: bytes, b: bytes, c: bytes, d: bytes, e: bytes) => boolean;
453
+ /**
454
+ * for (data A, signature B, pubkey C) verify the signature of ("ProgData" || program_hash || data) against the pubkey => {0 or 1}
455
+ * The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.
456
+ * @see Native TEAL opcode: [`ed25519verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify)
457
+ */
458
+ export type Ed25519verifyType = (a: bytes, b: bytes, c: bytes) => boolean;
459
+ /**
460
+ * for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}
461
+ * @see Native TEAL opcode: [`ed25519verify_bare`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify_bare)
462
+ */
463
+ export type Ed25519verifyBareType = (a: bytes, b: bytes, c: bytes) => boolean;
464
+ /**
465
+ * A raised to the Bth power. Fail if A == B == 0 and on overflow
466
+ * @see Native TEAL opcode: [`exp`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#exp)
467
+ */
468
+ export type ExpType = (a: uint64, b: uint64) => uint64;
469
+ /**
470
+ * A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1
471
+ * @see Native TEAL opcode: [`expw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#expw)
472
+ */
473
+ export type ExpwType = (a: uint64, b: uint64) => readonly [uint64, uint64];
474
+ /**
475
+ * A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails
476
+ * `extract3` can be called using `extract` with no immediates.
477
+ * @see Native TEAL opcode: [`extract3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract3)
478
+ */
479
+ export type ExtractType = (a: bytes, b: uint64, c: uint64) => bytes;
480
+ /**
481
+ * A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails
482
+ * @see Native TEAL opcode: [`extract_uint16`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint16)
483
+ */
484
+ export type ExtractUint16Type = (a: bytes, b: uint64) => uint64;
485
+ /**
486
+ * A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails
487
+ * @see Native TEAL opcode: [`extract_uint32`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint32)
488
+ */
489
+ export type ExtractUint32Type = (a: bytes, b: uint64) => uint64;
490
+ /**
491
+ * A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails
492
+ * @see Native TEAL opcode: [`extract_uint64`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint64)
493
+ */
494
+ export type ExtractUint64Type = (a: bytes, b: uint64) => uint64;
495
+ /**
496
+ * ID of the asset or application created in the Ath transaction of the current group
497
+ * `gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.
498
+ * @see Native TEAL opcode: [`gaids`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gaids)
499
+ */
500
+ export type GaidType = (a: uint64) => uint64;
501
+ /**
502
+ * Bth bit of (byte-array or integer) A. If B is greater than or equal to the bit length of the value (8*byte length), the program fails
503
+ * see explanation of bit ordering in setbit
504
+ * @see Native TEAL opcode: [`getbit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbit)
505
+ */
506
+ export type GetBitType = (a: uint64 | bytes, b: uint64) => uint64;
507
+ /**
508
+ * Bth byte of A, as an integer. If B is greater than or equal to the array length, the program fails
509
+ * @see Native TEAL opcode: [`getbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbyte)
510
+ */
511
+ export type GetByteType = (a: bytes, b: uint64) => uint64;
512
+ /**
513
+ * Get values for inner transaction in the last group submitted
514
+ */
515
+ export type GITxnType = {
516
+ /**
517
+ * 32 byte address
518
+ */
519
+ sender(t: uint64): Account;
520
+ /**
521
+ * microalgos
522
+ */
523
+ fee(t: uint64): uint64;
524
+ /**
525
+ * round number
526
+ */
527
+ firstValid(t: uint64): uint64;
528
+ /**
529
+ * UNIX timestamp of block before txn.FirstValid. Fails if negative
530
+ */
531
+ firstValidTime(t: uint64): uint64;
532
+ /**
533
+ * round number
534
+ */
535
+ lastValid(t: uint64): uint64;
536
+ /**
537
+ * Any data up to 1024 bytes
538
+ */
539
+ note(t: uint64): bytes;
540
+ /**
541
+ * 32 byte lease value
542
+ */
543
+ lease(t: uint64): bytes;
544
+ /**
545
+ * 32 byte address
546
+ */
547
+ receiver(t: uint64): Account;
548
+ /**
549
+ * microalgos
550
+ */
551
+ amount(t: uint64): uint64;
552
+ /**
553
+ * 32 byte address
554
+ */
555
+ closeRemainderTo(t: uint64): Account;
556
+ /**
557
+ * 32 byte address
558
+ */
559
+ votePk(t: uint64): bytes;
560
+ /**
561
+ * 32 byte address
562
+ */
563
+ selectionPk(t: uint64): bytes;
564
+ /**
565
+ * The first round that the participation key is valid.
566
+ */
567
+ voteFirst(t: uint64): uint64;
568
+ /**
569
+ * The last round that the participation key is valid.
570
+ */
571
+ voteLast(t: uint64): uint64;
572
+ /**
573
+ * Dilution for the 2-level participation key
574
+ */
575
+ voteKeyDilution(t: uint64): uint64;
576
+ /**
577
+ * Transaction type as bytes
578
+ */
579
+ type(t: uint64): bytes;
580
+ /**
581
+ * Transaction type as integer
582
+ */
583
+ typeEnum(t: uint64): uint64;
584
+ /**
585
+ * Asset ID
586
+ */
587
+ xferAsset(t: uint64): Asset;
588
+ /**
589
+ * value in Asset's units
590
+ */
591
+ assetAmount(t: uint64): uint64;
592
+ /**
593
+ * 32 byte address. Source of assets if Sender is the Asset's Clawback address.
594
+ */
595
+ assetSender(t: uint64): Account;
596
+ /**
597
+ * 32 byte address
598
+ */
599
+ assetReceiver(t: uint64): Account;
600
+ /**
601
+ * 32 byte address
602
+ */
603
+ assetCloseTo(t: uint64): Account;
604
+ /**
605
+ * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
606
+ */
607
+ groupIndex(t: uint64): uint64;
608
+ /**
609
+ * The computed ID for this transaction. 32 bytes.
610
+ */
611
+ txId(t: uint64): bytes;
612
+ /**
613
+ * ApplicationID from ApplicationCall transaction
614
+ */
615
+ applicationId(t: uint64): Application;
616
+ /**
617
+ * ApplicationCall transaction on completion action
618
+ */
619
+ onCompletion(t: uint64): uint64;
620
+ /**
621
+ * Arguments passed to the application in the ApplicationCall transaction
622
+ */
623
+ applicationArgs(t: uint64, a: uint64): bytes;
624
+ /**
625
+ * Number of ApplicationArgs
626
+ */
627
+ numAppArgs(t: uint64): uint64;
628
+ /**
629
+ * Accounts listed in the ApplicationCall transaction
630
+ */
631
+ accounts(t: uint64, a: uint64): Account;
632
+ /**
633
+ * Number of Accounts
634
+ */
635
+ numAccounts(t: uint64): uint64;
636
+ /**
637
+ * Approval program
638
+ */
639
+ approvalProgram(t: uint64): bytes;
640
+ /**
641
+ * Clear state program
642
+ */
643
+ clearStateProgram(t: uint64): bytes;
644
+ /**
645
+ * 32 byte Sender's new AuthAddr
646
+ */
647
+ rekeyTo(t: uint64): Account;
648
+ /**
649
+ * Asset ID in asset config transaction
650
+ */
651
+ configAsset(t: uint64): Asset;
652
+ /**
653
+ * Total number of units of this asset created
654
+ */
655
+ configAssetTotal(t: uint64): uint64;
656
+ /**
657
+ * Number of digits to display after the decimal place when displaying the asset
658
+ */
659
+ configAssetDecimals(t: uint64): uint64;
660
+ /**
661
+ * Whether the asset's slots are frozen by default or not, 0 or 1
662
+ */
663
+ configAssetDefaultFrozen(t: uint64): boolean;
664
+ /**
665
+ * Unit name of the asset
666
+ */
667
+ configAssetUnitName(t: uint64): bytes;
668
+ /**
669
+ * The asset name
670
+ */
671
+ configAssetName(t: uint64): bytes;
672
+ /**
673
+ * URL
674
+ */
675
+ configAssetUrl(t: uint64): bytes;
676
+ /**
677
+ * 32 byte commitment to unspecified asset metadata
678
+ */
679
+ configAssetMetadataHash(t: uint64): bytes;
680
+ /**
681
+ * 32 byte address
682
+ */
683
+ configAssetManager(t: uint64): Account;
684
+ /**
685
+ * 32 byte address
686
+ */
687
+ configAssetReserve(t: uint64): Account;
688
+ /**
689
+ * 32 byte address
690
+ */
691
+ configAssetFreeze(t: uint64): Account;
692
+ /**
693
+ * 32 byte address
694
+ */
695
+ configAssetClawback(t: uint64): Account;
696
+ /**
697
+ * Asset ID being frozen or un-frozen
698
+ */
699
+ freezeAsset(t: uint64): Asset;
700
+ /**
701
+ * 32 byte address of the account whose asset slot is being frozen or un-frozen
702
+ */
703
+ freezeAssetAccount(t: uint64): Account;
704
+ /**
705
+ * The new frozen value, 0 or 1
706
+ */
707
+ freezeAssetFrozen(t: uint64): boolean;
708
+ /**
709
+ * Foreign Assets listed in the ApplicationCall transaction
710
+ */
711
+ assets(t: uint64, a: uint64): Asset;
712
+ /**
713
+ * Number of Assets
714
+ */
715
+ numAssets(t: uint64): uint64;
716
+ /**
717
+ * Foreign Apps listed in the ApplicationCall transaction
718
+ */
719
+ applications(t: uint64, a: uint64): Application;
720
+ /**
721
+ * Number of Applications
722
+ */
723
+ numApplications(t: uint64): uint64;
724
+ /**
725
+ * Number of global state integers in ApplicationCall
726
+ */
727
+ globalNumUint(t: uint64): uint64;
728
+ /**
729
+ * Number of global state byteslices in ApplicationCall
730
+ */
731
+ globalNumByteSlice(t: uint64): uint64;
732
+ /**
733
+ * Number of local state integers in ApplicationCall
734
+ */
735
+ localNumUint(t: uint64): uint64;
736
+ /**
737
+ * Number of local state byteslices in ApplicationCall
738
+ */
739
+ localNumByteSlice(t: uint64): uint64;
740
+ /**
741
+ * Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
742
+ */
743
+ extraProgramPages(t: uint64): uint64;
744
+ /**
745
+ * Marks an account nonparticipating for rewards
746
+ */
747
+ nonparticipation(t: uint64): boolean;
748
+ /**
749
+ * Log messages emitted by an application call (only with `itxn` in v5). Application mode only
750
+ */
751
+ logs(t: uint64, a: uint64): bytes;
752
+ /**
753
+ * Number of Logs (only with `itxn` in v5). Application mode only
754
+ */
755
+ numLogs(t: uint64): uint64;
756
+ /**
757
+ * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only
758
+ */
759
+ createdAssetId(t: uint64): Asset;
760
+ /**
761
+ * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only
762
+ */
763
+ createdApplicationId(t: uint64): Application;
764
+ /**
765
+ * The last message emitted. Empty bytes if none were emitted. Application mode only
766
+ */
767
+ lastLog(t: uint64): bytes;
768
+ /**
769
+ * 64 byte state proof public key
770
+ */
771
+ stateProofPk(t: uint64): bytes;
772
+ /**
773
+ * Approval Program as an array of pages
774
+ */
775
+ approvalProgramPages(t: uint64, a: uint64): bytes;
776
+ /**
777
+ * Number of Approval Program pages
778
+ */
779
+ numApprovalProgramPages(t: uint64): uint64;
780
+ /**
781
+ * ClearState Program as an array of pages
782
+ */
783
+ clearStateProgramPages(t: uint64, a: uint64): bytes;
784
+ /**
785
+ * Number of ClearState Program pages
786
+ */
787
+ numClearStateProgramPages(t: uint64): uint64;
788
+ };
789
+ /**
790
+ * Bth scratch space value of the Ath transaction in the current group
791
+ * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)
792
+ */
793
+ export type GloadBytesType = (a: uint64, b: uint64) => bytes;
794
+ /**
795
+ * Bth scratch space value of the Ath transaction in the current group
796
+ * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)
797
+ */
798
+ export type GloadUint64Type = (a: uint64, b: uint64) => uint64;
799
+ export type GlobalType = {
800
+ /**
801
+ * microalgos
802
+ */
803
+ get minTxnFee(): uint64;
804
+ /**
805
+ * microalgos
806
+ */
807
+ get minBalance(): uint64;
808
+ /**
809
+ * rounds
810
+ */
811
+ get maxTxnLife(): uint64;
812
+ /**
813
+ * 32 byte address of all zero bytes
814
+ */
815
+ get zeroAddress(): Account;
816
+ /**
817
+ * Number of transactions in this atomic transaction group. At least 1
818
+ */
819
+ get groupSize(): uint64;
820
+ /**
821
+ * Maximum supported version
822
+ */
823
+ get logicSigVersion(): uint64;
824
+ /**
825
+ * Current round number. Application mode only.
826
+ */
827
+ get round(): uint64;
828
+ /**
829
+ * Last confirmed block UNIX timestamp. Fails if negative. Application mode only.
830
+ */
831
+ get latestTimestamp(): uint64;
832
+ /**
833
+ * ID of current application executing. Application mode only.
834
+ */
835
+ get currentApplicationId(): Application;
836
+ /**
837
+ * Address of the creator of the current application. Application mode only.
838
+ */
839
+ get creatorAddress(): Account;
840
+ /**
841
+ * Address that the current application controls. Application mode only.
842
+ */
843
+ get currentApplicationAddress(): Account;
844
+ /**
845
+ * ID of the transaction group. 32 zero bytes if the transaction is not part of a group.
846
+ */
847
+ get groupId(): bytes;
848
+ /**
849
+ * The remaining cost that can be spent by opcodes in this program.
850
+ */
851
+ get opcodeBudget(): uint64;
852
+ /**
853
+ * The application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.
854
+ */
855
+ get callerApplicationId(): uint64;
856
+ /**
857
+ * The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.
858
+ */
859
+ get callerApplicationAddress(): Account;
860
+ /**
861
+ * The additional minimum balance required to create (and opt-in to) an asset.
862
+ */
863
+ get assetCreateMinBalance(): uint64;
864
+ /**
865
+ * The additional minimum balance required to opt-in to an asset.
866
+ */
867
+ get assetOptInMinBalance(): uint64;
868
+ /**
869
+ * The Genesis Hash for the network.
870
+ */
871
+ get genesisHash(): bytes;
872
+ };
873
+ /**
874
+ * Get values for transactions in the current group
875
+ */
876
+ export type GTxnType = {
877
+ /**
878
+ * 32 byte address
879
+ */
880
+ sender(t: uint64): Account;
881
+ /**
882
+ * microalgos
883
+ */
884
+ fee(t: uint64): uint64;
885
+ /**
886
+ * round number
887
+ */
888
+ firstValid(t: uint64): uint64;
889
+ /**
890
+ * UNIX timestamp of block before txn.FirstValid. Fails if negative
891
+ */
892
+ firstValidTime(t: uint64): uint64;
893
+ /**
894
+ * round number
895
+ */
896
+ lastValid(t: uint64): uint64;
897
+ /**
898
+ * Any data up to 1024 bytes
899
+ */
900
+ note(t: uint64): bytes;
901
+ /**
902
+ * 32 byte lease value
903
+ */
904
+ lease(t: uint64): bytes;
905
+ /**
906
+ * 32 byte address
907
+ */
908
+ receiver(t: uint64): Account;
909
+ /**
910
+ * microalgos
911
+ */
912
+ amount(t: uint64): uint64;
913
+ /**
914
+ * 32 byte address
915
+ */
916
+ closeRemainderTo(t: uint64): Account;
917
+ /**
918
+ * 32 byte address
919
+ */
920
+ votePk(t: uint64): bytes;
921
+ /**
922
+ * 32 byte address
923
+ */
924
+ selectionPk(t: uint64): bytes;
925
+ /**
926
+ * The first round that the participation key is valid.
927
+ */
928
+ voteFirst(t: uint64): uint64;
929
+ /**
930
+ * The last round that the participation key is valid.
931
+ */
932
+ voteLast(t: uint64): uint64;
933
+ /**
934
+ * Dilution for the 2-level participation key
935
+ */
936
+ voteKeyDilution(t: uint64): uint64;
937
+ /**
938
+ * Transaction type as bytes
939
+ */
940
+ type(t: uint64): bytes;
941
+ /**
942
+ * Transaction type as integer
943
+ */
944
+ typeEnum(t: uint64): uint64;
945
+ /**
946
+ * Asset ID
947
+ */
948
+ xferAsset(t: uint64): Asset;
949
+ /**
950
+ * value in Asset's units
951
+ */
952
+ assetAmount(t: uint64): uint64;
953
+ /**
954
+ * 32 byte address. Source of assets if Sender is the Asset's Clawback address.
955
+ */
956
+ assetSender(t: uint64): Account;
957
+ /**
958
+ * 32 byte address
959
+ */
960
+ assetReceiver(t: uint64): Account;
961
+ /**
962
+ * 32 byte address
963
+ */
964
+ assetCloseTo(t: uint64): Account;
965
+ /**
966
+ * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
967
+ */
968
+ groupIndex(t: uint64): uint64;
969
+ /**
970
+ * The computed ID for this transaction. 32 bytes.
971
+ */
972
+ txId(t: uint64): bytes;
973
+ /**
974
+ * ApplicationID from ApplicationCall transaction
975
+ */
976
+ applicationId(t: uint64): Application;
977
+ /**
978
+ * ApplicationCall transaction on completion action
979
+ */
980
+ onCompletion(t: uint64): uint64;
981
+ /**
982
+ * Arguments passed to the application in the ApplicationCall transaction
983
+ */
984
+ applicationArgs(a: uint64, b: uint64): bytes;
985
+ /**
986
+ * Number of ApplicationArgs
987
+ */
988
+ numAppArgs(t: uint64): uint64;
989
+ /**
990
+ * Accounts listed in the ApplicationCall transaction
991
+ */
992
+ accounts(a: uint64, b: uint64): Account;
993
+ /**
994
+ * Number of Accounts
995
+ */
996
+ numAccounts(t: uint64): uint64;
997
+ /**
998
+ * Approval program
999
+ */
1000
+ approvalProgram(t: uint64): bytes;
1001
+ /**
1002
+ * Clear state program
1003
+ */
1004
+ clearStateProgram(t: uint64): bytes;
1005
+ /**
1006
+ * 32 byte Sender's new AuthAddr
1007
+ */
1008
+ rekeyTo(t: uint64): Account;
1009
+ /**
1010
+ * Asset ID in asset config transaction
1011
+ */
1012
+ configAsset(t: uint64): Asset;
1013
+ /**
1014
+ * Total number of units of this asset created
1015
+ */
1016
+ configAssetTotal(t: uint64): uint64;
1017
+ /**
1018
+ * Number of digits to display after the decimal place when displaying the asset
1019
+ */
1020
+ configAssetDecimals(t: uint64): uint64;
1021
+ /**
1022
+ * Whether the asset's slots are frozen by default or not, 0 or 1
1023
+ */
1024
+ configAssetDefaultFrozen(t: uint64): boolean;
1025
+ /**
1026
+ * Unit name of the asset
1027
+ */
1028
+ configAssetUnitName(t: uint64): bytes;
1029
+ /**
1030
+ * The asset name
1031
+ */
1032
+ configAssetName(t: uint64): bytes;
1033
+ /**
1034
+ * URL
1035
+ */
1036
+ configAssetUrl(t: uint64): bytes;
1037
+ /**
1038
+ * 32 byte commitment to unspecified asset metadata
1039
+ */
1040
+ configAssetMetadataHash(t: uint64): bytes;
1041
+ /**
1042
+ * 32 byte address
1043
+ */
1044
+ configAssetManager(t: uint64): Account;
1045
+ /**
1046
+ * 32 byte address
1047
+ */
1048
+ configAssetReserve(t: uint64): Account;
1049
+ /**
1050
+ * 32 byte address
1051
+ */
1052
+ configAssetFreeze(t: uint64): Account;
1053
+ /**
1054
+ * 32 byte address
1055
+ */
1056
+ configAssetClawback(t: uint64): Account;
1057
+ /**
1058
+ * Asset ID being frozen or un-frozen
1059
+ */
1060
+ freezeAsset(t: uint64): Asset;
1061
+ /**
1062
+ * 32 byte address of the account whose asset slot is being frozen or un-frozen
1063
+ */
1064
+ freezeAssetAccount(t: uint64): Account;
1065
+ /**
1066
+ * The new frozen value, 0 or 1
1067
+ */
1068
+ freezeAssetFrozen(t: uint64): boolean;
1069
+ /**
1070
+ * Foreign Assets listed in the ApplicationCall transaction
1071
+ */
1072
+ assets(a: uint64, b: uint64): Asset;
1073
+ /**
1074
+ * Number of Assets
1075
+ */
1076
+ numAssets(t: uint64): uint64;
1077
+ /**
1078
+ * Foreign Apps listed in the ApplicationCall transaction
1079
+ */
1080
+ applications(a: uint64, b: uint64): Application;
1081
+ /**
1082
+ * Number of Applications
1083
+ */
1084
+ numApplications(t: uint64): uint64;
1085
+ /**
1086
+ * Number of global state integers in ApplicationCall
1087
+ */
1088
+ globalNumUint(t: uint64): uint64;
1089
+ /**
1090
+ * Number of global state byteslices in ApplicationCall
1091
+ */
1092
+ globalNumByteSlice(t: uint64): uint64;
1093
+ /**
1094
+ * Number of local state integers in ApplicationCall
1095
+ */
1096
+ localNumUint(t: uint64): uint64;
1097
+ /**
1098
+ * Number of local state byteslices in ApplicationCall
1099
+ */
1100
+ localNumByteSlice(t: uint64): uint64;
1101
+ /**
1102
+ * Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
1103
+ */
1104
+ extraProgramPages(t: uint64): uint64;
1105
+ /**
1106
+ * Marks an account nonparticipating for rewards
1107
+ */
1108
+ nonparticipation(t: uint64): boolean;
1109
+ /**
1110
+ * Log messages emitted by an application call (only with `itxn` in v5). Application mode only
1111
+ */
1112
+ logs(a: uint64, b: uint64): bytes;
1113
+ /**
1114
+ * Number of Logs (only with `itxn` in v5). Application mode only
1115
+ */
1116
+ numLogs(t: uint64): uint64;
1117
+ /**
1118
+ * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only
1119
+ */
1120
+ createdAssetId(t: uint64): Asset;
1121
+ /**
1122
+ * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only
1123
+ */
1124
+ createdApplicationId(t: uint64): Application;
1125
+ /**
1126
+ * The last message emitted. Empty bytes if none were emitted. Application mode only
1127
+ */
1128
+ lastLog(t: uint64): bytes;
1129
+ /**
1130
+ * 64 byte state proof public key
1131
+ */
1132
+ stateProofPk(t: uint64): bytes;
1133
+ /**
1134
+ * Approval Program as an array of pages
1135
+ */
1136
+ approvalProgramPages(a: uint64, b: uint64): bytes;
1137
+ /**
1138
+ * Number of Approval Program pages
1139
+ */
1140
+ numApprovalProgramPages(t: uint64): uint64;
1141
+ /**
1142
+ * ClearState Program as an array of pages
1143
+ */
1144
+ clearStateProgramPages(a: uint64, b: uint64): bytes;
1145
+ /**
1146
+ * Number of ClearState Program pages
1147
+ */
1148
+ numClearStateProgramPages(t: uint64): uint64;
1149
+ };
1150
+ /**
1151
+ * converts uint64 A to big-endian byte array, always of length 8
1152
+ * @see Native TEAL opcode: [`itob`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itob)
1153
+ */
1154
+ export type ItobType = (a: uint64) => bytes;
1155
+ /**
1156
+ * Get values for the last inner transaction
1157
+ */
1158
+ export type ITxnType = {
1159
+ /**
1160
+ * 32 byte address
1161
+ */
1162
+ get sender(): Account;
1163
+ /**
1164
+ * microalgos
1165
+ */
1166
+ get fee(): uint64;
1167
+ /**
1168
+ * round number
1169
+ */
1170
+ get firstValid(): uint64;
1171
+ /**
1172
+ * UNIX timestamp of block before txn.FirstValid. Fails if negative
1173
+ */
1174
+ get firstValidTime(): uint64;
1175
+ /**
1176
+ * round number
1177
+ */
1178
+ get lastValid(): uint64;
1179
+ /**
1180
+ * Any data up to 1024 bytes
1181
+ */
1182
+ get note(): bytes;
1183
+ /**
1184
+ * 32 byte lease value
1185
+ */
1186
+ get lease(): bytes;
1187
+ /**
1188
+ * 32 byte address
1189
+ */
1190
+ get receiver(): Account;
1191
+ /**
1192
+ * microalgos
1193
+ */
1194
+ get amount(): uint64;
1195
+ /**
1196
+ * 32 byte address
1197
+ */
1198
+ get closeRemainderTo(): Account;
1199
+ /**
1200
+ * 32 byte address
1201
+ */
1202
+ get votePk(): bytes;
1203
+ /**
1204
+ * 32 byte address
1205
+ */
1206
+ get selectionPk(): bytes;
1207
+ /**
1208
+ * The first round that the participation key is valid.
1209
+ */
1210
+ get voteFirst(): uint64;
1211
+ /**
1212
+ * The last round that the participation key is valid.
1213
+ */
1214
+ get voteLast(): uint64;
1215
+ /**
1216
+ * Dilution for the 2-level participation key
1217
+ */
1218
+ get voteKeyDilution(): uint64;
1219
+ /**
1220
+ * Transaction type as bytes
1221
+ */
1222
+ get type(): bytes;
1223
+ /**
1224
+ * Transaction type as integer
1225
+ */
1226
+ get typeEnum(): uint64;
1227
+ /**
1228
+ * Asset ID
1229
+ */
1230
+ get xferAsset(): Asset;
1231
+ /**
1232
+ * value in Asset's units
1233
+ */
1234
+ get assetAmount(): uint64;
1235
+ /**
1236
+ * 32 byte address. Source of assets if Sender is the Asset's Clawback address.
1237
+ */
1238
+ get assetSender(): Account;
1239
+ /**
1240
+ * 32 byte address
1241
+ */
1242
+ get assetReceiver(): Account;
1243
+ /**
1244
+ * 32 byte address
1245
+ */
1246
+ get assetCloseTo(): Account;
1247
+ /**
1248
+ * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
1249
+ */
1250
+ get groupIndex(): uint64;
1251
+ /**
1252
+ * The computed ID for this transaction. 32 bytes.
1253
+ */
1254
+ get txId(): bytes;
1255
+ /**
1256
+ * ApplicationID from ApplicationCall transaction
1257
+ */
1258
+ get applicationId(): Application;
1259
+ /**
1260
+ * ApplicationCall transaction on completion action
1261
+ */
1262
+ get onCompletion(): uint64;
1263
+ /**
1264
+ * Arguments passed to the application in the ApplicationCall transaction
1265
+ */
1266
+ applicationArgs(a: uint64): bytes;
1267
+ /**
1268
+ * Number of ApplicationArgs
1269
+ */
1270
+ get numAppArgs(): uint64;
1271
+ /**
1272
+ * Accounts listed in the ApplicationCall transaction
1273
+ */
1274
+ accounts(a: uint64): Account;
1275
+ /**
1276
+ * Number of Accounts
1277
+ */
1278
+ get numAccounts(): uint64;
1279
+ /**
1280
+ * Approval program
1281
+ */
1282
+ get approvalProgram(): bytes;
1283
+ /**
1284
+ * Clear state program
1285
+ */
1286
+ get clearStateProgram(): bytes;
1287
+ /**
1288
+ * 32 byte Sender's new AuthAddr
1289
+ */
1290
+ get rekeyTo(): Account;
1291
+ /**
1292
+ * Asset ID in asset config transaction
1293
+ */
1294
+ get configAsset(): Asset;
1295
+ /**
1296
+ * Total number of units of this asset created
1297
+ */
1298
+ get configAssetTotal(): uint64;
1299
+ /**
1300
+ * Number of digits to display after the decimal place when displaying the asset
1301
+ */
1302
+ get configAssetDecimals(): uint64;
1303
+ /**
1304
+ * Whether the asset's slots are frozen by default or not, 0 or 1
1305
+ */
1306
+ get configAssetDefaultFrozen(): boolean;
1307
+ /**
1308
+ * Unit name of the asset
1309
+ */
1310
+ get configAssetUnitName(): bytes;
1311
+ /**
1312
+ * The asset name
1313
+ */
1314
+ get configAssetName(): bytes;
1315
+ /**
1316
+ * URL
1317
+ */
1318
+ get configAssetUrl(): bytes;
1319
+ /**
1320
+ * 32 byte commitment to unspecified asset metadata
1321
+ */
1322
+ get configAssetMetadataHash(): bytes;
1323
+ /**
1324
+ * 32 byte address
1325
+ */
1326
+ get configAssetManager(): Account;
1327
+ /**
1328
+ * 32 byte address
1329
+ */
1330
+ get configAssetReserve(): Account;
1331
+ /**
1332
+ * 32 byte address
1333
+ */
1334
+ get configAssetFreeze(): Account;
1335
+ /**
1336
+ * 32 byte address
1337
+ */
1338
+ get configAssetClawback(): Account;
1339
+ /**
1340
+ * Asset ID being frozen or un-frozen
1341
+ */
1342
+ get freezeAsset(): Asset;
1343
+ /**
1344
+ * 32 byte address of the account whose asset slot is being frozen or un-frozen
1345
+ */
1346
+ get freezeAssetAccount(): Account;
1347
+ /**
1348
+ * The new frozen value, 0 or 1
1349
+ */
1350
+ get freezeAssetFrozen(): boolean;
1351
+ /**
1352
+ * Foreign Assets listed in the ApplicationCall transaction
1353
+ */
1354
+ assets(a: uint64): Asset;
1355
+ /**
1356
+ * Number of Assets
1357
+ */
1358
+ get numAssets(): uint64;
1359
+ /**
1360
+ * Foreign Apps listed in the ApplicationCall transaction
1361
+ */
1362
+ applications(a: uint64): Application;
1363
+ /**
1364
+ * Number of Applications
1365
+ */
1366
+ get numApplications(): uint64;
1367
+ /**
1368
+ * Number of global state integers in ApplicationCall
1369
+ */
1370
+ get globalNumUint(): uint64;
1371
+ /**
1372
+ * Number of global state byteslices in ApplicationCall
1373
+ */
1374
+ get globalNumByteSlice(): uint64;
1375
+ /**
1376
+ * Number of local state integers in ApplicationCall
1377
+ */
1378
+ get localNumUint(): uint64;
1379
+ /**
1380
+ * Number of local state byteslices in ApplicationCall
1381
+ */
1382
+ get localNumByteSlice(): uint64;
1383
+ /**
1384
+ * Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
1385
+ */
1386
+ get extraProgramPages(): uint64;
1387
+ /**
1388
+ * Marks an account nonparticipating for rewards
1389
+ */
1390
+ get nonparticipation(): boolean;
1391
+ /**
1392
+ * Log messages emitted by an application call (only with `itxn` in v5). Application mode only
1393
+ */
1394
+ logs(a: uint64): bytes;
1395
+ /**
1396
+ * Number of Logs (only with `itxn` in v5). Application mode only
1397
+ */
1398
+ get numLogs(): uint64;
1399
+ /**
1400
+ * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only
1401
+ */
1402
+ get createdAssetId(): Asset;
1403
+ /**
1404
+ * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only
1405
+ */
1406
+ get createdApplicationId(): Application;
1407
+ /**
1408
+ * The last message emitted. Empty bytes if none were emitted. Application mode only
1409
+ */
1410
+ get lastLog(): bytes;
1411
+ /**
1412
+ * 64 byte state proof public key
1413
+ */
1414
+ get stateProofPk(): bytes;
1415
+ /**
1416
+ * Approval Program as an array of pages
1417
+ */
1418
+ approvalProgramPages(a: uint64): bytes;
1419
+ /**
1420
+ * Number of Approval Program pages
1421
+ */
1422
+ get numApprovalProgramPages(): uint64;
1423
+ /**
1424
+ * ClearState Program as an array of pages
1425
+ */
1426
+ clearStateProgramPages(a: uint64): bytes;
1427
+ /**
1428
+ * Number of ClearState Program pages
1429
+ */
1430
+ get numClearStateProgramPages(): uint64;
1431
+ };
1432
+ /**
1433
+ * Create inner transactions
1434
+ */
1435
+ export type ITxnCreateType = {
1436
+ /**
1437
+ * begin preparation of a new inner transaction in a new transaction group
1438
+ * `itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.
1439
+ * @see Native TEAL opcode: [`itxn_begin`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_begin)
1440
+ */
1441
+ begin(): void;
1442
+ /**
1443
+ * 32 byte address
1444
+ */
1445
+ setSender(a: Account): void;
1446
+ /**
1447
+ * microalgos
1448
+ */
1449
+ setFee(a: uint64): void;
1450
+ /**
1451
+ * Any data up to 1024 bytes
1452
+ */
1453
+ setNote(a: bytes): void;
1454
+ /**
1455
+ * 32 byte address
1456
+ */
1457
+ setReceiver(a: Account): void;
1458
+ /**
1459
+ * microalgos
1460
+ */
1461
+ setAmount(a: uint64): void;
1462
+ /**
1463
+ * 32 byte address
1464
+ */
1465
+ setCloseRemainderTo(a: Account): void;
1466
+ /**
1467
+ * 32 byte address
1468
+ */
1469
+ setVotePk(a: bytes): void;
1470
+ /**
1471
+ * 32 byte address
1472
+ */
1473
+ setSelectionPk(a: bytes): void;
1474
+ /**
1475
+ * The first round that the participation key is valid.
1476
+ */
1477
+ setVoteFirst(a: uint64): void;
1478
+ /**
1479
+ * The last round that the participation key is valid.
1480
+ */
1481
+ setVoteLast(a: uint64): void;
1482
+ /**
1483
+ * Dilution for the 2-level participation key
1484
+ */
1485
+ setVoteKeyDilution(a: uint64): void;
1486
+ /**
1487
+ * Transaction type as bytes
1488
+ */
1489
+ setType(a: bytes): void;
1490
+ /**
1491
+ * Transaction type as integer
1492
+ */
1493
+ setTypeEnum(a: uint64): void;
1494
+ /**
1495
+ * Asset ID
1496
+ */
1497
+ setXferAsset(a: Asset | uint64): void;
1498
+ /**
1499
+ * value in Asset's units
1500
+ */
1501
+ setAssetAmount(a: uint64): void;
1502
+ /**
1503
+ * 32 byte address. Source of assets if Sender is the Asset's Clawback address.
1504
+ */
1505
+ setAssetSender(a: Account): void;
1506
+ /**
1507
+ * 32 byte address
1508
+ */
1509
+ setAssetReceiver(a: Account): void;
1510
+ /**
1511
+ * 32 byte address
1512
+ */
1513
+ setAssetCloseTo(a: Account): void;
1514
+ /**
1515
+ * ApplicationID from ApplicationCall transaction
1516
+ */
1517
+ setApplicationId(a: Application | uint64): void;
1518
+ /**
1519
+ * ApplicationCall transaction on completion action
1520
+ */
1521
+ setOnCompletion(a: uint64): void;
1522
+ /**
1523
+ * Arguments passed to the application in the ApplicationCall transaction
1524
+ */
1525
+ setApplicationArgs(a: bytes): void;
1526
+ /**
1527
+ * Accounts listed in the ApplicationCall transaction
1528
+ */
1529
+ setAccounts(a: Account): void;
1530
+ /**
1531
+ * Approval program
1532
+ */
1533
+ setApprovalProgram(a: bytes): void;
1534
+ /**
1535
+ * Clear state program
1536
+ */
1537
+ setClearStateProgram(a: bytes): void;
1538
+ /**
1539
+ * 32 byte Sender's new AuthAddr
1540
+ */
1541
+ setRekeyTo(a: Account): void;
1542
+ /**
1543
+ * Asset ID in asset config transaction
1544
+ */
1545
+ setConfigAsset(a: Asset | uint64): void;
1546
+ /**
1547
+ * Total number of units of this asset created
1548
+ */
1549
+ setConfigAssetTotal(a: uint64): void;
1550
+ /**
1551
+ * Number of digits to display after the decimal place when displaying the asset
1552
+ */
1553
+ setConfigAssetDecimals(a: uint64): void;
1554
+ /**
1555
+ * Whether the asset's slots are frozen by default or not, 0 or 1
1556
+ */
1557
+ setConfigAssetDefaultFrozen(a: boolean): void;
1558
+ /**
1559
+ * Unit name of the asset
1560
+ */
1561
+ setConfigAssetUnitName(a: bytes): void;
1562
+ /**
1563
+ * The asset name
1564
+ */
1565
+ setConfigAssetName(a: bytes): void;
1566
+ /**
1567
+ * URL
1568
+ */
1569
+ setConfigAssetUrl(a: bytes): void;
1570
+ /**
1571
+ * 32 byte commitment to unspecified asset metadata
1572
+ */
1573
+ setConfigAssetMetadataHash(a: bytes): void;
1574
+ /**
1575
+ * 32 byte address
1576
+ */
1577
+ setConfigAssetManager(a: Account): void;
1578
+ /**
1579
+ * 32 byte address
1580
+ */
1581
+ setConfigAssetReserve(a: Account): void;
1582
+ /**
1583
+ * 32 byte address
1584
+ */
1585
+ setConfigAssetFreeze(a: Account): void;
1586
+ /**
1587
+ * 32 byte address
1588
+ */
1589
+ setConfigAssetClawback(a: Account): void;
1590
+ /**
1591
+ * Asset ID being frozen or un-frozen
1592
+ */
1593
+ setFreezeAsset(a: Asset | uint64): void;
1594
+ /**
1595
+ * 32 byte address of the account whose asset slot is being frozen or un-frozen
1596
+ */
1597
+ setFreezeAssetAccount(a: Account): void;
1598
+ /**
1599
+ * The new frozen value, 0 or 1
1600
+ */
1601
+ setFreezeAssetFrozen(a: boolean): void;
1602
+ /**
1603
+ * Foreign Assets listed in the ApplicationCall transaction
1604
+ */
1605
+ setAssets(a: uint64): void;
1606
+ /**
1607
+ * Foreign Apps listed in the ApplicationCall transaction
1608
+ */
1609
+ setApplications(a: uint64): void;
1610
+ /**
1611
+ * Number of global state integers in ApplicationCall
1612
+ */
1613
+ setGlobalNumUint(a: uint64): void;
1614
+ /**
1615
+ * Number of global state byteslices in ApplicationCall
1616
+ */
1617
+ setGlobalNumByteSlice(a: uint64): void;
1618
+ /**
1619
+ * Number of local state integers in ApplicationCall
1620
+ */
1621
+ setLocalNumUint(a: uint64): void;
1622
+ /**
1623
+ * Number of local state byteslices in ApplicationCall
1624
+ */
1625
+ setLocalNumByteSlice(a: uint64): void;
1626
+ /**
1627
+ * Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
1628
+ */
1629
+ setExtraProgramPages(a: uint64): void;
1630
+ /**
1631
+ * Marks an account nonparticipating for rewards
1632
+ */
1633
+ setNonparticipation(a: boolean): void;
1634
+ /**
1635
+ * 64 byte state proof public key
1636
+ */
1637
+ setStateProofPk(a: bytes): void;
1638
+ /**
1639
+ * Approval Program as an array of pages
1640
+ */
1641
+ setApprovalProgramPages(a: bytes): void;
1642
+ /**
1643
+ * ClearState Program as an array of pages
1644
+ */
1645
+ setClearStateProgramPages(a: bytes): void;
1646
+ /**
1647
+ * begin preparation of a new inner transaction in the same transaction group
1648
+ * `itxn_next` initializes the transaction exactly as `itxn_begin` does
1649
+ * @see Native TEAL opcode: [`itxn_next`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_next)
1650
+ */
1651
+ next(): void;
1652
+ /**
1653
+ * execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.
1654
+ * `itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.
1655
+ * @see Native TEAL opcode: [`itxn_submit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_submit)
1656
+ */
1657
+ submit(): void;
1658
+ };
1659
+ export type JsonRefType = {
1660
+ jsonString(a: bytes, b: bytes): bytes;
1661
+ jsonUint64(a: bytes, b: bytes): uint64;
1662
+ jsonObject(a: bytes, b: bytes): bytes;
1663
+ };
1664
+ /**
1665
+ * Keccak256 hash of value A, yields [32]byte
1666
+ * @see Native TEAL opcode: [`keccak256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#keccak256)
1667
+ */
1668
+ export type Keccak256Type = (a: bytes) => bytes;
1669
+ /**
1670
+ * yields length of byte value A
1671
+ * @see Native TEAL opcode: [`len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#len)
1672
+ */
1673
+ export type LenType = (a: bytes) => uint64;
1674
+ /**
1675
+ * Load or store scratch values
1676
+ */
1677
+ export type ScratchType = {
1678
+ /**
1679
+ * Ath scratch space value. All scratch spaces are 0 at program start.
1680
+ * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)
1681
+ */
1682
+ loadBytes(a: uint64): bytes;
1683
+ /**
1684
+ * Ath scratch space value. All scratch spaces are 0 at program start.
1685
+ * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)
1686
+ */
1687
+ loadUint64(a: uint64): uint64;
1688
+ /**
1689
+ * store B to the Ath scratch space
1690
+ * @see Native TEAL opcode: [`stores`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#stores)
1691
+ */
1692
+ store(a: uint64, b: uint64 | bytes): void;
1693
+ };
1694
+ /**
1695
+ * minimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change.
1696
+ * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).
1697
+ * * @return value.
1698
+ * @see Native TEAL opcode: [`min_balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#min_balance)
1699
+ */
1700
+ export type MinBalanceType = (a: Account | uint64) => uint64;
1701
+ /**
1702
+ * A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low
1703
+ * @see Native TEAL opcode: [`mulw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#mulw)
1704
+ */
1705
+ export type MulwType = (a: uint64, b: uint64) => readonly [uint64, uint64];
1706
+ /**
1707
+ * Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)
1708
+ * `replace3` can be called using `replace` with no immediates.
1709
+ * @see Native TEAL opcode: [`replace3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#replace3)
1710
+ */
1711
+ export type ReplaceType = (a: bytes, b: uint64, c: bytes) => bytes;
1712
+ /**
1713
+ * Copy of A with the Bth byte set to small integer (between 0..255) C. If B is greater than or equal to the array length, the program fails
1714
+ * @see Native TEAL opcode: [`setbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#setbyte)
1715
+ */
1716
+ export type SetByteType = (a: bytes, b: uint64, c: uint64) => bytes;
1717
+ /**
1718
+ * SHA256 hash of value A, yields [32]byte
1719
+ * @see Native TEAL opcode: [`sha256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha256)
1720
+ */
1721
+ export type Sha256Type = (a: bytes) => bytes;
1722
+ /**
1723
+ * SHA3_256 hash of value A, yields [32]byte
1724
+ * @see Native TEAL opcode: [`sha3_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha3_256)
1725
+ */
1726
+ export type Sha3_256Type = (a: bytes) => bytes;
1727
+ /**
1728
+ * SHA512_256 hash of value A, yields [32]byte
1729
+ * @see Native TEAL opcode: [`sha512_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha512_256)
1730
+ */
1731
+ export type Sha512_256Type = (a: bytes) => bytes;
1732
+ /**
1733
+ * A times 2^B, modulo 2^64
1734
+ * @see Native TEAL opcode: [`shl`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shl)
1735
+ */
1736
+ export type ShlType = (a: uint64, b: uint64) => uint64;
1737
+ /**
1738
+ * A divided by 2^B
1739
+ * @see Native TEAL opcode: [`shr`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shr)
1740
+ */
1741
+ export type ShrType = (a: uint64, b: uint64) => uint64;
1742
+ /**
1743
+ * The largest integer I such that I^2 <= A
1744
+ * @see Native TEAL opcode: [`sqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sqrt)
1745
+ */
1746
+ export type SqrtType = (a: uint64) => uint64;
1747
+ /**
1748
+ * A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails
1749
+ * @see Native TEAL opcode: [`substring3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#substring3)
1750
+ */
1751
+ export type SubstringType = (a: bytes, b: uint64, c: uint64) => bytes;
1752
+ /**
1753
+ * Get values for the current executing transaction
1754
+ */
1755
+ export type TxnType = {
1756
+ /**
1757
+ * 32 byte address
1758
+ */
1759
+ get sender(): Account;
1760
+ /**
1761
+ * microalgos
1762
+ */
1763
+ get fee(): uint64;
1764
+ /**
1765
+ * round number
1766
+ */
1767
+ get firstValid(): uint64;
1768
+ /**
1769
+ * UNIX timestamp of block before txn.FirstValid. Fails if negative
1770
+ */
1771
+ get firstValidTime(): uint64;
1772
+ /**
1773
+ * round number
1774
+ */
1775
+ get lastValid(): uint64;
1776
+ /**
1777
+ * Any data up to 1024 bytes
1778
+ */
1779
+ get note(): bytes;
1780
+ /**
1781
+ * 32 byte lease value
1782
+ */
1783
+ get lease(): bytes;
1784
+ /**
1785
+ * 32 byte address
1786
+ */
1787
+ get receiver(): Account;
1788
+ /**
1789
+ * microalgos
1790
+ */
1791
+ get amount(): uint64;
1792
+ /**
1793
+ * 32 byte address
1794
+ */
1795
+ get closeRemainderTo(): Account;
1796
+ /**
1797
+ * 32 byte address
1798
+ */
1799
+ get votePk(): bytes;
1800
+ /**
1801
+ * 32 byte address
1802
+ */
1803
+ get selectionPk(): bytes;
1804
+ /**
1805
+ * The first round that the participation key is valid.
1806
+ */
1807
+ get voteFirst(): uint64;
1808
+ /**
1809
+ * The last round that the participation key is valid.
1810
+ */
1811
+ get voteLast(): uint64;
1812
+ /**
1813
+ * Dilution for the 2-level participation key
1814
+ */
1815
+ get voteKeyDilution(): uint64;
1816
+ /**
1817
+ * Transaction type as bytes
1818
+ */
1819
+ get type(): bytes;
1820
+ /**
1821
+ * Transaction type as integer
1822
+ */
1823
+ get typeEnum(): uint64;
1824
+ /**
1825
+ * Asset ID
1826
+ */
1827
+ get xferAsset(): Asset;
1828
+ /**
1829
+ * value in Asset's units
1830
+ */
1831
+ get assetAmount(): uint64;
1832
+ /**
1833
+ * 32 byte address. Source of assets if Sender is the Asset's Clawback address.
1834
+ */
1835
+ get assetSender(): Account;
1836
+ /**
1837
+ * 32 byte address
1838
+ */
1839
+ get assetReceiver(): Account;
1840
+ /**
1841
+ * 32 byte address
1842
+ */
1843
+ get assetCloseTo(): Account;
1844
+ /**
1845
+ * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
1846
+ */
1847
+ get groupIndex(): uint64;
1848
+ /**
1849
+ * The computed ID for this transaction. 32 bytes.
1850
+ */
1851
+ get txId(): bytes;
1852
+ /**
1853
+ * ApplicationID from ApplicationCall transaction
1854
+ */
1855
+ get applicationId(): Application;
1856
+ /**
1857
+ * ApplicationCall transaction on completion action
1858
+ */
1859
+ get onCompletion(): uint64;
1860
+ /**
1861
+ * Arguments passed to the application in the ApplicationCall transaction
1862
+ */
1863
+ applicationArgs(a: uint64): bytes;
1864
+ /**
1865
+ * Number of ApplicationArgs
1866
+ */
1867
+ get numAppArgs(): uint64;
1868
+ /**
1869
+ * Accounts listed in the ApplicationCall transaction
1870
+ */
1871
+ accounts(a: uint64): Account;
1872
+ /**
1873
+ * Number of Accounts
1874
+ */
1875
+ get numAccounts(): uint64;
1876
+ /**
1877
+ * Approval program
1878
+ */
1879
+ get approvalProgram(): bytes;
1880
+ /**
1881
+ * Clear state program
1882
+ */
1883
+ get clearStateProgram(): bytes;
1884
+ /**
1885
+ * 32 byte Sender's new AuthAddr
1886
+ */
1887
+ get rekeyTo(): Account;
1888
+ /**
1889
+ * Asset ID in asset config transaction
1890
+ */
1891
+ get configAsset(): Asset;
1892
+ /**
1893
+ * Total number of units of this asset created
1894
+ */
1895
+ get configAssetTotal(): uint64;
1896
+ /**
1897
+ * Number of digits to display after the decimal place when displaying the asset
1898
+ */
1899
+ get configAssetDecimals(): uint64;
1900
+ /**
1901
+ * Whether the asset's slots are frozen by default or not, 0 or 1
1902
+ */
1903
+ get configAssetDefaultFrozen(): boolean;
1904
+ /**
1905
+ * Unit name of the asset
1906
+ */
1907
+ get configAssetUnitName(): bytes;
1908
+ /**
1909
+ * The asset name
1910
+ */
1911
+ get configAssetName(): bytes;
1912
+ /**
1913
+ * URL
1914
+ */
1915
+ get configAssetUrl(): bytes;
1916
+ /**
1917
+ * 32 byte commitment to unspecified asset metadata
1918
+ */
1919
+ get configAssetMetadataHash(): bytes;
1920
+ /**
1921
+ * 32 byte address
1922
+ */
1923
+ get configAssetManager(): Account;
1924
+ /**
1925
+ * 32 byte address
1926
+ */
1927
+ get configAssetReserve(): Account;
1928
+ /**
1929
+ * 32 byte address
1930
+ */
1931
+ get configAssetFreeze(): Account;
1932
+ /**
1933
+ * 32 byte address
1934
+ */
1935
+ get configAssetClawback(): Account;
1936
+ /**
1937
+ * Asset ID being frozen or un-frozen
1938
+ */
1939
+ get freezeAsset(): Asset;
1940
+ /**
1941
+ * 32 byte address of the account whose asset slot is being frozen or un-frozen
1942
+ */
1943
+ get freezeAssetAccount(): Account;
1944
+ /**
1945
+ * The new frozen value, 0 or 1
1946
+ */
1947
+ get freezeAssetFrozen(): boolean;
1948
+ /**
1949
+ * Foreign Assets listed in the ApplicationCall transaction
1950
+ */
1951
+ assets(a: uint64): Asset;
1952
+ /**
1953
+ * Number of Assets
1954
+ */
1955
+ get numAssets(): uint64;
1956
+ /**
1957
+ * Foreign Apps listed in the ApplicationCall transaction
1958
+ */
1959
+ applications(a: uint64): Application;
1960
+ /**
1961
+ * Number of Applications
1962
+ */
1963
+ get numApplications(): uint64;
1964
+ /**
1965
+ * Number of global state integers in ApplicationCall
1966
+ */
1967
+ get globalNumUint(): uint64;
1968
+ /**
1969
+ * Number of global state byteslices in ApplicationCall
1970
+ */
1971
+ get globalNumByteSlice(): uint64;
1972
+ /**
1973
+ * Number of local state integers in ApplicationCall
1974
+ */
1975
+ get localNumUint(): uint64;
1976
+ /**
1977
+ * Number of local state byteslices in ApplicationCall
1978
+ */
1979
+ get localNumByteSlice(): uint64;
1980
+ /**
1981
+ * Number of additional pages for each of the application's approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
1982
+ */
1983
+ get extraProgramPages(): uint64;
1984
+ /**
1985
+ * Marks an account nonparticipating for rewards
1986
+ */
1987
+ get nonparticipation(): boolean;
1988
+ /**
1989
+ * Log messages emitted by an application call (only with `itxn` in v5). Application mode only
1990
+ */
1991
+ logs(a: uint64): bytes;
1992
+ /**
1993
+ * Number of Logs (only with `itxn` in v5). Application mode only
1994
+ */
1995
+ get numLogs(): uint64;
1996
+ /**
1997
+ * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only
1998
+ */
1999
+ get createdAssetId(): Asset;
2000
+ /**
2001
+ * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only
2002
+ */
2003
+ get createdApplicationId(): Application;
2004
+ /**
2005
+ * The last message emitted. Empty bytes if none were emitted. Application mode only
2006
+ */
2007
+ get lastLog(): bytes;
2008
+ /**
2009
+ * 64 byte state proof public key
2010
+ */
2011
+ get stateProofPk(): bytes;
2012
+ /**
2013
+ * Approval Program as an array of pages
2014
+ */
2015
+ approvalProgramPages(a: uint64): bytes;
2016
+ /**
2017
+ * Number of Approval Program pages
2018
+ */
2019
+ get numApprovalProgramPages(): uint64;
2020
+ /**
2021
+ * ClearState Program as an array of pages
2022
+ */
2023
+ clearStateProgramPages(a: uint64): bytes;
2024
+ /**
2025
+ * Number of ClearState Program pages
2026
+ */
2027
+ get numClearStateProgramPages(): uint64;
2028
+ };
2029
+ /**
2030
+ * Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.
2031
+ * `VrfAlgorand` is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft [draft-irtf-cfrg-vrf-03](https://datatracker.ietf.org/doc/draft-irtf-cfrg-vrf/03/).
2032
+ * @see Native TEAL opcode: [`vrf_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#vrf_verify)
2033
+ */
2034
+ export type VrfVerifyType = (s: VrfVerify, a: bytes, b: bytes, c: bytes) => readonly [bytes, boolean];
2035
+ export type SelectType = ((a: bytes, b: bytes, c: uint64) => bytes) & ((a: uint64, b: uint64, c: uint64) => uint64);
2036
+ export type SetBitType = ((target: bytes, n: uint64, c: uint64) => bytes) & ((target: uint64, n: uint64, c: uint64) => uint64);
2037
+ import { bytes, uint64, biguint } from './primitives';
2038
+ import { Account, Application, Asset } from './reference';
2039
+ export type OpsNamespace = {
2040
+ AcctParams: AcctParamsType;
2041
+ addw: AddwType;
2042
+ AppGlobal: AppGlobalType;
2043
+ AppLocal: AppLocalType;
2044
+ appOptedIn: AppOptedInType;
2045
+ AppParams: AppParamsType;
2046
+ arg: ArgType;
2047
+ AssetHolding: AssetHoldingType;
2048
+ AssetParams: AssetParamsType;
2049
+ balance: BalanceType;
2050
+ base64Decode: Base64DecodeType;
2051
+ bitLength: BitLengthType;
2052
+ Block: BlockType;
2053
+ Box: BoxType;
2054
+ bsqrt: BsqrtType;
2055
+ btoi: BtoiType;
2056
+ bzero: BzeroType;
2057
+ concat: ConcatType;
2058
+ divmodw: DivmodwType;
2059
+ divw: DivwType;
2060
+ EllipticCurve: EllipticCurveType;
2061
+ ecdsaPkDecompress: EcdsaPkDecompressType;
2062
+ ecdsaPkRecover: EcdsaPkRecoverType;
2063
+ ecdsaVerify: EcdsaVerifyType;
2064
+ ed25519verify: Ed25519verifyType;
2065
+ ed25519verifyBare: Ed25519verifyBareType;
2066
+ exp: ExpType;
2067
+ expw: ExpwType;
2068
+ extract: ExtractType;
2069
+ extractUint16: ExtractUint16Type;
2070
+ extractUint32: ExtractUint32Type;
2071
+ extractUint64: ExtractUint64Type;
2072
+ gaid: GaidType;
2073
+ getBit: GetBitType;
2074
+ getByte: GetByteType;
2075
+ GITxn: GITxnType;
2076
+ gloadBytes: GloadBytesType;
2077
+ gloadUint64: GloadUint64Type;
2078
+ Global: GlobalType;
2079
+ GTxn: GTxnType;
2080
+ itob: ItobType;
2081
+ ITxn: ITxnType;
2082
+ ITxnCreate: ITxnCreateType;
2083
+ JsonRef: JsonRefType;
2084
+ keccak256: Keccak256Type;
2085
+ len: LenType;
2086
+ Scratch: ScratchType;
2087
+ minBalance: MinBalanceType;
2088
+ mulw: MulwType;
2089
+ replace: ReplaceType;
2090
+ setByte: SetByteType;
2091
+ sha256: Sha256Type;
2092
+ sha3_256: Sha3_256Type;
2093
+ sha512_256: Sha512_256Type;
2094
+ shl: ShlType;
2095
+ shr: ShrType;
2096
+ sqrt: SqrtType;
2097
+ substring: SubstringType;
2098
+ Txn: TxnType;
2099
+ vrfVerify: VrfVerifyType;
2100
+ select: SelectType;
2101
+ setBit: SetBitType;
2102
+ };