@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/_virtual/_rolldown/runtime.js +33 -0
  2. package/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/account/account.d.ts +25 -30
  4. package/account/account.js +151 -146
  5. package/account/account.js.map +1 -1
  6. package/account/account.mjs +149 -144
  7. package/account/account.mjs.map +1 -1
  8. package/account/get-account-config-from-environment.d.ts +7 -2
  9. package/account/get-account-config-from-environment.js +19 -21
  10. package/account/get-account-config-from-environment.js.map +1 -1
  11. package/account/get-account-config-from-environment.mjs +19 -19
  12. package/account/get-account-config-from-environment.mjs.map +1 -1
  13. package/account/get-account.d.ts +14 -12
  14. package/account/get-account.js +56 -59
  15. package/account/get-account.js.map +1 -1
  16. package/account/get-account.mjs +56 -57
  17. package/account/get-account.mjs.map +1 -1
  18. package/account/get-dispenser-account.d.ts +9 -5
  19. package/account/get-dispenser-account.js +20 -18
  20. package/account/get-dispenser-account.js.map +1 -1
  21. package/account/get-dispenser-account.mjs +20 -16
  22. package/account/get-dispenser-account.mjs.map +1 -1
  23. package/account/mnemonic-account.d.ts +7 -3
  24. package/account/mnemonic-account.js +17 -17
  25. package/account/mnemonic-account.js.map +1 -1
  26. package/account/mnemonic-account.mjs +15 -15
  27. package/account/mnemonic-account.mjs.map +1 -1
  28. package/amount.d.ts +40 -35
  29. package/amount.js +33 -34
  30. package/amount.js.map +1 -1
  31. package/amount.mjs +33 -32
  32. package/amount.mjs.map +1 -1
  33. package/app-client.d.ts +10 -6
  34. package/app-client.js +91 -86
  35. package/app-client.js.map +1 -1
  36. package/app-client.mjs +91 -84
  37. package/app-client.mjs.map +1 -1
  38. package/app-deploy.d.ts +26 -24
  39. package/app-deploy.js +235 -253
  40. package/app-deploy.js.map +1 -1
  41. package/app-deploy.mjs +233 -251
  42. package/app-deploy.mjs.map +1 -1
  43. package/app.d.ts +45 -46
  44. package/app.js +253 -271
  45. package/app.js.map +1 -1
  46. package/app.mjs +249 -267
  47. package/app.mjs.map +1 -1
  48. package/asset.d.ts +16 -12
  49. package/asset.js +116 -122
  50. package/asset.js.map +1 -1
  51. package/asset.mjs +116 -120
  52. package/asset.mjs.map +1 -1
  53. package/config.d.ts +7 -2
  54. package/config.js +5 -7
  55. package/config.js.map +1 -1
  56. package/config.mjs +5 -4
  57. package/config.mjs.map +1 -1
  58. package/debugging/debugging.d.ts +5 -1
  59. package/debugging/debugging.js +11 -11
  60. package/debugging/debugging.js.map +1 -1
  61. package/debugging/debugging.mjs +11 -9
  62. package/debugging/debugging.mjs.map +1 -1
  63. package/dispenser-client.d.ts +7 -2
  64. package/dispenser-client.js +23 -24
  65. package/dispenser-client.js.map +1 -1
  66. package/dispenser-client.mjs +23 -22
  67. package/dispenser-client.mjs.map +1 -1
  68. package/index.d.ts +27 -18
  69. package/index.js +140 -143
  70. package/index.mjs +27 -29
  71. package/indexer-lookup.d.ts +18 -11
  72. package/indexer-lookup.js +112 -120
  73. package/indexer-lookup.js.map +1 -1
  74. package/indexer-lookup.mjs +105 -118
  75. package/indexer-lookup.mjs.map +1 -1
  76. package/localnet/get-kmd-wallet-account.d.ts +9 -7
  77. package/localnet/get-kmd-wallet-account.js +28 -26
  78. package/localnet/get-kmd-wallet-account.js.map +1 -1
  79. package/localnet/get-kmd-wallet-account.mjs +28 -24
  80. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  81. package/localnet/get-localnet-dispenser-account.d.ts +7 -5
  82. package/localnet/get-localnet-dispenser-account.js +17 -15
  83. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  84. package/localnet/get-localnet-dispenser-account.mjs +17 -13
  85. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  86. package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
  87. package/localnet/get-or-create-kmd-wallet-account.js +28 -26
  88. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  89. package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
  90. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  91. package/localnet/is-localnet.d.ts +7 -3
  92. package/localnet/is-localnet.js +9 -10
  93. package/localnet/is-localnet.js.map +1 -1
  94. package/localnet/is-localnet.mjs +9 -8
  95. package/localnet/is-localnet.mjs.map +1 -1
  96. package/network-client.d.ts +17 -15
  97. package/network-client.js +115 -116
  98. package/network-client.js.map +1 -1
  99. package/network-client.mjs +115 -114
  100. package/network-client.mjs.map +1 -1
  101. package/package.json +12 -3
  102. package/testing/account.d.ts +11 -9
  103. package/testing/account.js +31 -33
  104. package/testing/account.js.map +1 -1
  105. package/testing/account.mjs +29 -31
  106. package/testing/account.mjs.map +1 -1
  107. package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
  108. package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
  109. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  110. package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
  111. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  112. package/testing/fixtures/algorand-fixture.d.ts +9 -4
  113. package/testing/fixtures/algorand-fixture.js +67 -62
  114. package/testing/fixtures/algorand-fixture.js.map +1 -1
  115. package/testing/fixtures/algorand-fixture.mjs +66 -59
  116. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  117. package/testing/index.d.ts +7 -5
  118. package/testing/index.js +13 -18
  119. package/testing/index.mjs +7 -7
  120. package/testing/indexer.d.ts +5 -1
  121. package/testing/indexer.js +28 -37
  122. package/testing/indexer.js.map +1 -1
  123. package/testing/indexer.mjs +28 -35
  124. package/testing/indexer.mjs.map +1 -1
  125. package/testing/test-logger.d.ts +41 -36
  126. package/testing/test-logger.js +71 -76
  127. package/testing/test-logger.js.map +1 -1
  128. package/testing/test-logger.mjs +71 -74
  129. package/testing/test-logger.mjs.map +1 -1
  130. package/testing/transaction-logger.d.ts +30 -27
  131. package/testing/transaction-logger.js +77 -93
  132. package/testing/transaction-logger.js.map +1 -1
  133. package/testing/transaction-logger.mjs +74 -90
  134. package/testing/transaction-logger.mjs.map +1 -1
  135. package/transaction/legacy-bridge.js +100 -111
  136. package/transaction/legacy-bridge.js.map +1 -1
  137. package/transaction/legacy-bridge.mjs +97 -108
  138. package/transaction/legacy-bridge.mjs.map +1 -1
  139. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
  140. package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
  141. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  142. package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
  143. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  144. package/transaction/transaction.d.ts +34 -35
  145. package/transaction/transaction.js +716 -914
  146. package/transaction/transaction.js.map +1 -1
  147. package/transaction/transaction.mjs +713 -911
  148. package/transaction/transaction.mjs.map +1 -1
  149. package/transfer/transfer-algos.d.ts +9 -5
  150. package/transfer/transfer-algos.js +26 -27
  151. package/transfer/transfer-algos.js.map +1 -1
  152. package/transfer/transfer-algos.mjs +26 -25
  153. package/transfer/transfer-algos.mjs.map +1 -1
  154. package/transfer/transfer.d.ts +11 -8
  155. package/transfer/transfer.js +94 -100
  156. package/transfer/transfer.js.map +1 -1
  157. package/transfer/transfer.mjs +94 -98
  158. package/transfer/transfer.mjs.map +1 -1
  159. package/types/account-manager.d.ts +432 -429
  160. package/types/account-manager.js +591 -602
  161. package/types/account-manager.js.map +1 -1
  162. package/types/account-manager.mjs +587 -599
  163. package/types/account-manager.mjs.map +1 -1
  164. package/types/account.d.ts +192 -202
  165. package/types/account.js +91 -88
  166. package/types/account.js.map +1 -1
  167. package/types/account.mjs +88 -86
  168. package/types/account.mjs.map +1 -1
  169. package/types/algo-http-client-with-retry.d.ts +15 -10
  170. package/types/algo-http-client-with-retry.js +70 -92
  171. package/types/algo-http-client-with-retry.js.map +1 -1
  172. package/types/algo-http-client-with-retry.mjs +69 -90
  173. package/types/algo-http-client-with-retry.mjs.map +1 -1
  174. package/types/algorand-client-transaction-creator.d.ts +778 -771
  175. package/types/algorand-client-transaction-creator.js +733 -732
  176. package/types/algorand-client-transaction-creator.js.map +1 -1
  177. package/types/algorand-client-transaction-creator.mjs +732 -730
  178. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  179. package/types/algorand-client-transaction-sender.d.ts +1090 -1360
  180. package/types/algorand-client-transaction-sender.js +930 -961
  181. package/types/algorand-client-transaction-sender.js.map +1 -1
  182. package/types/algorand-client-transaction-sender.mjs +927 -959
  183. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  184. package/types/algorand-client.d.ts +239 -236
  185. package/types/algorand-client.js +322 -320
  186. package/types/algorand-client.js.map +1 -1
  187. package/types/algorand-client.mjs +321 -318
  188. package/types/algorand-client.mjs.map +1 -1
  189. package/types/amount.d.ts +47 -43
  190. package/types/amount.js +66 -70
  191. package/types/amount.js.map +1 -1
  192. package/types/amount.mjs +63 -68
  193. package/types/amount.mjs.map +1 -1
  194. package/types/app-arc56.d.ts +235 -272
  195. package/types/app-arc56.js +124 -170
  196. package/types/app-arc56.js.map +1 -1
  197. package/types/app-arc56.mjs +121 -168
  198. package/types/app-arc56.mjs.map +1 -1
  199. package/types/app-client.d.ts +1128 -2009
  200. package/types/app-client.js +1633 -1791
  201. package/types/app-client.js.map +1 -1
  202. package/types/app-client.mjs +1624 -1783
  203. package/types/app-client.mjs.map +1 -1
  204. package/types/app-deployer.d.ts +139 -141
  205. package/types/app-deployer.js +344 -384
  206. package/types/app-deployer.js.map +1 -1
  207. package/types/app-deployer.mjs +341 -382
  208. package/types/app-deployer.mjs.map +1 -1
  209. package/types/app-factory.d.ts +762 -932
  210. package/types/app-factory.js +496 -488
  211. package/types/app-factory.js.map +1 -1
  212. package/types/app-factory.mjs +491 -484
  213. package/types/app-factory.mjs.map +1 -1
  214. package/types/app-manager.d.ts +304 -310
  215. package/types/app-manager.js +422 -475
  216. package/types/app-manager.js.map +1 -1
  217. package/types/app-manager.mjs +419 -473
  218. package/types/app-manager.mjs.map +1 -1
  219. package/types/app-spec.d.ts +118 -117
  220. package/types/app-spec.js +125 -135
  221. package/types/app-spec.js.map +1 -1
  222. package/types/app-spec.mjs +121 -132
  223. package/types/app-spec.mjs.map +1 -1
  224. package/types/app.d.ts +229 -241
  225. package/types/app.js +36 -28
  226. package/types/app.js.map +1 -1
  227. package/types/app.mjs +33 -26
  228. package/types/app.mjs.map +1 -1
  229. package/types/asset-manager.d.ts +204 -199
  230. package/types/asset-manager.js +165 -174
  231. package/types/asset-manager.js.map +1 -1
  232. package/types/asset-manager.mjs +164 -172
  233. package/types/asset-manager.mjs.map +1 -1
  234. package/types/asset.d.ts +95 -91
  235. package/types/asset.js +0 -3
  236. package/types/asset.mjs +0 -2
  237. package/types/async-event-emitter.d.ts +18 -13
  238. package/types/async-event-emitter.js +37 -49
  239. package/types/async-event-emitter.js.map +1 -1
  240. package/types/async-event-emitter.mjs +36 -47
  241. package/types/async-event-emitter.mjs.map +1 -1
  242. package/types/client-manager.d.ts +453 -451
  243. package/types/client-manager.js +602 -598
  244. package/types/client-manager.js.map +1 -1
  245. package/types/client-manager.mjs +597 -594
  246. package/types/client-manager.mjs.map +1 -1
  247. package/types/composer.d.ts +1211 -1258
  248. package/types/composer.js +1436 -1498
  249. package/types/composer.js.map +1 -1
  250. package/types/composer.mjs +1430 -1493
  251. package/types/composer.mjs.map +1 -1
  252. package/types/config.d.ts +53 -48
  253. package/types/config.js +78 -77
  254. package/types/config.js.map +1 -1
  255. package/types/config.mjs +77 -75
  256. package/types/config.mjs.map +1 -1
  257. package/types/debugging.d.ts +25 -23
  258. package/types/debugging.js +9 -11
  259. package/types/debugging.js.map +1 -1
  260. package/types/debugging.mjs +8 -9
  261. package/types/debugging.mjs.map +1 -1
  262. package/types/dispenser-client.d.ts +57 -52
  263. package/types/dispenser-client.js +120 -141
  264. package/types/dispenser-client.js.map +1 -1
  265. package/types/dispenser-client.mjs +119 -139
  266. package/types/dispenser-client.mjs.map +1 -1
  267. package/types/expand.d.ts +5 -3
  268. package/types/expand.js +0 -3
  269. package/types/expand.mjs +0 -2
  270. package/types/indexer.d.ts +104 -100
  271. package/types/indexer.js +36 -31
  272. package/types/indexer.js.map +1 -1
  273. package/types/indexer.mjs +32 -30
  274. package/types/indexer.mjs.map +1 -1
  275. package/types/instance-of.d.ts +5 -3
  276. package/types/instance-of.js +0 -3
  277. package/types/instance-of.mjs +0 -2
  278. package/types/kmd-account-manager.d.ts +75 -70
  279. package/types/kmd-account-manager.js +150 -184
  280. package/types/kmd-account-manager.js.map +1 -1
  281. package/types/kmd-account-manager.mjs +147 -182
  282. package/types/kmd-account-manager.mjs.map +1 -1
  283. package/types/lifecycle-events.d.ts +13 -8
  284. package/types/lifecycle-events.js +10 -7
  285. package/types/lifecycle-events.js.map +1 -1
  286. package/types/lifecycle-events.mjs +9 -7
  287. package/types/lifecycle-events.mjs.map +1 -1
  288. package/types/logging.d.ts +15 -11
  289. package/types/logging.js +30 -31
  290. package/types/logging.js.map +1 -1
  291. package/types/logging.mjs +29 -29
  292. package/types/logging.mjs.map +1 -1
  293. package/types/logic-error.d.ts +33 -29
  294. package/types/logic-error.js +50 -49
  295. package/types/logic-error.js.map +1 -1
  296. package/types/logic-error.mjs +49 -47
  297. package/types/logic-error.mjs.map +1 -1
  298. package/types/network-client.d.ts +32 -27
  299. package/types/network-client.js +10 -9
  300. package/types/network-client.js.map +1 -1
  301. package/types/network-client.mjs +9 -7
  302. package/types/network-client.mjs.map +1 -1
  303. package/types/testing.d.ts +131 -132
  304. package/types/testing.js +0 -3
  305. package/types/testing.mjs +0 -2
  306. package/types/transaction.d.ts +110 -110
  307. package/types/transaction.js +0 -3
  308. package/types/transaction.mjs +0 -2
  309. package/types/transfer.d.ts +70 -66
  310. package/types/transfer.js +0 -3
  311. package/types/transfer.mjs +0 -2
  312. package/util.js +73 -118
  313. package/util.js.map +1 -1
  314. package/util.mjs +73 -116
  315. package/util.mjs.map +1 -1
  316. package/account/index.d.ts +0 -5
  317. package/debugging/index.d.ts +0 -1
  318. package/index.js.map +0 -1
  319. package/index.mjs.map +0 -1
  320. package/localnet/index.d.ts +0 -4
  321. package/testing/_asset.d.ts +0 -3
  322. package/testing/fixtures/index.d.ts +0 -2
  323. package/testing/index.js.map +0 -1
  324. package/testing/index.mjs.map +0 -1
  325. package/transaction/index.d.ts +0 -2
  326. package/transaction/legacy-bridge.d.ts +0 -35
  327. package/transfer/index.d.ts +0 -2
  328. package/types/asset.js.map +0 -1
  329. package/types/asset.mjs.map +0 -1
  330. package/types/expand.js.map +0 -1
  331. package/types/expand.mjs.map +0 -1
  332. package/types/instance-of.js.map +0 -1
  333. package/types/instance-of.mjs.map +0 -1
  334. package/types/testing.js.map +0 -1
  335. package/types/testing.mjs.map +0 -1
  336. package/types/transaction.js.map +0 -1
  337. package/types/transaction.mjs.map +0 -1
  338. package/types/transfer.js.map +0 -1
  339. package/types/transfer.mjs.map +0 -1
  340. package/util.d.ts +0 -48
package/types/app.d.ts CHANGED
@@ -1,47 +1,39 @@
1
- import algosdk from 'algosdk';
2
- import { Expand } from './expand';
3
- import { SendSingleTransactionResult, SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from './transaction';
4
- import ABIArgument = algosdk.ABIArgument;
5
- import ABIMethod = algosdk.ABIMethod;
6
- import ABIMethodParams = algosdk.ABIMethodParams;
7
- import ABIType = algosdk.ABIType;
8
- import ABIValue = algosdk.ABIValue;
9
- import Address = algosdk.Address;
10
- import OnApplicationComplete = algosdk.OnApplicationComplete;
11
- import SourceMap = algosdk.ProgramSourceMap;
12
- import SuggestedParams = algosdk.SuggestedParams;
13
- import Transaction = algosdk.Transaction;
1
+ import { Expand } from "./expand.js";
2
+ import { SendSingleTransactionResult, SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from "./transaction.js";
3
+ import algosdk from "algosdk";
4
+
5
+ //#region src/types/app.d.ts
14
6
  /** The name of the TEAL template variable for deploy-time immutability control */
15
- export declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
7
+ declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
16
8
  /** The name of the TEAL template variable for deploy-time permanence control */
17
- export declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
9
+ declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
18
10
  /** The app create/update [ARC-2](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0002.md) transaction note prefix */
19
- export declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
11
+ declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
20
12
  /** The maximum number of bytes in a single app code page */
21
- export declare const APP_PAGE_MAX_SIZE = 2048;
13
+ declare const APP_PAGE_MAX_SIZE = 2048;
22
14
  /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
23
- export declare const ABI_RETURN_PREFIX: Uint8Array;
15
+ declare const ABI_RETURN_PREFIX: Uint8Array<ArrayBuffer>;
24
16
  /** Information about an Algorand app */
25
- export interface AppReference {
26
- /** The id of the app */
27
- appId: number | bigint;
28
- /** The Algorand address of the account associated with the app */
29
- appAddress: string;
17
+ interface AppReference {
18
+ /** The id of the app */
19
+ appId: number | bigint;
20
+ /** The Algorand address of the account associated with the app */
21
+ appAddress: string;
30
22
  }
31
23
  /**
32
24
  * @deprecated Use `types/app-manager/BoxReference` instead.
33
25
  *
34
26
  * A grouping of the app ID and name of the box in an Uint8Array
35
27
  */
36
- export interface BoxReference {
37
- /**
38
- * A unique application id
39
- */
40
- appId: number | bigint;
41
- /**
42
- * Name of box to reference
43
- */
44
- name: BoxIdentifier;
28
+ interface BoxReference {
29
+ /**
30
+ * A unique application id
31
+ */
32
+ appId: number | bigint;
33
+ /**
34
+ * Name of box to reference
35
+ */
36
+ name: BoxIdentifier;
45
37
  }
46
38
  /**
47
39
  * @deprecated Use `types/app-manager/BoxIdentifier` instead.
@@ -51,86 +43,84 @@ export interface BoxReference {
51
43
  * * `string` (that will be encoded to a Uint8Array)
52
44
  * * `SendTransactionFrom` (encoded into the public key address of the corresponding account)
53
45
  */
54
- export type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
46
+ type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
55
47
  /** Common app call arguments for ABI and non-ABI (raw) calls */
56
- export interface CoreAppCallArgs {
57
- /** The optional lease for the transaction */
58
- lease?: string | Uint8Array;
59
- /** Any box references to load */
60
- boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
61
- /** The address of any accounts to load in */
62
- accounts?: (string | Address)[];
63
- /** IDs of any apps to load into the foreignApps array */
64
- apps?: number[];
65
- /** IDs of any assets to load into the foreignAssets array */
66
- assets?: number[];
67
- /** Optional account / account address that should be authorised to transact on behalf of the from account the app call is sent from after this transaction.
68
- *
69
- * **Note:** Use with extreme caution and review the [official rekey guidance](https://dev.algorand.co/concepts/accounts/rekeying) first.
70
- */
71
- rekeyTo?: SendTransactionFrom | string;
48
+ interface CoreAppCallArgs {
49
+ /** The optional lease for the transaction */
50
+ lease?: string | Uint8Array;
51
+ /** Any box references to load */
52
+ boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
53
+ /** The address of any accounts to load in */
54
+ accounts?: (string | Address$1)[];
55
+ /** IDs of any apps to load into the foreignApps array */
56
+ apps?: number[];
57
+ /** IDs of any assets to load into the foreignAssets array */
58
+ assets?: number[];
59
+ /** Optional account / account address that should be authorised to transact on behalf of the from account the app call is sent from after this transaction.
60
+ *
61
+ * **Note:** Use with extreme caution and review the [official rekey guidance](https://dev.algorand.co/concepts/accounts/rekeying) first.
62
+ */
63
+ rekeyTo?: SendTransactionFrom | string;
72
64
  }
73
65
  /**
74
66
  * App call args with non-ABI (raw) values (minus some processing like encoding strings as binary)
75
67
  */
76
- export interface RawAppCallArgs extends CoreAppCallArgs {
77
- /** Any application arguments to pass through */
78
- appArgs?: (Uint8Array | string)[];
79
- /** Property to aid intellisense */
80
- method?: undefined;
68
+ interface RawAppCallArgs extends CoreAppCallArgs {
69
+ /** Any application arguments to pass through */
70
+ appArgs?: (Uint8Array | string)[];
71
+ /** Property to aid intellisense */
72
+ method?: undefined;
81
73
  }
82
74
  /** An argument for an ABI method, either a primitive value, or a transaction with or without signer, or the unawaited async return value of an algokit method that returns a `SendTransactionResult` */
83
- export type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
75
+ type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
84
76
  /**
85
77
  * App call args for an ABI call
86
78
  */
87
- export type ABIAppCallArgs = CoreAppCallArgs & {
88
- /** The ABI method to call */
89
- method: ABIMethodParams | ABIMethod;
90
- /** The ABI method args to pass in */
91
- methodArgs: ABIAppCallArg[];
79
+ type ABIAppCallArgs = CoreAppCallArgs & {
80
+ /** The ABI method to call */method: ABIMethodParams | ABIMethod; /** The ABI method args to pass in */
81
+ methodArgs: ABIAppCallArg[];
92
82
  };
93
83
  /** Arguments to pass to an app call either:
94
84
  * * The raw app call values to pass through into the transaction (after processing); or
95
85
  * * An ABI method definition (method and args)
96
86
  **/
97
- export type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
87
+ type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
98
88
  /**
99
89
  * @deprecated Use `TransactionComposer` to construct create app transactions instead.
100
90
  *
101
91
  * Base interface for common data passed to an app create or update.
102
92
  */
103
93
  interface CreateOrUpdateAppParams extends SendTransactionParams {
104
- /** The account (with private key loaded) that will send the transaction */
105
- from: SendTransactionFrom;
106
- /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
107
- approvalProgram: Uint8Array | string;
108
- /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
109
- clearStateProgram: Uint8Array | string;
110
- /** Optional transaction parameters */
111
- transactionParams?: SuggestedParams;
112
- /** The (optional) transaction note */
113
- note?: TransactionNote;
114
- /** The arguments passed in to the app call */
115
- args?: AppCallArgs;
94
+ /** The account (with private key loaded) that will send the transaction */
95
+ from: SendTransactionFrom;
96
+ /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
97
+ approvalProgram: Uint8Array | string;
98
+ /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
99
+ clearStateProgram: Uint8Array | string;
100
+ /** Optional transaction parameters */
101
+ transactionParams?: SuggestedParams;
102
+ /** The (optional) transaction note */
103
+ note?: TransactionNote;
104
+ /** The arguments passed in to the app call */
105
+ args?: AppCallArgs;
116
106
  }
117
107
  /**
118
108
  * @deprecated Use `TransactionComposer` to construct create app transactions instead.
119
109
  *
120
110
  * Parameters that are passed in when creating an app. */
121
- export interface CreateAppParams extends CreateOrUpdateAppParams {
122
- /** The storage schema to request for the created app */
123
- schema: AppStorageSchema;
124
- /** Override the on-completion action for the create call; defaults to NoOp */
125
- onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
111
+ interface CreateAppParams extends CreateOrUpdateAppParams {
112
+ /** The storage schema to request for the created app */
113
+ schema: AppStorageSchema;
114
+ /** Override the on-completion action for the create call; defaults to NoOp */
115
+ onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
126
116
  }
127
117
  /**
128
118
  * @deprecated Use `TransactionComposer` to construct update app transactions instead.
129
119
  *
130
120
  * Parameters that are passed in when updating an app. */
131
- export interface UpdateAppParams extends CreateOrUpdateAppParams {
132
- /** The id of the app to update */
133
- appId: number | bigint;
121
+ interface UpdateAppParams extends CreateOrUpdateAppParams {
122
+ /** The id of the app to update */
123
+ appId: number | bigint;
134
124
  }
135
125
  /**
136
126
  * @deprecated Use `algosdk.OnApplicationComplete` directly instead.
@@ -146,217 +136,215 @@ export interface UpdateAppParams extends CreateOrUpdateAppParams {
146
136
  * * `update_application`: Update the smart contract
147
137
  * * `delete_application`: Delete the smart contract
148
138
  */
149
- export type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
139
+ type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
150
140
  /** Parameters representing a call to an app. */
151
- export interface AppCallParams extends SendTransactionParams {
152
- /** The id of the app to call */
153
- appId: number | bigint;
154
- /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
155
- callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
156
- /** The account to make the call from */
157
- from: SendTransactionFrom;
158
- /** Optional transaction parameters */
159
- transactionParams?: SuggestedParams;
160
- /** The (optional) transaction note */
161
- note?: TransactionNote;
162
- /** The arguments passed in to the app call */
163
- args?: AppCallArgs;
141
+ interface AppCallParams extends SendTransactionParams {
142
+ /** The id of the app to call */
143
+ appId: number | bigint;
144
+ /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
145
+ callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
146
+ /** The account to make the call from */
147
+ from: SendTransactionFrom;
148
+ /** Optional transaction parameters */
149
+ transactionParams?: SuggestedParams;
150
+ /** The (optional) transaction note */
151
+ note?: TransactionNote;
152
+ /** The arguments passed in to the app call */
153
+ args?: AppCallArgs;
164
154
  }
165
155
  /** Parameters representing the storage schema of an app. */
166
- export interface AppStorageSchema {
167
- /** Restricts number of ints in per-user local state */
168
- localInts: number;
169
- /** Restricts number of byte slices in per-user local state */
170
- localByteSlices: number;
171
- /** Restricts number of ints in global state */
172
- globalInts: number;
173
- /** Restricts number of byte slices in global state */
174
- globalByteSlices: number;
175
- /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
176
- extraPages?: number;
156
+ interface AppStorageSchema {
157
+ /** Restricts number of ints in per-user local state */
158
+ localInts: number;
159
+ /** Restricts number of byte slices in per-user local state */
160
+ localByteSlices: number;
161
+ /** Restricts number of ints in global state */
162
+ globalInts: number;
163
+ /** Restricts number of byte slices in global state */
164
+ globalByteSlices: number;
165
+ /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
166
+ extraPages?: number;
177
167
  }
178
168
  /** Information about a compiled teal program */
179
- export interface CompiledTeal {
180
- /** Original TEAL code */
181
- teal: string;
182
- /** The compiled code */
183
- compiled: string;
184
- /** The hash returned by the compiler */
185
- compiledHash: string;
186
- /** The base64 encoded code as a byte array */
187
- compiledBase64ToBytes: Uint8Array;
188
- /** Source map from the compilation */
189
- sourceMap: SourceMap;
169
+ interface CompiledTeal {
170
+ /** Original TEAL code */
171
+ teal: string;
172
+ /** The compiled code */
173
+ compiled: string;
174
+ /** The hash returned by the compiler */
175
+ compiledHash: string;
176
+ /** The base64 encoded code as a byte array */
177
+ compiledBase64ToBytes: Uint8Array;
178
+ /** Source map from the compilation */
179
+ sourceMap: SourceMap;
190
180
  }
191
- export interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
192
- /** If an ABI method was called the processed return value */
193
- return?: T;
181
+ interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
182
+ /** If an ABI method was called the processed return value */
183
+ return?: T;
194
184
  }
195
185
  /** Result from calling an app */
196
- export type AppCallTransactionResult = AppCallTransactionResultOfType<ABIReturn>;
186
+ type AppCallTransactionResult = AppCallTransactionResultOfType<ABIReturn>;
197
187
  /** The return value of an ABI method call */
198
- export type ABIReturn = {
199
- rawReturnValue: Uint8Array;
200
- returnValue: ABIValue;
201
- method: ABIMethod;
202
- decodeError: undefined;
188
+ type ABIReturn = {
189
+ rawReturnValue: Uint8Array;
190
+ returnValue: ABIValue;
191
+ method: ABIMethod;
192
+ decodeError: undefined;
203
193
  } | {
204
- rawReturnValue?: undefined;
205
- returnValue?: undefined;
206
- method?: undefined;
207
- decodeError: Error;
194
+ rawReturnValue?: undefined;
195
+ returnValue?: undefined;
196
+ method?: undefined;
197
+ decodeError: Error;
208
198
  };
209
199
  /**
210
200
  * The payload of the metadata to add to the transaction note when deploying an app, noting it will be prefixed with `APP_DEPLOY_NOTE_PREFIX`.
211
201
  */
212
- export interface AppDeployMetadata {
213
- /** The unique name identifier of the app within the creator account */
214
- name: string;
215
- /** The version of app that is / will be deployed */
216
- version: string;
217
- /** Whether or not the app is deletable / permanent / unspecified */
218
- deletable?: boolean;
219
- /** Whether or not the app is updatable / immutable / unspecified */
220
- updatable?: boolean;
202
+ interface AppDeployMetadata {
203
+ /** The unique name identifier of the app within the creator account */
204
+ name: string;
205
+ /** The version of app that is / will be deployed */
206
+ version: string;
207
+ /** Whether or not the app is deletable / permanent / unspecified */
208
+ deletable?: boolean;
209
+ /** Whether or not the app is updatable / immutable / unspecified */
210
+ updatable?: boolean;
221
211
  }
222
212
  /** The metadata that can be collected about a deployed app */
223
- export interface AppMetadata extends AppReference, AppDeployMetadata {
224
- /** The round the app was created */
225
- createdRound: number;
226
- /** The last round that the app was updated */
227
- updatedRound: number;
228
- /** The metadata when the app was created */
229
- createdMetadata: AppDeployMetadata;
230
- /** Whether or not the app is deleted */
231
- deleted: boolean;
213
+ interface AppMetadata extends AppReference, AppDeployMetadata {
214
+ /** The round the app was created */
215
+ createdRound: number;
216
+ /** The last round that the app was updated */
217
+ updatedRound: number;
218
+ /** The metadata when the app was created */
219
+ createdMetadata: AppDeployMetadata;
220
+ /** Whether or not the app is deleted */
221
+ deleted: boolean;
232
222
  }
233
223
  /** A lookup of name -> Algorand app for a creator */
234
- export interface AppLookup {
235
- creator: Readonly<string>;
236
- apps: Readonly<{
237
- [name: string]: AppMetadata;
238
- }>;
224
+ interface AppLookup {
225
+ creator: Readonly<string>;
226
+ apps: Readonly<{
227
+ [name: string]: AppMetadata;
228
+ }>;
239
229
  }
240
230
  /** Dictionary of deploy-time parameters to replace in a teal template.
241
231
  *
242
232
  * Note: Looks for `TMPL_{parameter}` for template replacements i.e. you can leave out the `TMPL_`.
243
233
  *
244
234
  */
245
- export interface TealTemplateParams {
246
- [key: string]: string | bigint | number | Uint8Array;
235
+ interface TealTemplateParams {
236
+ [key: string]: string | bigint | number | Uint8Array;
247
237
  }
248
238
  /** What action to perform when deploying an app and an update is detected in the TEAL code */
249
- export declare enum OnUpdate {
250
- /** Fail the deployment */
251
- Fail = 0,
252
- /** Update the app */
253
- UpdateApp = 1,
254
- /** Delete the app and create a new one in its place */
255
- ReplaceApp = 2,
256
- /** Create a new app */
257
- AppendApp = 3
239
+ declare enum OnUpdate {
240
+ /** Fail the deployment */
241
+ Fail = 0,
242
+ /** Update the app */
243
+ UpdateApp = 1,
244
+ /** Delete the app and create a new one in its place */
245
+ ReplaceApp = 2,
246
+ /** Create a new app */
247
+ AppendApp = 3
258
248
  }
259
249
  /** What action to perform when deploying an app and a breaking schema change is detected */
260
- export declare enum OnSchemaBreak {
261
- /** Fail the deployment */
262
- Fail = 0,
263
- /** Delete the app and create a new one in its place */
264
- ReplaceApp = 1,
265
- /** Create a new app */
266
- AppendApp = 2
250
+ declare enum OnSchemaBreak {
251
+ /** Fail the deployment */
252
+ Fail = 0,
253
+ /** Delete the app and create a new one in its place */
254
+ ReplaceApp = 1,
255
+ /** Create a new app */
256
+ AppendApp = 2
267
257
  }
268
258
  /** The parameters to deploy an app */
269
- export interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
270
- /** The deployment metadata */
271
- metadata: AppDeployMetadata;
272
- /** Any deploy-time parameters to replace in the TEAL code */
273
- deployTimeParams?: TealTemplateParams;
274
- /** What action to perform if a schema break is detected */
275
- onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
276
- /** What action to perform if a TEAL update is detected */
277
- onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
278
- /** Optional cached value of the existing apps for the given creator */
279
- existingDeployments?: AppLookup;
280
- /** Any args to pass to any create transaction that is issued as part of deployment */
281
- createArgs?: AppCallArgs;
282
- /** Override the on-completion action for the create call; defaults to NoOp */
283
- createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
284
- /** Any args to pass to any update transaction that is issued as part of deployment */
285
- updateArgs?: AppCallArgs;
286
- /** Any args to pass to any delete transaction that is issued as part of deployment */
287
- deleteArgs?: AppCallArgs;
259
+ interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
260
+ /** The deployment metadata */
261
+ metadata: AppDeployMetadata;
262
+ /** Any deploy-time parameters to replace in the TEAL code */
263
+ deployTimeParams?: TealTemplateParams;
264
+ /** What action to perform if a schema break is detected */
265
+ onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
266
+ /** What action to perform if a TEAL update is detected */
267
+ onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
268
+ /** Optional cached value of the existing apps for the given creator */
269
+ existingDeployments?: AppLookup;
270
+ /** Any args to pass to any create transaction that is issued as part of deployment */
271
+ createArgs?: AppCallArgs;
272
+ /** Override the on-completion action for the create call; defaults to NoOp */
273
+ createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
274
+ /** Any args to pass to any update transaction that is issued as part of deployment */
275
+ updateArgs?: AppCallArgs;
276
+ /** Any args to pass to any delete transaction that is issued as part of deployment */
277
+ deleteArgs?: AppCallArgs;
288
278
  }
289
279
  /** The result of compiling the approval and clear state TEAL programs for an app */
290
- export interface AppCompilationResult {
291
- /** The result of compiling the approval program */
292
- compiledApproval: CompiledTeal;
293
- /** The result of compiling the clear state program */
294
- compiledClear: CompiledTeal;
280
+ interface AppCompilationResult {
281
+ /** The result of compiling the approval program */
282
+ compiledApproval: CompiledTeal;
283
+ /** The result of compiling the clear state program */
284
+ compiledClear: CompiledTeal;
295
285
  }
296
- export type AppReturn<TReturn> = {
297
- /** The ABI method call return value */
298
- return?: TReturn;
286
+ type AppReturn<TReturn> = {
287
+ /** The ABI method call return value */return?: TReturn;
299
288
  };
300
289
  /** Result from sending a single app transaction. */
301
- export type SendAppTransactionResult = Expand<SendSingleTransactionResult & {
302
- /** If an ABI method was called the processed return value */
303
- return?: ABIReturn;
290
+ type SendAppTransactionResult = Expand<SendSingleTransactionResult & {
291
+ /** If an ABI method was called the processed return value */return?: ABIReturn;
304
292
  }>;
305
293
  /** Result from sending a single app transaction. */
306
- export type SendAppUpdateTransactionResult = Expand<SendAppTransactionResult & Partial<AppCompilationResult>>;
294
+ type SendAppUpdateTransactionResult = Expand<SendAppTransactionResult & Partial<AppCompilationResult>>;
307
295
  /** Result from sending a single app transaction. */
308
- export type SendAppCreateTransactionResult = Expand<SendAppUpdateTransactionResult & {
309
- /** The id of the created app */
310
- appId: bigint;
311
- /** The Algorand address of the account associated with the app */
312
- appAddress: Address;
296
+ type SendAppCreateTransactionResult = Expand<SendAppUpdateTransactionResult & {
297
+ /** The id of the created app */appId: bigint; /** The Algorand address of the account associated with the app */
298
+ appAddress: Address$1;
313
299
  }>;
314
300
  /** Object holding app state values */
315
- export interface AppState {
316
- [key: string]: {
317
- value: bigint;
318
- keyRaw: Uint8Array;
319
- keyBase64: string;
320
- } | {
321
- value: string;
322
- valueRaw: Uint8Array;
323
- valueBase64: string;
324
- keyRaw: Uint8Array;
325
- keyBase64: string;
326
- };
301
+ interface AppState {
302
+ [key: string]: {
303
+ value: bigint;
304
+ keyRaw: Uint8Array;
305
+ keyBase64: string;
306
+ } | {
307
+ value: string;
308
+ valueRaw: Uint8Array;
309
+ valueBase64: string;
310
+ keyRaw: Uint8Array;
311
+ keyBase64: string;
312
+ };
327
313
  }
328
314
  /**
329
315
  * The name of a box storage box */
330
- export interface BoxName {
331
- /** Name in UTF-8 */
332
- name: string;
333
- /** Name in binary bytes */
334
- nameRaw: Uint8Array;
335
- /** Name in Base64 */
336
- nameBase64: string;
316
+ interface BoxName {
317
+ /** Name in UTF-8 */
318
+ name: string;
319
+ /** Name in binary bytes */
320
+ nameRaw: Uint8Array;
321
+ /** Name in Base64 */
322
+ nameBase64: string;
337
323
  }
338
324
  /**
339
325
  * @deprecated Use `types/app-manager/BoxValueRequestParams` instead.
340
326
  * Parameters to get and decode a box value as an ABI type.
341
327
  */
342
- export interface BoxValueRequestParams {
343
- /** The ID of the app return box names for */
344
- appId: number | bigint;
345
- /** The name of the box to return either as a string, binary array or `BoxName` */
346
- boxName: string | Uint8Array | BoxName;
347
- /** The ABI type to decode the value using */
348
- type: ABIType;
328
+ interface BoxValueRequestParams {
329
+ /** The ID of the app return box names for */
330
+ appId: number | bigint;
331
+ /** The name of the box to return either as a string, binary array or `BoxName` */
332
+ boxName: string | Uint8Array | BoxName;
333
+ /** The ABI type to decode the value using */
334
+ type: ABIType;
349
335
  }
350
336
  /**
351
337
  * @deprecated Use `types/app-manager/BoxValuesRequestParams` instead.
352
338
  * Parameters to get and decode a box value as an ABI type.
353
339
  */
354
- export interface BoxValuesRequestParams {
355
- /** The ID of the app return box names for */
356
- appId: number;
357
- /** The names of the boxes to return either as a string, binary array or BoxName` */
358
- boxNames: (string | Uint8Array | BoxName)[];
359
- /** The ABI type to decode the value using */
360
- type: ABIType;
340
+ interface BoxValuesRequestParams {
341
+ /** The ID of the app return box names for */
342
+ appId: number;
343
+ /** The names of the boxes to return either as a string, binary array or BoxName` */
344
+ boxNames: (string | Uint8Array | BoxName)[];
345
+ /** The ABI type to decode the value using */
346
+ type: ABIType;
361
347
  }
362
- export {};
348
+ //#endregion
349
+ export { ABIAppCallArg, ABIAppCallArgs, ABIReturn, ABI_RETURN_PREFIX, APP_DEPLOY_NOTE_DAPP, APP_PAGE_MAX_SIZE, AppCallArgs, AppCallParams, AppCallTransactionResult, AppCallTransactionResultOfType, AppCallType, AppCompilationResult, AppDeployMetadata, AppDeploymentParams, AppLookup, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxIdentifier, BoxName, BoxReference, BoxValueRequestParams, BoxValuesRequestParams, CompiledTeal, CoreAppCallArgs, CreateAppParams, DELETABLE_TEMPLATE_NAME, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult, TealTemplateParams, UPDATABLE_TEMPLATE_NAME, UpdateAppParams };
350
+ //# sourceMappingURL=app.d.ts.map