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