@algorandfoundation/algokit-utils 5.3.3-beta.2 → 5.4.0-beta.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.
Files changed (528) hide show
  1. package/account/account.d.ts +81 -0
  2. package/account/account.d.ts.map +1 -0
  3. package/account/account.js +120 -0
  4. package/account/account.js.map +1 -0
  5. package/account/account.mjs +112 -0
  6. package/account/account.mjs.map +1 -0
  7. package/account/get-account-config-from-environment.d.ts +13 -0
  8. package/account/get-account-config-from-environment.d.ts.map +1 -0
  9. package/account/get-account-config-from-environment.js +25 -0
  10. package/account/get-account-config-from-environment.js.map +1 -0
  11. package/account/get-account-config-from-environment.mjs +23 -0
  12. package/account/get-account-config-from-environment.mjs.map +1 -0
  13. package/account/get-account.d.ts +66 -0
  14. package/account/get-account.d.ts.map +1 -0
  15. package/account/get-account.js +83 -0
  16. package/account/get-account.js.map +1 -0
  17. package/account/get-account.mjs +81 -0
  18. package/account/get-account.mjs.map +1 -0
  19. package/account/get-dispenser-account.d.ts +13 -0
  20. package/account/get-dispenser-account.d.ts.map +1 -0
  21. package/account/get-dispenser-account.js +23 -0
  22. package/account/get-dispenser-account.js.map +1 -0
  23. package/account/get-dispenser-account.mjs +21 -0
  24. package/account/get-dispenser-account.mjs.map +1 -0
  25. package/account/index.d.ts +6 -0
  26. package/account/index.d.ts.map +1 -0
  27. package/account/mnemonic-account.d.ts +11 -0
  28. package/account/mnemonic-account.d.ts.map +1 -0
  29. package/account/mnemonic-account.js +18 -0
  30. package/account/mnemonic-account.js.map +1 -0
  31. package/account/mnemonic-account.mjs +16 -0
  32. package/account/mnemonic-account.mjs.map +1 -0
  33. package/amount.d.ts.map +1 -0
  34. package/amount.js +34 -0
  35. package/amount.js.map +1 -0
  36. package/{esm/amount.js → amount.mjs} +8 -5
  37. package/amount.mjs.map +1 -0
  38. package/app-client.d.ts.map +1 -0
  39. package/{cjs/app-client.js → app-client.js} +11 -10
  40. package/app-client.js.map +1 -0
  41. package/{esm/app-client.js → app-client.mjs} +8 -5
  42. package/app-client.mjs.map +1 -0
  43. package/app-deploy.d.ts.map +1 -0
  44. package/{cjs/app-deploy.js → app-deploy.js} +67 -69
  45. package/app-deploy.js.map +1 -0
  46. package/{esm/app-deploy.js → app-deploy.mjs} +17 -14
  47. package/app-deploy.mjs.map +1 -0
  48. package/{cjs/app.d.ts → app.d.ts} +1 -1
  49. package/app.d.ts.map +1 -0
  50. package/{cjs/app.js → app.js} +102 -104
  51. package/app.js.map +1 -0
  52. package/{esm/app.js → app.mjs} +27 -24
  53. package/app.mjs.map +1 -0
  54. package/asset.d.ts.map +1 -0
  55. package/{cjs/asset.js → asset.js} +41 -42
  56. package/asset.js.map +1 -0
  57. package/{esm/asset.js → asset.mjs} +10 -6
  58. package/asset.mjs.map +1 -0
  59. package/config.d.ts +4 -0
  60. package/config.d.ts.map +1 -0
  61. package/config.js +9 -0
  62. package/config.js.map +1 -0
  63. package/config.mjs +7 -0
  64. package/config.mjs.map +1 -0
  65. package/debugging/debugging.d.ts +10 -0
  66. package/debugging/debugging.d.ts.map +1 -0
  67. package/debugging/debugging.js +139 -0
  68. package/debugging/debugging.js.map +1 -0
  69. package/debugging/debugging.mjs +118 -0
  70. package/debugging/debugging.mjs.map +1 -0
  71. package/debugging/index.d.ts +3 -0
  72. package/debugging/index.d.ts.map +1 -0
  73. package/{cjs/debugging.d.ts → debugging/simulate-and-persist-response.d.ts} +3 -12
  74. package/debugging/simulate-and-persist-response.d.ts.map +1 -0
  75. package/debugging/simulate-and-persist-response.js +108 -0
  76. package/debugging/simulate-and-persist-response.js.map +1 -0
  77. package/debugging/simulate-and-persist-response.mjs +89 -0
  78. package/debugging/simulate-and-persist-response.mjs.map +1 -0
  79. package/dispenser-client.d.ts.map +1 -0
  80. package/{cjs/dispenser-client.js → dispenser-client.js} +7 -6
  81. package/dispenser-client.js.map +1 -0
  82. package/{esm/dispenser-client.js → dispenser-client.mjs} +6 -3
  83. package/dispenser-client.mjs.map +1 -0
  84. package/{cjs/index.d.ts → index.d.ts} +1 -3
  85. package/index.d.ts.map +1 -0
  86. package/index.js +125 -0
  87. package/index.js.map +1 -0
  88. package/index.mjs +25 -0
  89. package/index.mjs.map +1 -0
  90. package/indexer-lookup.d.ts.map +1 -0
  91. package/{cjs/indexer-lookup.js → indexer-lookup.js} +8 -8
  92. package/indexer-lookup.js.map +1 -0
  93. package/{esm/indexer-lookup.js → indexer-lookup.mjs} +8 -6
  94. package/indexer-lookup.mjs.map +1 -0
  95. package/localnet/get-kmd-wallet-account.d.ts +26 -0
  96. package/localnet/get-kmd-wallet-account.d.ts.map +1 -0
  97. package/localnet/get-kmd-wallet-account.js +55 -0
  98. package/localnet/get-kmd-wallet-account.js.map +1 -0
  99. package/localnet/get-kmd-wallet-account.mjs +53 -0
  100. package/localnet/get-kmd-wallet-account.mjs.map +1 -0
  101. package/localnet/get-localnet-dispenser-account.d.ts +12 -0
  102. package/localnet/get-localnet-dispenser-account.d.ts.map +1 -0
  103. package/localnet/get-localnet-dispenser-account.js +21 -0
  104. package/localnet/get-localnet-dispenser-account.js.map +1 -0
  105. package/localnet/get-localnet-dispenser-account.mjs +19 -0
  106. package/localnet/get-localnet-dispenser-account.mjs.map +1 -0
  107. package/localnet/get-or-create-kmd-wallet-account.d.ts +27 -0
  108. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +1 -0
  109. package/localnet/get-or-create-kmd-wallet-account.js +52 -0
  110. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
  111. package/localnet/get-or-create-kmd-wallet-account.mjs +50 -0
  112. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
  113. package/localnet/index.d.ts +5 -0
  114. package/localnet/index.d.ts.map +1 -0
  115. package/localnet/is-localnet.d.ts +5 -0
  116. package/localnet/is-localnet.d.ts.map +1 -0
  117. package/localnet/is-localnet.js +10 -0
  118. package/localnet/is-localnet.js.map +1 -0
  119. package/localnet/is-localnet.mjs +8 -0
  120. package/localnet/is-localnet.mjs.map +1 -0
  121. package/{cjs/network-client.d.ts → network-client.d.ts} +0 -1
  122. package/network-client.d.ts.map +1 -0
  123. package/{cjs/network-client.js → network-client.js} +21 -25
  124. package/network-client.js.map +1 -0
  125. package/{esm/network-client.js → network-client.mjs} +15 -13
  126. package/network-client.mjs.map +1 -0
  127. package/package.json +15 -36
  128. package/testing/_asset.d.ts.map +1 -0
  129. package/testing/account.d.ts.map +1 -0
  130. package/testing/account.js +29 -0
  131. package/testing/account.js.map +1 -0
  132. package/{esm/testing/account.js → testing/account.mjs} +8 -5
  133. package/testing/account.mjs.map +1 -0
  134. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
  135. package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.js +11 -10
  136. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  137. package/{esm/testing/fixtures/algokit-log-capture-fixture.js → testing/fixtures/algokit-log-capture-fixture.mjs} +7 -4
  138. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
  139. package/testing/fixtures/algorand-fixture.d.ts.map +1 -0
  140. package/testing/fixtures/algorand-fixture.js +64 -0
  141. package/testing/fixtures/algorand-fixture.js.map +1 -0
  142. package/{esm/testing/fixtures/algorand-fixture.js → testing/fixtures/algorand-fixture.mjs} +12 -4
  143. package/testing/fixtures/algorand-fixture.mjs.map +1 -0
  144. package/testing/fixtures/index.d.ts.map +1 -0
  145. package/testing/index.d.ts.map +1 -0
  146. package/testing/index.js +18 -0
  147. package/testing/index.js.map +1 -0
  148. package/testing/index.mjs +7 -0
  149. package/testing/index.mjs.map +1 -0
  150. package/testing/indexer.d.ts.map +1 -0
  151. package/{cjs/testing → testing}/indexer.js +4 -4
  152. package/testing/indexer.js.map +1 -0
  153. package/{esm/testing/indexer.js → testing/indexer.mjs} +4 -2
  154. package/testing/indexer.mjs.map +1 -0
  155. package/testing/test-logger.d.ts.map +1 -0
  156. package/{cjs/testing → testing}/test-logger.js +7 -8
  157. package/testing/test-logger.js.map +1 -0
  158. package/{esm/testing/test-logger.js → testing/test-logger.mjs} +6 -5
  159. package/testing/test-logger.mjs.map +1 -0
  160. package/testing/transaction-logger.d.ts.map +1 -0
  161. package/{cjs/testing → testing}/transaction-logger.js +14 -15
  162. package/testing/transaction-logger.js.map +1 -0
  163. package/{esm/testing/transaction-logger.js → testing/transaction-logger.mjs} +9 -5
  164. package/testing/transaction-logger.mjs.map +1 -0
  165. package/transaction/index.d.ts +3 -0
  166. package/transaction/index.d.ts.map +1 -0
  167. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +11 -0
  168. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +1 -0
  169. package/transaction/perform-atomic-transaction-composer-simulate.js +35 -0
  170. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
  171. package/transaction/perform-atomic-transaction-composer-simulate.mjs +33 -0
  172. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
  173. package/{cjs → transaction}/transaction.d.ts +2 -9
  174. package/transaction/transaction.d.ts.map +1 -0
  175. package/{cjs → transaction}/transaction.js +88 -113
  176. package/transaction/transaction.js.map +1 -0
  177. package/{esm/transaction.js → transaction/transaction.mjs} +27 -50
  178. package/transaction/transaction.mjs.map +1 -0
  179. package/transfer/index.d.ts +3 -0
  180. package/transfer/index.d.ts.map +1 -0
  181. package/transfer/transfer-algos.d.ts +17 -0
  182. package/transfer/transfer-algos.d.ts.map +1 -0
  183. package/transfer/transfer-algos.js +40 -0
  184. package/transfer/transfer-algos.js.map +1 -0
  185. package/transfer/transfer-algos.mjs +38 -0
  186. package/transfer/transfer-algos.mjs.map +1 -0
  187. package/{cjs → transfer}/transfer.d.ts +2 -14
  188. package/transfer/transfer.d.ts.map +1 -0
  189. package/transfer/transfer.js +147 -0
  190. package/transfer/transfer.js.map +1 -0
  191. package/{esm/transfer.js → transfer/transfer.mjs} +15 -40
  192. package/transfer/transfer.mjs.map +1 -0
  193. package/types/account.d.ts +63 -161
  194. package/types/account.d.ts.map +1 -1
  195. package/{cjs/types → types}/account.js +14 -22
  196. package/types/account.js.map +1 -0
  197. package/{esm/types/account.js → types/account.mjs} +7 -11
  198. package/types/account.mjs.map +1 -0
  199. package/types/algo-http-client-with-retry.d.ts.map +1 -0
  200. package/{cjs/types → types}/algo-http-client-with-retry.js +25 -24
  201. package/types/algo-http-client-with-retry.js.map +1 -0
  202. package/{esm/types/algo-http-client-with-retry.js → types/algo-http-client-with-retry.mjs} +23 -20
  203. package/types/algo-http-client-with-retry.mjs.map +1 -0
  204. package/types/amount.d.ts +22 -18
  205. package/types/amount.d.ts.map +1 -1
  206. package/{cjs/types → types}/amount.js +8 -11
  207. package/types/amount.js.map +1 -0
  208. package/{esm/types/amount.js → types/amount.mjs} +5 -3
  209. package/types/amount.mjs.map +1 -0
  210. package/types/app-client.d.ts +413 -69
  211. package/types/app-client.d.ts.map +1 -1
  212. package/{cjs/types → types}/app-client.js +58 -73
  213. package/types/app-client.js.map +1 -0
  214. package/{esm/types/app-client.js → types/app-client.mjs} +14 -24
  215. package/types/app-client.mjs.map +1 -0
  216. package/types/app-spec.d.ts.map +1 -0
  217. package/types/app.d.ts +300 -146
  218. package/types/app.d.ts.map +1 -1
  219. package/{cjs/types → types}/app.js +16 -14
  220. package/types/app.js.map +1 -0
  221. package/{esm/types/app.js → types/app.mjs} +9 -9
  222. package/types/app.mjs.map +1 -0
  223. package/types/asset.d.ts +40 -47
  224. package/types/asset.d.ts.map +1 -1
  225. package/types/config.d.ts.map +1 -0
  226. package/{cjs/types → types}/config.js +30 -41
  227. package/types/config.js.map +1 -0
  228. package/{esm/types/config.js → types/config.mjs} +8 -11
  229. package/types/config.mjs.map +1 -0
  230. package/types/debugging.d.ts +105 -22
  231. package/types/debugging.d.ts.map +1 -1
  232. package/{cjs/types → types}/debugging.js +6 -13
  233. package/types/debugging.js.map +1 -0
  234. package/{esm/types/debugging.js → types/debugging.mjs} +6 -11
  235. package/types/debugging.mjs.map +1 -0
  236. package/types/dispenser-client.d.ts +71 -13
  237. package/types/dispenser-client.d.ts.map +1 -1
  238. package/{cjs/types → types}/dispenser-client.js +4 -6
  239. package/types/dispenser-client.js.map +1 -0
  240. package/{esm/types/dispenser-client.js → types/dispenser-client.mjs} +4 -4
  241. package/types/dispenser-client.mjs.map +1 -0
  242. package/types/indexer.d.ts.map +1 -0
  243. package/types/logging.d.ts.map +1 -0
  244. package/{cjs/types → types}/logging.js +8 -6
  245. package/types/logging.js.map +1 -0
  246. package/{esm/types/logging.js → types/logging.mjs} +5 -3
  247. package/types/logging.mjs.map +1 -0
  248. package/types/logic-error.d.ts.map +1 -0
  249. package/{cjs/types → types}/logic-error.js +6 -9
  250. package/types/logic-error.js.map +1 -0
  251. package/{esm/types/logic-error.js → types/logic-error.mjs} +6 -7
  252. package/types/logic-error.mjs.map +1 -0
  253. package/types/network-client.d.ts +19 -99
  254. package/types/network-client.d.ts.map +1 -1
  255. package/types/testing.d.ts.map +1 -0
  256. package/types/transaction.d.ts +112 -175
  257. package/types/transaction.d.ts.map +1 -1
  258. package/types/transfer.d.ts +74 -56
  259. package/types/transfer.d.ts.map +1 -1
  260. package/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
  261. package/{cjs/types → types}/urlTokenBaseHTTPClient.js +7 -10
  262. package/types/urlTokenBaseHTTPClient.js.map +1 -0
  263. package/{esm/types/urlTokenBaseHTTPClient.js → types/urlTokenBaseHTTPClient.mjs} +5 -6
  264. package/types/urlTokenBaseHTTPClient.mjs.map +1 -0
  265. package/util.d.ts.map +1 -0
  266. package/{cjs/util.js → util.js} +7 -7
  267. package/util.js.map +1 -0
  268. package/{esm/util.js → util.mjs} +7 -5
  269. package/util.mjs.map +1 -0
  270. package/cjs/account.d.ts +0 -168
  271. package/cjs/account.d.ts.map +0 -1
  272. package/cjs/account.js +0 -238
  273. package/cjs/account.js.map +0 -1
  274. package/cjs/amount.d.ts.map +0 -1
  275. package/cjs/amount.js +0 -36
  276. package/cjs/amount.js.map +0 -1
  277. package/cjs/app-client.d.ts.map +0 -1
  278. package/cjs/app-client.js.map +0 -1
  279. package/cjs/app-deploy.d.ts.map +0 -1
  280. package/cjs/app-deploy.js.map +0 -1
  281. package/cjs/app.d.ts.map +0 -1
  282. package/cjs/app.js.map +0 -1
  283. package/cjs/asset.d.ts.map +0 -1
  284. package/cjs/asset.js.map +0 -1
  285. package/cjs/debugging.d.ts.map +0 -1
  286. package/cjs/debugging.js +0 -225
  287. package/cjs/debugging.js.map +0 -1
  288. package/cjs/dispenser-client.d.ts.map +0 -1
  289. package/cjs/dispenser-client.js.map +0 -1
  290. package/cjs/index.d.ts.map +0 -1
  291. package/cjs/index.js +0 -34
  292. package/cjs/index.js.map +0 -1
  293. package/cjs/indexer-lookup.d.ts.map +0 -1
  294. package/cjs/indexer-lookup.js.map +0 -1
  295. package/cjs/localnet.d.ts +0 -57
  296. package/cjs/localnet.d.ts.map +0 -1
  297. package/cjs/localnet.js +0 -121
  298. package/cjs/localnet.js.map +0 -1
  299. package/cjs/network-client.d.ts.map +0 -1
  300. package/cjs/network-client.js.map +0 -1
  301. package/cjs/testing/_asset.d.ts.map +0 -1
  302. package/cjs/testing/_asset.js +0 -36
  303. package/cjs/testing/_asset.js.map +0 -1
  304. package/cjs/testing/account.d.ts.map +0 -1
  305. package/cjs/testing/account.js +0 -31
  306. package/cjs/testing/account.js.map +0 -1
  307. package/cjs/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  308. package/cjs/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  309. package/cjs/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  310. package/cjs/testing/fixtures/algorand-fixture.js +0 -58
  311. package/cjs/testing/fixtures/algorand-fixture.js.map +0 -1
  312. package/cjs/testing/fixtures/index.d.ts.map +0 -1
  313. package/cjs/testing/fixtures/index.js +0 -19
  314. package/cjs/testing/fixtures/index.js.map +0 -1
  315. package/cjs/testing/index.d.ts.map +0 -1
  316. package/cjs/testing/index.js +0 -22
  317. package/cjs/testing/index.js.map +0 -1
  318. package/cjs/testing/indexer.d.ts.map +0 -1
  319. package/cjs/testing/indexer.js.map +0 -1
  320. package/cjs/testing/test-logger.d.ts.map +0 -1
  321. package/cjs/testing/test-logger.js.map +0 -1
  322. package/cjs/testing/transaction-logger.d.ts.map +0 -1
  323. package/cjs/testing/transaction-logger.js.map +0 -1
  324. package/cjs/transaction.d.ts.map +0 -1
  325. package/cjs/transaction.js.map +0 -1
  326. package/cjs/transfer.d.ts.map +0 -1
  327. package/cjs/transfer.js +0 -178
  328. package/cjs/transfer.js.map +0 -1
  329. package/cjs/types/account.d.ts +0 -70
  330. package/cjs/types/account.d.ts.map +0 -1
  331. package/cjs/types/account.js.map +0 -1
  332. package/cjs/types/algo-http-client-with-retry.d.ts.map +0 -1
  333. package/cjs/types/algo-http-client-with-retry.js.map +0 -1
  334. package/cjs/types/amount.d.ts +0 -24
  335. package/cjs/types/amount.d.ts.map +0 -1
  336. package/cjs/types/amount.js.map +0 -1
  337. package/cjs/types/app-client.d.ts +0 -416
  338. package/cjs/types/app-client.d.ts.map +0 -1
  339. package/cjs/types/app-client.js.map +0 -1
  340. package/cjs/types/app-spec.d.ts.map +0 -1
  341. package/cjs/types/app-spec.js +0 -3
  342. package/cjs/types/app-spec.js.map +0 -1
  343. package/cjs/types/app.d.ts +0 -323
  344. package/cjs/types/app.d.ts.map +0 -1
  345. package/cjs/types/app.js.map +0 -1
  346. package/cjs/types/asset.d.ts +0 -42
  347. package/cjs/types/asset.d.ts.map +0 -1
  348. package/cjs/types/asset.js +0 -3
  349. package/cjs/types/asset.js.map +0 -1
  350. package/cjs/types/config.d.ts.map +0 -1
  351. package/cjs/types/config.js.map +0 -1
  352. package/cjs/types/debugging.d.ts +0 -112
  353. package/cjs/types/debugging.d.ts.map +0 -1
  354. package/cjs/types/debugging.js.map +0 -1
  355. package/cjs/types/dispenser-client.d.ts +0 -77
  356. package/cjs/types/dispenser-client.d.ts.map +0 -1
  357. package/cjs/types/dispenser-client.js.map +0 -1
  358. package/cjs/types/indexer.d.ts.map +0 -1
  359. package/cjs/types/indexer.js +0 -34
  360. package/cjs/types/indexer.js.map +0 -1
  361. package/cjs/types/logging.d.ts.map +0 -1
  362. package/cjs/types/logging.js.map +0 -1
  363. package/cjs/types/logic-error.d.ts.map +0 -1
  364. package/cjs/types/logic-error.js.map +0 -1
  365. package/cjs/types/network-client.d.ts +0 -20
  366. package/cjs/types/network-client.d.ts.map +0 -1
  367. package/cjs/types/network-client.js +0 -3
  368. package/cjs/types/network-client.js.map +0 -1
  369. package/cjs/types/testing.d.ts.map +0 -1
  370. package/cjs/types/testing.js +0 -3
  371. package/cjs/types/testing.js.map +0 -1
  372. package/cjs/types/transaction.d.ts +0 -118
  373. package/cjs/types/transaction.d.ts.map +0 -1
  374. package/cjs/types/transaction.js +0 -3
  375. package/cjs/types/transaction.js.map +0 -1
  376. package/cjs/types/transfer.d.ts +0 -76
  377. package/cjs/types/transfer.d.ts.map +0 -1
  378. package/cjs/types/transfer.js +0 -3
  379. package/cjs/types/transfer.js.map +0 -1
  380. package/cjs/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  381. package/cjs/types/urlTokenBaseHTTPClient.js.map +0 -1
  382. package/cjs/util.d.ts.map +0 -1
  383. package/cjs/util.js.map +0 -1
  384. package/esm/account.js +0 -221
  385. package/esm/account.js.map +0 -1
  386. package/esm/amount.js.map +0 -1
  387. package/esm/app-client.js.map +0 -1
  388. package/esm/app-deploy.js.map +0 -1
  389. package/esm/app.js.map +0 -1
  390. package/esm/asset.js.map +0 -1
  391. package/esm/debugging.js +0 -197
  392. package/esm/debugging.js.map +0 -1
  393. package/esm/dispenser-client.js.map +0 -1
  394. package/esm/index.js +0 -17
  395. package/esm/index.js.map +0 -1
  396. package/esm/indexer-lookup.js.map +0 -1
  397. package/esm/localnet.js +0 -111
  398. package/esm/localnet.js.map +0 -1
  399. package/esm/network-client.js.map +0 -1
  400. package/esm/package.json +0 -3
  401. package/esm/testing/_asset.js +0 -29
  402. package/esm/testing/_asset.js.map +0 -1
  403. package/esm/testing/account.js.map +0 -1
  404. package/esm/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  405. package/esm/testing/fixtures/algorand-fixture.js.map +0 -1
  406. package/esm/testing/fixtures/index.js +0 -3
  407. package/esm/testing/fixtures/index.js.map +0 -1
  408. package/esm/testing/index.js +0 -6
  409. package/esm/testing/index.js.map +0 -1
  410. package/esm/testing/indexer.js.map +0 -1
  411. package/esm/testing/test-logger.js.map +0 -1
  412. package/esm/testing/transaction-logger.js.map +0 -1
  413. package/esm/transaction.js.map +0 -1
  414. package/esm/transfer.js.map +0 -1
  415. package/esm/types/account.js.map +0 -1
  416. package/esm/types/algo-http-client-with-retry.js.map +0 -1
  417. package/esm/types/amount.js.map +0 -1
  418. package/esm/types/app-client.js.map +0 -1
  419. package/esm/types/app-spec.js +0 -2
  420. package/esm/types/app-spec.js.map +0 -1
  421. package/esm/types/app.js.map +0 -1
  422. package/esm/types/asset.js +0 -2
  423. package/esm/types/asset.js.map +0 -1
  424. package/esm/types/config.js.map +0 -1
  425. package/esm/types/debugging.js.map +0 -1
  426. package/esm/types/dispenser-client.js.map +0 -1
  427. package/esm/types/indexer.js +0 -31
  428. package/esm/types/indexer.js.map +0 -1
  429. package/esm/types/logging.js.map +0 -1
  430. package/esm/types/logic-error.js.map +0 -1
  431. package/esm/types/network-client.js +0 -2
  432. package/esm/types/network-client.js.map +0 -1
  433. package/esm/types/testing.js +0 -2
  434. package/esm/types/testing.js.map +0 -1
  435. package/esm/types/transaction.js +0 -2
  436. package/esm/types/transaction.js.map +0 -1
  437. package/esm/types/transfer.js +0 -2
  438. package/esm/types/transfer.js.map +0 -1
  439. package/esm/types/urlTokenBaseHTTPClient.js.map +0 -1
  440. package/esm/util.js.map +0 -1
  441. package/types/app-deploy.d.ts +0 -104
  442. package/types/app-deploy.d.ts.map +0 -1
  443. package/types/index.d.ts +0 -17
  444. package/types/index.d.ts.map +0 -1
  445. package/types/indexer-lookup.d.ts +0 -39
  446. package/types/indexer-lookup.d.ts.map +0 -1
  447. package/types/localnet.d.ts +0 -57
  448. package/types/localnet.d.ts.map +0 -1
  449. package/types/testing/_asset.d.ts +0 -5
  450. package/types/testing/_asset.d.ts.map +0 -1
  451. package/types/testing/account.d.ts +0 -17
  452. package/types/testing/account.d.ts.map +0 -1
  453. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -20
  454. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  455. package/types/testing/fixtures/algorand-fixture.d.ts +0 -50
  456. package/types/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  457. package/types/testing/fixtures/index.d.ts +0 -3
  458. package/types/testing/fixtures/index.d.ts.map +0 -1
  459. package/types/testing/index.d.ts +0 -6
  460. package/types/testing/index.d.ts.map +0 -1
  461. package/types/testing/indexer.d.ts +0 -13
  462. package/types/testing/indexer.d.ts.map +0 -1
  463. package/types/testing/test-logger.d.ts +0 -41
  464. package/types/testing/test-logger.d.ts.map +0 -1
  465. package/types/testing/transaction-logger.d.ts +0 -31
  466. package/types/testing/transaction-logger.d.ts.map +0 -1
  467. package/types/types/account.d.ts +0 -70
  468. package/types/types/account.d.ts.map +0 -1
  469. package/types/types/algo-http-client-with-retry.d.ts +0 -14
  470. package/types/types/algo-http-client-with-retry.d.ts.map +0 -1
  471. package/types/types/amount.d.ts +0 -24
  472. package/types/types/amount.d.ts.map +0 -1
  473. package/types/types/app-client.d.ts +0 -416
  474. package/types/types/app-client.d.ts.map +0 -1
  475. package/types/types/app-spec.d.ts +0 -156
  476. package/types/types/app-spec.d.ts.map +0 -1
  477. package/types/types/app.d.ts +0 -323
  478. package/types/types/app.d.ts.map +0 -1
  479. package/types/types/asset.d.ts +0 -42
  480. package/types/types/asset.d.ts.map +0 -1
  481. package/types/types/config.d.ts +0 -49
  482. package/types/types/config.d.ts.map +0 -1
  483. package/types/types/debugging.d.ts +0 -112
  484. package/types/types/debugging.d.ts.map +0 -1
  485. package/types/types/dispenser-client.d.ts +0 -77
  486. package/types/types/dispenser-client.d.ts.map +0 -1
  487. package/types/types/indexer.d.ts +0 -625
  488. package/types/types/indexer.d.ts.map +0 -1
  489. package/types/types/logging.d.ts +0 -13
  490. package/types/types/logging.d.ts.map +0 -1
  491. package/types/types/logic-error.d.ts +0 -37
  492. package/types/types/logic-error.d.ts.map +0 -1
  493. package/types/types/network-client.d.ts +0 -20
  494. package/types/types/network-client.d.ts.map +0 -1
  495. package/types/types/testing.d.ts +0 -95
  496. package/types/types/testing.d.ts.map +0 -1
  497. package/types/types/transaction.d.ts +0 -118
  498. package/types/types/transaction.d.ts.map +0 -1
  499. package/types/types/transfer.d.ts +0 -76
  500. package/types/types/transfer.d.ts.map +0 -1
  501. package/types/types/urlTokenBaseHTTPClient.d.ts +0 -41
  502. package/types/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  503. package/types/util.d.ts +0 -24
  504. package/types/util.d.ts.map +0 -1
  505. /package/{cjs/amount.d.ts → amount.d.ts} +0 -0
  506. /package/{cjs/app-client.d.ts → app-client.d.ts} +0 -0
  507. /package/{cjs/app-deploy.d.ts → app-deploy.d.ts} +0 -0
  508. /package/{cjs/asset.d.ts → asset.d.ts} +0 -0
  509. /package/{cjs/dispenser-client.d.ts → dispenser-client.d.ts} +0 -0
  510. /package/{cjs/indexer-lookup.d.ts → indexer-lookup.d.ts} +0 -0
  511. /package/{cjs/testing → testing}/_asset.d.ts +0 -0
  512. /package/{cjs/testing → testing}/account.d.ts +0 -0
  513. /package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.d.ts +0 -0
  514. /package/{cjs/testing → testing}/fixtures/algorand-fixture.d.ts +0 -0
  515. /package/{cjs/testing → testing}/fixtures/index.d.ts +0 -0
  516. /package/{cjs/testing → testing}/index.d.ts +0 -0
  517. /package/{cjs/testing → testing}/indexer.d.ts +0 -0
  518. /package/{cjs/testing → testing}/test-logger.d.ts +0 -0
  519. /package/{cjs/testing → testing}/transaction-logger.d.ts +0 -0
  520. /package/{cjs/types → types}/algo-http-client-with-retry.d.ts +0 -0
  521. /package/{cjs/types → types}/app-spec.d.ts +0 -0
  522. /package/{cjs/types → types}/config.d.ts +0 -0
  523. /package/{cjs/types → types}/indexer.d.ts +0 -0
  524. /package/{cjs/types → types}/logging.d.ts +0 -0
  525. /package/{cjs/types → types}/logic-error.d.ts +0 -0
  526. /package/{cjs/types → types}/testing.d.ts +0 -0
  527. /package/{cjs/types → types}/urlTokenBaseHTTPClient.d.ts +0 -0
  528. /package/{cjs/util.d.ts → util.d.ts} +0 -0
package/types/app.d.ts CHANGED
@@ -1,169 +1,323 @@
1
1
  import algosdk from 'algosdk';
2
- import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallParams, AppCallTransactionResult, AppCallType, AppCompilationResult, AppReference, AppState, BoxIdentifier, BoxName, BoxReference, BoxValueRequestParams, BoxValuesRequestParams, CompiledTeal, CreateAppParams, RawAppCallArgs, UpdateAppParams } from './types/app';
3
- import { SendTransactionFrom } from './types/transaction';
2
+ import { SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from './transaction';
3
+ import ABIArgument = algosdk.ABIArgument;
4
4
  import ABIMethod = algosdk.ABIMethod;
5
5
  import ABIMethodParams = algosdk.ABIMethodParams;
6
+ import ABIType = algosdk.ABIType;
6
7
  import ABIValue = algosdk.ABIValue;
7
- import Algodv2 = algosdk.Algodv2;
8
- import modelsv2 = algosdk.modelsv2;
8
+ import Address = algosdk.Address;
9
9
  import OnApplicationComplete = algosdk.OnApplicationComplete;
10
+ import SourceMap = algosdk.SourceMap;
11
+ import SuggestedParams = algosdk.SuggestedParams;
12
+ import Transaction = algosdk.Transaction;
13
+ /** The name of the TEAL template variable for deploy-time immutability control */
14
+ export declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
15
+ /** The name of the TEAL template variable for deploy-time permanence control */
16
+ export declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
17
+ /** The app create/update ARC-2 transaction note prefix */
18
+ export declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
19
+ /** The maximum number of bytes in a single app code page */
20
+ export declare const APP_PAGE_MAX_SIZE = 2048;
21
+ /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
22
+ export declare const ABI_RETURN_PREFIX: Uint8Array;
23
+ /** Information about an Algorand app */
24
+ export interface AppReference {
25
+ /** The id of the app */
26
+ appId: number | bigint;
27
+ /** The Algorand address of the account associated with the app */
28
+ appAddress: string;
29
+ }
10
30
  /**
11
- * Creates a smart contract app, returns the details of the created app.
12
- * @param create The parameters to create the app with
13
- * @param algod An algod client
14
- * @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result
31
+ * A grouping of the app ID and name of the box in an Uint8Array
15
32
  */
16
- export declare function createApp(create: CreateAppParams, algod: Algodv2): Promise<Partial<AppCompilationResult> & AppCallTransactionResult & AppReference>;
33
+ export interface BoxReference {
34
+ /**
35
+ * A unique application id
36
+ */
37
+ appId: number | bigint;
38
+ /**
39
+ * Name of box to reference
40
+ */
41
+ name: BoxIdentifier;
42
+ }
17
43
  /**
18
- * Updates a smart contract app.
19
- * @param update The parameters to update the app with
20
- * @param algod An algod client
21
- * @returns The transaction send result and the compilation result
44
+ * Something that identifies a box name - either a:
45
+ * * `Uint8Array`
46
+ * * `string` (that will be encoded to a Uint8Array)
47
+ * * `SendTransactionFrom` (encoded into the public key address of the corresponding account)
22
48
  */
23
- export declare function updateApp(update: UpdateAppParams, algod: Algodv2): Promise<Partial<AppCompilationResult> & AppCallTransactionResult>;
24
- /** Returns an `algosdk.OnApplicationComplete` for the given onCompleteAction.
25
- *
26
- * If given `undefined` will return `OnApplicationComplete.NoOpOC`.
27
- *
28
- * If given an `AppCallType` will convert the string enum to the correct underlying `algosdk.OnApplicationComplete`.
29
- *
30
- * @param onCompletionAction The on completion action
31
- * @returns The `algosdk.OnApplicationComplete`
32
- */
33
- export declare function getAppOnCompleteAction(onCompletionAction?: AppCallType | OnApplicationComplete): algosdk.OnApplicationComplete;
34
- /**
35
- * Issues a call to a given app.
36
- * @param call The call details.
37
- * @param algod An algod client
38
- * @returns The result of the call
39
- */
40
- export declare function callApp(call: AppCallParams, algod: Algodv2): Promise<AppCallTransactionResult>;
41
- /**
42
- * Returns any ABI return values for the given app call arguments and transaction confirmation.
43
- * @param args The arguments that were used for the call
44
- * @param confirmation The transaction confirmation from algod
45
- * @returns The return value for the method call
46
- */
47
- export declare function getABIReturn(args?: AppCallArgs, confirmation?: modelsv2.PendingTransactionResponse): ABIReturn | undefined;
48
- /**
49
- * Returns the current global state values for the given app ID
50
- * @param appId The ID of the app return global state for
51
- * @param algod An algod client instance
52
- * @returns The current global state
53
- */
54
- export declare function getAppGlobalState(appId: number | bigint, algod: Algodv2): Promise<AppState>;
55
- /**
56
- * Returns the current global state values for the given app ID and account
57
- * @param appId The ID of the app return global state for
58
- * @param account Either the string address of an account or an account object for the account to get local state for the given app
59
- * @param algod An algod client instance
60
- * @returns The current local state for the given (app, account) combination
61
- */
62
- export declare function getAppLocalState(appId: number | bigint, account: string | SendTransactionFrom, algod: Algodv2): Promise<AppState>;
63
- /**
64
- * Returns the names of the boxes for the given app.
65
- * @param appId The ID of the app return box names for
66
- * @param algod An algod client instance
67
- * @returns The current box names
68
- */
69
- export declare function getAppBoxNames(appId: number | bigint, algod: Algodv2): Promise<BoxName[]>;
49
+ export type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
50
+ /** Common app call arguments for ABI and non-ABI (raw) calls */
51
+ export interface CoreAppCallArgs {
52
+ /** The optional lease for the transaction */
53
+ lease?: string | Uint8Array;
54
+ /** Any box references to load */
55
+ boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
56
+ /** The address of any accounts to load in */
57
+ accounts?: (string | Address)[];
58
+ /** IDs of any apps to load into the foreignApps array */
59
+ apps?: number[];
60
+ /** IDs of any assets to load into the foreignAssets array */
61
+ assets?: number[];
62
+ /** 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.
63
+ *
64
+ * **Note:** Use with extreme caution and review the [official rekey guidance](https://developer.algorand.org/docs/get-details/accounts/rekey/) first.
65
+ */
66
+ rekeyTo?: SendTransactionFrom | string;
67
+ }
70
68
  /**
71
- * Returns the value of the given box name for the given app.
72
- * @param appId The ID of the app return box names for
73
- * @param boxName The name of the box to return either as a string, binary array or `BoxName`
74
- * @param algod An algod client instance
75
- * @returns The current box value as a byte array
69
+ * App call args with non-ABI (raw) values (minus some processing like encoding strings as binary)
76
70
  */
77
- export declare function getAppBoxValue(appId: number | bigint, boxName: string | Uint8Array | BoxName, algod: Algodv2): Promise<Uint8Array>;
71
+ export interface RawAppCallArgs extends CoreAppCallArgs {
72
+ /** Any application arguments to pass through */
73
+ appArgs?: (Uint8Array | string)[];
74
+ /** Property to aid intellisense */
75
+ method?: undefined;
76
+ }
77
+ /** 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` */
78
+ export type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
78
79
  /**
79
- * Returns the value of the given box names for the given app.
80
- * @param appId The ID of the app return box names for
81
- * @param boxNames The names of the boxes to return either as a string, binary array or `BoxName`
82
- * @param algod An algod client instance
83
- * @returns The current box values as a byte array in the same order as the passed in box names
80
+ * App call args for an ABI call
84
81
  */
85
- export declare function getAppBoxValues(appId: number, boxNames: (string | Uint8Array | BoxName)[], algod: Algodv2): Promise<Uint8Array[]>;
86
- /**
87
- * Returns the value of the given box name for the given app decoded based on the given ABI type.
88
- * @param request The parameters for the box value request
89
- * @param algod An algod client instance
90
- * @returns The current box value as an ABI value
91
- */
92
- export declare function getAppBoxValueFromABIType(request: BoxValueRequestParams, algod: Algodv2): Promise<ABIValue>;
93
- /**
94
- * Returns the value of the given box names for the given app decoded based on the given ABI type.
95
- * @param request The parameters for the box value request
96
- * @param algod An algod client instance
97
- * @returns The current box values as an ABI value in the same order as the passed in box names
98
- */
99
- export declare function getAppBoxValuesFromABIType(request: BoxValuesRequestParams, algod: Algodv2): Promise<ABIValue[]>;
100
- /**
101
- * Converts an array of global/local state values from the algod api to a more friendly
102
- * generic object keyed by the UTF-8 value of the key.
103
- * @param state A `global-state`, `local-state`, `global-state-deltas` or `local-state-deltas`
104
- * @returns An object keyeed by the UTF-8 representation of the key with various parsings of the values
105
- */
106
- export declare function decodeAppState(state: {
107
- key: string;
108
- value: modelsv2.TealValue | modelsv2.EvalDelta;
109
- }[]): AppState;
110
- /**
111
- * Returns the app args ready to load onto an app `Transaction` object
112
- * @param args The app call args
113
- * @returns The args ready to load into a `Transaction`
114
- */
115
- export declare function getAppArgsForTransaction(args?: RawAppCallArgs): {
116
- accounts: string[] | undefined;
117
- appArgs: Uint8Array[] | undefined;
118
- boxes: algosdk.BoxReference[] | undefined;
119
- foreignApps: number[] | undefined;
120
- foreignAssets: number[] | undefined;
121
- lease: Uint8Array | undefined;
122
- } | undefined;
123
- /**
124
- * Returns the app args ready to load onto an ABI method call in `AtomicTransactionComposer`
125
- * @param args The ABI app call args
126
- * @param from The transaction signer
127
- * @returns The parameters ready to pass into `addMethodCall` within AtomicTransactionComposer
82
+ export type ABIAppCallArgs = CoreAppCallArgs & {
83
+ /** The ABI method to call */
84
+ method: ABIMethodParams | ABIMethod;
85
+ /** The ABI method args to pass in */
86
+ methodArgs: ABIAppCallArg[];
87
+ };
88
+ /** Arguments to pass to an app call either:
89
+ * * The raw app call values to pass through into the transaction (after processing); or
90
+ * * An ABI method definition (method and args)
91
+ **/
92
+ export type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
93
+ /** Base interface for common data passed to an app create or update. */
94
+ interface CreateOrUpdateAppParams extends SendTransactionParams {
95
+ /** The account (with private key loaded) that will send the transaction */
96
+ from: SendTransactionFrom;
97
+ /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
98
+ approvalProgram: Uint8Array | string;
99
+ /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
100
+ clearStateProgram: Uint8Array | string;
101
+ /** Optional transaction parameters */
102
+ transactionParams?: SuggestedParams;
103
+ /** The (optional) transaction note */
104
+ note?: TransactionNote;
105
+ /** The arguments passed in to the app call */
106
+ args?: AppCallArgs;
107
+ }
108
+ /** Parameters that are passed in when creating an app. */
109
+ export interface CreateAppParams extends CreateOrUpdateAppParams {
110
+ /** The storage schema to request for the created app */
111
+ schema: AppStorageSchema;
112
+ /** Override the on-completion action for the create call; defaults to NoOp */
113
+ onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
114
+ }
115
+ /** Parameters that are passed in when updating an app. */
116
+ export interface UpdateAppParams extends CreateOrUpdateAppParams {
117
+ /** The id of the app to update */
118
+ appId: number | bigint;
119
+ }
120
+ /** The type of call / [on-completion action](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#the-lifecycle-of-a-smart-contract) for a smart contract call.
121
+ *
122
+ * Equivalent of `algosdk.OnApplicationComplete`, but as a more convenient string enum.
123
+ *
124
+ * * `no_op`: Normal smart contract call, no special on-complete action
125
+ * * `opt_in`: Opt-in to smart contract local storage
126
+ * * `close_out`: Close-out local storage storage
127
+ * * `clear_state`: Clear local storage state
128
+ * * `update_application`: Update the smart contract
129
+ * * `delete_application`: Delete the smart contract
128
130
  */
129
- export declare function getAppArgsForABICall(args: ABIAppCallArgs, from: SendTransactionFrom): Promise<{
130
- method: algosdk.ABIMethod;
131
- sender: string;
132
- signer: algosdk.TransactionSigner;
133
- boxes: algosdk.BoxReference[] | undefined;
134
- lease: Uint8Array | undefined;
135
- appForeignApps: number[] | undefined;
136
- appForeignAssets: number[] | undefined;
137
- appAccounts: string[] | undefined;
138
- methodArgs: (string | number | bigint | boolean | Uint8Array | algosdk.ABIValue[] | algosdk.TransactionWithSigner)[];
139
- rekeyTo: string | undefined;
140
- }>;
131
+ export type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
132
+ /** Parameters representing a call to an app. */
133
+ export interface AppCallParams extends SendTransactionParams {
134
+ /** The id of the app to call */
135
+ appId: number | bigint;
136
+ /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
137
+ callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
138
+ /** The account to make the call from */
139
+ from: SendTransactionFrom;
140
+ /** Optional transaction parameters */
141
+ transactionParams?: SuggestedParams;
142
+ /** The (optional) transaction note */
143
+ note?: TransactionNote;
144
+ /** The arguments passed in to the app call */
145
+ args?: AppCallArgs;
146
+ }
147
+ /** Parameters representing the storage schema of an app. */
148
+ export interface AppStorageSchema {
149
+ /** Restricts number of ints in per-user local state */
150
+ localInts: number;
151
+ /** Restricts number of byte slices in per-user local state */
152
+ localByteSlices: number;
153
+ /** Restricts number of ints in global state */
154
+ globalInts: number;
155
+ /** Restricts number of byte slices in global state */
156
+ globalByteSlices: number;
157
+ /** 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 */
158
+ extraPages?: number;
159
+ }
160
+ /** Information about a compiled teal program */
161
+ export interface CompiledTeal {
162
+ /** Original TEAL code */
163
+ teal: string;
164
+ /** The compiled code */
165
+ compiled: string;
166
+ /** The has returned by the compiler */
167
+ compiledHash: string;
168
+ /** The base64 encoded code as a byte array */
169
+ compiledBase64ToBytes: Uint8Array;
170
+ /** Source map from the compilation */
171
+ sourceMap: SourceMap;
172
+ }
173
+ export interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
174
+ /** If an ABI method was called the processed return value */
175
+ return?: T;
176
+ }
177
+ /** Result from calling an app */
178
+ export interface AppCallTransactionResult extends AppCallTransactionResultOfType<ABIReturn> {
179
+ }
180
+ /** The return value of an ABI method call */
181
+ export type ABIReturn = {
182
+ rawReturnValue: Uint8Array;
183
+ returnValue: ABIValue;
184
+ decodeError: undefined;
185
+ } | {
186
+ rawReturnValue: undefined;
187
+ returnValue: undefined;
188
+ decodeError: Error;
189
+ };
141
190
  /**
142
- * Returns a `algosdk.BoxReference` given a `BoxIdentifier` or `BoxReference`.
143
- * @param box The box to return a reference for
144
- * @returns The box reference ready to pass into a `Transaction`
191
+ * 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`.
145
192
  */
146
- export declare function getBoxReference(box: BoxIdentifier | BoxReference | algosdk.BoxReference): algosdk.BoxReference;
147
- /**
148
- * Gets the current data for the given app from algod.
193
+ export interface AppDeployMetadata {
194
+ /** The unique name identifier of the app within the creator account */
195
+ name: string;
196
+ /** The version of app that is / will be deployed */
197
+ version: string;
198
+ /** Whether or not the app is deletable / permanent / unspecified */
199
+ deletable?: boolean;
200
+ /** Whether or not the app is updatable / immutable / unspecified */
201
+ updatable?: boolean;
202
+ }
203
+ /** The metadata that can be collected about a deployed app */
204
+ export interface AppMetadata extends AppReference, AppDeployMetadata {
205
+ /** The round the app was created */
206
+ createdRound: number;
207
+ /** The last round that the app was updated */
208
+ updatedRound: number;
209
+ /** The metadata when the app was created */
210
+ createdMetadata: AppDeployMetadata;
211
+ /** Whether or not the app is deleted */
212
+ deleted: boolean;
213
+ }
214
+ /** A lookup of name -> Algorand app for a creator */
215
+ export interface AppLookup {
216
+ creator: Readonly<string>;
217
+ apps: Readonly<{
218
+ [name: string]: AppMetadata;
219
+ }>;
220
+ }
221
+ /** Dictionary of deploy-time parameters to replace in a teal template.
222
+ *
223
+ * Note: Looks for `TMPL_{parameter}` for template replacements i.e. you can leave out the `TMPL_`.
149
224
  *
150
- * @param appId The id of the app
151
- * @param algod An algod client
152
- * @returns The data about the app
153
225
  */
154
- export declare function getAppById(appId: number | bigint, algod: Algodv2): Promise<algosdk.modelsv2.Application>;
226
+ export interface TealTemplateParams {
227
+ [key: string]: string | bigint | number | Uint8Array;
228
+ }
229
+ /** What action to perform when deploying an app and an update is detected in the TEAL code */
230
+ export declare enum OnUpdate {
231
+ /** Fail the deployment */
232
+ Fail = 0,
233
+ /** Update the app */
234
+ UpdateApp = 1,
235
+ /** Delete the app and create a new one in its place */
236
+ ReplaceApp = 2,
237
+ /** Create a new app */
238
+ AppendApp = 3
239
+ }
240
+ /** What action to perform when deploying an app and a breaking schema change is detected */
241
+ export declare enum OnSchemaBreak {
242
+ /** Fail the deployment */
243
+ Fail = 0,
244
+ /** Delete the app and create a new one in its place */
245
+ ReplaceApp = 1,
246
+ /** Create a new app */
247
+ AppendApp = 2
248
+ }
249
+ /** The parameters to deploy an app */
250
+ export interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
251
+ /** The deployment metadata */
252
+ metadata: AppDeployMetadata;
253
+ /** Any deploy-time parameters to replace in the TEAL code */
254
+ deployTimeParams?: TealTemplateParams;
255
+ /** What action to perform if a schema break is detected */
256
+ onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
257
+ /** What action to perform if a TEAL update is detected */
258
+ onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
259
+ /** Optional cached value of the existing apps for the given creator */
260
+ existingDeployments?: AppLookup;
261
+ /** Any args to pass to any create transaction that is issued as part of deployment */
262
+ createArgs?: AppCallArgs;
263
+ /** Override the on-completion action for the create call; defaults to NoOp */
264
+ createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
265
+ /** Any args to pass to any update transaction that is issued as part of deployment */
266
+ updateArgs?: AppCallArgs;
267
+ /** Any args to pass to any delete transaction that is issued as part of deployment */
268
+ deleteArgs?: AppCallArgs;
269
+ }
270
+ /** The result of compiling the approval and clear TEAL for an app */
271
+ export interface AppCompilationResult {
272
+ /** The compilation result of approval */
273
+ compiledApproval: CompiledTeal;
274
+ /** The compilation result of clear */
275
+ compiledClear: CompiledTeal;
276
+ }
277
+ /** Object holding app state values */
278
+ export interface AppState {
279
+ [key: string]: {
280
+ value: number | bigint;
281
+ keyRaw: Uint8Array;
282
+ keyBase64: string;
283
+ } | {
284
+ value: string;
285
+ valueRaw: Uint8Array;
286
+ valueBase64: string;
287
+ keyRaw: Uint8Array;
288
+ keyBase64: string;
289
+ };
290
+ }
291
+ /** The name of a box storage box */
292
+ export interface BoxName {
293
+ /** Name in UTF-8 */
294
+ name: string;
295
+ /** Name in binary bytes */
296
+ nameRaw: Uint8Array;
297
+ /** Name in Base64 */
298
+ nameBase64: string;
299
+ }
155
300
  /**
156
- * Compiles the given TEAL using algod and returns the result, including source map.
157
- *
158
- * @param algod An algod client
159
- * @param tealCode The TEAL code
160
- * @returns The information about the compiled file
301
+ * Parameters to get and decode a box value as an ABI type.
161
302
  */
162
- export declare function compileTeal(tealCode: string, algod: Algodv2): Promise<CompiledTeal>;
303
+ export interface BoxValueRequestParams {
304
+ /** The ID of the app return box names for */
305
+ appId: number | bigint;
306
+ /** The name of the box to return either as a string, binary array or `BoxName` */
307
+ boxName: string | Uint8Array | BoxName;
308
+ /** The ABI type to decode the value using */
309
+ type: ABIType;
310
+ }
163
311
  /**
164
- * Returns the encoded ABI spec for a given ABI Method
165
- * @param method The method to return a signature for
166
- * @returns The encoded ABI method spec e.g. `method_name(uint64,string)string`
312
+ * Parameters to get and decode a box value as an ABI type.
167
313
  */
168
- export declare const getABIMethodSignature: (method: ABIMethodParams | ABIMethod) => string;
314
+ export interface BoxValuesRequestParams {
315
+ /** The ID of the app return box names for */
316
+ appId: number;
317
+ /** The names of the boxes to return either as a string, binary array or BoxName` */
318
+ boxNames: (string | Uint8Array | BoxName)[];
319
+ /** The ABI type to decode the value using */
320
+ type: ABIType;
321
+ }
322
+ export {};
169
323
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,O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MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,gBAAgB,EAAE,YAAY,CAAA;IAC9B,sCAAsC;IACtC,aAAa,EAAE,YAAY,CAAA;CAC5B;AAED,sCAAsC;AACtC,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GACR;QACE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;QACtB,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,GACD;QACE,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,UAAU,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACN;AAED,oCAAoC;AACpC,MAAM,WAAW,OAAO;IACtB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,2BAA2B;IAC3B,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,kFAAkF;IAClF,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAA;IACtC,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,QAAQ,EAAE,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,EAAE,CAAA;IAC3C,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd"}
@@ -1,18 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OnSchemaBreak = exports.OnUpdate = exports.ABI_RETURN_PREFIX = exports.APP_PAGE_MAX_SIZE = exports.APP_DEPLOY_NOTE_DAPP = exports.DELETABLE_TEMPLATE_NAME = exports.UPDATABLE_TEMPLATE_NAME = void 0;
1
+ 'use strict';
2
+
4
3
  /** The name of the TEAL template variable for deploy-time immutability control */
5
- exports.UPDATABLE_TEMPLATE_NAME = 'TMPL_UPDATABLE';
4
+ const UPDATABLE_TEMPLATE_NAME = 'TMPL_UPDATABLE';
6
5
  /** The name of the TEAL template variable for deploy-time permanence control */
7
- exports.DELETABLE_TEMPLATE_NAME = 'TMPL_DELETABLE';
6
+ const DELETABLE_TEMPLATE_NAME = 'TMPL_DELETABLE';
8
7
  /** The app create/update ARC-2 transaction note prefix */
9
- exports.APP_DEPLOY_NOTE_DAPP = 'ALGOKIT_DEPLOYER';
8
+ const APP_DEPLOY_NOTE_DAPP = 'ALGOKIT_DEPLOYER';
10
9
  /** The maximum number of bytes in a single app code page */
11
- exports.APP_PAGE_MAX_SIZE = 2048;
12
- /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
13
- exports.ABI_RETURN_PREFIX = new Uint8Array([21, 31, 124, 117]);
10
+ const APP_PAGE_MAX_SIZE = 2048;
14
11
  /** What action to perform when deploying an app and an update is detected in the TEAL code */
15
- var OnUpdate;
12
+ exports.OnUpdate = void 0;
16
13
  (function (OnUpdate) {
17
14
  /** Fail the deployment */
18
15
  OnUpdate[OnUpdate["Fail"] = 0] = "Fail";
@@ -22,9 +19,9 @@ var OnUpdate;
22
19
  OnUpdate[OnUpdate["ReplaceApp"] = 2] = "ReplaceApp";
23
20
  /** Create a new app */
24
21
  OnUpdate[OnUpdate["AppendApp"] = 3] = "AppendApp";
25
- })(OnUpdate || (exports.OnUpdate = OnUpdate = {}));
22
+ })(exports.OnUpdate || (exports.OnUpdate = {}));
26
23
  /** What action to perform when deploying an app and a breaking schema change is detected */
27
- var OnSchemaBreak;
24
+ exports.OnSchemaBreak = void 0;
28
25
  (function (OnSchemaBreak) {
29
26
  /** Fail the deployment */
30
27
  OnSchemaBreak[OnSchemaBreak["Fail"] = 0] = "Fail";
@@ -32,5 +29,10 @@ var OnSchemaBreak;
32
29
  OnSchemaBreak[OnSchemaBreak["ReplaceApp"] = 1] = "ReplaceApp";
33
30
  /** Create a new app */
34
31
  OnSchemaBreak[OnSchemaBreak["AppendApp"] = 2] = "AppendApp";
35
- })(OnSchemaBreak || (exports.OnSchemaBreak = OnSchemaBreak = {}));
36
- //# sourceMappingURL=app.js.map
32
+ })(exports.OnSchemaBreak || (exports.OnSchemaBreak = {}));
33
+
34
+ exports.APP_DEPLOY_NOTE_DAPP = APP_DEPLOY_NOTE_DAPP;
35
+ exports.APP_PAGE_MAX_SIZE = APP_PAGE_MAX_SIZE;
36
+ exports.DELETABLE_TEMPLATE_NAME = DELETABLE_TEMPLATE_NAME;
37
+ exports.UPDATABLE_TEMPLATE_NAME = UPDATABLE_TEMPLATE_NAME;
38
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sources":["../../src/types/app.ts"],"sourcesContent":[null],"names":["OnUpdate","OnSchemaBreak"],"mappings":";;AAoBA;AACO,MAAM,uBAAuB,GAAG,iBAAgB;AAEvD;AACO,MAAM,uBAAuB,GAAG,iBAAgB;AAEvD;AACO,MAAM,oBAAoB,GAAG,mBAAkB;AAEtD;AACO,MAAM,iBAAiB,GAAG,KAAI;AA6OrC;AACYA,0BASX;AATD,CAAA,UAAY,QAAQ,EAAA;;AAElB,IAAA,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;;AAEJ,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;;AAET,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;;AAEV,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACX,CAAC,EATWA,gBAAQ,KAARA,gBAAQ,GASnB,EAAA,CAAA,CAAA,CAAA;AAED;AACYC,+BAOX;AAPD,CAAA,UAAY,aAAa,EAAA;;AAEvB,IAAA,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;;AAEJ,IAAA,aAAA,CAAA,aAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;;AAEV,IAAA,aAAA,CAAA,aAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACX,CAAC,EAPWA,qBAAa,KAAbA,qBAAa,GAOxB,EAAA,CAAA,CAAA;;;;;;;"}
@@ -1,15 +1,13 @@
1
1
  /** The name of the TEAL template variable for deploy-time immutability control */
2
- export const UPDATABLE_TEMPLATE_NAME = 'TMPL_UPDATABLE';
2
+ const UPDATABLE_TEMPLATE_NAME = 'TMPL_UPDATABLE';
3
3
  /** The name of the TEAL template variable for deploy-time permanence control */
4
- export const DELETABLE_TEMPLATE_NAME = 'TMPL_DELETABLE';
4
+ const DELETABLE_TEMPLATE_NAME = 'TMPL_DELETABLE';
5
5
  /** The app create/update ARC-2 transaction note prefix */
6
- export const APP_DEPLOY_NOTE_DAPP = 'ALGOKIT_DEPLOYER';
6
+ const APP_DEPLOY_NOTE_DAPP = 'ALGOKIT_DEPLOYER';
7
7
  /** The maximum number of bytes in a single app code page */
8
- export const APP_PAGE_MAX_SIZE = 2048;
9
- /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
10
- export const ABI_RETURN_PREFIX = new Uint8Array([21, 31, 124, 117]);
8
+ const APP_PAGE_MAX_SIZE = 2048;
11
9
  /** What action to perform when deploying an app and an update is detected in the TEAL code */
12
- export var OnUpdate;
10
+ var OnUpdate;
13
11
  (function (OnUpdate) {
14
12
  /** Fail the deployment */
15
13
  OnUpdate[OnUpdate["Fail"] = 0] = "Fail";
@@ -21,7 +19,7 @@ export var OnUpdate;
21
19
  OnUpdate[OnUpdate["AppendApp"] = 3] = "AppendApp";
22
20
  })(OnUpdate || (OnUpdate = {}));
23
21
  /** What action to perform when deploying an app and a breaking schema change is detected */
24
- export var OnSchemaBreak;
22
+ var OnSchemaBreak;
25
23
  (function (OnSchemaBreak) {
26
24
  /** Fail the deployment */
27
25
  OnSchemaBreak[OnSchemaBreak["Fail"] = 0] = "Fail";
@@ -30,4 +28,6 @@ export var OnSchemaBreak;
30
28
  /** Create a new app */
31
29
  OnSchemaBreak[OnSchemaBreak["AppendApp"] = 2] = "AppendApp";
32
30
  })(OnSchemaBreak || (OnSchemaBreak = {}));
33
- //# sourceMappingURL=app.js.map
31
+
32
+ export { APP_DEPLOY_NOTE_DAPP, APP_PAGE_MAX_SIZE, DELETABLE_TEMPLATE_NAME, OnSchemaBreak, OnUpdate, UPDATABLE_TEMPLATE_NAME };
33
+ //# sourceMappingURL=app.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.mjs","sources":["../../src/types/app.ts"],"sourcesContent":[null],"names":[],"mappings":"AAoBA;AACO,MAAM,uBAAuB,GAAG,iBAAgB;AAEvD;AACO,MAAM,uBAAuB,GAAG,iBAAgB;AAEvD;AACO,MAAM,oBAAoB,GAAG,mBAAkB;AAEtD;AACO,MAAM,iBAAiB,GAAG,KAAI;AA6OrC;IACY,SASX;AATD,CAAA,UAAY,QAAQ,EAAA;;AAElB,IAAA,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;;AAEJ,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;;AAET,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;;AAEV,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACX,CAAC,EATW,QAAQ,KAAR,QAAQ,GASnB,EAAA,CAAA,CAAA,CAAA;AAED;IACY,cAOX;AAPD,CAAA,UAAY,aAAa,EAAA;;AAEvB,IAAA,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;;AAEJ,IAAA,aAAA,CAAA,aAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;;AAEV,IAAA,aAAA,CAAA,aAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACX,CAAC,EAPW,aAAa,KAAb,aAAa,GAOxB,EAAA,CAAA,CAAA;;;;"}