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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -26
  3. package/account/account.d.ts +12 -10
  4. package/account/account.js +17 -14
  5. package/account/account.js.map +1 -1
  6. package/account/account.mjs +18 -15
  7. package/account/account.mjs.map +1 -1
  8. package/account/get-account-config-from-environment.d.ts +0 -1
  9. package/account/get-account-config-from-environment.js.map +1 -1
  10. package/account/get-account-config-from-environment.mjs.map +1 -1
  11. package/account/get-account.d.ts +2 -3
  12. package/account/get-account.js +1 -1
  13. package/account/get-account.js.map +1 -1
  14. package/account/get-account.mjs +1 -1
  15. package/account/get-account.mjs.map +1 -1
  16. package/account/get-dispenser-account.d.ts +2 -3
  17. package/account/get-dispenser-account.js +1 -1
  18. package/account/get-dispenser-account.js.map +1 -1
  19. package/account/get-dispenser-account.mjs +1 -1
  20. package/account/get-dispenser-account.mjs.map +1 -1
  21. package/account/index.d.ts +0 -1
  22. package/account/mnemonic-account.d.ts +1 -2
  23. package/account/mnemonic-account.js +1 -1
  24. package/account/mnemonic-account.js.map +1 -1
  25. package/account/mnemonic-account.mjs +1 -1
  26. package/account/mnemonic-account.mjs.map +1 -1
  27. package/amount.d.ts +15 -5
  28. package/amount.js +9 -2
  29. package/amount.js.map +1 -1
  30. package/amount.mjs +9 -3
  31. package/amount.mjs.map +1 -1
  32. package/app-client.d.ts +19 -5
  33. package/app-client.js +19 -4
  34. package/app-client.js.map +1 -1
  35. package/app-client.mjs +19 -4
  36. package/app-client.mjs.map +1 -1
  37. package/app-deploy.d.ts +18 -2
  38. package/app-deploy.js +159 -342
  39. package/app-deploy.js.map +1 -1
  40. package/app-deploy.mjs +163 -346
  41. package/app-deploy.mjs.map +1 -1
  42. package/app.d.ts +39 -3
  43. package/app.js +121 -371
  44. package/app.js.map +1 -1
  45. package/app.mjs +122 -372
  46. package/app.mjs.map +1 -1
  47. package/asset.d.ts +5 -6
  48. package/asset.js +5 -8
  49. package/asset.js.map +1 -1
  50. package/asset.mjs +5 -8
  51. package/asset.mjs.map +1 -1
  52. package/config.d.ts +0 -1
  53. package/config.js.map +1 -1
  54. package/config.mjs.map +1 -1
  55. package/debugging/debugging.d.ts +3 -5
  56. package/debugging/debugging.js +4 -128
  57. package/debugging/debugging.js.map +1 -1
  58. package/debugging/debugging.mjs +4 -109
  59. package/debugging/debugging.mjs.map +1 -1
  60. package/debugging/index.d.ts +0 -2
  61. package/dispenser-client.d.ts +0 -1
  62. package/dispenser-client.js.map +1 -1
  63. package/dispenser-client.mjs.map +1 -1
  64. package/index.d.ts +5 -4
  65. package/index.js +36 -26
  66. package/index.js.map +1 -1
  67. package/index.mjs +6 -5
  68. package/index.mjs.map +1 -1
  69. package/indexer-lookup.d.ts +10 -9
  70. package/indexer-lookup.js +14 -10
  71. package/indexer-lookup.js.map +1 -1
  72. package/indexer-lookup.mjs +14 -10
  73. package/indexer-lookup.mjs.map +1 -1
  74. package/localnet/get-kmd-wallet-account.d.ts +1 -2
  75. package/localnet/get-kmd-wallet-account.js +1 -1
  76. package/localnet/get-kmd-wallet-account.js.map +1 -1
  77. package/localnet/get-kmd-wallet-account.mjs +1 -1
  78. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  79. package/localnet/get-localnet-dispenser-account.d.ts +1 -2
  80. package/localnet/get-localnet-dispenser-account.js +1 -1
  81. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  82. package/localnet/get-localnet-dispenser-account.mjs +1 -1
  83. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  84. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
  85. package/localnet/get-or-create-kmd-wallet-account.js +1 -1
  86. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  87. package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
  88. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  89. package/localnet/index.d.ts +0 -1
  90. package/localnet/is-localnet.d.ts +1 -2
  91. package/localnet/is-localnet.js +1 -1
  92. package/localnet/is-localnet.js.map +1 -1
  93. package/localnet/is-localnet.mjs +1 -1
  94. package/localnet/is-localnet.mjs.map +1 -1
  95. package/network-client.d.ts +3 -10
  96. package/network-client.js +4 -11
  97. package/network-client.js.map +1 -1
  98. package/network-client.mjs +4 -11
  99. package/network-client.mjs.map +1 -1
  100. package/package.json +3 -4
  101. package/testing/_asset.d.ts +2 -2
  102. package/testing/account.d.ts +4 -4
  103. package/testing/account.js +8 -2
  104. package/testing/account.js.map +1 -1
  105. package/testing/account.mjs +9 -3
  106. package/testing/account.mjs.map +1 -1
  107. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  108. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  109. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  110. package/testing/fixtures/algorand-fixture.d.ts +0 -1
  111. package/testing/fixtures/algorand-fixture.js +13 -14
  112. package/testing/fixtures/algorand-fixture.js.map +1 -1
  113. package/testing/fixtures/algorand-fixture.mjs +13 -14
  114. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  115. package/testing/fixtures/index.d.ts +0 -1
  116. package/testing/index.d.ts +0 -1
  117. package/testing/indexer.d.ts +0 -1
  118. package/testing/indexer.js.map +1 -1
  119. package/testing/indexer.mjs.map +1 -1
  120. package/testing/test-logger.d.ts +0 -1
  121. package/testing/test-logger.js +7 -3
  122. package/testing/test-logger.js.map +1 -1
  123. package/testing/test-logger.mjs +7 -3
  124. package/testing/test-logger.mjs.map +1 -1
  125. package/testing/transaction-logger.d.ts +0 -1
  126. package/testing/transaction-logger.js.map +1 -1
  127. package/testing/transaction-logger.mjs.map +1 -1
  128. package/transaction/index.d.ts +0 -1
  129. package/transaction/legacy-bridge.d.ts +31 -6
  130. package/transaction/legacy-bridge.js +101 -7
  131. package/transaction/legacy-bridge.js.map +1 -1
  132. package/transaction/legacy-bridge.mjs +101 -10
  133. package/transaction/legacy-bridge.mjs.map +1 -1
  134. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
  135. package/transaction/perform-atomic-transaction-composer-simulate.js +14 -9
  136. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  137. package/transaction/perform-atomic-transaction-composer-simulate.mjs +15 -10
  138. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  139. package/transaction/transaction.d.ts +38 -19
  140. package/transaction/transaction.js +217 -137
  141. package/transaction/transaction.js.map +1 -1
  142. package/transaction/transaction.mjs +218 -138
  143. package/transaction/transaction.mjs.map +1 -1
  144. package/transfer/index.d.ts +0 -1
  145. package/transfer/transfer-algos.d.ts +1 -2
  146. package/transfer/transfer-algos.js +1 -1
  147. package/transfer/transfer-algos.js.map +1 -1
  148. package/transfer/transfer-algos.mjs +1 -1
  149. package/transfer/transfer-algos.mjs.map +1 -1
  150. package/transfer/transfer.d.ts +1 -2
  151. package/transfer/transfer.js +6 -4
  152. package/transfer/transfer.js.map +1 -1
  153. package/transfer/transfer.mjs +6 -4
  154. package/transfer/transfer.mjs.map +1 -1
  155. package/types/account-manager.d.ts +33 -25
  156. package/types/account-manager.js +54 -31
  157. package/types/account-manager.js.map +1 -1
  158. package/types/account-manager.mjs +56 -33
  159. package/types/account-manager.mjs.map +1 -1
  160. package/types/account.d.ts +17 -9
  161. package/types/account.js +2 -2
  162. package/types/account.js.map +1 -1
  163. package/types/account.mjs +3 -3
  164. package/types/account.mjs.map +1 -1
  165. package/types/algo-http-client-with-retry.d.ts +1 -3
  166. package/types/algo-http-client-with-retry.js +33 -3
  167. package/types/algo-http-client-with-retry.js.map +1 -1
  168. package/types/algo-http-client-with-retry.mjs +32 -2
  169. package/types/algo-http-client-with-retry.mjs.map +1 -1
  170. package/types/algorand-client-interface.d.ts +28 -0
  171. package/types/algorand-client-interface.js +3 -0
  172. package/types/algorand-client-interface.js.map +1 -0
  173. package/types/algorand-client-interface.mjs +2 -0
  174. package/types/algorand-client-interface.mjs.map +1 -0
  175. package/types/algorand-client-transaction-creator.d.ts +452 -23
  176. package/types/algorand-client-transaction-creator.js +407 -23
  177. package/types/algorand-client-transaction-creator.js.map +1 -1
  178. package/types/algorand-client-transaction-creator.mjs +407 -23
  179. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  180. package/types/algorand-client-transaction-sender.d.ts +772 -47
  181. package/types/algorand-client-transaction-sender.js +445 -15
  182. package/types/algorand-client-transaction-sender.js.map +1 -1
  183. package/types/algorand-client-transaction-sender.mjs +445 -15
  184. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  185. package/types/algorand-client.d.ts +24 -17
  186. package/types/algorand-client.js +26 -16
  187. package/types/algorand-client.js.map +1 -1
  188. package/types/algorand-client.mjs +28 -15
  189. package/types/algorand-client.mjs.map +1 -1
  190. package/types/amount.d.ts +10 -11
  191. package/types/amount.js +7 -7
  192. package/types/amount.js.map +1 -1
  193. package/types/amount.mjs +7 -7
  194. package/types/amount.mjs.map +1 -1
  195. package/types/app-arc56.d.ts +359 -0
  196. package/types/app-arc56.js +184 -0
  197. package/types/app-arc56.js.map +1 -0
  198. package/types/app-arc56.mjs +175 -0
  199. package/types/app-arc56.mjs.map +1 -0
  200. package/types/app-client.d.ts +1508 -12
  201. package/types/app-client.js +1018 -29
  202. package/types/app-client.js.map +1 -1
  203. package/types/app-client.mjs +1020 -32
  204. package/types/app-client.mjs.map +1 -1
  205. package/types/app-deployer.d.ts +126 -0
  206. package/types/app-deployer.js +353 -0
  207. package/types/app-deployer.js.map +1 -0
  208. package/types/app-deployer.mjs +351 -0
  209. package/types/app-deployer.mjs.map +1 -0
  210. package/types/app-factory.d.ts +846 -0
  211. package/types/app-factory.js +410 -0
  212. package/types/app-factory.js.map +1 -0
  213. package/types/app-factory.mjs +408 -0
  214. package/types/app-factory.mjs.map +1 -0
  215. package/types/app-manager.d.ts +244 -0
  216. package/types/app-manager.js +423 -0
  217. package/types/app-manager.js.map +1 -0
  218. package/types/app-manager.mjs +421 -0
  219. package/types/app-manager.mjs.map +1 -0
  220. package/types/app-spec.d.ts +2 -1
  221. package/types/app-spec.js +127 -0
  222. package/types/app-spec.js.map +1 -1
  223. package/types/app-spec.mjs +126 -0
  224. package/types/app-spec.mjs.map +1 -1
  225. package/types/app.d.ts +57 -18
  226. package/types/app.js +1 -1
  227. package/types/app.js.map +1 -1
  228. package/types/app.mjs +1 -1
  229. package/types/app.mjs.map +1 -1
  230. package/types/asset-manager.d.ts +10 -10
  231. package/types/asset-manager.js +13 -17
  232. package/types/asset-manager.js.map +1 -1
  233. package/types/asset-manager.mjs +13 -17
  234. package/types/asset-manager.mjs.map +1 -1
  235. package/types/asset.d.ts +0 -1
  236. package/types/async-event-emitter.d.ts +14 -0
  237. package/types/async-event-emitter.js +50 -0
  238. package/types/async-event-emitter.js.map +1 -0
  239. package/types/async-event-emitter.mjs +48 -0
  240. package/types/async-event-emitter.mjs.map +1 -0
  241. package/types/client-manager.d.ts +135 -60
  242. package/types/client-manager.js +158 -44
  243. package/types/client-manager.js.map +1 -1
  244. package/types/client-manager.mjs +159 -45
  245. package/types/client-manager.mjs.map +1 -1
  246. package/types/composer.d.ts +271 -87
  247. package/types/composer.js +405 -125
  248. package/types/composer.js.map +1 -1
  249. package/types/composer.mjs +407 -125
  250. package/types/composer.mjs.map +1 -1
  251. package/types/config.d.ts +3 -6
  252. package/types/config.js +5 -44
  253. package/types/config.js.map +1 -1
  254. package/types/config.mjs +5 -27
  255. package/types/config.mjs.map +1 -1
  256. package/types/debugging.d.ts +29 -101
  257. package/types/debugging.js +16 -109
  258. package/types/debugging.js.map +1 -1
  259. package/types/debugging.mjs +12 -107
  260. package/types/debugging.mjs.map +1 -1
  261. package/types/dispenser-client.d.ts +2 -2
  262. package/types/dispenser-client.js +10 -5
  263. package/types/dispenser-client.js.map +1 -1
  264. package/types/dispenser-client.mjs +10 -5
  265. package/types/dispenser-client.mjs.map +1 -1
  266. package/types/expand.d.ts +7 -0
  267. package/types/expand.js +3 -0
  268. package/types/expand.js.map +1 -0
  269. package/types/expand.mjs +2 -0
  270. package/types/expand.mjs.map +1 -0
  271. package/types/indexer.d.ts +74 -756
  272. package/types/indexer.js.map +1 -1
  273. package/types/indexer.mjs.map +1 -1
  274. package/types/kmd-account-manager.d.ts +2 -3
  275. package/types/kmd-account-manager.js +3 -3
  276. package/types/kmd-account-manager.js.map +1 -1
  277. package/types/kmd-account-manager.mjs +4 -4
  278. package/types/kmd-account-manager.mjs.map +1 -1
  279. package/types/lifecycle-events.d.ts +10 -0
  280. package/types/lifecycle-events.js +8 -0
  281. package/types/lifecycle-events.js.map +1 -0
  282. package/types/lifecycle-events.mjs +8 -0
  283. package/types/lifecycle-events.mjs.map +1 -0
  284. package/types/logging.d.ts +0 -1
  285. package/types/logging.js.map +1 -1
  286. package/types/logging.mjs.map +1 -1
  287. package/types/logic-error.d.ts +2 -4
  288. package/types/logic-error.js +3 -3
  289. package/types/logic-error.js.map +1 -1
  290. package/types/logic-error.mjs +3 -3
  291. package/types/logic-error.mjs.map +1 -1
  292. package/types/network-client.d.ts +14 -2
  293. package/types/network-client.js.map +1 -1
  294. package/types/network-client.mjs.map +1 -1
  295. package/types/testing.d.ts +8 -10
  296. package/types/transaction.d.ts +17 -4
  297. package/types/transfer.d.ts +0 -1
  298. package/util.d.ts +2 -2
  299. package/util.js +11 -10
  300. package/util.js.map +1 -1
  301. package/util.mjs +11 -10
  302. package/util.mjs.map +1 -1
  303. package/account/account.d.ts.map +0 -1
  304. package/account/get-account-config-from-environment.d.ts.map +0 -1
  305. package/account/get-account.d.ts.map +0 -1
  306. package/account/get-dispenser-account.d.ts.map +0 -1
  307. package/account/index.d.ts.map +0 -1
  308. package/account/mnemonic-account.d.ts.map +0 -1
  309. package/amount.d.ts.map +0 -1
  310. package/app-client.d.ts.map +0 -1
  311. package/app-deploy.d.ts.map +0 -1
  312. package/app.d.ts.map +0 -1
  313. package/asset.d.ts.map +0 -1
  314. package/config.d.ts.map +0 -1
  315. package/debugging/debugging.d.ts.map +0 -1
  316. package/debugging/index.d.ts.map +0 -1
  317. package/debugging/simulate-and-persist-response.d.ts +0 -20
  318. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  319. package/debugging/simulate-and-persist-response.js +0 -108
  320. package/debugging/simulate-and-persist-response.js.map +0 -1
  321. package/debugging/simulate-and-persist-response.mjs +0 -89
  322. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  323. package/dispenser-client.d.ts.map +0 -1
  324. package/index.d.ts.map +0 -1
  325. package/indexer-lookup.d.ts.map +0 -1
  326. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  327. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  328. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  329. package/localnet/index.d.ts.map +0 -1
  330. package/localnet/is-localnet.d.ts.map +0 -1
  331. package/network-client.d.ts.map +0 -1
  332. package/testing/_asset.d.ts.map +0 -1
  333. package/testing/account.d.ts.map +0 -1
  334. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  335. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  336. package/testing/fixtures/index.d.ts.map +0 -1
  337. package/testing/index.d.ts.map +0 -1
  338. package/testing/indexer.d.ts.map +0 -1
  339. package/testing/test-logger.d.ts.map +0 -1
  340. package/testing/transaction-logger.d.ts.map +0 -1
  341. package/transaction/index.d.ts.map +0 -1
  342. package/transaction/legacy-bridge.d.ts.map +0 -1
  343. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  344. package/transaction/transaction.d.ts.map +0 -1
  345. package/transfer/index.d.ts.map +0 -1
  346. package/transfer/transfer-algos.d.ts.map +0 -1
  347. package/transfer/transfer.d.ts.map +0 -1
  348. package/types/account-manager.d.ts.map +0 -1
  349. package/types/account.d.ts.map +0 -1
  350. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  351. package/types/algorand-client-transaction-creator.d.ts.map +0 -1
  352. package/types/algorand-client-transaction-sender.d.ts.map +0 -1
  353. package/types/algorand-client.d.ts.map +0 -1
  354. package/types/amount.d.ts.map +0 -1
  355. package/types/app-client.d.ts.map +0 -1
  356. package/types/app-spec.d.ts.map +0 -1
  357. package/types/app.d.ts.map +0 -1
  358. package/types/asset-manager.d.ts.map +0 -1
  359. package/types/asset.d.ts.map +0 -1
  360. package/types/client-manager.d.ts.map +0 -1
  361. package/types/composer.d.ts.map +0 -1
  362. package/types/config.d.ts.map +0 -1
  363. package/types/debugging.d.ts.map +0 -1
  364. package/types/dispenser-client.d.ts.map +0 -1
  365. package/types/indexer.d.ts.map +0 -1
  366. package/types/kmd-account-manager.d.ts.map +0 -1
  367. package/types/logging.d.ts.map +0 -1
  368. package/types/logic-error.d.ts.map +0 -1
  369. package/types/network-client.d.ts.map +0 -1
  370. package/types/testing.d.ts.map +0 -1
  371. package/types/transaction.d.ts.map +0 -1
  372. package/types/transfer.d.ts.map +0 -1
  373. package/types/urlTokenBaseHTTPClient.d.ts +0 -41
  374. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  375. package/types/urlTokenBaseHTTPClient.js +0 -153
  376. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  377. package/types/urlTokenBaseHTTPClient.mjs +0 -151
  378. package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
  379. package/util.d.ts.map +0 -1
@@ -2,7 +2,7 @@
2
2
  class AlgorandClientTransactionCreator {
3
3
  /**
4
4
  * Creates a new `AlgorandClientTransactionCreator`
5
- * @param newGroup A lambda that starts a new `AlgoKitComposer` transaction group
5
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
6
6
  */
7
7
  constructor(newGroup) {
8
8
  /**
@@ -10,7 +10,7 @@ class AlgorandClientTransactionCreator {
10
10
  * @param params The parameters for the payment transaction
11
11
  * @example Basic example
12
12
  * ```typescript
13
- * const result = await algorandClient.send.payment({
13
+ * const result = await algorand.send.payment({
14
14
  * sender: 'SENDERADDRESS',
15
15
  * receiver: 'RECEIVERADDRESS',
16
16
  * amount: (4).algo(),
@@ -18,7 +18,7 @@ class AlgorandClientTransactionCreator {
18
18
  * ```
19
19
  * @example Advanced example
20
20
  * ```typescript
21
- * const result = await algorandClient.send.payment({
21
+ * const result = await algorand.send.payment({
22
22
  * amount: (4).algo(),
23
23
  * receiver: 'RECEIVERADDRESS',
24
24
  * sender: 'SENDERADDRESS',
@@ -50,11 +50,11 @@ class AlgorandClientTransactionCreator {
50
50
  *
51
51
  * @example Basic example
52
52
  * ```typescript
53
- * await algorand.transaction.assetCreate({sender: "CREATORADDRESS", total: 100n})
53
+ * await algorand.createTransaction.assetCreate({sender: "CREATORADDRESS", total: 100n})
54
54
  * ```
55
55
  * @example Advanced example
56
56
  * ```typescript
57
- * await algorand.transaction.assetCreate({
57
+ * await algorand.createTransaction.assetCreate({
58
58
  * sender: 'CREATORADDRESS',
59
59
  * total: 100n,
60
60
  * decimals: 2,
@@ -92,11 +92,11 @@ class AlgorandClientTransactionCreator {
92
92
  *
93
93
  * @example Basic example
94
94
  * ```typescript
95
- * await algorand.transaction.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
95
+ * await algorand.createTransaction.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
96
96
  * ```
97
97
  * @example Advanced example
98
98
  * ```typescript
99
- * await algorand.transaction.assetConfig({
99
+ * await algorand.createTransaction.assetConfig({
100
100
  * sender: 'MANAGERADDRESS',
101
101
  * assetId: 123456n,
102
102
  * manager: 'MANAGERADDRESS',
@@ -124,11 +124,11 @@ class AlgorandClientTransactionCreator {
124
124
  *
125
125
  * @example Basic example
126
126
  * ```typescript
127
- * await algorand.transaction.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
127
+ * await algorand.createTransaction.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
128
128
  * ```
129
129
  * @example Advanced example
130
130
  * ```typescript
131
- * await algorand.transaction.assetFreeze({
131
+ * await algorand.createTransaction.assetFreeze({
132
132
  * sender: 'MANAGERADDRESS',
133
133
  * assetId: 123456n,
134
134
  * account: 'ACCOUNTADDRESS',
@@ -158,11 +158,11 @@ class AlgorandClientTransactionCreator {
158
158
  *
159
159
  * @example Basic example
160
160
  * ```typescript
161
- * await algorand.transaction.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
161
+ * await algorand.createTransaction.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
162
162
  * ```
163
163
  * @example Advanced example
164
164
  * ```typescript
165
- * await algorand.transaction.assetDestroy({
165
+ * await algorand.createTransaction.assetDestroy({
166
166
  * sender: 'MANAGERADDRESS',
167
167
  * assetId: 123456n,
168
168
  * lease: 'lease',
@@ -186,11 +186,11 @@ class AlgorandClientTransactionCreator {
186
186
  *
187
187
  * @example Basic example
188
188
  * ```typescript
189
- * await algorand.transaction.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
189
+ * await algorand.createTransaction.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
190
190
  * ```
191
191
  * @example Advanced example (with clawback)
192
192
  * ```typescript
193
- * await algorand.transaction.assetTransfer({
193
+ * await algorand.createTransaction.assetTransfer({
194
194
  * sender: 'CLAWBACKADDRESS',
195
195
  * assetId: 123456n,
196
196
  * amount: 1n,
@@ -219,11 +219,11 @@ class AlgorandClientTransactionCreator {
219
219
  *
220
220
  * @example Basic example
221
221
  * ```typescript
222
- * await algorand.transaction.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
222
+ * await algorand.createTransaction.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
223
223
  * ```
224
224
  * @example Advanced example
225
225
  * ```typescript
226
- * await algorand.transaction.assetOptIn({
226
+ * await algorand.createTransaction.assetOptIn({
227
227
  * sender: 'SENDERADDRESS',
228
228
  * assetId: 123456n,
229
229
  * lease: 'lease',
@@ -250,11 +250,11 @@ class AlgorandClientTransactionCreator {
250
250
  *
251
251
  * @example Basic example
252
252
  * ```typescript
253
- * await algorand.transaction.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
253
+ * await algorand.createTransaction.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
254
254
  * ```
255
255
  * @example Advanced example
256
256
  * ```typescript
257
- * await algorand.transaction.assetOptIn({
257
+ * await algorand.createTransaction.assetOptIn({
258
258
  * sender: 'SENDERADDRESS',
259
259
  * assetId: 123456n,
260
260
  * creator: 'CREATORADDRESS',
@@ -274,12 +274,390 @@ class AlgorandClientTransactionCreator {
274
274
  * @returns The asset opt-out transaction
275
275
  */
276
276
  this.assetOptOut = this._transaction((c) => c.addAssetOptOut);
277
- /** Create an application call transaction. */
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
+ */
278
444
  this.appCall = this._transaction((c) => c.addAppCall);
279
- /** Create an application call with ABI method call transaction. */
280
- this.methodCall = async (params) => {
281
- return await this._newGroup().addMethodCall(params).buildTransactions();
282
- };
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);
283
661
  /** Create an online key registration transaction. */
284
662
  this.onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration);
285
663
  this._newGroup = newGroup;
@@ -288,7 +666,13 @@ class AlgorandClientTransactionCreator {
288
666
  return async (params) => {
289
667
  const composer = this._newGroup();
290
668
  const result = await c(composer).apply(composer, [params]).buildTransactions();
291
- return result[result.length - 1];
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();
292
676
  };
293
677
  }
294
678
  }
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":[null],"names":[],"mappings":"AAKA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAY3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAA;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,CAAA;AAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAA;AAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAA;AACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;;AAExD,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAA;;AAEhD,QAAA,IAAA,CAAA,UAAU,GAAG,OAAO,MAAwB,KAAI;AAC9C,YAAA,OAAO,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,iBAAiB,EAAE,CAAA;AACzE,SAAC,CAAA;;AAED,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC,CAAA;AA/R1E,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;KAC1B;AAEO,IAAA,YAAY,CAAI,CAAyD,EAAA;AAC/E,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClC,SAAC,CAAA;KACF;AAuRF;;;;"}
1
+ {"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { BuiltTransactions, TransactionComposer } from './composer'\nimport { Expand } from './expand'\n\nimport Transaction = algosdk.Transaction\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => TransactionComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `TransactionComposer` transaction group\n */\n constructor(newGroup: () => TransactionComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: TransactionComposer) => (params: T) => TransactionComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n ): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n *\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetCreate({sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetConfig({sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetTransfer({sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.createTransaction.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptOut({sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /** Create an online key registration transaction. */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n}\n"],"names":[],"mappings":"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"}