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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -26
  3. package/account/account.d.ts +12 -10
  4. package/account/get-account-config-from-environment.d.ts +0 -1
  5. package/account/get-account.d.ts +2 -3
  6. package/account/get-dispenser-account.d.ts +2 -3
  7. package/account/index.d.ts +0 -1
  8. package/account/mnemonic-account.d.ts +1 -2
  9. package/amount.d.ts +15 -5
  10. package/app-client.d.ts +19 -5
  11. package/app-deploy.d.ts +18 -2
  12. package/app.d.ts +39 -3
  13. package/asset.d.ts +5 -6
  14. package/config.d.ts +0 -1
  15. package/debugging/debugging.d.ts +3 -5
  16. package/debugging/index.d.ts +0 -2
  17. package/dispenser-client.d.ts +0 -1
  18. package/index.d.ts +5 -4
  19. package/index.js +56 -46
  20. package/index.js.map +1 -1
  21. package/index.mjs +26 -25
  22. package/index.mjs.map +1 -1
  23. package/indexer-lookup.d.ts +10 -9
  24. package/localnet/get-kmd-wallet-account.d.ts +1 -2
  25. package/localnet/get-localnet-dispenser-account.d.ts +1 -2
  26. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
  27. package/localnet/index.d.ts +0 -1
  28. package/localnet/is-localnet.d.ts +1 -2
  29. package/network-client.d.ts +3 -10
  30. package/package.json +3 -4
  31. package/{account → src/account}/account.js +21 -18
  32. package/src/account/account.js.map +1 -0
  33. package/{account → src/account}/account.mjs +22 -19
  34. package/src/account/account.mjs.map +1 -0
  35. package/src/account/get-account-config-from-environment.js.map +1 -0
  36. package/src/account/get-account-config-from-environment.mjs.map +1 -0
  37. package/{account → src/account}/get-account.js +3 -3
  38. package/src/account/get-account.js.map +1 -0
  39. package/{account → src/account}/get-account.mjs +3 -3
  40. package/src/account/get-account.mjs.map +1 -0
  41. package/{account → src/account}/get-dispenser-account.js +3 -3
  42. package/src/account/get-dispenser-account.js.map +1 -0
  43. package/{account → src/account}/get-dispenser-account.mjs +3 -3
  44. package/src/account/get-dispenser-account.mjs.map +1 -0
  45. package/{account → src/account}/mnemonic-account.js +1 -1
  46. package/src/account/mnemonic-account.js.map +1 -0
  47. package/{account → src/account}/mnemonic-account.mjs +1 -1
  48. package/src/account/mnemonic-account.mjs.map +1 -0
  49. package/{amount.js → src/amount.js} +10 -3
  50. package/src/amount.js.map +1 -0
  51. package/{amount.mjs → src/amount.mjs} +10 -4
  52. package/src/amount.mjs.map +1 -0
  53. package/{app-client.js → src/app-client.js} +20 -5
  54. package/src/app-client.js.map +1 -0
  55. package/{app-client.mjs → src/app-client.mjs} +20 -5
  56. package/src/app-client.mjs.map +1 -0
  57. package/src/app-deploy.js +285 -0
  58. package/src/app-deploy.js.map +1 -0
  59. package/src/app-deploy.mjs +276 -0
  60. package/src/app-deploy.mjs.map +1 -0
  61. package/src/app.js +349 -0
  62. package/src/app.js.map +1 -0
  63. package/src/app.mjs +329 -0
  64. package/src/app.mjs.map +1 -0
  65. package/{asset.js → src/asset.js} +6 -9
  66. package/src/asset.js.map +1 -0
  67. package/{asset.mjs → src/asset.mjs} +6 -9
  68. package/src/asset.mjs.map +1 -0
  69. package/{config.js → src/config.js} +1 -1
  70. package/src/config.js.map +1 -0
  71. package/{config.mjs → src/config.mjs} +1 -1
  72. package/src/config.mjs.map +1 -0
  73. package/src/debugging/debugging.js +15 -0
  74. package/src/debugging/debugging.js.map +1 -0
  75. package/src/debugging/debugging.mjs +13 -0
  76. package/src/debugging/debugging.mjs.map +1 -0
  77. package/{dispenser-client.js → src/dispenser-client.js} +1 -1
  78. package/src/dispenser-client.js.map +1 -0
  79. package/{dispenser-client.mjs → src/dispenser-client.mjs} +1 -1
  80. package/src/dispenser-client.mjs.map +1 -0
  81. package/{indexer-lookup.js → src/indexer-lookup.js} +14 -10
  82. package/src/indexer-lookup.js.map +1 -0
  83. package/{indexer-lookup.mjs → src/indexer-lookup.mjs} +14 -10
  84. package/src/indexer-lookup.mjs.map +1 -0
  85. package/{localnet → src/localnet}/get-kmd-wallet-account.js +3 -3
  86. package/src/localnet/get-kmd-wallet-account.js.map +1 -0
  87. package/{localnet → src/localnet}/get-kmd-wallet-account.mjs +3 -3
  88. package/src/localnet/get-kmd-wallet-account.mjs.map +1 -0
  89. package/{localnet → src/localnet}/get-localnet-dispenser-account.js +3 -3
  90. package/src/localnet/get-localnet-dispenser-account.js.map +1 -0
  91. package/{localnet → src/localnet}/get-localnet-dispenser-account.mjs +3 -3
  92. package/src/localnet/get-localnet-dispenser-account.mjs.map +1 -0
  93. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.js +3 -3
  94. package/src/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
  95. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.mjs +3 -3
  96. package/src/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
  97. package/{localnet → src/localnet}/is-localnet.js +2 -2
  98. package/src/localnet/is-localnet.js.map +1 -0
  99. package/{localnet → src/localnet}/is-localnet.mjs +2 -2
  100. package/src/localnet/is-localnet.mjs.map +1 -0
  101. package/{network-client.js → src/network-client.js} +5 -12
  102. package/src/network-client.js.map +1 -0
  103. package/{network-client.mjs → src/network-client.mjs} +5 -12
  104. package/src/network-client.mjs.map +1 -0
  105. package/{testing → src/testing}/account.js +9 -3
  106. package/src/testing/account.js.map +1 -0
  107. package/{testing → src/testing}/account.mjs +10 -4
  108. package/src/testing/account.mjs.map +1 -0
  109. package/src/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  110. package/src/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
  111. package/{testing → src/testing}/fixtures/algorand-fixture.js +15 -16
  112. package/src/testing/fixtures/algorand-fixture.js.map +1 -0
  113. package/{testing → src/testing}/fixtures/algorand-fixture.mjs +15 -16
  114. package/src/testing/fixtures/algorand-fixture.mjs.map +1 -0
  115. package/src/testing/indexer.js.map +1 -0
  116. package/src/testing/indexer.mjs.map +1 -0
  117. package/{testing → src/testing}/test-logger.js +7 -3
  118. package/src/testing/test-logger.js.map +1 -0
  119. package/{testing → src/testing}/test-logger.mjs +7 -3
  120. package/src/testing/test-logger.mjs.map +1 -0
  121. package/src/testing/transaction-logger.js.map +1 -0
  122. package/src/testing/transaction-logger.mjs.map +1 -0
  123. package/src/transaction/legacy-bridge.js +129 -0
  124. package/src/transaction/legacy-bridge.js.map +1 -0
  125. package/src/transaction/legacy-bridge.mjs +124 -0
  126. package/src/transaction/legacy-bridge.mjs.map +1 -0
  127. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.js +14 -9
  128. package/src/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
  129. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.mjs +15 -10
  130. package/src/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
  131. package/{transaction → src/transaction}/transaction.js +217 -137
  132. package/src/transaction/transaction.js.map +1 -0
  133. package/{transaction → src/transaction}/transaction.mjs +218 -138
  134. package/src/transaction/transaction.mjs.map +1 -0
  135. package/{transfer → src/transfer}/transfer-algos.js +1 -1
  136. package/src/transfer/transfer-algos.js.map +1 -0
  137. package/{transfer → src/transfer}/transfer-algos.mjs +1 -1
  138. package/src/transfer/transfer-algos.mjs.map +1 -0
  139. package/{transfer → src/transfer}/transfer.js +8 -6
  140. package/src/transfer/transfer.js.map +1 -0
  141. package/{transfer → src/transfer}/transfer.mjs +8 -6
  142. package/src/transfer/transfer.mjs.map +1 -0
  143. package/{util.js → src/util.js} +11 -10
  144. package/src/util.js.map +1 -0
  145. package/{util.mjs → src/util.mjs} +11 -10
  146. package/src/util.mjs.map +1 -0
  147. package/testing/_asset.d.ts +2 -2
  148. package/testing/account.d.ts +4 -4
  149. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  150. package/testing/fixtures/algorand-fixture.d.ts +0 -1
  151. package/testing/fixtures/index.d.ts +0 -1
  152. package/testing/index.d.ts +0 -1
  153. package/testing/index.js +6 -6
  154. package/testing/index.mjs +6 -6
  155. package/testing/indexer.d.ts +0 -1
  156. package/testing/test-logger.d.ts +0 -1
  157. package/testing/transaction-logger.d.ts +0 -1
  158. package/transaction/index.d.ts +0 -1
  159. package/transaction/legacy-bridge.d.ts +31 -6
  160. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
  161. package/transaction/transaction.d.ts +38 -19
  162. package/transfer/index.d.ts +0 -1
  163. package/transfer/transfer-algos.d.ts +1 -2
  164. package/transfer/transfer.d.ts +1 -2
  165. package/types/account-manager.d.ts +33 -25
  166. package/types/account-manager.js +56 -33
  167. package/types/account-manager.js.map +1 -1
  168. package/types/account-manager.mjs +58 -35
  169. package/types/account-manager.mjs.map +1 -1
  170. package/types/account.d.ts +17 -9
  171. package/types/account.js +2 -2
  172. package/types/account.js.map +1 -1
  173. package/types/account.mjs +3 -3
  174. package/types/account.mjs.map +1 -1
  175. package/types/algo-http-client-with-retry.d.ts +1 -3
  176. package/types/algo-http-client-with-retry.js +34 -4
  177. package/types/algo-http-client-with-retry.js.map +1 -1
  178. package/types/algo-http-client-with-retry.mjs +33 -3
  179. package/types/algo-http-client-with-retry.mjs.map +1 -1
  180. package/types/algorand-client-interface.d.ts +28 -0
  181. package/types/algorand-client-interface.js +3 -0
  182. package/types/algorand-client-interface.js.map +1 -0
  183. package/types/algorand-client-interface.mjs +2 -0
  184. package/types/algorand-client-interface.mjs.map +1 -0
  185. package/types/algorand-client-transaction-creator.d.ts +452 -23
  186. package/types/algorand-client-transaction-creator.js +407 -23
  187. package/types/algorand-client-transaction-creator.js.map +1 -1
  188. package/types/algorand-client-transaction-creator.mjs +407 -23
  189. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  190. package/types/algorand-client-transaction-sender.d.ts +772 -47
  191. package/types/algorand-client-transaction-sender.js +446 -16
  192. package/types/algorand-client-transaction-sender.js.map +1 -1
  193. package/types/algorand-client-transaction-sender.mjs +446 -16
  194. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  195. package/types/algorand-client.d.ts +24 -17
  196. package/types/algorand-client.js +26 -16
  197. package/types/algorand-client.js.map +1 -1
  198. package/types/algorand-client.mjs +28 -15
  199. package/types/algorand-client.mjs.map +1 -1
  200. package/types/amount.d.ts +10 -11
  201. package/types/amount.js +7 -7
  202. package/types/amount.js.map +1 -1
  203. package/types/amount.mjs +7 -7
  204. package/types/amount.mjs.map +1 -1
  205. package/types/app-arc56.d.ts +359 -0
  206. package/types/app-arc56.js +184 -0
  207. package/types/app-arc56.js.map +1 -0
  208. package/types/app-arc56.mjs +175 -0
  209. package/types/app-arc56.mjs.map +1 -0
  210. package/types/app-client.d.ts +1508 -12
  211. package/types/app-client.js +1023 -34
  212. package/types/app-client.js.map +1 -1
  213. package/types/app-client.mjs +1024 -36
  214. package/types/app-client.mjs.map +1 -1
  215. package/types/app-deployer.d.ts +126 -0
  216. package/types/app-deployer.js +353 -0
  217. package/types/app-deployer.js.map +1 -0
  218. package/types/app-deployer.mjs +351 -0
  219. package/types/app-deployer.mjs.map +1 -0
  220. package/types/app-factory.d.ts +846 -0
  221. package/types/app-factory.js +410 -0
  222. package/types/app-factory.js.map +1 -0
  223. package/types/app-factory.mjs +408 -0
  224. package/types/app-factory.mjs.map +1 -0
  225. package/types/app-manager.d.ts +244 -0
  226. package/types/app-manager.js +423 -0
  227. package/types/app-manager.js.map +1 -0
  228. package/types/app-manager.mjs +421 -0
  229. package/types/app-manager.mjs.map +1 -0
  230. package/types/app-spec.d.ts +2 -1
  231. package/types/app-spec.js +127 -0
  232. package/types/app-spec.js.map +1 -1
  233. package/types/app-spec.mjs +126 -0
  234. package/types/app-spec.mjs.map +1 -1
  235. package/types/app.d.ts +57 -18
  236. package/types/app.js +1 -1
  237. package/types/app.js.map +1 -1
  238. package/types/app.mjs +1 -1
  239. package/types/app.mjs.map +1 -1
  240. package/types/asset-manager.d.ts +10 -10
  241. package/types/asset-manager.js +15 -19
  242. package/types/asset-manager.js.map +1 -1
  243. package/types/asset-manager.mjs +15 -19
  244. package/types/asset-manager.mjs.map +1 -1
  245. package/types/asset.d.ts +0 -1
  246. package/types/async-event-emitter.d.ts +14 -0
  247. package/types/async-event-emitter.js +50 -0
  248. package/types/async-event-emitter.js.map +1 -0
  249. package/types/async-event-emitter.mjs +48 -0
  250. package/types/async-event-emitter.mjs.map +1 -0
  251. package/types/client-manager.d.ts +135 -60
  252. package/types/client-manager.js +158 -44
  253. package/types/client-manager.js.map +1 -1
  254. package/types/client-manager.mjs +159 -45
  255. package/types/client-manager.mjs.map +1 -1
  256. package/types/composer.d.ts +271 -87
  257. package/types/composer.js +406 -126
  258. package/types/composer.js.map +1 -1
  259. package/types/composer.mjs +407 -125
  260. package/types/composer.mjs.map +1 -1
  261. package/types/config.d.ts +3 -6
  262. package/types/config.js +5 -44
  263. package/types/config.js.map +1 -1
  264. package/types/config.mjs +5 -27
  265. package/types/config.mjs.map +1 -1
  266. package/types/debugging.d.ts +29 -101
  267. package/types/debugging.js +16 -109
  268. package/types/debugging.js.map +1 -1
  269. package/types/debugging.mjs +12 -107
  270. package/types/debugging.mjs.map +1 -1
  271. package/types/dispenser-client.d.ts +2 -2
  272. package/types/dispenser-client.js +10 -5
  273. package/types/dispenser-client.js.map +1 -1
  274. package/types/dispenser-client.mjs +10 -5
  275. package/types/dispenser-client.mjs.map +1 -1
  276. package/types/expand.d.ts +7 -0
  277. package/types/expand.js +3 -0
  278. package/types/expand.js.map +1 -0
  279. package/types/expand.mjs +2 -0
  280. package/types/expand.mjs.map +1 -0
  281. package/types/indexer.d.ts +74 -756
  282. package/types/indexer.js.map +1 -1
  283. package/types/indexer.mjs.map +1 -1
  284. package/types/kmd-account-manager.d.ts +2 -3
  285. package/types/kmd-account-manager.js +4 -4
  286. package/types/kmd-account-manager.js.map +1 -1
  287. package/types/kmd-account-manager.mjs +5 -5
  288. package/types/kmd-account-manager.mjs.map +1 -1
  289. package/types/lifecycle-events.d.ts +10 -0
  290. package/types/lifecycle-events.js +8 -0
  291. package/types/lifecycle-events.js.map +1 -0
  292. package/types/lifecycle-events.mjs +8 -0
  293. package/types/lifecycle-events.mjs.map +1 -0
  294. package/types/logging.d.ts +0 -1
  295. package/types/logging.js.map +1 -1
  296. package/types/logging.mjs.map +1 -1
  297. package/types/logic-error.d.ts +2 -4
  298. package/types/logic-error.js +3 -3
  299. package/types/logic-error.js.map +1 -1
  300. package/types/logic-error.mjs +3 -3
  301. package/types/logic-error.mjs.map +1 -1
  302. package/types/network-client.d.ts +14 -2
  303. package/types/network-client.js.map +1 -1
  304. package/types/network-client.mjs.map +1 -1
  305. package/types/testing.d.ts +8 -10
  306. package/types/transaction.d.ts +17 -4
  307. package/types/transfer.d.ts +0 -1
  308. package/util.d.ts +2 -2
  309. package/account/account.d.ts.map +0 -1
  310. package/account/account.js.map +0 -1
  311. package/account/account.mjs.map +0 -1
  312. package/account/get-account-config-from-environment.d.ts.map +0 -1
  313. package/account/get-account-config-from-environment.js.map +0 -1
  314. package/account/get-account-config-from-environment.mjs.map +0 -1
  315. package/account/get-account.d.ts.map +0 -1
  316. package/account/get-account.js.map +0 -1
  317. package/account/get-account.mjs.map +0 -1
  318. package/account/get-dispenser-account.d.ts.map +0 -1
  319. package/account/get-dispenser-account.js.map +0 -1
  320. package/account/get-dispenser-account.mjs.map +0 -1
  321. package/account/index.d.ts.map +0 -1
  322. package/account/mnemonic-account.d.ts.map +0 -1
  323. package/account/mnemonic-account.js.map +0 -1
  324. package/account/mnemonic-account.mjs.map +0 -1
  325. package/amount.d.ts.map +0 -1
  326. package/amount.js.map +0 -1
  327. package/amount.mjs.map +0 -1
  328. package/app-client.d.ts.map +0 -1
  329. package/app-client.js.map +0 -1
  330. package/app-client.mjs.map +0 -1
  331. package/app-deploy.d.ts.map +0 -1
  332. package/app-deploy.js +0 -468
  333. package/app-deploy.js.map +0 -1
  334. package/app-deploy.mjs +0 -459
  335. package/app-deploy.mjs.map +0 -1
  336. package/app.d.ts.map +0 -1
  337. package/app.js +0 -599
  338. package/app.js.map +0 -1
  339. package/app.mjs +0 -579
  340. package/app.mjs.map +0 -1
  341. package/asset.d.ts.map +0 -1
  342. package/asset.js.map +0 -1
  343. package/asset.mjs.map +0 -1
  344. package/config.d.ts.map +0 -1
  345. package/config.js.map +0 -1
  346. package/config.mjs.map +0 -1
  347. package/debugging/debugging.d.ts.map +0 -1
  348. package/debugging/debugging.js +0 -139
  349. package/debugging/debugging.js.map +0 -1
  350. package/debugging/debugging.mjs +0 -118
  351. package/debugging/debugging.mjs.map +0 -1
  352. package/debugging/index.d.ts.map +0 -1
  353. package/debugging/simulate-and-persist-response.d.ts +0 -20
  354. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  355. package/debugging/simulate-and-persist-response.js +0 -108
  356. package/debugging/simulate-and-persist-response.js.map +0 -1
  357. package/debugging/simulate-and-persist-response.mjs +0 -89
  358. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  359. package/dispenser-client.d.ts.map +0 -1
  360. package/dispenser-client.js.map +0 -1
  361. package/dispenser-client.mjs.map +0 -1
  362. package/index.d.ts.map +0 -1
  363. package/indexer-lookup.d.ts.map +0 -1
  364. package/indexer-lookup.js.map +0 -1
  365. package/indexer-lookup.mjs.map +0 -1
  366. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  367. package/localnet/get-kmd-wallet-account.js.map +0 -1
  368. package/localnet/get-kmd-wallet-account.mjs.map +0 -1
  369. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  370. package/localnet/get-localnet-dispenser-account.js.map +0 -1
  371. package/localnet/get-localnet-dispenser-account.mjs.map +0 -1
  372. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  373. package/localnet/get-or-create-kmd-wallet-account.js.map +0 -1
  374. package/localnet/get-or-create-kmd-wallet-account.mjs.map +0 -1
  375. package/localnet/index.d.ts.map +0 -1
  376. package/localnet/is-localnet.d.ts.map +0 -1
  377. package/localnet/is-localnet.js.map +0 -1
  378. package/localnet/is-localnet.mjs.map +0 -1
  379. package/network-client.d.ts.map +0 -1
  380. package/network-client.js.map +0 -1
  381. package/network-client.mjs.map +0 -1
  382. package/testing/_asset.d.ts.map +0 -1
  383. package/testing/account.d.ts.map +0 -1
  384. package/testing/account.js.map +0 -1
  385. package/testing/account.mjs.map +0 -1
  386. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  387. package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  388. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +0 -1
  389. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  390. package/testing/fixtures/algorand-fixture.js.map +0 -1
  391. package/testing/fixtures/algorand-fixture.mjs.map +0 -1
  392. package/testing/fixtures/index.d.ts.map +0 -1
  393. package/testing/index.d.ts.map +0 -1
  394. package/testing/indexer.d.ts.map +0 -1
  395. package/testing/indexer.js.map +0 -1
  396. package/testing/indexer.mjs.map +0 -1
  397. package/testing/test-logger.d.ts.map +0 -1
  398. package/testing/test-logger.js.map +0 -1
  399. package/testing/test-logger.mjs.map +0 -1
  400. package/testing/transaction-logger.d.ts.map +0 -1
  401. package/testing/transaction-logger.js.map +0 -1
  402. package/testing/transaction-logger.mjs.map +0 -1
  403. package/transaction/index.d.ts.map +0 -1
  404. package/transaction/legacy-bridge.d.ts.map +0 -1
  405. package/transaction/legacy-bridge.js +0 -35
  406. package/transaction/legacy-bridge.js.map +0 -1
  407. package/transaction/legacy-bridge.mjs +0 -33
  408. package/transaction/legacy-bridge.mjs.map +0 -1
  409. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  410. package/transaction/perform-atomic-transaction-composer-simulate.js.map +0 -1
  411. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +0 -1
  412. package/transaction/transaction.d.ts.map +0 -1
  413. package/transaction/transaction.js.map +0 -1
  414. package/transaction/transaction.mjs.map +0 -1
  415. package/transfer/index.d.ts.map +0 -1
  416. package/transfer/transfer-algos.d.ts.map +0 -1
  417. package/transfer/transfer-algos.js.map +0 -1
  418. package/transfer/transfer-algos.mjs.map +0 -1
  419. package/transfer/transfer.d.ts.map +0 -1
  420. package/transfer/transfer.js.map +0 -1
  421. package/transfer/transfer.mjs.map +0 -1
  422. package/types/account-manager.d.ts.map +0 -1
  423. package/types/account.d.ts.map +0 -1
  424. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  425. package/types/algorand-client-transaction-creator.d.ts.map +0 -1
  426. package/types/algorand-client-transaction-sender.d.ts.map +0 -1
  427. package/types/algorand-client.d.ts.map +0 -1
  428. package/types/amount.d.ts.map +0 -1
  429. package/types/app-client.d.ts.map +0 -1
  430. package/types/app-spec.d.ts.map +0 -1
  431. package/types/app.d.ts.map +0 -1
  432. package/types/asset-manager.d.ts.map +0 -1
  433. package/types/asset.d.ts.map +0 -1
  434. package/types/client-manager.d.ts.map +0 -1
  435. package/types/composer.d.ts.map +0 -1
  436. package/types/config.d.ts.map +0 -1
  437. package/types/debugging.d.ts.map +0 -1
  438. package/types/dispenser-client.d.ts.map +0 -1
  439. package/types/indexer.d.ts.map +0 -1
  440. package/types/kmd-account-manager.d.ts.map +0 -1
  441. package/types/logging.d.ts.map +0 -1
  442. package/types/logic-error.d.ts.map +0 -1
  443. package/types/network-client.d.ts.map +0 -1
  444. package/types/testing.d.ts.map +0 -1
  445. package/types/transaction.d.ts.map +0 -1
  446. package/types/transfer.d.ts.map +0 -1
  447. package/types/urlTokenBaseHTTPClient.d.ts +0 -41
  448. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  449. package/types/urlTokenBaseHTTPClient.js +0 -153
  450. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  451. package/types/urlTokenBaseHTTPClient.mjs +0 -151
  452. package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
  453. package/util.d.ts.map +0 -1
  454. package/util.js.map +0 -1
  455. package/util.mjs.map +0 -1
  456. /package/{account → src/account}/get-account-config-from-environment.js +0 -0
  457. /package/{account → src/account}/get-account-config-from-environment.mjs +0 -0
  458. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
  459. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.mjs +0 -0
  460. /package/{testing → src/testing}/indexer.js +0 -0
  461. /package/{testing → src/testing}/indexer.mjs +0 -0
  462. /package/{testing → src/testing}/transaction-logger.js +0 -0
  463. /package/{testing → src/testing}/transaction-logger.mjs +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Algorand Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # AlgoKit TypeScript Utilities
1
+ # AlgoKit TypeScript Utilities
2
2
 
3
3
  A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand. This project is part of [AlgoKit](https://github.com/algorandfoundation/algokit-cli).
4
4
 
@@ -10,45 +10,41 @@ Note: If you prefer Python there's an equivalent [Python utility library](https:
10
10
 
11
11
  ## Install
12
12
 
13
- This library can be installed from NPM using your favourite npm client, e.g.:
13
+ Before installing, you'll need to decide on the version you want to target. Version 7 and 8 have the same feature set, however v7 leverages algosdk@>=2.9.0<3.0, whereas v8 leverages algosdk@>=3.0.0. Your project and it's dependencies will help you decide which version to target.
14
+
15
+ Once you've decided on the target version, this library can be installed from NPM using your favourite npm client, e.g.:
16
+
17
+ To target algosdk@2 and use version 7 of AlgoKit Utils, run the below:
14
18
 
15
19
  ```
16
- npm install @algorandfoundation/algokit-utils
20
+ npm install algosdk@^2.9.0 @algorandfoundation/algokit-utils@^7.0.0
17
21
  ```
18
22
 
19
- Then to import it:
23
+ To target algosdk@3 and use the latest version of AlgoKit Utils, run the below:
20
24
 
21
- ```typescript
22
- import { AlgorandClient, Config } from '@algorandfoundation/algokit-utils'
25
+ ```
26
+ npm install algosdk@^3.0.0 @algorandfoundation/algokit-utils
23
27
  ```
24
28
 
25
- See [usage](./docs/README.md#usage) for more.
26
-
27
- ## Guiding principles
29
+ Now you can import the library:
28
30
 
29
- This library follows the [Guiding Principles of AlgoKit](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md#guiding-principles).
31
+ ```typescript
32
+ import { AlgorandClient, Config } from '@algorandfoundation/algokit-utils'
33
+ ```
30
34
 
31
- ## NextJS compatibility
35
+ See [usage](./docs/README.md#usage) for more details.
32
36
 
33
- `algokit-utils-ts` has a set of `node` specific utilities used for simplifying aggregation of artifacts for [AlgoKit VSCode Debugger Extension](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). Which causes Next.js based projects to fail on `fs` module not found. To fix this issue, you can add the following to your `next.config.js` file:
37
+ ## Migration
34
38
 
35
- ```js
36
- webpack: (config, { isServer }) => {
37
- // Fix for Module not found: Can't resolve 'fs'
38
- if (!isServer) {
39
- config.resolve.fallback.fs = false;
40
- }
41
- return config;
42
- },
43
- ```
39
+ Whilst we aim to minimise breaking changes, there are situations where they are required.
40
+ JSDoc deprecations should guide you through most migration paths inside your IDE, however the migration guides will provide more detailed information should you need it.
44
41
 
45
- The root cause is due to the fact that, unlike many frameworks, Next.js allows you to import server-only (Node.js APIs that don't work in a browser) code into your page files. When Next.js builds your project, it removes server only code from your client-side bundle by checking which code exists inside one any of the following built-in methods (code splitting):
42
+ If you're targetting v7, please refer to the [v7 migration guide](./docs/v7-migration.md).
43
+ If you're targetting v8, please refer to the [v8 migration guide](./docs/v8-migration.md).
46
44
 
47
- - getServerSideProps
48
- - getStaticProps
49
- - getStaticPaths
45
+ ## Guiding principles
50
46
 
51
- The Module not found: can't resolve 'xyz' error happens when you try to use server only code outside of these methods. Despite `algokit-utils` lazy loading the node specific code dynamically, Next.js does not seem to correctly identify whether a dynamic import is specific to server or client side. Hence the above fix disables the fallback for `fs` module so it ignores polyfilling it on client side.
47
+ This library follows the [Guiding Principles of AlgoKit](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md#guiding-principles).
52
48
 
53
49
  ## Contributing
54
50
 
@@ -9,7 +9,7 @@ import MultisigMetadata = algosdk.MultisigMetadata;
9
9
  import TransactionSigner = algosdk.TransactionSigner;
10
10
  import AccountInformationModel = algosdk.modelsv2.Account;
11
11
  /**
12
- * @deprecated Use `algorandClient.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
12
+ * @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
13
13
  *
14
14
  * Returns an account wrapper that supports partial or full multisig signing.
15
15
  * @param multisigParams The parameters that define the multisig account
@@ -18,7 +18,7 @@ import AccountInformationModel = algosdk.modelsv2.Account;
18
18
  */
19
19
  export declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
20
20
  /**
21
- * @deprecated Use `algorandClient.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
21
+ * @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
22
22
  *
23
23
  * Returns an account wrapper that supports a rekeyed account.
24
24
  * @param signer The account, with private key loaded, that is signing
@@ -27,7 +27,7 @@ export declare function multisigAccount(multisigParams: MultisigMetadata, signin
27
27
  */
28
28
  export declare function rekeyedAccount(signer: Account, sender: string): SigningAccount;
29
29
  /**
30
- * @deprecated Use `algorandClient.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.
30
+ * @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.
31
31
  *
32
32
  * Returns an account wrapper that supports a transaction signer with associated sender address.
33
33
  * @param signer The transaction signer
@@ -36,7 +36,7 @@ export declare function rekeyedAccount(signer: Account, sender: string): Signing
36
36
  */
37
37
  export declare function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount;
38
38
  /**
39
- * @deprecated Use `algorandClient.account.random()` or `algosdk.generateAccount()` instead.
39
+ * @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.
40
40
  *
41
41
  * Returns a new, random Algorand account with secret key loaded.
42
42
  *
@@ -45,7 +45,7 @@ export declare function transactionSignerAccount(signer: TransactionSigner, send
45
45
  */
46
46
  export declare function randomAccount(): Account;
47
47
  /**
48
- * @deprecated Use `algorandClient.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.
48
+ * @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.
49
49
  *
50
50
  * Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.
51
51
  *
@@ -96,14 +96,17 @@ export declare function getAccountAddressAsUint8Array(account: SendTransactionFr
96
96
  * @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
97
97
  */
98
98
  export declare function getAccountAddressAsString(addressEncodedInB64: string): string;
99
- type NumberConverter<T extends AccountInformationModel> = {
99
+ export type NumberConverter<T extends AccountInformationModel> = {
100
100
  [key in keyof T]: ToNumberIfExtends<T[key], number | bigint>;
101
101
  };
102
102
  type ToNumberIfExtends<K, E> = K extends E ? number : K;
103
103
  /** @deprecated Account information at a given round. */
104
- export type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'get_obj_for_encoding'>;
104
+ export type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'getEncodingSchema' | 'toEncodingData' | 'authAddr'> & {
105
+ /** (spend) the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. */
106
+ authAddr?: string;
107
+ };
105
108
  /**
106
- * @deprecated Use `algorandClient.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
109
+ * @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
107
110
  *
108
111
  * Returns the given sender account's current status, balance and spendable amounts.
109
112
  *
@@ -120,7 +123,7 @@ export type AccountInformation = Omit<NumberConverter<AccountInformationModel>,
120
123
  */
121
124
  export declare function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation>;
122
125
  /**
123
- * @deprecated Use `algorandClient.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
126
+ * @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
124
127
  *
125
128
  * Returns the given sender account's asset holding for a given asset.
126
129
  *
@@ -139,4 +142,3 @@ export declare function getAccountInformation(sender: string | SendTransactionFr
139
142
  */
140
143
  export declare function getAccountAssetInformation(sender: string | SendTransactionFrom, assetId: number | bigint, algod: Algodv2): Promise<AccountAssetInformation>;
141
144
  export {};
142
- //# sourceMappingURL=account.d.ts.map
@@ -10,4 +10,3 @@ import { AccountConfig } from '../types/account';
10
10
  *
11
11
  */
12
12
  export declare function getAccountConfigFromEnvironment(accountName: string): AccountConfig;
13
- //# sourceMappingURL=get-account-config-from-environment.d.ts.map
@@ -4,7 +4,7 @@ import { AlgoAmount } from '../types/amount';
4
4
  import Account = algosdk.Account;
5
5
  import Algodv2 = algosdk.Algodv2;
6
6
  import Kmd = algosdk.Kmd;
7
- /** @deprecated use `algorandClient.account.fromEnvironment()` instead
7
+ /** @deprecated use `algorand.account.fromEnvironment()` instead
8
8
  *
9
9
  * Returns an Algorand account with private key loaded by convention based on the given name identifier.
10
10
  *
@@ -38,7 +38,7 @@ export declare function getAccount(account: {
38
38
  name: string;
39
39
  fundWith?: AlgoAmount;
40
40
  } | string, algod: Algodv2, kmdClient?: Kmd): Promise<Account | SigningAccount>;
41
- /** @deprecated use `algorandClient.account.fromEnvironment()` instead
41
+ /** @deprecated use `algorand.account.fromEnvironment()` instead
42
42
  * Returns an Algorand account with private key loaded by convention based on the given name identifier.
43
43
  *
44
44
  * Note: This function expects to run in a Node.js environment.
@@ -63,4 +63,3 @@ export declare function getAccount(account: {
63
63
  config: AccountConfig;
64
64
  fundWith?: AlgoAmount;
65
65
  }, algod: Algodv2, kmdClient?: Kmd): Promise<Account | SigningAccount>;
66
- //# sourceMappingURL=get-account.d.ts.map
@@ -2,7 +2,7 @@ import algosdk from 'algosdk';
2
2
  import Algodv2 = algosdk.Algodv2;
3
3
  import Kmd = algosdk.Kmd;
4
4
  /**
5
- * @deprecated Use `algorandClient.account.dispenserFromEnvironment()` or `new AccountManager(clientManager).dispenserFromEnvironment()` instead
5
+ * @deprecated Use `algorand.account.dispenserFromEnvironment()` or `new AccountManager(clientManager).dispenserFromEnvironment()` instead
6
6
  *
7
7
  * Returns an account (with private key loaded) that can act as a dispenser
8
8
  *
@@ -12,7 +12,6 @@ import Kmd = algosdk.Kmd;
12
12
  * @param algod An algod client
13
13
  * @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
14
14
  */
15
- export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<import("../types/account").TransactionSignerAccount & {
15
+ export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<algosdk.Address & import("../types/account").TransactionSignerAccount & {
16
16
  account: import("../types/account").SigningAccount;
17
17
  }>;
18
- //# sourceMappingURL=get-dispenser-account.d.ts.map
@@ -3,4 +3,3 @@ export * from './get-account';
3
3
  export * from './get-account-config-from-environment';
4
4
  export * from './get-dispenser-account';
5
5
  export * from './mnemonic-account';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import algosdk from 'algosdk';
2
2
  import Account = algosdk.Account;
3
3
  /**
4
- * @deprecated Use `algorandClient.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.
4
+ * @deprecated Use `algorand.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.
5
5
  *
6
6
  * Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
7
7
  *
@@ -11,4 +11,3 @@ import Account = algosdk.Account;
11
11
  * never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.
12
12
  */
13
13
  export declare function mnemonicAccount(mnemonicSecret: string): Account;
14
- //# sourceMappingURL=mnemonic-account.d.ts.map
package/amount.d.ts CHANGED
@@ -18,25 +18,35 @@ declare global {
18
18
  */
19
19
  algo(this: number): AlgoAmount;
20
20
  }
21
+ interface BigInt {
22
+ /**
23
+ * Returns an `AlgoAmount` using this number of microAlgo.
24
+ */
25
+ microAlgo(this: bigint): AlgoAmount;
26
+ /**
27
+ * Returns an `AlgoAmount` using this number of Algo.
28
+ */
29
+ algo(this: bigint): AlgoAmount;
30
+ }
21
31
  }
22
32
  /** Returns an amount of Algo using AlgoAmount
23
33
  * @param algos The amount of Algo
24
34
  */
25
- export declare const algos: (algos: number) => AlgoAmount;
35
+ export declare const algos: (algos: number | bigint) => AlgoAmount;
26
36
  /** Returns an amount of Algo using AlgoAmount
27
37
  * @param algos The amount of Algo
28
38
  */
29
- export declare const algo: (algos: number) => AlgoAmount;
39
+ export declare const algo: (algos: number | bigint) => AlgoAmount;
30
40
  /** Returns an amount of µAlgo using AlgoAmount
31
41
  * @param microAlgos The amount of µAlgo
32
42
  */
33
- export declare const microAlgos: (microAlgos: number) => AlgoAmount;
43
+ export declare const microAlgos: (microAlgos: number | bigint) => AlgoAmount;
34
44
  /** Returns an amount of µAlgo using AlgoAmount
35
45
  * @param microAlgos The amount of µAlgo
36
46
  */
37
- export declare const microAlgo: (microAlgos: number) => AlgoAmount;
47
+ export declare const microAlgo: (microAlgos: number | bigint) => AlgoAmount;
38
48
  /** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
39
49
  * @param numberOfTransactions The of standard transaction fees to return the amount of Algo
40
50
  */
41
51
  export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
42
- //# sourceMappingURL=amount.d.ts.map
52
+ export declare const ALGORAND_MIN_TX_FEE: AlgoAmount;
package/app-client.d.ts CHANGED
@@ -2,6 +2,11 @@ import algosdk from 'algosdk';
2
2
  import { AppSpecAppDetails, AppSpecAppDetailsByCreatorAndName, AppSpecAppDetailsById, ApplicationClient } from './types/app-client';
3
3
  import Algodv2 = algosdk.Algodv2;
4
4
  /**
5
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
6
+ * `algorand.client.getAppClientByCreatorAndName`.
7
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
8
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
9
+ *
5
10
  * Create a new ApplicationClient instance
6
11
  * @param appDetails The details of the app
7
12
  * @param algod An algod instance
@@ -33,6 +38,11 @@ import Algodv2 = algosdk.Algodv2;
33
38
  */
34
39
  export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2): ApplicationClient;
35
40
  /**
41
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.
42
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
43
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
44
+ *
45
+ *
36
46
  * Create a new ApplicationClient instance by id
37
47
  * @param appDetails The details of the app
38
48
  * @param algod An algod instance
@@ -51,6 +61,11 @@ export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algod
51
61
  */
52
62
  export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algod: Algodv2): ApplicationClient;
53
63
  /**
64
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
65
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
66
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
67
+ *
68
+ *
54
69
  * Create a new ApplicationClient instance by creator and name
55
70
  * @param appDetails The details of the app by creator and name
56
71
  * @param algod An algod instance
@@ -58,10 +73,10 @@ export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algo
58
73
  * @example
59
74
  * const client = algokit.getAppClientByCreatorAndName(
60
75
  * {
61
- * app: {appSpec},
62
- * sender: {account},
63
- * creatorAddress: {account.addr},
64
- * findExistingUsing: {indexerClient},
76
+ * app: appSpec,
77
+ * sender: account,
78
+ * creatorAddress: account,
79
+ * findExistingUsing: indexerClient,
65
80
  * },
66
81
  * algodClient,
67
82
  * )
@@ -69,4 +84,3 @@ export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algo
69
84
  * @returns The application client
70
85
  */
71
86
  export declare function getAppClientByCreatorAndName(appDetails: AppSpecAppDetailsByCreatorAndName, algod: Algodv2): ApplicationClient;
72
- //# sourceMappingURL=app-client.d.ts.map
package/app-deploy.d.ts CHANGED
@@ -5,6 +5,8 @@ import Algodv2 = algosdk.Algodv2;
5
5
  import Indexer = algosdk.Indexer;
6
6
  import modelsv2 = algosdk.modelsv2;
7
7
  /**
8
+ * @deprecated Use `algorand.appDeployer.deploy` instead.
9
+ *
8
10
  * Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
9
11
  *
10
12
  * To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
@@ -30,7 +32,10 @@ export declare function deployApp(deployment: AppDeploymentParams, algod: Algodv
30
32
  }) | (AppMetadata & {
31
33
  operationPerformed: 'nothing';
32
34
  }))>;
33
- /** Returns true is there is a breaking change in the application state schema from before to after.
35
+ /**
36
+ * @deprecated Use `before.numByteSlice < after.numByteSlice || before.numUint < after.numUint` instead.
37
+ *
38
+ * Returns true is there is a breaking change in the application state schema from before to after.
34
39
  * i.e. if the schema becomes larger, since applications can't ask for more schema after creation.
35
40
  * Otherwise, there is no error, the app just doesn't store data in the extra schema :(
36
41
  *
@@ -40,6 +45,8 @@ export declare function deployApp(deployment: AppDeploymentParams, algod: Algodv
40
45
  */
41
46
  export declare function isSchemaIsBroken(before: modelsv2.ApplicationStateSchema, after: modelsv2.ApplicationStateSchema): boolean;
42
47
  /**
48
+ * @deprecated Use `algorand.appDeployer.getCreatorAppsByName` instead.
49
+ *
43
50
  * Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an `AppDeployNote` in the transaction note of the creation transaction.
44
51
  *
45
52
  * **Note:** It's recommended this is only called once and then stored since it's a somewhat expensive operation (multiple indexer calls).
@@ -50,12 +57,16 @@ export declare function isSchemaIsBroken(before: modelsv2.ApplicationStateSchema
50
57
  */
51
58
  export declare function getCreatorAppsByName(creatorAccount: SendTransactionFrom | string, indexer: Indexer): Promise<AppLookup>;
52
59
  /**
60
+ * @deprecated Use `{ dAppName: APP_DEPLOY_NOTE_DAPP, data: metadata, format: 'j' }` instead.
61
+ *
53
62
  * Return the transaction note for an app deployment.
54
63
  * @param metadata The metadata of the deployment
55
64
  * @returns The transaction note as a utf-8 string
56
65
  */
57
66
  export declare function getAppDeploymentTransactionNote(metadata: AppDeployMetadata): Arc2TransactionNote;
58
67
  /**
68
+ * @deprecated Use `AppManager.replaceTealTemplateDeployTimeControlParams` instead
69
+ *
59
70
  * Replaces deploy-time deployment control parameters within the given teal code.
60
71
  *
61
72
  * * `TMPL_UPDATABLE` for updatability / immutability control
@@ -73,6 +84,8 @@ export declare function replaceDeployTimeControlParams(tealCode: string, params:
73
84
  deletable?: boolean;
74
85
  }): string;
75
86
  /**
87
+ * @deprecated Use `AppManager.replaceTealTemplateParams` instead
88
+ *
76
89
  * Performs template substitution of a teal file.
77
90
  *
78
91
  * Looks for `TMPL_{parameter}` for template replacements.
@@ -83,6 +96,8 @@ export declare function replaceDeployTimeControlParams(tealCode: string, params:
83
96
  */
84
97
  export declare function performTemplateSubstitution(tealCode: string, templateParams?: TealTemplateParams): string;
85
98
  /**
99
+ * @deprecated Use `algorand.appManager.compileTealTemplate` instead.
100
+ *
86
101
  * Performs template substitution of a teal file and compiles it, returning the compiled result.
87
102
  *
88
103
  * Looks for `TMPL_{parameter}` for template replacements.
@@ -95,10 +110,11 @@ export declare function performTemplateSubstitution(tealCode: string, templatePa
95
110
  */
96
111
  export declare function performTemplateSubstitutionAndCompile(tealCode: string, algod: Algodv2, templateParams?: TealTemplateParams, deploymentMetadata?: AppDeployMetadata): Promise<CompiledTeal>;
97
112
  /**
113
+ * @deprecated Use `AppManager.stripTealComments` instead.
114
+ *
98
115
  * Remove comments from TEAL Code
99
116
  *
100
117
  * @param tealCode The TEAL logic to compile
101
118
  * @returns The TEAL without comments
102
119
  */
103
120
  export declare function stripTealComments(tealCode: string): string;
104
- //# sourceMappingURL=app-deploy.d.ts.map
package/app.d.ts CHANGED
@@ -8,6 +8,9 @@ import Algodv2 = algosdk.Algodv2;
8
8
  import modelsv2 = algosdk.modelsv2;
9
9
  import OnApplicationComplete = algosdk.OnApplicationComplete;
10
10
  /**
11
+ * @deprecated Use `algorand.send.appCreate()` / `algorand.createTransaction.appCreate()` / `algorand.send.appCreateMethodCall()`
12
+ * / `algorand.createTransaction.appCreateMethodCall()` instead
13
+ *
11
14
  * Creates a smart contract app, returns the details of the created app.
12
15
  * @param create The parameters to create the app with
13
16
  * @param algod An algod client
@@ -15,13 +18,19 @@ import OnApplicationComplete = algosdk.OnApplicationComplete;
15
18
  */
16
19
  export declare function createApp(create: CreateAppParams, algod: Algodv2): Promise<Partial<AppCompilationResult> & AppCallTransactionResult & AppReference>;
17
20
  /**
21
+ * @deprecated Use `algorand.send.appUpdate()` / `algorand.createTransaction.appUpdate()` / `algorand.send.appUpdateMethodCall()`
22
+ * / `algorand.createTransaction.appUpdateMethodCall()` instead
23
+ *
18
24
  * Updates a smart contract app.
19
25
  * @param update The parameters to update the app with
20
26
  * @param algod An algod client
21
27
  * @returns The transaction send result and the compilation result
22
28
  */
23
29
  export declare function updateApp(update: UpdateAppParams, algod: Algodv2): Promise<Partial<AppCompilationResult> & AppCallTransactionResult>;
24
- /** Returns an `algosdk.OnApplicationComplete` for the given onCompleteAction.
30
+ /**
31
+ * @deprecated Use `algosdk.OnApplicationComplete` directly instead.
32
+ *
33
+ * Returns a `algosdk.OnApplicationComplete` for the given onCompleteAction.
25
34
  *
26
35
  * If given `undefined` will return `OnApplicationComplete.NoOpOC`.
27
36
  *
@@ -32,6 +41,9 @@ export declare function updateApp(update: UpdateAppParams, algod: Algodv2): Prom
32
41
  */
33
42
  export declare function getAppOnCompleteAction(onCompletionAction?: AppCallType | OnApplicationComplete): algosdk.OnApplicationComplete;
34
43
  /**
44
+ * @deprecated Use `algorand.send.appUpdate()` / `algorand.createTransaction.appUpdate()` / `algorand.send.appUpdateMethodCall()`
45
+ * / `algorand.createTransaction.appUpdateMethodCall()` instead
46
+ *
35
47
  * Issues a call to a given app.
36
48
  * @param call The call details.
37
49
  * @param algod An algod client
@@ -39,6 +51,8 @@ export declare function getAppOnCompleteAction(onCompletionAction?: AppCallType
39
51
  */
40
52
  export declare function callApp(call: AppCallParams, algod: Algodv2): Promise<AppCallTransactionResult>;
41
53
  /**
54
+ * @deprecated Use `AppManager.getABIReturn` instead.
55
+ *
42
56
  * Returns any ABI return values for the given app call arguments and transaction confirmation.
43
57
  * @param args The arguments that were used for the call
44
58
  * @param confirmation The transaction confirmation from algod
@@ -46,6 +60,8 @@ export declare function callApp(call: AppCallParams, algod: Algodv2): Promise<Ap
46
60
  */
47
61
  export declare function getABIReturn(args?: AppCallArgs, confirmation?: modelsv2.PendingTransactionResponse): ABIReturn | undefined;
48
62
  /**
63
+ * @deprecated Use `algorand.app.getGlobalState` instead.
64
+ *
49
65
  * Returns the current global state values for the given app ID
50
66
  * @param appId The ID of the app return global state for
51
67
  * @param algod An algod client instance
@@ -53,6 +69,8 @@ export declare function getABIReturn(args?: AppCallArgs, confirmation?: modelsv2
53
69
  */
54
70
  export declare function getAppGlobalState(appId: number | bigint, algod: Algodv2): Promise<AppState>;
55
71
  /**
72
+ * @deprecated Use `algorand.app.getLocalState` instead.
73
+ *
56
74
  * Returns the current global state values for the given app ID and account
57
75
  * @param appId The ID of the app return global state for
58
76
  * @param account Either the string address of an account or an account object for the account to get local state for the given app
@@ -61,6 +79,7 @@ export declare function getAppGlobalState(appId: number | bigint, algod: Algodv2
61
79
  */
62
80
  export declare function getAppLocalState(appId: number | bigint, account: string | SendTransactionFrom, algod: Algodv2): Promise<AppState>;
63
81
  /**
82
+ * @deprecated Use `algorand.app.getBoxNames` instead.
64
83
  * Returns the names of the boxes for the given app.
65
84
  * @param appId The ID of the app return box names for
66
85
  * @param algod An algod client instance
@@ -68,6 +87,7 @@ export declare function getAppLocalState(appId: number | bigint, account: string
68
87
  */
69
88
  export declare function getAppBoxNames(appId: number | bigint, algod: Algodv2): Promise<BoxName[]>;
70
89
  /**
90
+ * @deprecated Use `algorand.app.getBoxValue` instead.
71
91
  * Returns the value of the given box name for the given app.
72
92
  * @param appId The ID of the app return box names for
73
93
  * @param boxName The name of the box to return either as a string, binary array or `BoxName`
@@ -76,6 +96,7 @@ export declare function getAppBoxNames(appId: number | bigint, algod: Algodv2):
76
96
  */
77
97
  export declare function getAppBoxValue(appId: number | bigint, boxName: string | Uint8Array | BoxName, algod: Algodv2): Promise<Uint8Array>;
78
98
  /**
99
+ * @deprecated Use `algorand.app.getBoxValues` instead.
79
100
  * Returns the value of the given box names for the given app.
80
101
  * @param appId The ID of the app return box names for
81
102
  * @param boxNames The names of the boxes to return either as a string, binary array or `BoxName`
@@ -84,6 +105,7 @@ export declare function getAppBoxValue(appId: number | bigint, boxName: string |
84
105
  */
85
106
  export declare function getAppBoxValues(appId: number, boxNames: (string | Uint8Array | BoxName)[], algod: Algodv2): Promise<Uint8Array[]>;
86
107
  /**
108
+ * @deprecated Use `algorand.app.getBoxValueFromABIType` instead.
87
109
  * Returns the value of the given box name for the given app decoded based on the given ABI type.
88
110
  * @param request The parameters for the box value request
89
111
  * @param algod An algod client instance
@@ -91,6 +113,7 @@ export declare function getAppBoxValues(appId: number, boxNames: (string | Uint8
91
113
  */
92
114
  export declare function getAppBoxValueFromABIType(request: BoxValueRequestParams, algod: Algodv2): Promise<ABIValue>;
93
115
  /**
116
+ * @deprecated Use `algorand.app.getBoxValuesFromABIType` instead.
94
117
  * Returns the value of the given box names for the given app decoded based on the given ABI type.
95
118
  * @param request The parameters for the box value request
96
119
  * @param algod An algod client instance
@@ -98,6 +121,8 @@ export declare function getAppBoxValueFromABIType(request: BoxValueRequestParams
98
121
  */
99
122
  export declare function getAppBoxValuesFromABIType(request: BoxValuesRequestParams, algod: Algodv2): Promise<ABIValue[]>;
100
123
  /**
124
+ * @deprecated Use `AppManager.decodeAppState` instead.
125
+ *
101
126
  * Converts an array of global/local state values from the algod api to a more friendly
102
127
  * generic object keyed by the UTF-8 value of the key.
103
128
  * @param state A `global-state`, `local-state`, `global-state-deltas` or `local-state-deltas`
@@ -108,6 +133,8 @@ export declare function decodeAppState(state: {
108
133
  value: modelsv2.TealValue | modelsv2.EvalDelta;
109
134
  }[]): AppState;
110
135
  /**
136
+ * @deprecated Use `TransactionComposer` methods to construct transactions instead.
137
+ *
111
138
  * Returns the app args ready to load onto an app `Transaction` object
112
139
  * @param args The app call args
113
140
  * @returns The args ready to load into a `Transaction`
@@ -121,6 +148,8 @@ export declare function getAppArgsForTransaction(args?: RawAppCallArgs): {
121
148
  lease: Uint8Array | undefined;
122
149
  } | undefined;
123
150
  /**
151
+ * @deprecated Use `TransactionComposer` methods to construct transactions instead.
152
+ *
124
153
  * Returns the app args ready to load onto an ABI method call in `AtomicTransactionComposer`
125
154
  * @param args The ABI app call args
126
155
  * @param from The transaction signer
@@ -135,16 +164,20 @@ export declare function getAppArgsForABICall(args: ABIAppCallArgs, from: SendTra
135
164
  appForeignApps: number[] | undefined;
136
165
  appForeignAssets: number[] | undefined;
137
166
  appAccounts: string[] | undefined;
138
- methodArgs: (string | number | bigint | boolean | algosdk.TransactionWithSigner | Uint8Array | algosdk.ABIValue[])[];
167
+ methodArgs: (string | number | bigint | boolean | Uint8Array | algosdk.ABIValue[] | algosdk.TransactionWithSigner)[];
139
168
  rekeyTo: string | undefined;
140
169
  }>;
141
170
  /**
171
+ * @deprecated Use `AppManager.getBoxReference()` instead.
172
+ *
142
173
  * Returns a `algosdk.BoxReference` given a `BoxIdentifier` or `BoxReference`.
143
174
  * @param box The box to return a reference for
144
175
  * @returns The box reference ready to pass into a `Transaction`
145
176
  */
146
177
  export declare function getBoxReference(box: BoxIdentifier | BoxReference | algosdk.BoxReference): algosdk.BoxReference;
147
178
  /**
179
+ * @deprecated Use `algorand.app.getById` instead.
180
+ *
148
181
  * Gets the current data for the given app from algod.
149
182
  *
150
183
  * @param appId The id of the app
@@ -153,6 +186,8 @@ export declare function getBoxReference(box: BoxIdentifier | BoxReference | algo
153
186
  */
154
187
  export declare function getAppById(appId: number | bigint, algod: Algodv2): Promise<algosdk.modelsv2.Application>;
155
188
  /**
189
+ * @deprecated Use `algorand.app.compileTeal` instead.
190
+ *
156
191
  * Compiles the given TEAL using algod and returns the result, including source map.
157
192
  *
158
193
  * @param algod An algod client
@@ -161,9 +196,10 @@ export declare function getAppById(appId: number | bigint, algod: Algodv2): Prom
161
196
  */
162
197
  export declare function compileTeal(tealCode: string, algod: Algodv2): Promise<CompiledTeal>;
163
198
  /**
199
+ * @deprecated Use `abiMethod.getSignature()` or `new ABIMethod(abiMethodParams).getSignature()` instead.
200
+ *
164
201
  * Returns the encoded ABI spec for a given ABI Method
165
202
  * @param method The method to return a signature for
166
203
  * @returns The encoded ABI method spec e.g. `method_name(uint64,string)string`
167
204
  */
168
205
  export declare const getABIMethodSignature: (method: ABIMethodParams | ABIMethod) => string;
169
- //# sourceMappingURL=app.d.ts.map
package/asset.d.ts CHANGED
@@ -3,7 +3,7 @@ import { AssetBulkOptInOutParams, AssetOptInParams, AssetOptOutParams, CreateAss
3
3
  import { SendTransactionResult } from './types/transaction';
4
4
  import Algodv2 = algosdk.Algodv2;
5
5
  /**
6
- * @deprecated use `algorandClient.send.assetCreate()` / `algorandClient.transaction.assetCreate()` instead
6
+ * @deprecated use `algorand.send.assetCreate()` / `algorand.createTransaction.assetCreate()` instead
7
7
  *
8
8
  * Create an Algorand Standard Asset (ASA).
9
9
  * @param create The asset creation definition
@@ -21,7 +21,7 @@ export declare function createAsset(create: CreateAssetParams, algod: Algodv2):
21
21
  };
22
22
  }>;
23
23
  /**
24
- * @deprecated use `algorandClient.send.assetOptIn()` / `algorandClient.transaction.assetOptIn()` instead
24
+ * @deprecated use `algorand.send.assetOptIn()` / `algorand.createTransaction.assetOptIn()` instead
25
25
  *
26
26
  * Opt-in an account to an asset.
27
27
  * @param optIn The opt-in definition
@@ -35,7 +35,7 @@ export declare function createAsset(create: CreateAssetParams, algod: Algodv2):
35
35
  */
36
36
  export declare function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Promise<SendTransactionResult>;
37
37
  /**
38
- * @deprecated use `algorandClient.send.assetOptOut()` / `algorandClient.transaction.assetOptOut()` instead
38
+ * @deprecated use `algorand.send.assetOptOut()` / `algorand.createTransaction.assetOptOut()` instead
39
39
  *
40
40
  * Opt-out an account from an asset.
41
41
  * @param optOut The opt-in definition
@@ -49,7 +49,7 @@ export declare function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Pro
49
49
  */
50
50
  export declare function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2): Promise<SendTransactionResult>;
51
51
  /**
52
- * @deprecated use `algorandClient.asset.bulkOptIn()` instead
52
+ * @deprecated use `algorand.asset.bulkOptIn()` instead
53
53
  *
54
54
  * Opt in to a list of assets on the Algorand blockchain.
55
55
  *
@@ -61,7 +61,7 @@ export declare function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2):
61
61
  */
62
62
  export declare function assetBulkOptIn(optIn: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>>;
63
63
  /**
64
- * @deprecated use `algorandClient.asset.bulkOptOut()` instead
64
+ * @deprecated use `algorand.asset.bulkOptOut()` instead
65
65
  *
66
66
  * Opt out of multiple assets in Algorand blockchain.
67
67
  *
@@ -72,4 +72,3 @@ export declare function assetBulkOptIn(optIn: AssetBulkOptInOutParams, algod: Al
72
72
  * @example algokit.bulkOptOut({ account: account, assetIds: [12345, 67890] }, algod)
73
73
  */
74
74
  export declare function assetBulkOptOut(optOut: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>>;
75
- //# sourceMappingURL=asset.d.ts.map
package/config.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { UpdatableConfig } from './types/config';
2
2
  /** The AlgoKit config. To update it use the configure method. */
3
3
  export declare const Config: UpdatableConfig;
4
- //# sourceMappingURL=config.d.ts.map