@algorandfoundation/algokit-utils 6.2.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 (465) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -26
  3. package/account/account.d.ts +21 -11
  4. package/account/get-account-config-from-environment.d.ts +0 -1
  5. package/account/get-account.d.ts +6 -7
  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 +41 -9
  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 +10 -1
  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 +1 -2
  18. package/index.d.ts +8 -6
  19. package/index.js +61 -48
  20. package/index.js.map +1 -1
  21. package/index.mjs +27 -24
  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 +2 -3
  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 +5 -5
  31. package/{account → src/account}/account.js +38 -15
  32. package/src/account/account.js.map +1 -0
  33. package/{account → src/account}/account.mjs +39 -16
  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 +5 -5
  38. package/src/account/get-account.js.map +1 -0
  39. package/{account → src/account}/get-account.mjs +5 -5
  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/src/amount.js +61 -0
  50. package/src/amount.js.map +1 -0
  51. package/src/amount.mjs +54 -0
  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/src/asset.js +142 -0
  66. package/src/asset.js.map +1 -0
  67. package/src/asset.mjs +136 -0
  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} +3 -3
  78. package/src/dispenser-client.js.map +1 -0
  79. package/{dispenser-client.mjs → src/dispenser-client.mjs} +3 -3
  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 +4 -4
  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 +4 -4
  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 +16 -4
  106. package/src/testing/account.js.map +1 -0
  107. package/{testing → src/testing}/account.mjs +17 -5
  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 +18 -14
  112. package/src/testing/fixtures/algorand-fixture.js.map +1 -0
  113. package/{testing → src/testing}/fixtures/algorand-fixture.mjs +18 -14
  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 +221 -141
  132. package/src/transaction/transaction.js.map +1 -0
  133. package/{transaction → src/transaction}/transaction.mjs +222 -142
  134. package/src/transaction/transaction.mjs.map +1 -0
  135. package/src/transfer/transfer-algos.js +31 -0
  136. package/src/transfer/transfer-algos.js.map +1 -0
  137. package/src/transfer/transfer-algos.mjs +29 -0
  138. package/src/transfer/transfer-algos.mjs.map +1 -0
  139. package/src/transfer/transfer.js +112 -0
  140. package/src/transfer/transfer.js.map +1 -0
  141. package/src/transfer/transfer.mjs +108 -0
  142. package/src/transfer/transfer.mjs.map +1 -0
  143. package/{util.js → src/util.js} +33 -7
  144. package/src/util.js.map +1 -0
  145. package/{util.mjs → src/util.mjs} +31 -7
  146. package/src/util.mjs.map +1 -0
  147. package/testing/_asset.d.ts +3 -5
  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 +1 -2
  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 +35 -0
  160. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
  161. package/transaction/transaction.d.ts +39 -20
  162. package/transfer/index.d.ts +0 -1
  163. package/transfer/transfer-algos.d.ts +4 -3
  164. package/transfer/transfer.d.ts +8 -2
  165. package/types/account-manager.d.ts +165 -40
  166. package/types/account-manager.js +255 -59
  167. package/types/account-manager.js.map +1 -1
  168. package/types/account-manager.mjs +255 -59
  169. package/types/account-manager.mjs.map +1 -1
  170. package/types/account.d.ts +137 -14
  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 +718 -0
  186. package/types/algorand-client-transaction-creator.js +683 -0
  187. package/types/algorand-client-transaction-creator.js.map +1 -0
  188. package/types/algorand-client-transaction-creator.mjs +681 -0
  189. package/types/algorand-client-transaction-creator.mjs.map +1 -0
  190. package/types/algorand-client-transaction-sender.d.ts +1158 -0
  191. package/types/algorand-client-transaction-sender.js +852 -0
  192. package/types/algorand-client-transaction-sender.js.map +1 -0
  193. package/types/algorand-client-transaction-sender.mjs +850 -0
  194. package/types/algorand-client-transaction-sender.mjs.map +1 -0
  195. package/types/algorand-client.d.ts +48 -91
  196. package/types/algorand-client.js +53 -132
  197. package/types/algorand-client.js.map +1 -1
  198. package/types/algorand-client.mjs +55 -131
  199. package/types/algorand-client.mjs.map +1 -1
  200. package/types/amount.d.ts +23 -12
  201. package/types/amount.js +33 -10
  202. package/types/amount.js.map +1 -1
  203. package/types/amount.mjs +33 -10
  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 +1511 -15
  211. package/types/app-client.js +1029 -43
  212. package/types/app-client.js.map +1 -1
  213. package/types/app-client.mjs +1030 -45
  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 +205 -0
  241. package/types/asset-manager.js +176 -0
  242. package/types/asset-manager.js.map +1 -0
  243. package/types/asset-manager.mjs +174 -0
  244. package/types/asset-manager.mjs.map +1 -0
  245. package/types/asset.d.ts +4 -5
  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 +171 -58
  252. package/types/client-manager.js +198 -43
  253. package/types/client-manager.js.map +1 -1
  254. package/types/client-manager.mjs +199 -44
  255. package/types/client-manager.mjs.map +1 -1
  256. package/types/composer.d.ts +474 -132
  257. package/types/composer.js +461 -167
  258. package/types/composer.js.map +1 -1
  259. package/types/composer.mjs +461 -168
  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 +14 -6
  272. package/types/dispenser-client.js +19 -14
  273. package/types/dispenser-client.js.map +1 -1
  274. package/types/dispenser-client.mjs +19 -14
  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 +5 -6
  285. package/types/kmd-account-manager.js +9 -9
  286. package/types/kmd-account-manager.js.map +1 -1
  287. package/types/kmd-account-manager.mjs +10 -10
  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 +21 -3
  303. package/types/network-client.js +10 -0
  304. package/types/network-client.js.map +1 -1
  305. package/types/network-client.mjs +9 -0
  306. package/types/network-client.mjs.map +1 -1
  307. package/types/testing.d.ts +9 -11
  308. package/types/transaction.d.ts +17 -4
  309. package/types/transfer.d.ts +8 -8
  310. package/util.d.ts +15 -2
  311. package/account/account.d.ts.map +0 -1
  312. package/account/account.js.map +0 -1
  313. package/account/account.mjs.map +0 -1
  314. package/account/get-account-config-from-environment.d.ts.map +0 -1
  315. package/account/get-account-config-from-environment.js.map +0 -1
  316. package/account/get-account-config-from-environment.mjs.map +0 -1
  317. package/account/get-account.d.ts.map +0 -1
  318. package/account/get-account.js.map +0 -1
  319. package/account/get-account.mjs.map +0 -1
  320. package/account/get-dispenser-account.d.ts.map +0 -1
  321. package/account/get-dispenser-account.js.map +0 -1
  322. package/account/get-dispenser-account.mjs.map +0 -1
  323. package/account/index.d.ts.map +0 -1
  324. package/account/mnemonic-account.d.ts.map +0 -1
  325. package/account/mnemonic-account.js.map +0 -1
  326. package/account/mnemonic-account.mjs.map +0 -1
  327. package/amount.d.ts.map +0 -1
  328. package/amount.js +0 -34
  329. package/amount.js.map +0 -1
  330. package/amount.mjs +0 -30
  331. package/amount.mjs.map +0 -1
  332. package/app-client.d.ts.map +0 -1
  333. package/app-client.js.map +0 -1
  334. package/app-client.mjs.map +0 -1
  335. package/app-deploy.d.ts.map +0 -1
  336. package/app-deploy.js +0 -468
  337. package/app-deploy.js.map +0 -1
  338. package/app-deploy.mjs +0 -459
  339. package/app-deploy.mjs.map +0 -1
  340. package/app.d.ts.map +0 -1
  341. package/app.js +0 -599
  342. package/app.js.map +0 -1
  343. package/app.mjs +0 -579
  344. package/app.mjs.map +0 -1
  345. package/asset.d.ts.map +0 -1
  346. package/asset.js +0 -272
  347. package/asset.js.map +0 -1
  348. package/asset.mjs +0 -266
  349. package/asset.mjs.map +0 -1
  350. package/config.d.ts.map +0 -1
  351. package/config.js.map +0 -1
  352. package/config.mjs.map +0 -1
  353. package/debugging/debugging.d.ts.map +0 -1
  354. package/debugging/debugging.js +0 -139
  355. package/debugging/debugging.js.map +0 -1
  356. package/debugging/debugging.mjs +0 -118
  357. package/debugging/debugging.mjs.map +0 -1
  358. package/debugging/index.d.ts.map +0 -1
  359. package/debugging/simulate-and-persist-response.d.ts +0 -20
  360. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  361. package/debugging/simulate-and-persist-response.js +0 -108
  362. package/debugging/simulate-and-persist-response.js.map +0 -1
  363. package/debugging/simulate-and-persist-response.mjs +0 -89
  364. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  365. package/dispenser-client.d.ts.map +0 -1
  366. package/dispenser-client.js.map +0 -1
  367. package/dispenser-client.mjs.map +0 -1
  368. package/index.d.ts.map +0 -1
  369. package/indexer-lookup.d.ts.map +0 -1
  370. package/indexer-lookup.js.map +0 -1
  371. package/indexer-lookup.mjs.map +0 -1
  372. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  373. package/localnet/get-kmd-wallet-account.js.map +0 -1
  374. package/localnet/get-kmd-wallet-account.mjs.map +0 -1
  375. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  376. package/localnet/get-localnet-dispenser-account.js.map +0 -1
  377. package/localnet/get-localnet-dispenser-account.mjs.map +0 -1
  378. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  379. package/localnet/get-or-create-kmd-wallet-account.js.map +0 -1
  380. package/localnet/get-or-create-kmd-wallet-account.mjs.map +0 -1
  381. package/localnet/index.d.ts.map +0 -1
  382. package/localnet/is-localnet.d.ts.map +0 -1
  383. package/localnet/is-localnet.js.map +0 -1
  384. package/localnet/is-localnet.mjs.map +0 -1
  385. package/network-client.d.ts.map +0 -1
  386. package/network-client.js.map +0 -1
  387. package/network-client.mjs.map +0 -1
  388. package/testing/_asset.d.ts.map +0 -1
  389. package/testing/account.d.ts.map +0 -1
  390. package/testing/account.js.map +0 -1
  391. package/testing/account.mjs.map +0 -1
  392. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  393. package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  394. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +0 -1
  395. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  396. package/testing/fixtures/algorand-fixture.js.map +0 -1
  397. package/testing/fixtures/algorand-fixture.mjs.map +0 -1
  398. package/testing/fixtures/index.d.ts.map +0 -1
  399. package/testing/index.d.ts.map +0 -1
  400. package/testing/indexer.d.ts.map +0 -1
  401. package/testing/indexer.js.map +0 -1
  402. package/testing/indexer.mjs.map +0 -1
  403. package/testing/test-logger.d.ts.map +0 -1
  404. package/testing/test-logger.js.map +0 -1
  405. package/testing/test-logger.mjs.map +0 -1
  406. package/testing/transaction-logger.d.ts.map +0 -1
  407. package/testing/transaction-logger.js.map +0 -1
  408. package/testing/transaction-logger.mjs.map +0 -1
  409. package/transaction/index.d.ts.map +0 -1
  410. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  411. package/transaction/perform-atomic-transaction-composer-simulate.js.map +0 -1
  412. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +0 -1
  413. package/transaction/transaction.d.ts.map +0 -1
  414. package/transaction/transaction.js.map +0 -1
  415. package/transaction/transaction.mjs.map +0 -1
  416. package/transfer/index.d.ts.map +0 -1
  417. package/transfer/transfer-algos.d.ts.map +0 -1
  418. package/transfer/transfer-algos.js +0 -40
  419. package/transfer/transfer-algos.js.map +0 -1
  420. package/transfer/transfer-algos.mjs +0 -38
  421. package/transfer/transfer-algos.mjs.map +0 -1
  422. package/transfer/transfer.d.ts.map +0 -1
  423. package/transfer/transfer.js +0 -147
  424. package/transfer/transfer.js.map +0 -1
  425. package/transfer/transfer.mjs +0 -143
  426. package/transfer/transfer.mjs.map +0 -1
  427. package/types/account-manager.d.ts.map +0 -1
  428. package/types/account.d.ts.map +0 -1
  429. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  430. package/types/algorand-client.d.ts.map +0 -1
  431. package/types/amount.d.ts.map +0 -1
  432. package/types/app-client.d.ts.map +0 -1
  433. package/types/app-spec.d.ts.map +0 -1
  434. package/types/app.d.ts.map +0 -1
  435. package/types/asset.d.ts.map +0 -1
  436. package/types/client-manager.d.ts.map +0 -1
  437. package/types/composer.d.ts.map +0 -1
  438. package/types/config.d.ts.map +0 -1
  439. package/types/debugging.d.ts.map +0 -1
  440. package/types/dispenser-client.d.ts.map +0 -1
  441. package/types/indexer.d.ts.map +0 -1
  442. package/types/kmd-account-manager.d.ts.map +0 -1
  443. package/types/logging.d.ts.map +0 -1
  444. package/types/logic-error.d.ts.map +0 -1
  445. package/types/network-client.d.ts.map +0 -1
  446. package/types/testing.d.ts.map +0 -1
  447. package/types/transaction.d.ts.map +0 -1
  448. package/types/transfer.d.ts.map +0 -1
  449. package/types/urlTokenBaseHTTPClient.d.ts +0 -41
  450. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  451. package/types/urlTokenBaseHTTPClient.js +0 -153
  452. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  453. package/types/urlTokenBaseHTTPClient.mjs +0 -151
  454. package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
  455. package/util.d.ts.map +0 -1
  456. package/util.js.map +0 -1
  457. package/util.mjs.map +0 -1
  458. /package/{account → src/account}/get-account-config-from-environment.js +0 -0
  459. /package/{account → src/account}/get-account-config-from-environment.mjs +0 -0
  460. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
  461. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.mjs +0 -0
  462. /package/{testing → src/testing}/indexer.js +0 -0
  463. /package/{testing → src/testing}/indexer.mjs +0 -0
  464. /package/{testing → src/testing}/transaction-logger.js +0 -0
  465. /package/{testing → src/testing}/transaction-logger.mjs +0 -0
@@ -0,0 +1,681 @@
1
+ /** Orchestrates creating transactions for `AlgorandClient`. */
2
+ class AlgorandClientTransactionCreator {
3
+ /**
4
+ * Creates a new `AlgorandClientTransactionCreator`
5
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
6
+ */
7
+ constructor(newGroup) {
8
+ /**
9
+ * Create a payment transaction to transfer Algo between accounts.
10
+ * @param params The parameters for the payment transaction
11
+ * @example Basic example
12
+ * ```typescript
13
+ * const result = await algorand.send.payment({
14
+ * sender: 'SENDERADDRESS',
15
+ * receiver: 'RECEIVERADDRESS',
16
+ * amount: (4).algo(),
17
+ * })
18
+ * ```
19
+ * @example Advanced example
20
+ * ```typescript
21
+ * const result = await algorand.send.payment({
22
+ * amount: (4).algo(),
23
+ * receiver: 'RECEIVERADDRESS',
24
+ * sender: 'SENDERADDRESS',
25
+ * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
26
+ * lease: 'lease',
27
+ * note: 'note',
28
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
29
+ * rekeyTo: 'REKEYTOADDRESS',
30
+ * // You wouldn't normally set this field
31
+ * firstValidRound: 1000n,
32
+ * validityWindow: 10,
33
+ * extraFee: (1000).microAlgo(),
34
+ * staticFee: (1000).microAlgo(),
35
+ * // Max fee doesn't make sense with extraFee AND staticFee
36
+ * // already specified, but here for completeness
37
+ * maxFee: (3000).microAlgo(),
38
+ * })
39
+ * ```
40
+ *
41
+ * @returns The payment transaction
42
+ */
43
+ this.payment = this._transaction((c) => c.addPayment);
44
+ /** Create a create Algorand Standard Asset transaction.
45
+ *
46
+ * The account that sends this transaction will automatically be
47
+ * opted in to the asset and will hold all units after creation.
48
+ *
49
+ * @param params The parameters for the asset creation transaction
50
+ *
51
+ * @example Basic example
52
+ * ```typescript
53
+ * await algorand.createTransaction.assetCreate({sender: "CREATORADDRESS", total: 100n})
54
+ * ```
55
+ * @example Advanced example
56
+ * ```typescript
57
+ * await algorand.createTransaction.assetCreate({
58
+ * sender: 'CREATORADDRESS',
59
+ * total: 100n,
60
+ * decimals: 2,
61
+ * assetName: 'asset',
62
+ * unitName: 'unit',
63
+ * url: 'url',
64
+ * metadataHash: 'metadataHash',
65
+ * defaultFrozen: false,
66
+ * manager: 'MANAGERADDRESS',
67
+ * reserve: 'RESERVEADDRESS',
68
+ * freeze: 'FREEZEADDRESS',
69
+ * clawback: 'CLAWBACKADDRESS',
70
+ * lease: 'lease',
71
+ * note: 'note',
72
+ * // You wouldn't normally set this field
73
+ * firstValidRound: 1000n,
74
+ * validityWindow: 10,
75
+ * extraFee: (1000).microAlgo(),
76
+ * staticFee: (1000).microAlgo(),
77
+ * // Max fee doesn't make sense with extraFee AND staticFee
78
+ * // already specified, but here for completeness
79
+ * maxFee: (3000).microAlgo(),
80
+ * })
81
+ * ```
82
+ * @returns The asset create transaction
83
+ */
84
+ this.assetCreate = this._transaction((c) => c.addAssetCreate);
85
+ /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
86
+ *
87
+ * **Note:** The manager, reserve, freeze, and clawback addresses
88
+ * are immutably empty if they are not set. If manager is not set then
89
+ * all fields are immutable from that point forward.
90
+ *
91
+ * @param params The parameters for the asset config transaction
92
+ *
93
+ * @example Basic example
94
+ * ```typescript
95
+ * await algorand.createTransaction.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
96
+ * ```
97
+ * @example Advanced example
98
+ * ```typescript
99
+ * await algorand.createTransaction.assetConfig({
100
+ * sender: 'MANAGERADDRESS',
101
+ * assetId: 123456n,
102
+ * manager: 'MANAGERADDRESS',
103
+ * reserve: 'RESERVEADDRESS',
104
+ * freeze: 'FREEZEADDRESS',
105
+ * clawback: 'CLAWBACKADDRESS',
106
+ * lease: 'lease',
107
+ * note: 'note',
108
+ * // You wouldn't normally set this field
109
+ * firstValidRound: 1000n,
110
+ * validityWindow: 10,
111
+ * extraFee: (1000).microAlgo(),
112
+ * staticFee: (1000).microAlgo(),
113
+ * // Max fee doesn't make sense with extraFee AND staticFee
114
+ * // already specified, but here for completeness
115
+ * maxFee: (3000).microAlgo(),
116
+ * })
117
+ * ```
118
+ * @returns The asset config transaction
119
+ */
120
+ this.assetConfig = this._transaction((c) => c.addAssetConfig);
121
+ /** Create an Algorand Standard Asset freeze transaction.
122
+ *
123
+ * @param params The parameters for the asset freeze transaction
124
+ *
125
+ * @example Basic example
126
+ * ```typescript
127
+ * await algorand.createTransaction.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
128
+ * ```
129
+ * @example Advanced example
130
+ * ```typescript
131
+ * await algorand.createTransaction.assetFreeze({
132
+ * sender: 'MANAGERADDRESS',
133
+ * assetId: 123456n,
134
+ * account: 'ACCOUNTADDRESS',
135
+ * frozen: true,
136
+ * lease: 'lease',
137
+ * note: 'note',
138
+ * // You wouldn't normally set this field
139
+ * firstValidRound: 1000n,
140
+ * validityWindow: 10,
141
+ * extraFee: (1000).microAlgo(),
142
+ * staticFee: (1000).microAlgo(),
143
+ * // Max fee doesn't make sense with extraFee AND staticFee
144
+ * // already specified, but here for completeness
145
+ * maxFee: (3000).microAlgo(),
146
+ * })
147
+ * ```
148
+ * @returns The asset freeze transaction
149
+ */
150
+ this.assetFreeze = this._transaction((c) => c.addAssetFreeze);
151
+ /** Create an Algorand Standard Asset destroy transaction.
152
+ *
153
+ * Created assets can be destroyed only by the asset manager account.
154
+ * All of the assets must be owned by the creator of the asset before
155
+ * the asset can be deleted.
156
+ *
157
+ * @param params The parameters for the asset destroy transaction
158
+ *
159
+ * @example Basic example
160
+ * ```typescript
161
+ * await algorand.createTransaction.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
162
+ * ```
163
+ * @example Advanced example
164
+ * ```typescript
165
+ * await algorand.createTransaction.assetDestroy({
166
+ * sender: 'MANAGERADDRESS',
167
+ * assetId: 123456n,
168
+ * lease: 'lease',
169
+ * note: 'note',
170
+ * // You wouldn't normally set this field
171
+ * firstValidRound: 1000n,
172
+ * validityWindow: 10,
173
+ * extraFee: (1000).microAlgo(),
174
+ * staticFee: (1000).microAlgo(),
175
+ * // Max fee doesn't make sense with extraFee AND staticFee
176
+ * // already specified, but here for completeness
177
+ * maxFee: (3000).microAlgo(),
178
+ * })
179
+ * ```
180
+ * @returns The asset destroy transaction
181
+ */
182
+ this.assetDestroy = this._transaction((c) => c.addAssetDestroy);
183
+ /** Create an Algorand Standard Asset transfer transaction.
184
+ *
185
+ * @param params The parameters for the asset transfer transaction
186
+ *
187
+ * @example Basic example
188
+ * ```typescript
189
+ * await algorand.createTransaction.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
190
+ * ```
191
+ * @example Advanced example (with clawback)
192
+ * ```typescript
193
+ * await algorand.createTransaction.assetTransfer({
194
+ * sender: 'CLAWBACKADDRESS',
195
+ * assetId: 123456n,
196
+ * amount: 1n,
197
+ * receiver: 'RECEIVERADDRESS',
198
+ * clawbackTarget: 'HOLDERADDRESS',
199
+ * // This field needs to be used with caution
200
+ * closeAssetTo: 'ADDRESSTOCLOSETO'
201
+ * lease: 'lease',
202
+ * note: 'note',
203
+ * // You wouldn't normally set this field
204
+ * firstValidRound: 1000n,
205
+ * validityWindow: 10,
206
+ * extraFee: (1000).microAlgo(),
207
+ * staticFee: (1000).microAlgo(),
208
+ * // Max fee doesn't make sense with extraFee AND staticFee
209
+ * // already specified, but here for completeness
210
+ * maxFee: (3000).microAlgo(),
211
+ * })
212
+ * ```
213
+ * @returns The result of the asset transfer transaction
214
+ */
215
+ this.assetTransfer = this._transaction((c) => c.addAssetTransfer);
216
+ /** Create an Algorand Standard Asset opt-in transaction.
217
+ *
218
+ * @param params The parameters for the asset opt-in transaction
219
+ *
220
+ * @example Basic example
221
+ * ```typescript
222
+ * await algorand.createTransaction.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
223
+ * ```
224
+ * @example Advanced example
225
+ * ```typescript
226
+ * await algorand.createTransaction.assetOptIn({
227
+ * sender: 'SENDERADDRESS',
228
+ * assetId: 123456n,
229
+ * lease: 'lease',
230
+ * note: 'note',
231
+ * // You wouldn't normally set this field
232
+ * firstValidRound: 1000n,
233
+ * validityWindow: 10,
234
+ * extraFee: (1000).microAlgo(),
235
+ * staticFee: (1000).microAlgo(),
236
+ * // Max fee doesn't make sense with extraFee AND staticFee
237
+ * // already specified, but here for completeness
238
+ * maxFee: (3000).microAlgo(),
239
+ * })
240
+ * ```
241
+ * @returns The asset opt-in transaction
242
+ */
243
+ this.assetOptIn = this._transaction((c) => c.addAssetOptIn);
244
+ /** Create an asset opt-out transaction.
245
+ *
246
+ * *Note:* If the account has a balance of the asset,
247
+ * it will lose those assets
248
+ *
249
+ * @param params The parameters for the asset opt-out transaction
250
+ *
251
+ * @example Basic example
252
+ * ```typescript
253
+ * await algorand.createTransaction.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
254
+ * ```
255
+ * @example Advanced example
256
+ * ```typescript
257
+ * await algorand.createTransaction.assetOptIn({
258
+ * sender: 'SENDERADDRESS',
259
+ * assetId: 123456n,
260
+ * creator: 'CREATORADDRESS',
261
+ * ensureZeroBalance: true,
262
+ * lease: 'lease',
263
+ * note: 'note',
264
+ * // You wouldn't normally set this field
265
+ * firstValidRound: 1000n,
266
+ * validityWindow: 10,
267
+ * extraFee: (1000).microAlgo(),
268
+ * staticFee: (1000).microAlgo(),
269
+ * // Max fee doesn't make sense with extraFee AND staticFee
270
+ * // already specified, but here for completeness
271
+ * maxFee: (3000).microAlgo(),
272
+ * })
273
+ * ```
274
+ * @returns The asset opt-out transaction
275
+ */
276
+ this.assetOptOut = this._transaction((c) => c.addAssetOptOut);
277
+ /** Create an application create transaction.
278
+ *
279
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
280
+ *
281
+ * @param params The parameters for the app creation transaction
282
+ * @example Basic example
283
+ * ```typescript
284
+ * const result = await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
285
+ * const createdAppId = result.appId
286
+ * ```
287
+ * @example Advanced example
288
+ * ```typescript
289
+ * await algorand.createTransaction.appCreate({
290
+ * sender: 'CREATORADDRESS',
291
+ * approvalProgram: "TEALCODE",
292
+ * clearStateProgram: "TEALCODE",
293
+ * schema: {
294
+ * globalInts: 1,
295
+ * globalByteSlices: 2,
296
+ * localInts: 3,
297
+ * localByteSlices: 4
298
+ * },
299
+ * extraProgramPages: 1,
300
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
301
+ * args: [new Uint8Array(1, 2, 3, 4)]
302
+ * accountReferences: ["ACCOUNT_1"]
303
+ * appReferences: [123n, 1234n]
304
+ * assetReferences: [12345n]
305
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
306
+ * lease: 'lease',
307
+ * note: 'note',
308
+ * // You wouldn't normally set this field
309
+ * firstValidRound: 1000n,
310
+ * validityWindow: 10,
311
+ * extraFee: (1000).microAlgo(),
312
+ * staticFee: (1000).microAlgo(),
313
+ * // Max fee doesn't make sense with extraFee AND staticFee
314
+ * // already specified, but here for completeness
315
+ * maxFee: (3000).microAlgo(),
316
+ * // Signer only needed if you want to provide one,
317
+ * // generally you'd register it with AlgorandClient
318
+ * // against the sender and not need to pass it in
319
+ * signer: transactionSigner,
320
+ * maxRoundsToWaitForConfirmation: 5,
321
+ * suppressLog: true,
322
+ *})
323
+ * ```
324
+ */
325
+ this.appCreate = this._transaction((c) => c.addAppCreate);
326
+ /** Create an application update transaction.
327
+ *
328
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
329
+ *
330
+ * @param params The parameters for the app update transaction
331
+ * @example Basic example
332
+ * ```typescript
333
+ * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
334
+ * ```
335
+ * @example Advanced example
336
+ * ```typescript
337
+ * await algorand.createTransaction.appUpdate({
338
+ * sender: 'CREATORADDRESS',
339
+ * approvalProgram: "TEALCODE",
340
+ * clearStateProgram: "TEALCODE",
341
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
342
+ * args: [new Uint8Array(1, 2, 3, 4)]
343
+ * accountReferences: ["ACCOUNT_1"]
344
+ * appReferences: [123n, 1234n]
345
+ * assetReferences: [12345n]
346
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
347
+ * lease: 'lease',
348
+ * note: 'note',
349
+ * // You wouldn't normally set this field
350
+ * firstValidRound: 1000n,
351
+ * validityWindow: 10,
352
+ * extraFee: (1000).microAlgo(),
353
+ * staticFee: (1000).microAlgo(),
354
+ * // Max fee doesn't make sense with extraFee AND staticFee
355
+ * // already specified, but here for completeness
356
+ * maxFee: (3000).microAlgo(),
357
+ * // Signer only needed if you want to provide one,
358
+ * // generally you'd register it with AlgorandClient
359
+ * // against the sender and not need to pass it in
360
+ * signer: transactionSigner,
361
+ * maxRoundsToWaitForConfirmation: 5,
362
+ * suppressLog: true,
363
+ *})
364
+ * ```
365
+ */
366
+ this.appUpdate = this._transaction((c) => c.addAppUpdate);
367
+ /** Create an application delete transaction.
368
+ *
369
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
370
+ *
371
+ * @param params The parameters for the app deletion transaction
372
+ * @example Basic example
373
+ * ```typescript
374
+ * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
375
+ * ```
376
+ * @example Advanced example
377
+ * ```typescript
378
+ * await algorand.createTransaction.appDelete({
379
+ * sender: 'CREATORADDRESS',
380
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
381
+ * args: [new Uint8Array(1, 2, 3, 4)]
382
+ * accountReferences: ["ACCOUNT_1"]
383
+ * appReferences: [123n, 1234n]
384
+ * assetReferences: [12345n]
385
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
386
+ * lease: 'lease',
387
+ * note: 'note',
388
+ * // You wouldn't normally set this field
389
+ * firstValidRound: 1000n,
390
+ * validityWindow: 10,
391
+ * extraFee: (1000).microAlgo(),
392
+ * staticFee: (1000).microAlgo(),
393
+ * // Max fee doesn't make sense with extraFee AND staticFee
394
+ * // already specified, but here for completeness
395
+ * maxFee: (3000).microAlgo(),
396
+ * // Signer only needed if you want to provide one,
397
+ * // generally you'd register it with AlgorandClient
398
+ * // against the sender and not need to pass it in
399
+ * signer: transactionSigner,
400
+ * maxRoundsToWaitForConfirmation: 5,
401
+ * suppressLog: true,
402
+ *})
403
+ * ```
404
+ */
405
+ this.appDelete = this._transaction((c) => c.addAppDelete);
406
+ /** Create an application call transaction.
407
+ *
408
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
409
+ *
410
+ * @param params The parameters for the app call transaction
411
+ * @example Basic example
412
+ * ```typescript
413
+ * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
414
+ * ```
415
+ * @example Advanced example
416
+ * ```typescript
417
+ * await algorand.createTransaction.appCall({
418
+ * sender: 'CREATORADDRESS',
419
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
420
+ * args: [new Uint8Array(1, 2, 3, 4)]
421
+ * accountReferences: ["ACCOUNT_1"]
422
+ * appReferences: [123n, 1234n]
423
+ * assetReferences: [12345n]
424
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
425
+ * lease: 'lease',
426
+ * note: 'note',
427
+ * // You wouldn't normally set this field
428
+ * firstValidRound: 1000n,
429
+ * validityWindow: 10,
430
+ * extraFee: (1000).microAlgo(),
431
+ * staticFee: (1000).microAlgo(),
432
+ * // Max fee doesn't make sense with extraFee AND staticFee
433
+ * // already specified, but here for completeness
434
+ * maxFee: (3000).microAlgo(),
435
+ * // Signer only needed if you want to provide one,
436
+ * // generally you'd register it with AlgorandClient
437
+ * // against the sender and not need to pass it in
438
+ * signer: transactionSigner,
439
+ * maxRoundsToWaitForConfirmation: 5,
440
+ * suppressLog: true,
441
+ *})
442
+ * ```
443
+ */
444
+ this.appCall = this._transaction((c) => c.addAppCall);
445
+ /** Create an application create call with ABI method call transaction.
446
+ *
447
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
448
+ *
449
+ * @param params The parameters for the app creation transaction
450
+ * @example Basic example
451
+ * ```typescript
452
+ * const method = new ABIMethod({
453
+ * name: 'method',
454
+ * args: [{ name: 'arg1', type: 'string' }],
455
+ * returns: { type: 'string' },
456
+ * })
457
+ * const result = await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
458
+ * const createdAppId = result.appId
459
+ * ```
460
+ * @example Advanced example
461
+ * ```typescript
462
+ * const method = new ABIMethod({
463
+ * name: 'method',
464
+ * args: [{ name: 'arg1', type: 'string' }],
465
+ * returns: { type: 'string' },
466
+ * })
467
+ * await algorand.createTransaction.appCreate({
468
+ * sender: 'CREATORADDRESS',
469
+ * method: method,
470
+ * args: ["arg1_value"],
471
+ * approvalProgram: "TEALCODE",
472
+ * clearStateProgram: "TEALCODE",
473
+ * schema: {
474
+ * globalInts: 1,
475
+ * globalByteSlices: 2,
476
+ * localInts: 3,
477
+ * localByteSlices: 4
478
+ * },
479
+ * extraProgramPages: 1,
480
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
481
+ * args: [new Uint8Array(1, 2, 3, 4)]
482
+ * accountReferences: ["ACCOUNT_1"]
483
+ * appReferences: [123n, 1234n]
484
+ * assetReferences: [12345n]
485
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
486
+ * lease: 'lease',
487
+ * note: 'note',
488
+ * // You wouldn't normally set this field
489
+ * firstValidRound: 1000n,
490
+ * validityWindow: 10,
491
+ * extraFee: (1000).microAlgo(),
492
+ * staticFee: (1000).microAlgo(),
493
+ * // Max fee doesn't make sense with extraFee AND staticFee
494
+ * // already specified, but here for completeness
495
+ * maxFee: (3000).microAlgo(),
496
+ * // Signer only needed if you want to provide one,
497
+ * // generally you'd register it with AlgorandClient
498
+ * // against the sender and not need to pass it in
499
+ * signer: transactionSigner,
500
+ * maxRoundsToWaitForConfirmation: 5,
501
+ * suppressLog: true,
502
+ *})
503
+ * ```
504
+ */
505
+ this.appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall);
506
+ /** Create an application update call with ABI method call transaction.
507
+ *
508
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
509
+ *
510
+ * @param params The parameters for the app update transaction
511
+ * @example Basic example
512
+ * ```typescript
513
+ * const method = new ABIMethod({
514
+ * name: 'method',
515
+ * args: [{ name: 'arg1', type: 'string' }],
516
+ * returns: { type: 'string' },
517
+ * })
518
+ * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
519
+ * ```
520
+ * @example Advanced example
521
+ * ```typescript
522
+ * const method = new ABIMethod({
523
+ * name: 'method',
524
+ * args: [{ name: 'arg1', type: 'string' }],
525
+ * returns: { type: 'string' },
526
+ * })
527
+ * await algorand.createTransaction.appUpdateMethodCall({
528
+ * sender: 'CREATORADDRESS',
529
+ * method: method,
530
+ * args: ["arg1_value"],
531
+ * approvalProgram: "TEALCODE",
532
+ * clearStateProgram: "TEALCODE",
533
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
534
+ * args: [new Uint8Array(1, 2, 3, 4)]
535
+ * accountReferences: ["ACCOUNT_1"]
536
+ * appReferences: [123n, 1234n]
537
+ * assetReferences: [12345n]
538
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
539
+ * lease: 'lease',
540
+ * note: 'note',
541
+ * // You wouldn't normally set this field
542
+ * firstValidRound: 1000n,
543
+ * validityWindow: 10,
544
+ * extraFee: (1000).microAlgo(),
545
+ * staticFee: (1000).microAlgo(),
546
+ * // Max fee doesn't make sense with extraFee AND staticFee
547
+ * // already specified, but here for completeness
548
+ * maxFee: (3000).microAlgo(),
549
+ * // Signer only needed if you want to provide one,
550
+ * // generally you'd register it with AlgorandClient
551
+ * // against the sender and not need to pass it in
552
+ * signer: transactionSigner,
553
+ * maxRoundsToWaitForConfirmation: 5,
554
+ * suppressLog: true,
555
+ *})
556
+ * ```
557
+ */
558
+ this.appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall);
559
+ /** Create an application delete call with ABI method call transaction.
560
+ *
561
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
562
+ *
563
+ * @param params The parameters for the app deletion transaction
564
+ * @example Basic example
565
+ * ```typescript
566
+ * const method = new ABIMethod({
567
+ * name: 'method',
568
+ * args: [{ name: 'arg1', type: 'string' }],
569
+ * returns: { type: 'string' },
570
+ * })
571
+ * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
572
+ * ```
573
+ * @example Advanced example
574
+ * ```typescript
575
+ * const method = new ABIMethod({
576
+ * name: 'method',
577
+ * args: [{ name: 'arg1', type: 'string' }],
578
+ * returns: { type: 'string' },
579
+ * })
580
+ * await algorand.createTransaction.appDeleteMethodCall({
581
+ * sender: 'CREATORADDRESS',
582
+ * method: method,
583
+ * args: ["arg1_value"],
584
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
585
+ * args: [new Uint8Array(1, 2, 3, 4)]
586
+ * accountReferences: ["ACCOUNT_1"]
587
+ * appReferences: [123n, 1234n]
588
+ * assetReferences: [12345n]
589
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
590
+ * lease: 'lease',
591
+ * note: 'note',
592
+ * // You wouldn't normally set this field
593
+ * firstValidRound: 1000n,
594
+ * validityWindow: 10,
595
+ * extraFee: (1000).microAlgo(),
596
+ * staticFee: (1000).microAlgo(),
597
+ * // Max fee doesn't make sense with extraFee AND staticFee
598
+ * // already specified, but here for completeness
599
+ * maxFee: (3000).microAlgo(),
600
+ * // Signer only needed if you want to provide one,
601
+ * // generally you'd register it with AlgorandClient
602
+ * // against the sender and not need to pass it in
603
+ * signer: transactionSigner,
604
+ * maxRoundsToWaitForConfirmation: 5,
605
+ * suppressLog: true,
606
+ *})
607
+ * ```
608
+ */
609
+ this.appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall);
610
+ /** Create an application call with ABI method call transaction.
611
+ *
612
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
613
+ *
614
+ * @param params The parameters for the app call transaction
615
+ * @example Basic example
616
+ * ```typescript
617
+ * const method = new ABIMethod({
618
+ * name: 'method',
619
+ * args: [{ name: 'arg1', type: 'string' }],
620
+ * returns: { type: 'string' },
621
+ * })
622
+ * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
623
+ * ```
624
+ * @example Advanced example
625
+ * ```typescript
626
+ * const method = new ABIMethod({
627
+ * name: 'method',
628
+ * args: [{ name: 'arg1', type: 'string' }],
629
+ * returns: { type: 'string' },
630
+ * })
631
+ * await algorand.createTransaction.appCallMethodCall({
632
+ * sender: 'CREATORADDRESS',
633
+ * method: method,
634
+ * args: ["arg1_value"],
635
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
636
+ * args: [new Uint8Array(1, 2, 3, 4)]
637
+ * accountReferences: ["ACCOUNT_1"]
638
+ * appReferences: [123n, 1234n]
639
+ * assetReferences: [12345n]
640
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
641
+ * lease: 'lease',
642
+ * note: 'note',
643
+ * // You wouldn't normally set this field
644
+ * firstValidRound: 1000n,
645
+ * validityWindow: 10,
646
+ * extraFee: (1000).microAlgo(),
647
+ * staticFee: (1000).microAlgo(),
648
+ * // Max fee doesn't make sense with extraFee AND staticFee
649
+ * // already specified, but here for completeness
650
+ * maxFee: (3000).microAlgo(),
651
+ * // Signer only needed if you want to provide one,
652
+ * // generally you'd register it with AlgorandClient
653
+ * // against the sender and not need to pass it in
654
+ * signer: transactionSigner,
655
+ * maxRoundsToWaitForConfirmation: 5,
656
+ * suppressLog: true,
657
+ *})
658
+ * ```
659
+ */
660
+ this.appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall);
661
+ /** Create an online key registration transaction. */
662
+ this.onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration);
663
+ this._newGroup = newGroup;
664
+ }
665
+ _transaction(c) {
666
+ return async (params) => {
667
+ const composer = this._newGroup();
668
+ const result = await c(composer).apply(composer, [params]).buildTransactions();
669
+ return result.transactions.at(-1);
670
+ };
671
+ }
672
+ _transactions(c) {
673
+ return async (params) => {
674
+ const composer = this._newGroup();
675
+ return await c(composer).apply(composer, [params]).buildTransactions();
676
+ };
677
+ }
678
+ }
679
+
680
+ export { AlgorandClientTransactionCreator };
681
+ //# sourceMappingURL=algorand-client-transaction-creator.mjs.map