@algorandfoundation/algokit-utils 6.2.1 → 7.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -26
  3. package/account/account.d.ts +21 -11
  4. package/account/get-account-config-from-environment.d.ts +0 -1
  5. package/account/get-account.d.ts +6 -7
  6. package/account/get-dispenser-account.d.ts +2 -3
  7. package/account/index.d.ts +0 -1
  8. package/account/mnemonic-account.d.ts +1 -2
  9. package/amount.d.ts +41 -9
  10. package/app-client.d.ts +19 -5
  11. package/app-deploy.d.ts +18 -2
  12. package/app.d.ts +39 -3
  13. package/asset.d.ts +10 -1
  14. package/config.d.ts +0 -1
  15. package/debugging/debugging.d.ts +3 -5
  16. package/debugging/index.d.ts +0 -2
  17. package/dispenser-client.d.ts +1 -2
  18. package/index.d.ts +8 -6
  19. package/index.js +61 -48
  20. package/index.js.map +1 -1
  21. package/index.mjs +27 -24
  22. package/index.mjs.map +1 -1
  23. package/indexer-lookup.d.ts +10 -9
  24. package/localnet/get-kmd-wallet-account.d.ts +1 -2
  25. package/localnet/get-localnet-dispenser-account.d.ts +1 -2
  26. package/localnet/get-or-create-kmd-wallet-account.d.ts +2 -3
  27. package/localnet/index.d.ts +0 -1
  28. package/localnet/is-localnet.d.ts +1 -2
  29. package/network-client.d.ts +3 -10
  30. package/package.json +5 -5
  31. package/{account → src/account}/account.js +38 -15
  32. package/src/account/account.js.map +1 -0
  33. package/{account → src/account}/account.mjs +39 -16
  34. package/src/account/account.mjs.map +1 -0
  35. package/src/account/get-account-config-from-environment.js.map +1 -0
  36. package/src/account/get-account-config-from-environment.mjs.map +1 -0
  37. package/{account → src/account}/get-account.js +5 -5
  38. package/src/account/get-account.js.map +1 -0
  39. package/{account → src/account}/get-account.mjs +5 -5
  40. package/src/account/get-account.mjs.map +1 -0
  41. package/{account → src/account}/get-dispenser-account.js +3 -3
  42. package/src/account/get-dispenser-account.js.map +1 -0
  43. package/{account → src/account}/get-dispenser-account.mjs +3 -3
  44. package/src/account/get-dispenser-account.mjs.map +1 -0
  45. package/{account → src/account}/mnemonic-account.js +1 -1
  46. package/src/account/mnemonic-account.js.map +1 -0
  47. package/{account → src/account}/mnemonic-account.mjs +1 -1
  48. package/src/account/mnemonic-account.mjs.map +1 -0
  49. package/src/amount.js +61 -0
  50. package/src/amount.js.map +1 -0
  51. package/src/amount.mjs +54 -0
  52. package/src/amount.mjs.map +1 -0
  53. package/{app-client.js → src/app-client.js} +20 -5
  54. package/src/app-client.js.map +1 -0
  55. package/{app-client.mjs → src/app-client.mjs} +20 -5
  56. package/src/app-client.mjs.map +1 -0
  57. package/src/app-deploy.js +285 -0
  58. package/src/app-deploy.js.map +1 -0
  59. package/src/app-deploy.mjs +276 -0
  60. package/src/app-deploy.mjs.map +1 -0
  61. package/src/app.js +349 -0
  62. package/src/app.js.map +1 -0
  63. package/src/app.mjs +329 -0
  64. package/src/app.mjs.map +1 -0
  65. package/src/asset.js +142 -0
  66. package/src/asset.js.map +1 -0
  67. package/src/asset.mjs +136 -0
  68. package/src/asset.mjs.map +1 -0
  69. package/{config.js → src/config.js} +1 -1
  70. package/src/config.js.map +1 -0
  71. package/{config.mjs → src/config.mjs} +1 -1
  72. package/src/config.mjs.map +1 -0
  73. package/src/debugging/debugging.js +15 -0
  74. package/src/debugging/debugging.js.map +1 -0
  75. package/src/debugging/debugging.mjs +13 -0
  76. package/src/debugging/debugging.mjs.map +1 -0
  77. package/{dispenser-client.js → src/dispenser-client.js} +3 -3
  78. package/src/dispenser-client.js.map +1 -0
  79. package/{dispenser-client.mjs → src/dispenser-client.mjs} +3 -3
  80. package/src/dispenser-client.mjs.map +1 -0
  81. package/{indexer-lookup.js → src/indexer-lookup.js} +14 -10
  82. package/src/indexer-lookup.js.map +1 -0
  83. package/{indexer-lookup.mjs → src/indexer-lookup.mjs} +14 -10
  84. package/src/indexer-lookup.mjs.map +1 -0
  85. package/{localnet → src/localnet}/get-kmd-wallet-account.js +3 -3
  86. package/src/localnet/get-kmd-wallet-account.js.map +1 -0
  87. package/{localnet → src/localnet}/get-kmd-wallet-account.mjs +3 -3
  88. package/src/localnet/get-kmd-wallet-account.mjs.map +1 -0
  89. package/{localnet → src/localnet}/get-localnet-dispenser-account.js +3 -3
  90. package/src/localnet/get-localnet-dispenser-account.js.map +1 -0
  91. package/{localnet → src/localnet}/get-localnet-dispenser-account.mjs +3 -3
  92. package/src/localnet/get-localnet-dispenser-account.mjs.map +1 -0
  93. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.js +4 -4
  94. package/src/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
  95. package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.mjs +4 -4
  96. package/src/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
  97. package/{localnet → src/localnet}/is-localnet.js +2 -2
  98. package/src/localnet/is-localnet.js.map +1 -0
  99. package/{localnet → src/localnet}/is-localnet.mjs +2 -2
  100. package/src/localnet/is-localnet.mjs.map +1 -0
  101. package/{network-client.js → src/network-client.js} +5 -12
  102. package/src/network-client.js.map +1 -0
  103. package/{network-client.mjs → src/network-client.mjs} +5 -12
  104. package/src/network-client.mjs.map +1 -0
  105. package/{testing → src/testing}/account.js +16 -4
  106. package/src/testing/account.js.map +1 -0
  107. package/{testing → src/testing}/account.mjs +17 -5
  108. package/src/testing/account.mjs.map +1 -0
  109. package/src/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  110. package/src/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
  111. package/{testing → src/testing}/fixtures/algorand-fixture.js +18 -14
  112. package/src/testing/fixtures/algorand-fixture.js.map +1 -0
  113. package/{testing → src/testing}/fixtures/algorand-fixture.mjs +18 -14
  114. package/src/testing/fixtures/algorand-fixture.mjs.map +1 -0
  115. package/src/testing/indexer.js.map +1 -0
  116. package/src/testing/indexer.mjs.map +1 -0
  117. package/{testing → src/testing}/test-logger.js +7 -3
  118. package/src/testing/test-logger.js.map +1 -0
  119. package/{testing → src/testing}/test-logger.mjs +7 -3
  120. package/src/testing/test-logger.mjs.map +1 -0
  121. package/src/testing/transaction-logger.js.map +1 -0
  122. package/src/testing/transaction-logger.mjs.map +1 -0
  123. package/src/transaction/legacy-bridge.js +129 -0
  124. package/src/transaction/legacy-bridge.js.map +1 -0
  125. package/src/transaction/legacy-bridge.mjs +124 -0
  126. package/src/transaction/legacy-bridge.mjs.map +1 -0
  127. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.js +14 -9
  128. package/src/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
  129. package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.mjs +15 -10
  130. package/src/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
  131. package/{transaction → src/transaction}/transaction.js +221 -141
  132. package/src/transaction/transaction.js.map +1 -0
  133. package/{transaction → src/transaction}/transaction.mjs +222 -142
  134. package/src/transaction/transaction.mjs.map +1 -0
  135. package/src/transfer/transfer-algos.js +31 -0
  136. package/src/transfer/transfer-algos.js.map +1 -0
  137. package/src/transfer/transfer-algos.mjs +29 -0
  138. package/src/transfer/transfer-algos.mjs.map +1 -0
  139. package/src/transfer/transfer.js +112 -0
  140. package/src/transfer/transfer.js.map +1 -0
  141. package/src/transfer/transfer.mjs +108 -0
  142. package/src/transfer/transfer.mjs.map +1 -0
  143. package/{util.js → src/util.js} +33 -7
  144. package/src/util.js.map +1 -0
  145. package/{util.mjs → src/util.mjs} +31 -7
  146. package/src/util.mjs.map +1 -0
  147. package/testing/_asset.d.ts +3 -5
  148. package/testing/account.d.ts +4 -4
  149. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  150. package/testing/fixtures/algorand-fixture.d.ts +1 -2
  151. package/testing/fixtures/index.d.ts +0 -1
  152. package/testing/index.d.ts +0 -1
  153. package/testing/index.js +6 -6
  154. package/testing/index.mjs +6 -6
  155. package/testing/indexer.d.ts +0 -1
  156. package/testing/test-logger.d.ts +0 -1
  157. package/testing/transaction-logger.d.ts +0 -1
  158. package/transaction/index.d.ts +0 -1
  159. package/transaction/legacy-bridge.d.ts +35 -0
  160. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
  161. package/transaction/transaction.d.ts +39 -20
  162. package/transfer/index.d.ts +0 -1
  163. package/transfer/transfer-algos.d.ts +4 -3
  164. package/transfer/transfer.d.ts +8 -2
  165. package/types/account-manager.d.ts +165 -40
  166. package/types/account-manager.js +255 -59
  167. package/types/account-manager.js.map +1 -1
  168. package/types/account-manager.mjs +255 -59
  169. package/types/account-manager.mjs.map +1 -1
  170. package/types/account.d.ts +137 -14
  171. package/types/account.js +2 -2
  172. package/types/account.js.map +1 -1
  173. package/types/account.mjs +3 -3
  174. package/types/account.mjs.map +1 -1
  175. package/types/algo-http-client-with-retry.d.ts +1 -3
  176. package/types/algo-http-client-with-retry.js +34 -4
  177. package/types/algo-http-client-with-retry.js.map +1 -1
  178. package/types/algo-http-client-with-retry.mjs +33 -3
  179. package/types/algo-http-client-with-retry.mjs.map +1 -1
  180. package/types/algorand-client-interface.d.ts +28 -0
  181. package/types/algorand-client-interface.js +3 -0
  182. package/types/algorand-client-interface.js.map +1 -0
  183. package/types/algorand-client-interface.mjs +2 -0
  184. package/types/algorand-client-interface.mjs.map +1 -0
  185. package/types/algorand-client-transaction-creator.d.ts +718 -0
  186. package/types/algorand-client-transaction-creator.js +683 -0
  187. package/types/algorand-client-transaction-creator.js.map +1 -0
  188. package/types/algorand-client-transaction-creator.mjs +681 -0
  189. package/types/algorand-client-transaction-creator.mjs.map +1 -0
  190. package/types/algorand-client-transaction-sender.d.ts +1158 -0
  191. package/types/algorand-client-transaction-sender.js +852 -0
  192. package/types/algorand-client-transaction-sender.js.map +1 -0
  193. package/types/algorand-client-transaction-sender.mjs +850 -0
  194. package/types/algorand-client-transaction-sender.mjs.map +1 -0
  195. package/types/algorand-client.d.ts +48 -91
  196. package/types/algorand-client.js +53 -132
  197. package/types/algorand-client.js.map +1 -1
  198. package/types/algorand-client.mjs +55 -131
  199. package/types/algorand-client.mjs.map +1 -1
  200. package/types/amount.d.ts +23 -12
  201. package/types/amount.js +33 -10
  202. package/types/amount.js.map +1 -1
  203. package/types/amount.mjs +33 -10
  204. package/types/amount.mjs.map +1 -1
  205. package/types/app-arc56.d.ts +359 -0
  206. package/types/app-arc56.js +184 -0
  207. package/types/app-arc56.js.map +1 -0
  208. package/types/app-arc56.mjs +175 -0
  209. package/types/app-arc56.mjs.map +1 -0
  210. package/types/app-client.d.ts +1511 -15
  211. package/types/app-client.js +1029 -43
  212. package/types/app-client.js.map +1 -1
  213. package/types/app-client.mjs +1030 -45
  214. package/types/app-client.mjs.map +1 -1
  215. package/types/app-deployer.d.ts +126 -0
  216. package/types/app-deployer.js +353 -0
  217. package/types/app-deployer.js.map +1 -0
  218. package/types/app-deployer.mjs +351 -0
  219. package/types/app-deployer.mjs.map +1 -0
  220. package/types/app-factory.d.ts +846 -0
  221. package/types/app-factory.js +410 -0
  222. package/types/app-factory.js.map +1 -0
  223. package/types/app-factory.mjs +408 -0
  224. package/types/app-factory.mjs.map +1 -0
  225. package/types/app-manager.d.ts +244 -0
  226. package/types/app-manager.js +423 -0
  227. package/types/app-manager.js.map +1 -0
  228. package/types/app-manager.mjs +421 -0
  229. package/types/app-manager.mjs.map +1 -0
  230. package/types/app-spec.d.ts +2 -1
  231. package/types/app-spec.js +127 -0
  232. package/types/app-spec.js.map +1 -1
  233. package/types/app-spec.mjs +126 -0
  234. package/types/app-spec.mjs.map +1 -1
  235. package/types/app.d.ts +57 -18
  236. package/types/app.js +1 -1
  237. package/types/app.js.map +1 -1
  238. package/types/app.mjs +1 -1
  239. package/types/app.mjs.map +1 -1
  240. package/types/asset-manager.d.ts +205 -0
  241. package/types/asset-manager.js +176 -0
  242. package/types/asset-manager.js.map +1 -0
  243. package/types/asset-manager.mjs +174 -0
  244. package/types/asset-manager.mjs.map +1 -0
  245. package/types/asset.d.ts +4 -5
  246. package/types/async-event-emitter.d.ts +14 -0
  247. package/types/async-event-emitter.js +50 -0
  248. package/types/async-event-emitter.js.map +1 -0
  249. package/types/async-event-emitter.mjs +48 -0
  250. package/types/async-event-emitter.mjs.map +1 -0
  251. package/types/client-manager.d.ts +171 -58
  252. package/types/client-manager.js +198 -43
  253. package/types/client-manager.js.map +1 -1
  254. package/types/client-manager.mjs +199 -44
  255. package/types/client-manager.mjs.map +1 -1
  256. package/types/composer.d.ts +474 -132
  257. package/types/composer.js +461 -167
  258. package/types/composer.js.map +1 -1
  259. package/types/composer.mjs +461 -168
  260. package/types/composer.mjs.map +1 -1
  261. package/types/config.d.ts +3 -6
  262. package/types/config.js +5 -44
  263. package/types/config.js.map +1 -1
  264. package/types/config.mjs +5 -27
  265. package/types/config.mjs.map +1 -1
  266. package/types/debugging.d.ts +29 -101
  267. package/types/debugging.js +16 -109
  268. package/types/debugging.js.map +1 -1
  269. package/types/debugging.mjs +12 -107
  270. package/types/debugging.mjs.map +1 -1
  271. package/types/dispenser-client.d.ts +14 -6
  272. package/types/dispenser-client.js +19 -14
  273. package/types/dispenser-client.js.map +1 -1
  274. package/types/dispenser-client.mjs +19 -14
  275. package/types/dispenser-client.mjs.map +1 -1
  276. package/types/expand.d.ts +7 -0
  277. package/types/expand.js +3 -0
  278. package/types/expand.js.map +1 -0
  279. package/types/expand.mjs +2 -0
  280. package/types/expand.mjs.map +1 -0
  281. package/types/indexer.d.ts +74 -756
  282. package/types/indexer.js.map +1 -1
  283. package/types/indexer.mjs.map +1 -1
  284. package/types/kmd-account-manager.d.ts +5 -6
  285. package/types/kmd-account-manager.js +9 -9
  286. package/types/kmd-account-manager.js.map +1 -1
  287. package/types/kmd-account-manager.mjs +10 -10
  288. package/types/kmd-account-manager.mjs.map +1 -1
  289. package/types/lifecycle-events.d.ts +10 -0
  290. package/types/lifecycle-events.js +8 -0
  291. package/types/lifecycle-events.js.map +1 -0
  292. package/types/lifecycle-events.mjs +8 -0
  293. package/types/lifecycle-events.mjs.map +1 -0
  294. package/types/logging.d.ts +0 -1
  295. package/types/logging.js.map +1 -1
  296. package/types/logging.mjs.map +1 -1
  297. package/types/logic-error.d.ts +2 -4
  298. package/types/logic-error.js +3 -3
  299. package/types/logic-error.js.map +1 -1
  300. package/types/logic-error.mjs +3 -3
  301. package/types/logic-error.mjs.map +1 -1
  302. package/types/network-client.d.ts +21 -3
  303. package/types/network-client.js +10 -0
  304. package/types/network-client.js.map +1 -1
  305. package/types/network-client.mjs +9 -0
  306. package/types/network-client.mjs.map +1 -1
  307. package/types/testing.d.ts +9 -11
  308. package/types/transaction.d.ts +17 -4
  309. package/types/transfer.d.ts +8 -8
  310. package/util.d.ts +15 -2
  311. package/account/account.d.ts.map +0 -1
  312. package/account/account.js.map +0 -1
  313. package/account/account.mjs.map +0 -1
  314. package/account/get-account-config-from-environment.d.ts.map +0 -1
  315. package/account/get-account-config-from-environment.js.map +0 -1
  316. package/account/get-account-config-from-environment.mjs.map +0 -1
  317. package/account/get-account.d.ts.map +0 -1
  318. package/account/get-account.js.map +0 -1
  319. package/account/get-account.mjs.map +0 -1
  320. package/account/get-dispenser-account.d.ts.map +0 -1
  321. package/account/get-dispenser-account.js.map +0 -1
  322. package/account/get-dispenser-account.mjs.map +0 -1
  323. package/account/index.d.ts.map +0 -1
  324. package/account/mnemonic-account.d.ts.map +0 -1
  325. package/account/mnemonic-account.js.map +0 -1
  326. package/account/mnemonic-account.mjs.map +0 -1
  327. package/amount.d.ts.map +0 -1
  328. package/amount.js +0 -34
  329. package/amount.js.map +0 -1
  330. package/amount.mjs +0 -30
  331. package/amount.mjs.map +0 -1
  332. package/app-client.d.ts.map +0 -1
  333. package/app-client.js.map +0 -1
  334. package/app-client.mjs.map +0 -1
  335. package/app-deploy.d.ts.map +0 -1
  336. package/app-deploy.js +0 -468
  337. package/app-deploy.js.map +0 -1
  338. package/app-deploy.mjs +0 -459
  339. package/app-deploy.mjs.map +0 -1
  340. package/app.d.ts.map +0 -1
  341. package/app.js +0 -599
  342. package/app.js.map +0 -1
  343. package/app.mjs +0 -579
  344. package/app.mjs.map +0 -1
  345. package/asset.d.ts.map +0 -1
  346. package/asset.js +0 -272
  347. package/asset.js.map +0 -1
  348. package/asset.mjs +0 -266
  349. package/asset.mjs.map +0 -1
  350. package/config.d.ts.map +0 -1
  351. package/config.js.map +0 -1
  352. package/config.mjs.map +0 -1
  353. package/debugging/debugging.d.ts.map +0 -1
  354. package/debugging/debugging.js +0 -139
  355. package/debugging/debugging.js.map +0 -1
  356. package/debugging/debugging.mjs +0 -118
  357. package/debugging/debugging.mjs.map +0 -1
  358. package/debugging/index.d.ts.map +0 -1
  359. package/debugging/simulate-and-persist-response.d.ts +0 -20
  360. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  361. package/debugging/simulate-and-persist-response.js +0 -108
  362. package/debugging/simulate-and-persist-response.js.map +0 -1
  363. package/debugging/simulate-and-persist-response.mjs +0 -89
  364. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  365. package/dispenser-client.d.ts.map +0 -1
  366. package/dispenser-client.js.map +0 -1
  367. package/dispenser-client.mjs.map +0 -1
  368. package/index.d.ts.map +0 -1
  369. package/indexer-lookup.d.ts.map +0 -1
  370. package/indexer-lookup.js.map +0 -1
  371. package/indexer-lookup.mjs.map +0 -1
  372. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  373. package/localnet/get-kmd-wallet-account.js.map +0 -1
  374. package/localnet/get-kmd-wallet-account.mjs.map +0 -1
  375. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  376. package/localnet/get-localnet-dispenser-account.js.map +0 -1
  377. package/localnet/get-localnet-dispenser-account.mjs.map +0 -1
  378. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  379. package/localnet/get-or-create-kmd-wallet-account.js.map +0 -1
  380. package/localnet/get-or-create-kmd-wallet-account.mjs.map +0 -1
  381. package/localnet/index.d.ts.map +0 -1
  382. package/localnet/is-localnet.d.ts.map +0 -1
  383. package/localnet/is-localnet.js.map +0 -1
  384. package/localnet/is-localnet.mjs.map +0 -1
  385. package/network-client.d.ts.map +0 -1
  386. package/network-client.js.map +0 -1
  387. package/network-client.mjs.map +0 -1
  388. package/testing/_asset.d.ts.map +0 -1
  389. package/testing/account.d.ts.map +0 -1
  390. package/testing/account.js.map +0 -1
  391. package/testing/account.mjs.map +0 -1
  392. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  393. package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  394. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +0 -1
  395. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  396. package/testing/fixtures/algorand-fixture.js.map +0 -1
  397. package/testing/fixtures/algorand-fixture.mjs.map +0 -1
  398. package/testing/fixtures/index.d.ts.map +0 -1
  399. package/testing/index.d.ts.map +0 -1
  400. package/testing/indexer.d.ts.map +0 -1
  401. package/testing/indexer.js.map +0 -1
  402. package/testing/indexer.mjs.map +0 -1
  403. package/testing/test-logger.d.ts.map +0 -1
  404. package/testing/test-logger.js.map +0 -1
  405. package/testing/test-logger.mjs.map +0 -1
  406. package/testing/transaction-logger.d.ts.map +0 -1
  407. package/testing/transaction-logger.js.map +0 -1
  408. package/testing/transaction-logger.mjs.map +0 -1
  409. package/transaction/index.d.ts.map +0 -1
  410. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  411. package/transaction/perform-atomic-transaction-composer-simulate.js.map +0 -1
  412. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +0 -1
  413. package/transaction/transaction.d.ts.map +0 -1
  414. package/transaction/transaction.js.map +0 -1
  415. package/transaction/transaction.mjs.map +0 -1
  416. package/transfer/index.d.ts.map +0 -1
  417. package/transfer/transfer-algos.d.ts.map +0 -1
  418. package/transfer/transfer-algos.js +0 -40
  419. package/transfer/transfer-algos.js.map +0 -1
  420. package/transfer/transfer-algos.mjs +0 -38
  421. package/transfer/transfer-algos.mjs.map +0 -1
  422. package/transfer/transfer.d.ts.map +0 -1
  423. package/transfer/transfer.js +0 -147
  424. package/transfer/transfer.js.map +0 -1
  425. package/transfer/transfer.mjs +0 -143
  426. package/transfer/transfer.mjs.map +0 -1
  427. package/types/account-manager.d.ts.map +0 -1
  428. package/types/account.d.ts.map +0 -1
  429. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  430. package/types/algorand-client.d.ts.map +0 -1
  431. package/types/amount.d.ts.map +0 -1
  432. package/types/app-client.d.ts.map +0 -1
  433. package/types/app-spec.d.ts.map +0 -1
  434. package/types/app.d.ts.map +0 -1
  435. package/types/asset.d.ts.map +0 -1
  436. package/types/client-manager.d.ts.map +0 -1
  437. package/types/composer.d.ts.map +0 -1
  438. package/types/config.d.ts.map +0 -1
  439. package/types/debugging.d.ts.map +0 -1
  440. package/types/dispenser-client.d.ts.map +0 -1
  441. package/types/indexer.d.ts.map +0 -1
  442. package/types/kmd-account-manager.d.ts.map +0 -1
  443. package/types/logging.d.ts.map +0 -1
  444. package/types/logic-error.d.ts.map +0 -1
  445. package/types/network-client.d.ts.map +0 -1
  446. package/types/testing.d.ts.map +0 -1
  447. package/types/transaction.d.ts.map +0 -1
  448. package/types/transfer.d.ts.map +0 -1
  449. package/types/urlTokenBaseHTTPClient.d.ts +0 -41
  450. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  451. package/types/urlTokenBaseHTTPClient.js +0 -153
  452. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  453. package/types/urlTokenBaseHTTPClient.mjs +0 -151
  454. package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
  455. package/util.d.ts.map +0 -1
  456. package/util.js.map +0 -1
  457. package/util.mjs.map +0 -1
  458. /package/{account → src/account}/get-account-config-from-environment.js +0 -0
  459. /package/{account → src/account}/get-account-config-from-environment.mjs +0 -0
  460. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
  461. /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.mjs +0 -0
  462. /package/{testing → src/testing}/indexer.js +0 -0
  463. /package/{testing → src/testing}/indexer.mjs +0 -0
  464. /package/{testing → src/testing}/transaction-logger.js +0 -0
  465. /package/{testing → src/testing}/transaction-logger.mjs +0 -0
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
 
@@ -1,5 +1,5 @@
1
1
  import algosdk from 'algosdk';
2
- import { AccountAssetInformation, AccountInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account';
2
+ import { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account';
3
3
  import { AlgoAmount } from '../types/amount';
4
4
  import { SendTransactionFrom } from '../types/transaction';
5
5
  import Account = algosdk.Account;
@@ -7,8 +7,9 @@ import Algodv2 = algosdk.Algodv2;
7
7
  import Kmd = algosdk.Kmd;
8
8
  import MultisigMetadata = algosdk.MultisigMetadata;
9
9
  import TransactionSigner = algosdk.TransactionSigner;
10
+ import AccountInformationModel = algosdk.modelsv2.Account;
10
11
  /**
11
- * @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.
12
13
  *
13
14
  * Returns an account wrapper that supports partial or full multisig signing.
14
15
  * @param multisigParams The parameters that define the multisig account
@@ -17,7 +18,7 @@ import TransactionSigner = algosdk.TransactionSigner;
17
18
  */
18
19
  export declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
19
20
  /**
20
- * @deprecated Use `algorandClient.account.rekeyed(account, sender)` or `new SigningAccount(account, sender)` instead.
21
+ * @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
21
22
  *
22
23
  * Returns an account wrapper that supports a rekeyed account.
23
24
  * @param signer The account, with private key loaded, that is signing
@@ -26,7 +27,7 @@ export declare function multisigAccount(multisigParams: MultisigMetadata, signin
26
27
  */
27
28
  export declare function rekeyedAccount(signer: Account, sender: string): SigningAccount;
28
29
  /**
29
- * @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.
30
31
  *
31
32
  * Returns an account wrapper that supports a transaction signer with associated sender address.
32
33
  * @param signer The transaction signer
@@ -35,7 +36,7 @@ export declare function rekeyedAccount(signer: Account, sender: string): Signing
35
36
  */
36
37
  export declare function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount;
37
38
  /**
38
- * @deprecated Use `algorandClient.account.random()` or `algosdk.generateAccount()` instead.
39
+ * @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.
39
40
  *
40
41
  * Returns a new, random Algorand account with secret key loaded.
41
42
  *
@@ -44,7 +45,7 @@ export declare function transactionSignerAccount(signer: TransactionSigner, send
44
45
  */
45
46
  export declare function randomAccount(): Account;
46
47
  /**
47
- * @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.
48
49
  *
49
50
  * Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.
50
51
  *
@@ -65,12 +66,12 @@ export declare function randomAccount(): Account;
65
66
  * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
66
67
  * ```
67
68
  *
68
- * If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
69
+ * If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
69
70
  * If not running against LocalNet then it will use proces.env.MY_ACCOUNT_MNEMONIC as the private key and (if present) process.env.MY_ACCOUNT_SENDER as the sender address.
70
71
  *
71
72
  * @param account The details of the account to get, either the name identifier (string) or an object with:
72
73
  * * `name`: string: The name identifier of the account
73
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
74
+ * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account
74
75
  * @param algod An algod client
75
76
  * @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
76
77
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -95,8 +96,17 @@ export declare function getAccountAddressAsUint8Array(account: SendTransactionFr
95
96
  * @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
96
97
  */
97
98
  export declare function getAccountAddressAsString(addressEncodedInB64: string): string;
99
+ export type NumberConverter<T extends AccountInformationModel> = {
100
+ [key in keyof T]: ToNumberIfExtends<T[key], number | bigint>;
101
+ };
102
+ type ToNumberIfExtends<K, E> = K extends E ? number : K;
103
+ /** @deprecated Account information at a given round. */
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
+ };
98
108
  /**
99
- * @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.
100
110
  *
101
111
  * Returns the given sender account's current status, balance and spendable amounts.
102
112
  *
@@ -113,7 +123,7 @@ export declare function getAccountAddressAsString(addressEncodedInB64: string):
113
123
  */
114
124
  export declare function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation>;
115
125
  /**
116
- * @deprecated Use `algorandClient.account.getAssetInformation(sender, assetId)` or `new AccountManager(clientManager).getAssetInformation(sender, assetId)` instead.
126
+ * @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
117
127
  *
118
128
  * Returns the given sender account's asset holding for a given asset.
119
129
  *
@@ -131,4 +141,4 @@ export declare function getAccountInformation(sender: string | SendTransactionFr
131
141
  * @returns The account asset holding information
132
142
  */
133
143
  export declare function getAccountAssetInformation(sender: string | SendTransactionFrom, assetId: number | bigint, algod: Algodv2): Promise<AccountAssetInformation>;
134
- //# sourceMappingURL=account.d.ts.map
144
+ export {};
@@ -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
  *
@@ -25,11 +25,11 @@ import Kmd = algosdk.Kmd;
25
25
  * const account = await getAccount('ACCOUNT', algod)
26
26
  * ```
27
27
  *
28
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
28
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
29
29
  *
30
30
  * @param account The details of the account to get, either the name identifier (string) or an object with:
31
31
  * * `name`: The name identifier of the account
32
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
32
+ * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account
33
33
  * @param algod An algod client
34
34
  * @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
35
35
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -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.
@@ -50,11 +50,11 @@ export declare function getAccount(account: {
50
50
  * const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
51
51
  * ```
52
52
  *
53
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
53
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
54
54
  *
55
55
  * @param account The details of the account to get, an object with:
56
56
  * * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName)
57
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
57
+ * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account
58
58
  * @param algod An algod client
59
59
  * @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
60
60
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -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
@@ -1,20 +1,52 @@
1
1
  import { AlgoAmount } from './types/amount';
2
2
  declare global {
3
3
  interface Number {
4
+ /**
5
+ * Returns an `AlgoAmount` using this number of microAlgo.
6
+ */
4
7
  microAlgos(this: number): AlgoAmount;
8
+ /**
9
+ * Returns an `AlgoAmount` using this number of Algo.
10
+ */
5
11
  algos(this: number): AlgoAmount;
12
+ /**
13
+ * Returns an `AlgoAmount` using this number of microAlgo.
14
+ */
15
+ microAlgo(this: number): AlgoAmount;
16
+ /**
17
+ * Returns an `AlgoAmount` using this number of Algo.
18
+ */
19
+ algo(this: number): AlgoAmount;
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;
6
30
  }
7
31
  }
8
- /** Returns an amount of Algos using AlgoAmount
9
- * @param algos The amount in Algos
32
+ /** Returns an amount of Algo using AlgoAmount
33
+ * @param algos The amount of Algo
34
+ */
35
+ export declare const algos: (algos: number | bigint) => AlgoAmount;
36
+ /** Returns an amount of Algo using AlgoAmount
37
+ * @param algos The amount of Algo
38
+ */
39
+ export declare const algo: (algos: number | bigint) => AlgoAmount;
40
+ /** Returns an amount of µAlgo using AlgoAmount
41
+ * @param microAlgos The amount of µAlgo
10
42
  */
11
- export declare const algos: (algos: number) => AlgoAmount;
12
- /** Returns an amount of µAlgos using AlgoAmount
13
- * @param microAlgos The amount in µAlgos
43
+ export declare const microAlgos: (microAlgos: number | bigint) => AlgoAmount;
44
+ /** Returns an amount of µAlgo using AlgoAmount
45
+ * @param microAlgos The amount of µAlgo
14
46
  */
15
- export declare const microAlgos: (microAlgos: number) => AlgoAmount;
16
- /** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
17
- * @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
47
+ export declare const microAlgo: (microAlgos: number | bigint) => AlgoAmount;
48
+ /** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
49
+ * @param numberOfTransactions The of standard transaction fees to return the amount of Algo
18
50
  */
19
51
  export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
20
- //# 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