@algorandfoundation/algokit-utils 6.3.0-beta.1 → 7.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -26
  3. package/account/account.d.ts +12 -10
  4. package/account/get-account-config-from-environment.d.ts +0 -1
  5. package/account/get-account.d.ts +2 -3
  6. package/account/get-dispenser-account.d.ts +2 -3
  7. package/account/index.d.ts +0 -1
  8. package/account/mnemonic-account.d.ts +1 -2
  9. package/amount.d.ts +15 -5
  10. package/app-client.d.ts +19 -5
  11. package/app-deploy.d.ts +18 -2
  12. package/app.d.ts +39 -3
  13. package/asset.d.ts +5 -6
  14. package/config.d.ts +0 -1
  15. package/debugging/debugging.d.ts +3 -5
  16. package/debugging/index.d.ts +0 -2
  17. package/dispenser-client.d.ts +0 -1
  18. package/index.d.ts +5 -4
  19. package/index.js +56 -46
  20. package/index.js.map +1 -1
  21. package/index.mjs +26 -25
  22. package/index.mjs.map +1 -1
  23. package/indexer-lookup.d.ts +10 -9
  24. package/localnet/get-kmd-wallet-account.d.ts +1 -2
  25. package/localnet/get-localnet-dispenser-account.d.ts +1 -2
  26. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
  27. package/localnet/index.d.ts +0 -1
  28. package/localnet/is-localnet.d.ts +1 -2
  29. package/network-client.d.ts +3 -10
  30. package/package.json +3 -4
  31. package/{account → src/account}/account.js +21 -18
  32. package/src/account/account.js.map +1 -0
  33. package/{account → src/account}/account.mjs +22 -19
  34. package/src/account/account.mjs.map +1 -0
  35. package/src/account/get-account-config-from-environment.js.map +1 -0
  36. package/src/account/get-account-config-from-environment.mjs.map +1 -0
  37. package/{account → src/account}/get-account.js +3 -3
  38. package/src/account/get-account.js.map +1 -0
  39. package/{account → src/account}/get-account.mjs +3 -3
  40. package/src/account/get-account.mjs.map +1 -0
  41. package/{account → src/account}/get-dispenser-account.js +3 -3
  42. package/src/account/get-dispenser-account.js.map +1 -0
  43. package/{account → src/account}/get-dispenser-account.mjs +3 -3
  44. package/src/account/get-dispenser-account.mjs.map +1 -0
  45. package/{account → src/account}/mnemonic-account.js +1 -1
  46. package/src/account/mnemonic-account.js.map +1 -0
  47. package/{account → src/account}/mnemonic-account.mjs +1 -1
  48. package/src/account/mnemonic-account.mjs.map +1 -0
  49. package/{amount.js → src/amount.js} +10 -3
  50. package/src/amount.js.map +1 -0
  51. package/{amount.mjs → src/amount.mjs} +10 -4
  52. package/src/amount.mjs.map +1 -0
  53. package/{app-client.js → src/app-client.js} +20 -5
  54. package/src/app-client.js.map +1 -0
  55. package/{app-client.mjs → src/app-client.mjs} +20 -5
  56. package/src/app-client.mjs.map +1 -0
  57. package/src/app-deploy.js +285 -0
  58. package/src/app-deploy.js.map +1 -0
  59. package/src/app-deploy.mjs +276 -0
  60. package/src/app-deploy.mjs.map +1 -0
  61. package/src/app.js +349 -0
  62. package/src/app.js.map +1 -0
  63. package/src/app.mjs +329 -0
  64. package/src/app.mjs.map +1 -0
  65. package/{asset.js → src/asset.js} +6 -9
  66. package/src/asset.js.map +1 -0
  67. package/{asset.mjs → src/asset.mjs} +6 -9
  68. package/src/asset.mjs.map +1 -0
  69. package/{config.js → src/config.js} +1 -1
  70. package/src/config.js.map +1 -0
  71. package/{config.mjs → src/config.mjs} +1 -1
  72. package/src/config.mjs.map +1 -0
  73. package/src/debugging/debugging.js +15 -0
  74. package/src/debugging/debugging.js.map +1 -0
  75. package/src/debugging/debugging.mjs +13 -0
  76. package/src/debugging/debugging.mjs.map +1 -0
  77. package/{dispenser-client.js → src/dispenser-client.js} +1 -1
  78. package/src/dispenser-client.js.map +1 -0
  79. package/{dispenser-client.mjs → src/dispenser-client.mjs} +1 -1
  80. package/src/dispenser-client.mjs.map +1 -0
  81. package/{indexer-lookup.js → src/indexer-lookup.js} +14 -10
  82. package/src/indexer-lookup.js.map +1 -0
  83. package/{indexer-lookup.mjs → src/indexer-lookup.mjs} +14 -10
  84. package/src/indexer-lookup.mjs.map +1 -0
  85. package/{localnet → src/localnet}/get-kmd-wallet-account.js +3 -3
  86. package/src/localnet/get-kmd-wallet-account.js.map +1 -0
  87. package/{localnet → src/localnet}/get-kmd-wallet-account.mjs +3 -3
  88. package/src/localnet/get-kmd-wallet-account.mjs.map +1 -0
  89. package/{localnet → src/localnet}/get-localnet-dispenser-account.js +3 -3
  90. package/src/localnet/get-localnet-dispenser-account.js.map +1 -0
  91. package/{localnet → src/localnet}/get-localnet-dispenser-account.mjs +3 -3
  92. package/src/localnet/get-localnet-dispenser-account.mjs.map +1 -0
  93. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.js +3 -3
  94. package/src/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
  95. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.mjs +3 -3
  96. package/src/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
  97. package/{localnet → src/localnet}/is-localnet.js +2 -2
  98. package/src/localnet/is-localnet.js.map +1 -0
  99. package/{localnet → src/localnet}/is-localnet.mjs +2 -2
  100. package/src/localnet/is-localnet.mjs.map +1 -0
  101. package/{network-client.js → src/network-client.js} +5 -12
  102. package/src/network-client.js.map +1 -0
  103. package/{network-client.mjs → src/network-client.mjs} +5 -12
  104. package/src/network-client.mjs.map +1 -0
  105. package/{testing → src/testing}/account.js +9 -3
  106. package/src/testing/account.js.map +1 -0
  107. package/{testing → src/testing}/account.mjs +10 -4
  108. package/src/testing/account.mjs.map +1 -0
  109. package/src/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  110. package/src/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
  111. package/{testing → src/testing}/fixtures/algorand-fixture.js +15 -16
  112. package/src/testing/fixtures/algorand-fixture.js.map +1 -0
  113. package/{testing → src/testing}/fixtures/algorand-fixture.mjs +15 -16
  114. package/src/testing/fixtures/algorand-fixture.mjs.map +1 -0
  115. package/src/testing/indexer.js.map +1 -0
  116. package/src/testing/indexer.mjs.map +1 -0
  117. package/{testing → src/testing}/test-logger.js +7 -3
  118. package/src/testing/test-logger.js.map +1 -0
  119. package/{testing → src/testing}/test-logger.mjs +7 -3
  120. package/src/testing/test-logger.mjs.map +1 -0
  121. package/src/testing/transaction-logger.js.map +1 -0
  122. package/src/testing/transaction-logger.mjs.map +1 -0
  123. package/src/transaction/legacy-bridge.js +129 -0
  124. package/src/transaction/legacy-bridge.js.map +1 -0
  125. package/src/transaction/legacy-bridge.mjs +124 -0
  126. package/src/transaction/legacy-bridge.mjs.map +1 -0
  127. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.js +14 -9
  128. package/src/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
  129. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.mjs +15 -10
  130. package/src/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
  131. package/{transaction → src/transaction}/transaction.js +217 -137
  132. package/src/transaction/transaction.js.map +1 -0
  133. package/{transaction → src/transaction}/transaction.mjs +218 -138
  134. package/src/transaction/transaction.mjs.map +1 -0
  135. package/{transfer → src/transfer}/transfer-algos.js +1 -1
  136. package/src/transfer/transfer-algos.js.map +1 -0
  137. package/{transfer → src/transfer}/transfer-algos.mjs +1 -1
  138. package/src/transfer/transfer-algos.mjs.map +1 -0
  139. package/{transfer → src/transfer}/transfer.js +8 -6
  140. package/src/transfer/transfer.js.map +1 -0
  141. package/{transfer → src/transfer}/transfer.mjs +8 -6
  142. package/src/transfer/transfer.mjs.map +1 -0
  143. package/{util.js → src/util.js} +11 -10
  144. package/src/util.js.map +1 -0
  145. package/{util.mjs → src/util.mjs} +11 -10
  146. package/src/util.mjs.map +1 -0
  147. package/testing/_asset.d.ts +2 -2
  148. package/testing/account.d.ts +4 -4
  149. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  150. package/testing/fixtures/algorand-fixture.d.ts +0 -1
  151. package/testing/fixtures/index.d.ts +0 -1
  152. package/testing/index.d.ts +0 -1
  153. package/testing/index.js +6 -6
  154. package/testing/index.mjs +6 -6
  155. package/testing/indexer.d.ts +0 -1
  156. package/testing/test-logger.d.ts +0 -1
  157. package/testing/transaction-logger.d.ts +0 -1
  158. package/transaction/index.d.ts +0 -1
  159. package/transaction/legacy-bridge.d.ts +31 -6
  160. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
  161. package/transaction/transaction.d.ts +38 -19
  162. package/transfer/index.d.ts +0 -1
  163. package/transfer/transfer-algos.d.ts +1 -2
  164. package/transfer/transfer.d.ts +1 -2
  165. package/types/account-manager.d.ts +33 -25
  166. package/types/account-manager.js +56 -33
  167. package/types/account-manager.js.map +1 -1
  168. package/types/account-manager.mjs +58 -35
  169. package/types/account-manager.mjs.map +1 -1
  170. package/types/account.d.ts +17 -9
  171. package/types/account.js +2 -2
  172. package/types/account.js.map +1 -1
  173. package/types/account.mjs +3 -3
  174. package/types/account.mjs.map +1 -1
  175. package/types/algo-http-client-with-retry.d.ts +1 -3
  176. package/types/algo-http-client-with-retry.js +34 -4
  177. package/types/algo-http-client-with-retry.js.map +1 -1
  178. package/types/algo-http-client-with-retry.mjs +33 -3
  179. package/types/algo-http-client-with-retry.mjs.map +1 -1
  180. package/types/algorand-client-interface.d.ts +28 -0
  181. package/types/algorand-client-interface.js +3 -0
  182. package/types/algorand-client-interface.js.map +1 -0
  183. package/types/algorand-client-interface.mjs +2 -0
  184. package/types/algorand-client-interface.mjs.map +1 -0
  185. package/types/algorand-client-transaction-creator.d.ts +452 -23
  186. package/types/algorand-client-transaction-creator.js +407 -23
  187. package/types/algorand-client-transaction-creator.js.map +1 -1
  188. package/types/algorand-client-transaction-creator.mjs +407 -23
  189. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  190. package/types/algorand-client-transaction-sender.d.ts +772 -47
  191. package/types/algorand-client-transaction-sender.js +446 -16
  192. package/types/algorand-client-transaction-sender.js.map +1 -1
  193. package/types/algorand-client-transaction-sender.mjs +446 -16
  194. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  195. package/types/algorand-client.d.ts +24 -17
  196. package/types/algorand-client.js +26 -16
  197. package/types/algorand-client.js.map +1 -1
  198. package/types/algorand-client.mjs +28 -15
  199. package/types/algorand-client.mjs.map +1 -1
  200. package/types/amount.d.ts +10 -11
  201. package/types/amount.js +7 -7
  202. package/types/amount.js.map +1 -1
  203. package/types/amount.mjs +7 -7
  204. package/types/amount.mjs.map +1 -1
  205. package/types/app-arc56.d.ts +359 -0
  206. package/types/app-arc56.js +184 -0
  207. package/types/app-arc56.js.map +1 -0
  208. package/types/app-arc56.mjs +175 -0
  209. package/types/app-arc56.mjs.map +1 -0
  210. package/types/app-client.d.ts +1508 -12
  211. package/types/app-client.js +1023 -34
  212. package/types/app-client.js.map +1 -1
  213. package/types/app-client.mjs +1024 -36
  214. package/types/app-client.mjs.map +1 -1
  215. package/types/app-deployer.d.ts +126 -0
  216. package/types/app-deployer.js +353 -0
  217. package/types/app-deployer.js.map +1 -0
  218. package/types/app-deployer.mjs +351 -0
  219. package/types/app-deployer.mjs.map +1 -0
  220. package/types/app-factory.d.ts +846 -0
  221. package/types/app-factory.js +410 -0
  222. package/types/app-factory.js.map +1 -0
  223. package/types/app-factory.mjs +408 -0
  224. package/types/app-factory.mjs.map +1 -0
  225. package/types/app-manager.d.ts +244 -0
  226. package/types/app-manager.js +423 -0
  227. package/types/app-manager.js.map +1 -0
  228. package/types/app-manager.mjs +421 -0
  229. package/types/app-manager.mjs.map +1 -0
  230. package/types/app-spec.d.ts +2 -1
  231. package/types/app-spec.js +127 -0
  232. package/types/app-spec.js.map +1 -1
  233. package/types/app-spec.mjs +126 -0
  234. package/types/app-spec.mjs.map +1 -1
  235. package/types/app.d.ts +57 -18
  236. package/types/app.js +1 -1
  237. package/types/app.js.map +1 -1
  238. package/types/app.mjs +1 -1
  239. package/types/app.mjs.map +1 -1
  240. package/types/asset-manager.d.ts +10 -10
  241. package/types/asset-manager.js +15 -19
  242. package/types/asset-manager.js.map +1 -1
  243. package/types/asset-manager.mjs +15 -19
  244. package/types/asset-manager.mjs.map +1 -1
  245. package/types/asset.d.ts +0 -1
  246. package/types/async-event-emitter.d.ts +14 -0
  247. package/types/async-event-emitter.js +50 -0
  248. package/types/async-event-emitter.js.map +1 -0
  249. package/types/async-event-emitter.mjs +48 -0
  250. package/types/async-event-emitter.mjs.map +1 -0
  251. package/types/client-manager.d.ts +135 -60
  252. package/types/client-manager.js +158 -44
  253. package/types/client-manager.js.map +1 -1
  254. package/types/client-manager.mjs +159 -45
  255. package/types/client-manager.mjs.map +1 -1
  256. package/types/composer.d.ts +271 -87
  257. package/types/composer.js +406 -126
  258. package/types/composer.js.map +1 -1
  259. package/types/composer.mjs +407 -125
  260. package/types/composer.mjs.map +1 -1
  261. package/types/config.d.ts +3 -6
  262. package/types/config.js +5 -44
  263. package/types/config.js.map +1 -1
  264. package/types/config.mjs +5 -27
  265. package/types/config.mjs.map +1 -1
  266. package/types/debugging.d.ts +29 -101
  267. package/types/debugging.js +16 -109
  268. package/types/debugging.js.map +1 -1
  269. package/types/debugging.mjs +12 -107
  270. package/types/debugging.mjs.map +1 -1
  271. package/types/dispenser-client.d.ts +2 -2
  272. package/types/dispenser-client.js +10 -5
  273. package/types/dispenser-client.js.map +1 -1
  274. package/types/dispenser-client.mjs +10 -5
  275. package/types/dispenser-client.mjs.map +1 -1
  276. package/types/expand.d.ts +7 -0
  277. package/types/expand.js +3 -0
  278. package/types/expand.js.map +1 -0
  279. package/types/expand.mjs +2 -0
  280. package/types/expand.mjs.map +1 -0
  281. package/types/indexer.d.ts +74 -756
  282. package/types/indexer.js.map +1 -1
  283. package/types/indexer.mjs.map +1 -1
  284. package/types/kmd-account-manager.d.ts +2 -3
  285. package/types/kmd-account-manager.js +4 -4
  286. package/types/kmd-account-manager.js.map +1 -1
  287. package/types/kmd-account-manager.mjs +5 -5
  288. package/types/kmd-account-manager.mjs.map +1 -1
  289. package/types/lifecycle-events.d.ts +10 -0
  290. package/types/lifecycle-events.js +8 -0
  291. package/types/lifecycle-events.js.map +1 -0
  292. package/types/lifecycle-events.mjs +8 -0
  293. package/types/lifecycle-events.mjs.map +1 -0
  294. package/types/logging.d.ts +0 -1
  295. package/types/logging.js.map +1 -1
  296. package/types/logging.mjs.map +1 -1
  297. package/types/logic-error.d.ts +2 -4
  298. package/types/logic-error.js +3 -3
  299. package/types/logic-error.js.map +1 -1
  300. package/types/logic-error.mjs +3 -3
  301. package/types/logic-error.mjs.map +1 -1
  302. package/types/network-client.d.ts +14 -2
  303. package/types/network-client.js.map +1 -1
  304. package/types/network-client.mjs.map +1 -1
  305. package/types/testing.d.ts +8 -10
  306. package/types/transaction.d.ts +17 -4
  307. package/types/transfer.d.ts +0 -1
  308. package/util.d.ts +2 -2
  309. package/account/account.d.ts.map +0 -1
  310. package/account/account.js.map +0 -1
  311. package/account/account.mjs.map +0 -1
  312. package/account/get-account-config-from-environment.d.ts.map +0 -1
  313. package/account/get-account-config-from-environment.js.map +0 -1
  314. package/account/get-account-config-from-environment.mjs.map +0 -1
  315. package/account/get-account.d.ts.map +0 -1
  316. package/account/get-account.js.map +0 -1
  317. package/account/get-account.mjs.map +0 -1
  318. package/account/get-dispenser-account.d.ts.map +0 -1
  319. package/account/get-dispenser-account.js.map +0 -1
  320. package/account/get-dispenser-account.mjs.map +0 -1
  321. package/account/index.d.ts.map +0 -1
  322. package/account/mnemonic-account.d.ts.map +0 -1
  323. package/account/mnemonic-account.js.map +0 -1
  324. package/account/mnemonic-account.mjs.map +0 -1
  325. package/amount.d.ts.map +0 -1
  326. package/amount.js.map +0 -1
  327. package/amount.mjs.map +0 -1
  328. package/app-client.d.ts.map +0 -1
  329. package/app-client.js.map +0 -1
  330. package/app-client.mjs.map +0 -1
  331. package/app-deploy.d.ts.map +0 -1
  332. package/app-deploy.js +0 -468
  333. package/app-deploy.js.map +0 -1
  334. package/app-deploy.mjs +0 -459
  335. package/app-deploy.mjs.map +0 -1
  336. package/app.d.ts.map +0 -1
  337. package/app.js +0 -599
  338. package/app.js.map +0 -1
  339. package/app.mjs +0 -579
  340. package/app.mjs.map +0 -1
  341. package/asset.d.ts.map +0 -1
  342. package/asset.js.map +0 -1
  343. package/asset.mjs.map +0 -1
  344. package/config.d.ts.map +0 -1
  345. package/config.js.map +0 -1
  346. package/config.mjs.map +0 -1
  347. package/debugging/debugging.d.ts.map +0 -1
  348. package/debugging/debugging.js +0 -139
  349. package/debugging/debugging.js.map +0 -1
  350. package/debugging/debugging.mjs +0 -118
  351. package/debugging/debugging.mjs.map +0 -1
  352. package/debugging/index.d.ts.map +0 -1
  353. package/debugging/simulate-and-persist-response.d.ts +0 -20
  354. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  355. package/debugging/simulate-and-persist-response.js +0 -108
  356. package/debugging/simulate-and-persist-response.js.map +0 -1
  357. package/debugging/simulate-and-persist-response.mjs +0 -89
  358. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  359. package/dispenser-client.d.ts.map +0 -1
  360. package/dispenser-client.js.map +0 -1
  361. package/dispenser-client.mjs.map +0 -1
  362. package/index.d.ts.map +0 -1
  363. package/indexer-lookup.d.ts.map +0 -1
  364. package/indexer-lookup.js.map +0 -1
  365. package/indexer-lookup.mjs.map +0 -1
  366. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  367. package/localnet/get-kmd-wallet-account.js.map +0 -1
  368. package/localnet/get-kmd-wallet-account.mjs.map +0 -1
  369. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  370. package/localnet/get-localnet-dispenser-account.js.map +0 -1
  371. package/localnet/get-localnet-dispenser-account.mjs.map +0 -1
  372. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  373. package/localnet/get-or-create-kmd-wallet-account.js.map +0 -1
  374. package/localnet/get-or-create-kmd-wallet-account.mjs.map +0 -1
  375. package/localnet/index.d.ts.map +0 -1
  376. package/localnet/is-localnet.d.ts.map +0 -1
  377. package/localnet/is-localnet.js.map +0 -1
  378. package/localnet/is-localnet.mjs.map +0 -1
  379. package/network-client.d.ts.map +0 -1
  380. package/network-client.js.map +0 -1
  381. package/network-client.mjs.map +0 -1
  382. package/testing/_asset.d.ts.map +0 -1
  383. package/testing/account.d.ts.map +0 -1
  384. package/testing/account.js.map +0 -1
  385. package/testing/account.mjs.map +0 -1
  386. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  387. package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  388. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +0 -1
  389. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  390. package/testing/fixtures/algorand-fixture.js.map +0 -1
  391. package/testing/fixtures/algorand-fixture.mjs.map +0 -1
  392. package/testing/fixtures/index.d.ts.map +0 -1
  393. package/testing/index.d.ts.map +0 -1
  394. package/testing/indexer.d.ts.map +0 -1
  395. package/testing/indexer.js.map +0 -1
  396. package/testing/indexer.mjs.map +0 -1
  397. package/testing/test-logger.d.ts.map +0 -1
  398. package/testing/test-logger.js.map +0 -1
  399. package/testing/test-logger.mjs.map +0 -1
  400. package/testing/transaction-logger.d.ts.map +0 -1
  401. package/testing/transaction-logger.js.map +0 -1
  402. package/testing/transaction-logger.mjs.map +0 -1
  403. package/transaction/index.d.ts.map +0 -1
  404. package/transaction/legacy-bridge.d.ts.map +0 -1
  405. package/transaction/legacy-bridge.js +0 -35
  406. package/transaction/legacy-bridge.js.map +0 -1
  407. package/transaction/legacy-bridge.mjs +0 -33
  408. package/transaction/legacy-bridge.mjs.map +0 -1
  409. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  410. package/transaction/perform-atomic-transaction-composer-simulate.js.map +0 -1
  411. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +0 -1
  412. package/transaction/transaction.d.ts.map +0 -1
  413. package/transaction/transaction.js.map +0 -1
  414. package/transaction/transaction.mjs.map +0 -1
  415. package/transfer/index.d.ts.map +0 -1
  416. package/transfer/transfer-algos.d.ts.map +0 -1
  417. package/transfer/transfer-algos.js.map +0 -1
  418. package/transfer/transfer-algos.mjs.map +0 -1
  419. package/transfer/transfer.d.ts.map +0 -1
  420. package/transfer/transfer.js.map +0 -1
  421. package/transfer/transfer.mjs.map +0 -1
  422. package/types/account-manager.d.ts.map +0 -1
  423. package/types/account.d.ts.map +0 -1
  424. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  425. package/types/algorand-client-transaction-creator.d.ts.map +0 -1
  426. package/types/algorand-client-transaction-sender.d.ts.map +0 -1
  427. package/types/algorand-client.d.ts.map +0 -1
  428. package/types/amount.d.ts.map +0 -1
  429. package/types/app-client.d.ts.map +0 -1
  430. package/types/app-spec.d.ts.map +0 -1
  431. package/types/app.d.ts.map +0 -1
  432. package/types/asset-manager.d.ts.map +0 -1
  433. package/types/asset.d.ts.map +0 -1
  434. package/types/client-manager.d.ts.map +0 -1
  435. package/types/composer.d.ts.map +0 -1
  436. package/types/config.d.ts.map +0 -1
  437. package/types/debugging.d.ts.map +0 -1
  438. package/types/dispenser-client.d.ts.map +0 -1
  439. package/types/indexer.d.ts.map +0 -1
  440. package/types/kmd-account-manager.d.ts.map +0 -1
  441. package/types/logging.d.ts.map +0 -1
  442. package/types/logic-error.d.ts.map +0 -1
  443. package/types/network-client.d.ts.map +0 -1
  444. package/types/testing.d.ts.map +0 -1
  445. package/types/transaction.d.ts.map +0 -1
  446. package/types/transfer.d.ts.map +0 -1
  447. package/types/urlTokenBaseHTTPClient.d.ts +0 -41
  448. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  449. package/types/urlTokenBaseHTTPClient.js +0 -153
  450. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  451. package/types/urlTokenBaseHTTPClient.mjs +0 -151
  452. package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
  453. package/util.d.ts.map +0 -1
  454. package/util.js.map +0 -1
  455. package/util.mjs.map +0 -1
  456. /package/{account → src/account}/get-account-config-from-environment.js +0 -0
  457. /package/{account → src/account}/get-account-config-from-environment.mjs +0 -0
  458. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
  459. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.mjs +0 -0
  460. /package/{testing → src/testing}/indexer.js +0 -0
  461. /package/{testing → src/testing}/indexer.mjs +0 -0
  462. /package/{testing → src/testing}/transaction-logger.js +0 -0
  463. /package/{testing → src/testing}/transaction-logger.mjs +0 -0
@@ -1,14 +1,24 @@
1
- import algosdk from 'algosdk';
1
+ import algosdk, { Address } from 'algosdk';
2
2
  import { TransactionSignerAccount } from './account';
3
3
  import { AlgoAmount } from './amount';
4
- import { SendAtomicTransactionComposerResults } from './transaction';
4
+ import { AppManager, BoxIdentifier, BoxReference } from './app-manager';
5
+ import { Expand } from './expand';
6
+ import { Arc2TransactionNote, SendAtomicTransactionComposerResults, SendParams } from './transaction';
5
7
  import Transaction = algosdk.Transaction;
8
+ import TransactionSigner = algosdk.TransactionSigner;
6
9
  import TransactionWithSigner = algosdk.TransactionWithSigner;
10
+ import SimulateResponse = algosdk.modelsv2.SimulateResponse;
11
+ import modelsv2 = algosdk.modelsv2;
7
12
  export declare const MAX_TRANSACTION_GROUP_SIZE = 16;
13
+ /** Options to control a simulate request */
14
+ export type SimulateOptions = Expand<Omit<ConstructorParameters<typeof modelsv2.SimulateRequest>[0], 'txnGroups'>> & {
15
+ /** Whether or not to skip signatures for all built transactions and use an empty signer instead. */
16
+ skipSignatures?: boolean;
17
+ };
8
18
  /** Common parameters for defining a transaction. */
9
19
  export type CommonTransactionParams = {
10
20
  /** The address of the account sending the transaction. */
11
- sender: string;
21
+ sender: string | Address;
12
22
  /** The function used to sign transaction(s); if not specified then
13
23
  * an attempt will be made to find a registered signer for the
14
24
  * given `sender` or use a default signer (if configured).
@@ -18,7 +28,7 @@ export type CommonTransactionParams = {
18
28
  *
19
29
  * **Warning:** Please be careful with this parameter and be sure to read the [official rekey guidance](https://developer.algorand.org/docs/get-details/accounts/rekey/).
20
30
  */
21
- rekeyTo?: string;
31
+ rekeyTo?: string | Address;
22
32
  /** Note to attach to the transaction. Max of 1000 bytes. */
23
33
  note?: Uint8Array | string;
24
34
  /** Prevent multiple transactions with the same lease being included within the validity window.
@@ -34,7 +44,7 @@ export type CommonTransactionParams = {
34
44
  /** Throw an error if the fee for the transaction is more than this amount; prevents overspending on fees during high congestion periods. */
35
45
  maxFee?: AlgoAmount;
36
46
  /** How many rounds the transaction should be valid for, if not specified then the registered default validity window will be used. */
37
- validityWindow?: number;
47
+ validityWindow?: number | bigint;
38
48
  /**
39
49
  * Set the first round this transaction is valid.
40
50
  * If left undefined, the value from algod will be used.
@@ -48,14 +58,14 @@ export type CommonTransactionParams = {
48
58
  /** Parameters to define a payment transaction. */
49
59
  export type PaymentParams = CommonTransactionParams & {
50
60
  /** The address of the account that will receive the Algo */
51
- receiver: string;
61
+ receiver: string | Address;
52
62
  /** Amount to send */
53
63
  amount: AlgoAmount;
54
64
  /** If given, close the sender account and send the remaining balance to this address
55
65
  *
56
66
  * *Warning:* Be careful with this parameter as it can lead to loss of funds if not used correctly.
57
67
  */
58
- closeRemainderTo?: string;
68
+ closeRemainderTo?: string | Address;
59
69
  };
60
70
  /** Parameters to define an asset create transaction.
61
71
  *
@@ -126,7 +136,7 @@ export type AssetCreateParams = CommonTransactionParams & {
126
136
  *
127
137
  * If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the `manager` the asset becomes permanently immutable.
128
138
  */
129
- manager?: string;
139
+ manager?: string | Address;
130
140
  /**
131
141
  * The address of the optional account that holds the reserve (uncirculated supply) units of the asset.
132
142
  *
@@ -140,7 +150,7 @@ export type AssetCreateParams = CommonTransactionParams & {
140
150
  *
141
151
  * If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
142
152
  */
143
- reserve?: string;
153
+ reserve?: string | Address;
144
154
  /**
145
155
  * The address of the optional account that can be used to freeze or unfreeze holdings of this asset for any account.
146
156
  *
@@ -148,7 +158,7 @@ export type AssetCreateParams = CommonTransactionParams & {
148
158
  *
149
159
  * If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
150
160
  */
151
- freeze?: string;
161
+ freeze?: string | Address;
152
162
  /**
153
163
  * The address of the optional account that can clawback holdings of this asset from any account.
154
164
  *
@@ -158,7 +168,7 @@ export type AssetCreateParams = CommonTransactionParams & {
158
168
  *
159
169
  * If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
160
170
  */
161
- clawback?: string;
171
+ clawback?: string | Address;
162
172
  };
163
173
  /** Parameters to define an asset reconfiguration transaction.
164
174
  *
@@ -175,7 +185,7 @@ export type AssetConfigParams = CommonTransactionParams & {
175
185
  *
176
186
  * If not set (`undefined` or `""`) the asset will become permanently immutable.
177
187
  */
178
- manager: string | undefined;
188
+ manager: string | Address | undefined;
179
189
  /**
180
190
  * The address of the optional account that holds the reserve (uncirculated supply) units of the asset.
181
191
  *
@@ -189,7 +199,7 @@ export type AssetConfigParams = CommonTransactionParams & {
189
199
  *
190
200
  * If not set (`undefined` or `""`) the field will become permanently empty.
191
201
  */
192
- reserve?: string;
202
+ reserve?: string | Address;
193
203
  /**
194
204
  * The address of the optional account that can be used to freeze or unfreeze holdings of this asset for any account.
195
205
  *
@@ -197,7 +207,7 @@ export type AssetConfigParams = CommonTransactionParams & {
197
207
  *
198
208
  * If not set (`undefined` or `""`) the field will become permanently empty.
199
209
  */
200
- freeze?: string;
210
+ freeze?: string | Address;
201
211
  /**
202
212
  * The address of the optional account that can clawback holdings of this asset from any account.
203
213
  *
@@ -207,14 +217,14 @@ export type AssetConfigParams = CommonTransactionParams & {
207
217
  *
208
218
  * If not set (`undefined` or `""`) the field will become permanently empty.
209
219
  */
210
- clawback?: string;
220
+ clawback?: string | Address;
211
221
  };
212
222
  /** Parameters to define an asset freeze transaction. */
213
223
  export type AssetFreezeParams = CommonTransactionParams & {
214
224
  /** The ID of the asset to freeze/unfreeze */
215
225
  assetId: bigint;
216
226
  /** The address of the account to freeze or unfreeze */
217
- account: string;
227
+ account: string | Address;
218
228
  /** Whether the assets in the account should be frozen */
219
229
  frozen: boolean;
220
230
  };
@@ -233,19 +243,19 @@ export type AssetTransferParams = CommonTransactionParams & {
233
243
  /** Amount of the asset to transfer (in smallest divisible (decimal) units). */
234
244
  amount: bigint;
235
245
  /** The address of the account that will receive the asset unit(s). */
236
- receiver: string;
246
+ receiver: string | Address;
237
247
  /** Optional address of an account to clawback the asset from.
238
248
  *
239
249
  * Requires the sender to be the clawback account.
240
250
  *
241
251
  * **Warning:** Be careful with this parameter as it can lead to unexpected loss of funds if not used correctly.
242
252
  */
243
- clawbackTarget?: string;
253
+ clawbackTarget?: string | Address;
244
254
  /** Optional address of an account to close the asset position to.
245
255
  *
246
256
  * **Warning:** Be careful with this parameter as it can lead to loss of funds if not used correctly.
247
257
  */
248
- closeAssetTo?: string;
258
+ closeAssetTo?: string | Address;
249
259
  };
250
260
  /** Parameters to define an asset opt-in transaction. */
251
261
  export type AssetOptInParams = CommonTransactionParams & {
@@ -260,7 +270,7 @@ export type AssetOptOutParams = CommonTransactionParams & {
260
270
  * The address of the asset creator account to close the asset
261
271
  * position to (any remaining asset units will be sent to this account).
262
272
  */
263
- creator: string;
273
+ creator: string | Address;
264
274
  };
265
275
  /** Parameters to define an online key registration transaction. */
266
276
  export type OnlineKeyRegistrationParams = CommonTransactionParams & {
@@ -277,77 +287,153 @@ export type OnlineKeyRegistrationParams = CommonTransactionParams & {
277
287
  /** The 64 byte state proof public key commitment */
278
288
  stateProofKey?: Uint8Array;
279
289
  };
280
- /** Parameters to define an application call transaction. */
281
- export type AppCallParams = CommonTransactionParams & {
282
- /** The [OnComplete](https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#oncomplete) */
290
+ /** Common parameters for defining an application call transaction. */
291
+ export type CommonAppCallParams = CommonTransactionParams & {
292
+ /** ID of the application; 0 if the application is being created. */
293
+ appId: bigint;
294
+ /** The [on-complete](https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#oncomplete) action of the call; defaults to no-op. */
283
295
  onComplete?: algosdk.OnApplicationComplete;
284
- /** ID of the application */
285
- appId?: bigint;
286
- /** The program to execute for all OnCompletes other than ClearState */
287
- approvalProgram?: Uint8Array;
288
- /** The program to execute for ClearState OnComplete */
289
- clearProgram?: Uint8Array;
290
- /** The state schema for the app. This is immutable. */
296
+ /** Any [arguments to pass to the smart contract call](https://developer.algorand.org/docs/get-details/dapps/avm/teal/#argument-passing). */
297
+ args?: Uint8Array[];
298
+ /** Any account addresses to add to the [accounts array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
299
+ accountReferences?: (string | Address)[];
300
+ /** The ID of any apps to load to the [foreign apps array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
301
+ appReferences?: bigint[];
302
+ /** The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
303
+ assetReferences?: bigint[];
304
+ /** Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays).
305
+ *
306
+ * Either the name identifier (which will be set against app ID of `0` i.e.
307
+ * the current app), or a box identifier with the name identifier and app ID.
308
+ */
309
+ boxReferences?: (BoxReference | BoxIdentifier)[];
310
+ };
311
+ /** Parameters to define an app create transaction */
312
+ export type AppCreateParams = Expand<Omit<CommonAppCallParams, 'appId'> & {
313
+ onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.ClearStateOC>;
314
+ /** The program to execute for all OnCompletes other than ClearState as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). */
315
+ approvalProgram: string | Uint8Array;
316
+ /** The program to execute for ClearState OnComplete as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). */
317
+ clearStateProgram: string | Uint8Array;
318
+ /** The state schema for the app. This is immutable once the app is created. */
291
319
  schema?: {
292
- /** The number of integers saved in global state */
293
- globalUints: number;
294
- /** The number of byte slices saved in global state */
320
+ /** The number of integers saved in global state. */
321
+ globalInts: number;
322
+ /** The number of byte slices saved in global state. */
295
323
  globalByteSlices: number;
296
- /** The number of integers saved in local state */
297
- localUints: number;
298
- /** The number of byte slices saved in local state */
324
+ /** The number of integers saved in local state. */
325
+ localInts: number;
326
+ /** The number of byte slices saved in local state. */
299
327
  localByteSlices: number;
300
328
  };
301
- /** Application arguments */
302
- args?: Uint8Array[];
303
- /** Account references */
304
- accountReferences?: string[];
305
- /** App references */
306
- appReferences?: bigint[];
307
- /** Asset references */
308
- assetReferences?: bigint[];
309
- /** Number of extra pages required for the programs */
310
- extraPages?: number;
311
- /** Box references */
312
- boxReferences?: algosdk.BoxReference[];
329
+ /** Number of extra pages required for the programs.
330
+ * Defaults to the number needed for the programs in this call if not specified.
331
+ * This is immutable once the app is created. */
332
+ extraProgramPages?: number;
333
+ }>;
334
+ /** Parameters to define an app update transaction */
335
+ export type AppUpdateParams = Expand<CommonAppCallParams & {
336
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC;
337
+ /** The program to execute for all OnCompletes other than ClearState as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) */
338
+ approvalProgram: string | Uint8Array;
339
+ /** The program to execute for ClearState OnComplete as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) */
340
+ clearStateProgram: string | Uint8Array;
341
+ }>;
342
+ /** Parameters to define an application call transaction. */
343
+ export type AppCallParams = CommonAppCallParams & {
344
+ onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC>;
313
345
  };
314
- /** Parameters to define an ABI method application call transaction. */
315
- export type MethodCallParams = CommonTransactionParams & Omit<AppCallParams, 'args'> & {
316
- /** ID of the application */
317
- appId: bigint;
346
+ /** Common parameters to define an ABI method call transaction. */
347
+ export type AppMethodCallParams = CommonAppCallParams & {
348
+ onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.ClearStateOC>;
349
+ };
350
+ /** Parameters to define an application delete call transaction. */
351
+ export type AppDeleteParams = CommonAppCallParams & {
352
+ onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC;
353
+ };
354
+ /** Parameters to define an ABI method call create transaction. */
355
+ export type AppCreateMethodCall = AppMethodCall<AppCreateParams>;
356
+ /** Parameters to define an ABI method call update transaction. */
357
+ export type AppUpdateMethodCall = AppMethodCall<AppUpdateParams>;
358
+ /** Parameters to define an ABI method call delete transaction. */
359
+ export type AppDeleteMethodCall = AppMethodCall<AppDeleteParams>;
360
+ /** Parameters to define an ABI method call transaction. */
361
+ export type AppCallMethodCall = AppMethodCall<AppMethodCallParams>;
362
+ /** Types that can be used to define a transaction argument for an ABI call transaction. */
363
+ export type AppMethodCallTransactionArgument = TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams>;
364
+ /** Parameters to define an ABI method call. */
365
+ export type AppMethodCall<T> = Expand<Omit<T, 'args'>> & {
318
366
  /** The ABI method to call */
319
367
  method: algosdk.ABIMethod;
320
368
  /** Arguments to the ABI method, either:
321
369
  * * An ABI value
322
370
  * * A transaction with explicit signer
323
371
  * * A transaction (where the signer will be automatically assigned)
324
- * * An unawaited transaction (e.g. from algorand.transactions.transactionType())
372
+ * * An unawaited transaction (e.g. from algorand.createTransaction.{transactionType}())
325
373
  * * Another method call (via method call params object)
374
+ * * undefined (this represents a placeholder transaction argument that is fulfilled by another method call argument)
326
375
  */
327
- args?: (algosdk.ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | MethodCallParams)[];
376
+ args?: (algosdk.ABIValue | Address | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
328
377
  };
329
- /** Parameters to configure transaction execution. */
330
- export interface ExecuteParams {
331
- /** The number of rounds to wait for confirmation. By default until the latest lastValid has past. */
332
- maxRoundsToWaitForConfirmation?: number;
333
- /** Whether to suppress log messages from transaction send, default: do not suppress. */
334
- suppressLog?: boolean;
335
- }
336
- /** Parameters to create an `AlgoKitComposer`. */
337
- export type AlgoKitComposerParams = {
378
+ export type Txn = (PaymentParams & {
379
+ type: 'pay';
380
+ }) | (AssetCreateParams & {
381
+ type: 'assetCreate';
382
+ }) | (AssetConfigParams & {
383
+ type: 'assetConfig';
384
+ }) | (AssetFreezeParams & {
385
+ type: 'assetFreeze';
386
+ }) | (AssetDestroyParams & {
387
+ type: 'assetDestroy';
388
+ }) | (AssetTransferParams & {
389
+ type: 'assetTransfer';
390
+ }) | (AssetOptInParams & {
391
+ type: 'assetOptIn';
392
+ }) | (AssetOptOutParams & {
393
+ type: 'assetOptOut';
394
+ }) | ((AppCallParams | AppCreateParams | AppUpdateParams) & {
395
+ type: 'appCall';
396
+ }) | (OnlineKeyRegistrationParams & {
397
+ type: 'keyReg';
398
+ }) | (algosdk.TransactionWithSigner & {
399
+ type: 'txnWithSigner';
400
+ }) | {
401
+ atc: algosdk.AtomicTransactionComposer;
402
+ type: 'atc';
403
+ } | ((AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall) & {
404
+ type: 'methodCall';
405
+ });
406
+ /** Parameters to create an `TransactionComposer`. */
407
+ export type TransactionComposerParams = {
338
408
  /** The algod client to use to get suggestedParams and send the transaction group */
339
409
  algod: algosdk.Algodv2;
340
410
  /** The function used to get the TransactionSigner for a given address */
341
- getSigner: (address: string) => algosdk.TransactionSigner;
411
+ getSigner: (address: string | Address) => algosdk.TransactionSigner;
342
412
  /** The method used to get SuggestedParams for transactions in the group */
343
413
  getSuggestedParams?: () => Promise<algosdk.SuggestedParams>;
344
414
  /** How many rounds a transaction should be valid for by default; if not specified
345
415
  * then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet).
346
416
  */
347
- defaultValidityWindow?: number;
417
+ defaultValidityWindow?: bigint;
418
+ /** An existing `AppManager` to use to manage app compilation and cache compilation results.
419
+ *
420
+ * If not specified than an ephemeral one will be created.
421
+ */
422
+ appManager?: AppManager;
348
423
  };
349
- /** AlgoKit Composer helps you compose and execute transactions as a transaction group. */
350
- export default class AlgoKitComposer {
424
+ /** Set of transactions built by `TransactionComposer`. */
425
+ export interface BuiltTransactions {
426
+ /** The built transactions */
427
+ transactions: algosdk.Transaction[];
428
+ /** Any `ABIMethod` objects associated with any of the transactions in a map keyed by transaction index. */
429
+ methodCalls: Map<number, algosdk.ABIMethod>;
430
+ /** Any `TransactionSigner` objects associated with any of the transactions in a map keyed by transaction index. */
431
+ signers: Map<number, algosdk.TransactionSigner>;
432
+ }
433
+ /** TransactionComposer helps you compose and execute transactions as a transaction group. */
434
+ export declare class TransactionComposer {
435
+ /** Signer used to represent a lack of signer */
436
+ private static NULL_SIGNER;
351
437
  /** The ATC used to compose the group */
352
438
  private atc;
353
439
  /** Map of txid to ABI method */
@@ -364,89 +450,153 @@ export default class AlgoKitComposer {
364
450
  private defaultValidityWindow;
365
451
  /** Whether the validity window was explicitly set on construction */
366
452
  private defaultValidityWindowIsExplicit;
453
+ private appManager;
367
454
  /**
368
- * Create an `AlgoKitComposer`.
455
+ * Create a `TransactionComposer`.
369
456
  * @param params The configuration for this composer
370
457
  */
371
- constructor(params: AlgoKitComposerParams);
458
+ constructor(params: TransactionComposerParams);
459
+ /**
460
+ * Add a pre-built transaction to the transaction group.
461
+ * @param transaction The pre-built transaction
462
+ * @param signer Optional signer override for the transaction
463
+ * @returns The composer so you can chain method calls
464
+ */
465
+ addTransaction(transaction: Transaction, signer?: TransactionSigner): TransactionComposer;
372
466
  /**
373
467
  * Add a payment transaction to the transaction group.
374
468
  * @param params The payment transaction parameters
375
469
  * @returns The composer so you can chain method calls
376
470
  */
377
- addPayment(params: PaymentParams): AlgoKitComposer;
471
+ addPayment(params: PaymentParams): TransactionComposer;
378
472
  /**
379
473
  * Add an asset create transaction to the transaction group.
380
474
  * @param params The asset create transaction parameters
381
475
  * @returns The composer so you can chain method calls
382
476
  */
383
- addAssetCreate(params: AssetCreateParams): AlgoKitComposer;
477
+ addAssetCreate(params: AssetCreateParams): TransactionComposer;
384
478
  /**
385
479
  * Add an asset config transaction to the transaction group.
386
480
  * @param params The asset config transaction parameters
387
481
  * @returns The composer so you can chain method calls
388
482
  */
389
- addAssetConfig(params: AssetConfigParams): AlgoKitComposer;
483
+ addAssetConfig(params: AssetConfigParams): TransactionComposer;
390
484
  /**
391
485
  * Add an asset freeze transaction to the transaction group.
392
486
  * @param params The asset freeze transaction parameters
393
487
  * @returns The composer so you can chain method calls
394
488
  */
395
- addAssetFreeze(params: AssetFreezeParams): AlgoKitComposer;
489
+ addAssetFreeze(params: AssetFreezeParams): TransactionComposer;
396
490
  /**
397
491
  * Add an asset destroy transaction to the transaction group.
398
492
  * @param params The asset destroy transaction parameters
399
493
  * @returns The composer so you can chain method calls
400
494
  */
401
- addAssetDestroy(params: AssetDestroyParams): AlgoKitComposer;
495
+ addAssetDestroy(params: AssetDestroyParams): TransactionComposer;
402
496
  /**
403
497
  * Add an asset transfer transaction to the transaction group.
404
498
  * @param params The asset transfer transaction parameters
405
499
  * @returns The composer so you can chain method calls
406
500
  */
407
- addAssetTransfer(params: AssetTransferParams): AlgoKitComposer;
501
+ addAssetTransfer(params: AssetTransferParams): TransactionComposer;
408
502
  /**
409
503
  * Add an asset opt-in transaction to the transaction group.
410
504
  * @param params The asset opt-in transaction parameters
411
505
  * @returns The composer so you can chain method calls
412
506
  */
413
- addAssetOptIn(params: AssetOptInParams): AlgoKitComposer;
507
+ addAssetOptIn(params: AssetOptInParams): TransactionComposer;
414
508
  /**
415
509
  * Add an asset opt-out transaction to the transaction group.
416
510
  * @param params The asset opt-out transaction parameters
417
511
  * @returns The composer so you can chain method calls
418
512
  */
419
- addAssetOptOut(params: AssetOptOutParams): AlgoKitComposer;
513
+ addAssetOptOut(params: AssetOptOutParams): TransactionComposer;
514
+ /**
515
+ * Add an application create transaction to the transaction group.
516
+ *
517
+ * Note: we recommend using app clients to make it easier to make app calls.
518
+ * @param params The application create transaction parameters
519
+ * @returns The composer so you can chain method calls
520
+ */
521
+ addAppCreate(params: AppCreateParams): TransactionComposer;
522
+ /**
523
+ * Add an application update transaction to the transaction group.
524
+ *
525
+ * Note: we recommend using app clients to make it easier to make app calls.
526
+ * @param params The application update transaction parameters
527
+ * @returns The composer so you can chain method calls
528
+ */
529
+ addAppUpdate(params: AppUpdateParams): TransactionComposer;
530
+ /**
531
+ * Add an application delete transaction to the transaction group.
532
+ *
533
+ * Note: we recommend using app clients to make it easier to make app calls.
534
+ * @param params The application delete transaction parameters
535
+ * @returns The composer so you can chain method calls
536
+ */
537
+ addAppDelete(params: AppDeleteParams): TransactionComposer;
420
538
  /**
421
539
  * Add an application call transaction to the transaction group.
422
540
  *
541
+ * If you want to create or update an app use `addAppCreate` or `addAppUpdate`.
542
+ *
423
543
  * Note: we recommend using app clients to make it easier to make app calls.
424
544
  * @param params The application call transaction parameters
425
545
  * @returns The composer so you can chain method calls
426
546
  */
427
- addAppCall(params: AppCallParams): AlgoKitComposer;
547
+ addAppCall(params: AppCallParams): TransactionComposer;
548
+ /**
549
+ * Add an ABI method create application call transaction to the transaction group.
550
+ *
551
+ * Note: we recommend using app clients to make it easier to make app calls.
552
+ * @param params The ABI create method application call transaction parameters
553
+ * @returns The composer so you can chain method calls
554
+ */
555
+ addAppCreateMethodCall(params: AppCreateMethodCall): this;
556
+ /**
557
+ * Add an ABI method update application call transaction to the transaction group.
558
+ *
559
+ * Note: we recommend using app clients to make it easier to make app calls.
560
+ * @param params The ABI update method application call transaction parameters
561
+ * @returns The composer so you can chain method calls
562
+ */
563
+ addAppUpdateMethodCall(params: AppUpdateMethodCall): this;
564
+ /**
565
+ * Add an ABI method delete application call transaction to the transaction group.
566
+ *
567
+ * Note: we recommend using app clients to make it easier to make app calls.
568
+ * @param params The ABI delete method application call transaction parameters
569
+ * @returns The composer so you can chain method calls
570
+ */
571
+ addAppDeleteMethodCall(params: AppDeleteMethodCall): this;
428
572
  /**
429
- * Add an ABI method application call transaction to the transaction group.
573
+ * Add a non-create/non-update ABI method application call transaction to the transaction group.
430
574
  *
431
575
  * Note: we recommend using app clients to make it easier to make app calls.
432
576
  * @param params The ABI method application call transaction parameters
433
577
  * @returns The composer so you can chain method calls
434
578
  */
435
- addMethodCall(params: MethodCallParams): this;
579
+ addAppCallMethodCall(params: AppCallMethodCall): this;
436
580
  /**
437
581
  * Add an online key registration transaction to the transaction group.
438
582
  * @param params The online key registration transaction parameters
439
583
  * @returns The composer so you can chain method calls
440
584
  */
441
- addOnlineKeyRegistration(params: OnlineKeyRegistrationParams): AlgoKitComposer;
585
+ addOnlineKeyRegistration(params: OnlineKeyRegistrationParams): TransactionComposer;
442
586
  /**
443
587
  * Add the transactions within an `AtomicTransactionComposer` to the transaction group.
444
588
  * @param atc The `AtomicTransactionComposer` to build transactions from and add to the group
445
589
  * @returns The composer so you can chain method calls
446
590
  */
447
- addAtc(atc: algosdk.AtomicTransactionComposer): AlgoKitComposer;
591
+ addAtc(atc: algosdk.AtomicTransactionComposer): TransactionComposer;
592
+ /** Build an ATC and return transactions ready to be incorporated into a broader set of transactions this composer is composing */
448
593
  private buildAtc;
449
594
  private commonTxnBuildStep;
595
+ /**
596
+ * Builds an ABI method call transaction and any other associated transactions represented in the ABI args.
597
+ * @param includeSigner Whether to include the actual signer for the transactions.
598
+ * If you are just building transactions without signers yet then set this to `false`.
599
+ */
450
600
  private buildMethodCall;
451
601
  private buildPayment;
452
602
  private buildAssetCreate;
@@ -456,23 +606,32 @@ export default class AlgoKitComposer {
456
606
  private buildAssetTransfer;
457
607
  private buildAppCall;
458
608
  private buildKeyReg;
609
+ /** Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` since those ones can have custom signers that need to be retrieved. */
459
610
  private buildTxn;
460
611
  private buildTxnWithSigner;
461
612
  /**
462
- * Compose all of the transactions without signers and return the transaction objects directly.
613
+ * Compose all of the transactions without signers and return the transaction objects directly along with any ABI method calls.
463
614
  *
464
- * @returns The array of built transactions
615
+ * @returns The array of built transactions and any corresponding method calls
465
616
  */
466
- buildTransactions(): Promise<algosdk.Transaction[]>;
617
+ buildTransactions(): Promise<BuiltTransactions>;
618
+ /**
619
+ * Get the number of transactions currently added to this composer.
620
+ */
621
+ count(): Promise<number>;
467
622
  /**
468
623
  * Compose all of the transactions in a single atomic transaction group and an atomic transaction composer.
469
624
  *
470
625
  * You can then use the transactions standalone, or use the composer to execute or simulate the transactions.
626
+ *
627
+ * Once this method is called, no further transactions will be able to be added.
628
+ * You can safely call this method multiple times to get the same result.
471
629
  * @returns The built atomic transaction composer and the transactions
472
630
  */
473
631
  build(): Promise<{
474
632
  atc: algosdk.AtomicTransactionComposer;
475
633
  transactions: algosdk.TransactionWithSigner[];
634
+ methodCalls: any;
476
635
  }>;
477
636
  /**
478
637
  * Rebuild the group, discarding any previously built transactions.
@@ -482,12 +641,37 @@ export default class AlgoKitComposer {
482
641
  rebuild(): Promise<{
483
642
  atc: algosdk.AtomicTransactionComposer;
484
643
  transactions: algosdk.TransactionWithSigner[];
644
+ methodCalls: any;
485
645
  }>;
486
646
  /**
647
+ * Compose the atomic transaction group and send it to the network.
648
+ * @param params The parameters to control execution with
649
+ * @returns The execution result
650
+ */
651
+ send(params?: SendParams): Promise<SendAtomicTransactionComposerResults>;
652
+ /**
653
+ * @deprecated Use `send` instead.
654
+ *
487
655
  * Compose the atomic transaction group and send it to the network
656
+ *
657
+ * An alias for `composer.send(params)`.
488
658
  * @param params The parameters to control execution with
489
659
  * @returns The execution result
490
660
  */
491
- execute(params?: ExecuteParams): Promise<SendAtomicTransactionComposerResults>;
661
+ execute(params?: SendParams): Promise<SendAtomicTransactionComposerResults>;
662
+ /**
663
+ * Compose the atomic transaction group and simulate sending it to the network
664
+ * @returns The simulation result
665
+ */
666
+ simulate(options?: SimulateOptions): Promise<SendAtomicTransactionComposerResults & {
667
+ simulateResponse: SimulateResponse;
668
+ }>;
669
+ /**
670
+ * Create an encoded transaction note that follows the ARC-2 spec.
671
+ *
672
+ * https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0002.md
673
+ * @param note The ARC-2 transaction note data
674
+ * @returns The binary encoded transaction note
675
+ */
676
+ static arc2Note(note: Arc2TransactionNote): Uint8Array;
492
677
  }
493
- //# sourceMappingURL=composer.d.ts.map