@algorandfoundation/algokit-utils 5.3.3-beta.2 → 5.4.0-beta.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 (528) hide show
  1. package/account/account.d.ts +81 -0
  2. package/account/account.d.ts.map +1 -0
  3. package/account/account.js +120 -0
  4. package/account/account.js.map +1 -0
  5. package/account/account.mjs +112 -0
  6. package/account/account.mjs.map +1 -0
  7. package/account/get-account-config-from-environment.d.ts +13 -0
  8. package/account/get-account-config-from-environment.d.ts.map +1 -0
  9. package/account/get-account-config-from-environment.js +25 -0
  10. package/account/get-account-config-from-environment.js.map +1 -0
  11. package/account/get-account-config-from-environment.mjs +23 -0
  12. package/account/get-account-config-from-environment.mjs.map +1 -0
  13. package/account/get-account.d.ts +66 -0
  14. package/account/get-account.d.ts.map +1 -0
  15. package/account/get-account.js +83 -0
  16. package/account/get-account.js.map +1 -0
  17. package/account/get-account.mjs +81 -0
  18. package/account/get-account.mjs.map +1 -0
  19. package/account/get-dispenser-account.d.ts +13 -0
  20. package/account/get-dispenser-account.d.ts.map +1 -0
  21. package/account/get-dispenser-account.js +23 -0
  22. package/account/get-dispenser-account.js.map +1 -0
  23. package/account/get-dispenser-account.mjs +21 -0
  24. package/account/get-dispenser-account.mjs.map +1 -0
  25. package/account/index.d.ts +6 -0
  26. package/account/index.d.ts.map +1 -0
  27. package/account/mnemonic-account.d.ts +11 -0
  28. package/account/mnemonic-account.d.ts.map +1 -0
  29. package/account/mnemonic-account.js +18 -0
  30. package/account/mnemonic-account.js.map +1 -0
  31. package/account/mnemonic-account.mjs +16 -0
  32. package/account/mnemonic-account.mjs.map +1 -0
  33. package/amount.d.ts.map +1 -0
  34. package/amount.js +34 -0
  35. package/amount.js.map +1 -0
  36. package/{esm/amount.js → amount.mjs} +8 -5
  37. package/amount.mjs.map +1 -0
  38. package/app-client.d.ts.map +1 -0
  39. package/{cjs/app-client.js → app-client.js} +11 -10
  40. package/app-client.js.map +1 -0
  41. package/{esm/app-client.js → app-client.mjs} +8 -5
  42. package/app-client.mjs.map +1 -0
  43. package/app-deploy.d.ts.map +1 -0
  44. package/{cjs/app-deploy.js → app-deploy.js} +67 -69
  45. package/app-deploy.js.map +1 -0
  46. package/{esm/app-deploy.js → app-deploy.mjs} +17 -14
  47. package/app-deploy.mjs.map +1 -0
  48. package/{cjs/app.d.ts → app.d.ts} +1 -1
  49. package/app.d.ts.map +1 -0
  50. package/{cjs/app.js → app.js} +102 -104
  51. package/app.js.map +1 -0
  52. package/{esm/app.js → app.mjs} +27 -24
  53. package/app.mjs.map +1 -0
  54. package/asset.d.ts.map +1 -0
  55. package/{cjs/asset.js → asset.js} +41 -42
  56. package/asset.js.map +1 -0
  57. package/{esm/asset.js → asset.mjs} +10 -6
  58. package/asset.mjs.map +1 -0
  59. package/config.d.ts +4 -0
  60. package/config.d.ts.map +1 -0
  61. package/config.js +9 -0
  62. package/config.js.map +1 -0
  63. package/config.mjs +7 -0
  64. package/config.mjs.map +1 -0
  65. package/debugging/debugging.d.ts +10 -0
  66. package/debugging/debugging.d.ts.map +1 -0
  67. package/debugging/debugging.js +139 -0
  68. package/debugging/debugging.js.map +1 -0
  69. package/debugging/debugging.mjs +118 -0
  70. package/debugging/debugging.mjs.map +1 -0
  71. package/debugging/index.d.ts +3 -0
  72. package/debugging/index.d.ts.map +1 -0
  73. package/{cjs/debugging.d.ts → debugging/simulate-and-persist-response.d.ts} +3 -12
  74. package/debugging/simulate-and-persist-response.d.ts.map +1 -0
  75. package/debugging/simulate-and-persist-response.js +108 -0
  76. package/debugging/simulate-and-persist-response.js.map +1 -0
  77. package/debugging/simulate-and-persist-response.mjs +89 -0
  78. package/debugging/simulate-and-persist-response.mjs.map +1 -0
  79. package/dispenser-client.d.ts.map +1 -0
  80. package/{cjs/dispenser-client.js → dispenser-client.js} +7 -6
  81. package/dispenser-client.js.map +1 -0
  82. package/{esm/dispenser-client.js → dispenser-client.mjs} +6 -3
  83. package/dispenser-client.mjs.map +1 -0
  84. package/{cjs/index.d.ts → index.d.ts} +1 -3
  85. package/index.d.ts.map +1 -0
  86. package/index.js +125 -0
  87. package/index.js.map +1 -0
  88. package/index.mjs +25 -0
  89. package/index.mjs.map +1 -0
  90. package/indexer-lookup.d.ts.map +1 -0
  91. package/{cjs/indexer-lookup.js → indexer-lookup.js} +8 -8
  92. package/indexer-lookup.js.map +1 -0
  93. package/{esm/indexer-lookup.js → indexer-lookup.mjs} +8 -6
  94. package/indexer-lookup.mjs.map +1 -0
  95. package/localnet/get-kmd-wallet-account.d.ts +26 -0
  96. package/localnet/get-kmd-wallet-account.d.ts.map +1 -0
  97. package/localnet/get-kmd-wallet-account.js +55 -0
  98. package/localnet/get-kmd-wallet-account.js.map +1 -0
  99. package/localnet/get-kmd-wallet-account.mjs +53 -0
  100. package/localnet/get-kmd-wallet-account.mjs.map +1 -0
  101. package/localnet/get-localnet-dispenser-account.d.ts +12 -0
  102. package/localnet/get-localnet-dispenser-account.d.ts.map +1 -0
  103. package/localnet/get-localnet-dispenser-account.js +21 -0
  104. package/localnet/get-localnet-dispenser-account.js.map +1 -0
  105. package/localnet/get-localnet-dispenser-account.mjs +19 -0
  106. package/localnet/get-localnet-dispenser-account.mjs.map +1 -0
  107. package/localnet/get-or-create-kmd-wallet-account.d.ts +27 -0
  108. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +1 -0
  109. package/localnet/get-or-create-kmd-wallet-account.js +52 -0
  110. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
  111. package/localnet/get-or-create-kmd-wallet-account.mjs +50 -0
  112. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
  113. package/localnet/index.d.ts +5 -0
  114. package/localnet/index.d.ts.map +1 -0
  115. package/localnet/is-localnet.d.ts +5 -0
  116. package/localnet/is-localnet.d.ts.map +1 -0
  117. package/localnet/is-localnet.js +10 -0
  118. package/localnet/is-localnet.js.map +1 -0
  119. package/localnet/is-localnet.mjs +8 -0
  120. package/localnet/is-localnet.mjs.map +1 -0
  121. package/{cjs/network-client.d.ts → network-client.d.ts} +0 -1
  122. package/network-client.d.ts.map +1 -0
  123. package/{cjs/network-client.js → network-client.js} +21 -25
  124. package/network-client.js.map +1 -0
  125. package/{esm/network-client.js → network-client.mjs} +15 -13
  126. package/network-client.mjs.map +1 -0
  127. package/package.json +15 -36
  128. package/testing/_asset.d.ts.map +1 -0
  129. package/testing/account.d.ts.map +1 -0
  130. package/testing/account.js +29 -0
  131. package/testing/account.js.map +1 -0
  132. package/{esm/testing/account.js → testing/account.mjs} +8 -5
  133. package/testing/account.mjs.map +1 -0
  134. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
  135. package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.js +11 -10
  136. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  137. package/{esm/testing/fixtures/algokit-log-capture-fixture.js → testing/fixtures/algokit-log-capture-fixture.mjs} +7 -4
  138. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
  139. package/testing/fixtures/algorand-fixture.d.ts.map +1 -0
  140. package/testing/fixtures/algorand-fixture.js +64 -0
  141. package/testing/fixtures/algorand-fixture.js.map +1 -0
  142. package/{esm/testing/fixtures/algorand-fixture.js → testing/fixtures/algorand-fixture.mjs} +12 -4
  143. package/testing/fixtures/algorand-fixture.mjs.map +1 -0
  144. package/testing/fixtures/index.d.ts.map +1 -0
  145. package/testing/index.d.ts.map +1 -0
  146. package/testing/index.js +18 -0
  147. package/testing/index.js.map +1 -0
  148. package/testing/index.mjs +7 -0
  149. package/testing/index.mjs.map +1 -0
  150. package/testing/indexer.d.ts.map +1 -0
  151. package/{cjs/testing → testing}/indexer.js +4 -4
  152. package/testing/indexer.js.map +1 -0
  153. package/{esm/testing/indexer.js → testing/indexer.mjs} +4 -2
  154. package/testing/indexer.mjs.map +1 -0
  155. package/testing/test-logger.d.ts.map +1 -0
  156. package/{cjs/testing → testing}/test-logger.js +7 -8
  157. package/testing/test-logger.js.map +1 -0
  158. package/{esm/testing/test-logger.js → testing/test-logger.mjs} +6 -5
  159. package/testing/test-logger.mjs.map +1 -0
  160. package/testing/transaction-logger.d.ts.map +1 -0
  161. package/{cjs/testing → testing}/transaction-logger.js +14 -15
  162. package/testing/transaction-logger.js.map +1 -0
  163. package/{esm/testing/transaction-logger.js → testing/transaction-logger.mjs} +9 -5
  164. package/testing/transaction-logger.mjs.map +1 -0
  165. package/transaction/index.d.ts +3 -0
  166. package/transaction/index.d.ts.map +1 -0
  167. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +11 -0
  168. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +1 -0
  169. package/transaction/perform-atomic-transaction-composer-simulate.js +35 -0
  170. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
  171. package/transaction/perform-atomic-transaction-composer-simulate.mjs +33 -0
  172. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
  173. package/{cjs → transaction}/transaction.d.ts +2 -9
  174. package/transaction/transaction.d.ts.map +1 -0
  175. package/{cjs → transaction}/transaction.js +88 -113
  176. package/transaction/transaction.js.map +1 -0
  177. package/{esm/transaction.js → transaction/transaction.mjs} +27 -50
  178. package/transaction/transaction.mjs.map +1 -0
  179. package/transfer/index.d.ts +3 -0
  180. package/transfer/index.d.ts.map +1 -0
  181. package/transfer/transfer-algos.d.ts +17 -0
  182. package/transfer/transfer-algos.d.ts.map +1 -0
  183. package/transfer/transfer-algos.js +40 -0
  184. package/transfer/transfer-algos.js.map +1 -0
  185. package/transfer/transfer-algos.mjs +38 -0
  186. package/transfer/transfer-algos.mjs.map +1 -0
  187. package/{cjs → transfer}/transfer.d.ts +2 -14
  188. package/transfer/transfer.d.ts.map +1 -0
  189. package/transfer/transfer.js +147 -0
  190. package/transfer/transfer.js.map +1 -0
  191. package/{esm/transfer.js → transfer/transfer.mjs} +15 -40
  192. package/transfer/transfer.mjs.map +1 -0
  193. package/types/account.d.ts +63 -161
  194. package/types/account.d.ts.map +1 -1
  195. package/{cjs/types → types}/account.js +14 -22
  196. package/types/account.js.map +1 -0
  197. package/{esm/types/account.js → types/account.mjs} +7 -11
  198. package/types/account.mjs.map +1 -0
  199. package/types/algo-http-client-with-retry.d.ts.map +1 -0
  200. package/{cjs/types → types}/algo-http-client-with-retry.js +25 -24
  201. package/types/algo-http-client-with-retry.js.map +1 -0
  202. package/{esm/types/algo-http-client-with-retry.js → types/algo-http-client-with-retry.mjs} +23 -20
  203. package/types/algo-http-client-with-retry.mjs.map +1 -0
  204. package/types/amount.d.ts +22 -18
  205. package/types/amount.d.ts.map +1 -1
  206. package/{cjs/types → types}/amount.js +8 -11
  207. package/types/amount.js.map +1 -0
  208. package/{esm/types/amount.js → types/amount.mjs} +5 -3
  209. package/types/amount.mjs.map +1 -0
  210. package/types/app-client.d.ts +413 -69
  211. package/types/app-client.d.ts.map +1 -1
  212. package/{cjs/types → types}/app-client.js +58 -73
  213. package/types/app-client.js.map +1 -0
  214. package/{esm/types/app-client.js → types/app-client.mjs} +14 -24
  215. package/types/app-client.mjs.map +1 -0
  216. package/types/app-spec.d.ts.map +1 -0
  217. package/types/app.d.ts +300 -146
  218. package/types/app.d.ts.map +1 -1
  219. package/{cjs/types → types}/app.js +16 -14
  220. package/types/app.js.map +1 -0
  221. package/{esm/types/app.js → types/app.mjs} +9 -9
  222. package/types/app.mjs.map +1 -0
  223. package/types/asset.d.ts +40 -47
  224. package/types/asset.d.ts.map +1 -1
  225. package/types/config.d.ts.map +1 -0
  226. package/{cjs/types → types}/config.js +30 -41
  227. package/types/config.js.map +1 -0
  228. package/{esm/types/config.js → types/config.mjs} +8 -11
  229. package/types/config.mjs.map +1 -0
  230. package/types/debugging.d.ts +105 -22
  231. package/types/debugging.d.ts.map +1 -1
  232. package/{cjs/types → types}/debugging.js +6 -13
  233. package/types/debugging.js.map +1 -0
  234. package/{esm/types/debugging.js → types/debugging.mjs} +6 -11
  235. package/types/debugging.mjs.map +1 -0
  236. package/types/dispenser-client.d.ts +71 -13
  237. package/types/dispenser-client.d.ts.map +1 -1
  238. package/{cjs/types → types}/dispenser-client.js +4 -6
  239. package/types/dispenser-client.js.map +1 -0
  240. package/{esm/types/dispenser-client.js → types/dispenser-client.mjs} +4 -4
  241. package/types/dispenser-client.mjs.map +1 -0
  242. package/types/indexer.d.ts.map +1 -0
  243. package/types/logging.d.ts.map +1 -0
  244. package/{cjs/types → types}/logging.js +8 -6
  245. package/types/logging.js.map +1 -0
  246. package/{esm/types/logging.js → types/logging.mjs} +5 -3
  247. package/types/logging.mjs.map +1 -0
  248. package/types/logic-error.d.ts.map +1 -0
  249. package/{cjs/types → types}/logic-error.js +6 -9
  250. package/types/logic-error.js.map +1 -0
  251. package/{esm/types/logic-error.js → types/logic-error.mjs} +6 -7
  252. package/types/logic-error.mjs.map +1 -0
  253. package/types/network-client.d.ts +19 -99
  254. package/types/network-client.d.ts.map +1 -1
  255. package/types/testing.d.ts.map +1 -0
  256. package/types/transaction.d.ts +112 -175
  257. package/types/transaction.d.ts.map +1 -1
  258. package/types/transfer.d.ts +74 -56
  259. package/types/transfer.d.ts.map +1 -1
  260. package/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
  261. package/{cjs/types → types}/urlTokenBaseHTTPClient.js +7 -10
  262. package/types/urlTokenBaseHTTPClient.js.map +1 -0
  263. package/{esm/types/urlTokenBaseHTTPClient.js → types/urlTokenBaseHTTPClient.mjs} +5 -6
  264. package/types/urlTokenBaseHTTPClient.mjs.map +1 -0
  265. package/util.d.ts.map +1 -0
  266. package/{cjs/util.js → util.js} +7 -7
  267. package/util.js.map +1 -0
  268. package/{esm/util.js → util.mjs} +7 -5
  269. package/util.mjs.map +1 -0
  270. package/cjs/account.d.ts +0 -168
  271. package/cjs/account.d.ts.map +0 -1
  272. package/cjs/account.js +0 -238
  273. package/cjs/account.js.map +0 -1
  274. package/cjs/amount.d.ts.map +0 -1
  275. package/cjs/amount.js +0 -36
  276. package/cjs/amount.js.map +0 -1
  277. package/cjs/app-client.d.ts.map +0 -1
  278. package/cjs/app-client.js.map +0 -1
  279. package/cjs/app-deploy.d.ts.map +0 -1
  280. package/cjs/app-deploy.js.map +0 -1
  281. package/cjs/app.d.ts.map +0 -1
  282. package/cjs/app.js.map +0 -1
  283. package/cjs/asset.d.ts.map +0 -1
  284. package/cjs/asset.js.map +0 -1
  285. package/cjs/debugging.d.ts.map +0 -1
  286. package/cjs/debugging.js +0 -225
  287. package/cjs/debugging.js.map +0 -1
  288. package/cjs/dispenser-client.d.ts.map +0 -1
  289. package/cjs/dispenser-client.js.map +0 -1
  290. package/cjs/index.d.ts.map +0 -1
  291. package/cjs/index.js +0 -34
  292. package/cjs/index.js.map +0 -1
  293. package/cjs/indexer-lookup.d.ts.map +0 -1
  294. package/cjs/indexer-lookup.js.map +0 -1
  295. package/cjs/localnet.d.ts +0 -57
  296. package/cjs/localnet.d.ts.map +0 -1
  297. package/cjs/localnet.js +0 -121
  298. package/cjs/localnet.js.map +0 -1
  299. package/cjs/network-client.d.ts.map +0 -1
  300. package/cjs/network-client.js.map +0 -1
  301. package/cjs/testing/_asset.d.ts.map +0 -1
  302. package/cjs/testing/_asset.js +0 -36
  303. package/cjs/testing/_asset.js.map +0 -1
  304. package/cjs/testing/account.d.ts.map +0 -1
  305. package/cjs/testing/account.js +0 -31
  306. package/cjs/testing/account.js.map +0 -1
  307. package/cjs/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  308. package/cjs/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  309. package/cjs/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  310. package/cjs/testing/fixtures/algorand-fixture.js +0 -58
  311. package/cjs/testing/fixtures/algorand-fixture.js.map +0 -1
  312. package/cjs/testing/fixtures/index.d.ts.map +0 -1
  313. package/cjs/testing/fixtures/index.js +0 -19
  314. package/cjs/testing/fixtures/index.js.map +0 -1
  315. package/cjs/testing/index.d.ts.map +0 -1
  316. package/cjs/testing/index.js +0 -22
  317. package/cjs/testing/index.js.map +0 -1
  318. package/cjs/testing/indexer.d.ts.map +0 -1
  319. package/cjs/testing/indexer.js.map +0 -1
  320. package/cjs/testing/test-logger.d.ts.map +0 -1
  321. package/cjs/testing/test-logger.js.map +0 -1
  322. package/cjs/testing/transaction-logger.d.ts.map +0 -1
  323. package/cjs/testing/transaction-logger.js.map +0 -1
  324. package/cjs/transaction.d.ts.map +0 -1
  325. package/cjs/transaction.js.map +0 -1
  326. package/cjs/transfer.d.ts.map +0 -1
  327. package/cjs/transfer.js +0 -178
  328. package/cjs/transfer.js.map +0 -1
  329. package/cjs/types/account.d.ts +0 -70
  330. package/cjs/types/account.d.ts.map +0 -1
  331. package/cjs/types/account.js.map +0 -1
  332. package/cjs/types/algo-http-client-with-retry.d.ts.map +0 -1
  333. package/cjs/types/algo-http-client-with-retry.js.map +0 -1
  334. package/cjs/types/amount.d.ts +0 -24
  335. package/cjs/types/amount.d.ts.map +0 -1
  336. package/cjs/types/amount.js.map +0 -1
  337. package/cjs/types/app-client.d.ts +0 -416
  338. package/cjs/types/app-client.d.ts.map +0 -1
  339. package/cjs/types/app-client.js.map +0 -1
  340. package/cjs/types/app-spec.d.ts.map +0 -1
  341. package/cjs/types/app-spec.js +0 -3
  342. package/cjs/types/app-spec.js.map +0 -1
  343. package/cjs/types/app.d.ts +0 -323
  344. package/cjs/types/app.d.ts.map +0 -1
  345. package/cjs/types/app.js.map +0 -1
  346. package/cjs/types/asset.d.ts +0 -42
  347. package/cjs/types/asset.d.ts.map +0 -1
  348. package/cjs/types/asset.js +0 -3
  349. package/cjs/types/asset.js.map +0 -1
  350. package/cjs/types/config.d.ts.map +0 -1
  351. package/cjs/types/config.js.map +0 -1
  352. package/cjs/types/debugging.d.ts +0 -112
  353. package/cjs/types/debugging.d.ts.map +0 -1
  354. package/cjs/types/debugging.js.map +0 -1
  355. package/cjs/types/dispenser-client.d.ts +0 -77
  356. package/cjs/types/dispenser-client.d.ts.map +0 -1
  357. package/cjs/types/dispenser-client.js.map +0 -1
  358. package/cjs/types/indexer.d.ts.map +0 -1
  359. package/cjs/types/indexer.js +0 -34
  360. package/cjs/types/indexer.js.map +0 -1
  361. package/cjs/types/logging.d.ts.map +0 -1
  362. package/cjs/types/logging.js.map +0 -1
  363. package/cjs/types/logic-error.d.ts.map +0 -1
  364. package/cjs/types/logic-error.js.map +0 -1
  365. package/cjs/types/network-client.d.ts +0 -20
  366. package/cjs/types/network-client.d.ts.map +0 -1
  367. package/cjs/types/network-client.js +0 -3
  368. package/cjs/types/network-client.js.map +0 -1
  369. package/cjs/types/testing.d.ts.map +0 -1
  370. package/cjs/types/testing.js +0 -3
  371. package/cjs/types/testing.js.map +0 -1
  372. package/cjs/types/transaction.d.ts +0 -118
  373. package/cjs/types/transaction.d.ts.map +0 -1
  374. package/cjs/types/transaction.js +0 -3
  375. package/cjs/types/transaction.js.map +0 -1
  376. package/cjs/types/transfer.d.ts +0 -76
  377. package/cjs/types/transfer.d.ts.map +0 -1
  378. package/cjs/types/transfer.js +0 -3
  379. package/cjs/types/transfer.js.map +0 -1
  380. package/cjs/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  381. package/cjs/types/urlTokenBaseHTTPClient.js.map +0 -1
  382. package/cjs/util.d.ts.map +0 -1
  383. package/cjs/util.js.map +0 -1
  384. package/esm/account.js +0 -221
  385. package/esm/account.js.map +0 -1
  386. package/esm/amount.js.map +0 -1
  387. package/esm/app-client.js.map +0 -1
  388. package/esm/app-deploy.js.map +0 -1
  389. package/esm/app.js.map +0 -1
  390. package/esm/asset.js.map +0 -1
  391. package/esm/debugging.js +0 -197
  392. package/esm/debugging.js.map +0 -1
  393. package/esm/dispenser-client.js.map +0 -1
  394. package/esm/index.js +0 -17
  395. package/esm/index.js.map +0 -1
  396. package/esm/indexer-lookup.js.map +0 -1
  397. package/esm/localnet.js +0 -111
  398. package/esm/localnet.js.map +0 -1
  399. package/esm/network-client.js.map +0 -1
  400. package/esm/package.json +0 -3
  401. package/esm/testing/_asset.js +0 -29
  402. package/esm/testing/_asset.js.map +0 -1
  403. package/esm/testing/account.js.map +0 -1
  404. package/esm/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  405. package/esm/testing/fixtures/algorand-fixture.js.map +0 -1
  406. package/esm/testing/fixtures/index.js +0 -3
  407. package/esm/testing/fixtures/index.js.map +0 -1
  408. package/esm/testing/index.js +0 -6
  409. package/esm/testing/index.js.map +0 -1
  410. package/esm/testing/indexer.js.map +0 -1
  411. package/esm/testing/test-logger.js.map +0 -1
  412. package/esm/testing/transaction-logger.js.map +0 -1
  413. package/esm/transaction.js.map +0 -1
  414. package/esm/transfer.js.map +0 -1
  415. package/esm/types/account.js.map +0 -1
  416. package/esm/types/algo-http-client-with-retry.js.map +0 -1
  417. package/esm/types/amount.js.map +0 -1
  418. package/esm/types/app-client.js.map +0 -1
  419. package/esm/types/app-spec.js +0 -2
  420. package/esm/types/app-spec.js.map +0 -1
  421. package/esm/types/app.js.map +0 -1
  422. package/esm/types/asset.js +0 -2
  423. package/esm/types/asset.js.map +0 -1
  424. package/esm/types/config.js.map +0 -1
  425. package/esm/types/debugging.js.map +0 -1
  426. package/esm/types/dispenser-client.js.map +0 -1
  427. package/esm/types/indexer.js +0 -31
  428. package/esm/types/indexer.js.map +0 -1
  429. package/esm/types/logging.js.map +0 -1
  430. package/esm/types/logic-error.js.map +0 -1
  431. package/esm/types/network-client.js +0 -2
  432. package/esm/types/network-client.js.map +0 -1
  433. package/esm/types/testing.js +0 -2
  434. package/esm/types/testing.js.map +0 -1
  435. package/esm/types/transaction.js +0 -2
  436. package/esm/types/transaction.js.map +0 -1
  437. package/esm/types/transfer.js +0 -2
  438. package/esm/types/transfer.js.map +0 -1
  439. package/esm/types/urlTokenBaseHTTPClient.js.map +0 -1
  440. package/esm/util.js.map +0 -1
  441. package/types/app-deploy.d.ts +0 -104
  442. package/types/app-deploy.d.ts.map +0 -1
  443. package/types/index.d.ts +0 -17
  444. package/types/index.d.ts.map +0 -1
  445. package/types/indexer-lookup.d.ts +0 -39
  446. package/types/indexer-lookup.d.ts.map +0 -1
  447. package/types/localnet.d.ts +0 -57
  448. package/types/localnet.d.ts.map +0 -1
  449. package/types/testing/_asset.d.ts +0 -5
  450. package/types/testing/_asset.d.ts.map +0 -1
  451. package/types/testing/account.d.ts +0 -17
  452. package/types/testing/account.d.ts.map +0 -1
  453. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -20
  454. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  455. package/types/testing/fixtures/algorand-fixture.d.ts +0 -50
  456. package/types/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  457. package/types/testing/fixtures/index.d.ts +0 -3
  458. package/types/testing/fixtures/index.d.ts.map +0 -1
  459. package/types/testing/index.d.ts +0 -6
  460. package/types/testing/index.d.ts.map +0 -1
  461. package/types/testing/indexer.d.ts +0 -13
  462. package/types/testing/indexer.d.ts.map +0 -1
  463. package/types/testing/test-logger.d.ts +0 -41
  464. package/types/testing/test-logger.d.ts.map +0 -1
  465. package/types/testing/transaction-logger.d.ts +0 -31
  466. package/types/testing/transaction-logger.d.ts.map +0 -1
  467. package/types/types/account.d.ts +0 -70
  468. package/types/types/account.d.ts.map +0 -1
  469. package/types/types/algo-http-client-with-retry.d.ts +0 -14
  470. package/types/types/algo-http-client-with-retry.d.ts.map +0 -1
  471. package/types/types/amount.d.ts +0 -24
  472. package/types/types/amount.d.ts.map +0 -1
  473. package/types/types/app-client.d.ts +0 -416
  474. package/types/types/app-client.d.ts.map +0 -1
  475. package/types/types/app-spec.d.ts +0 -156
  476. package/types/types/app-spec.d.ts.map +0 -1
  477. package/types/types/app.d.ts +0 -323
  478. package/types/types/app.d.ts.map +0 -1
  479. package/types/types/asset.d.ts +0 -42
  480. package/types/types/asset.d.ts.map +0 -1
  481. package/types/types/config.d.ts +0 -49
  482. package/types/types/config.d.ts.map +0 -1
  483. package/types/types/debugging.d.ts +0 -112
  484. package/types/types/debugging.d.ts.map +0 -1
  485. package/types/types/dispenser-client.d.ts +0 -77
  486. package/types/types/dispenser-client.d.ts.map +0 -1
  487. package/types/types/indexer.d.ts +0 -625
  488. package/types/types/indexer.d.ts.map +0 -1
  489. package/types/types/logging.d.ts +0 -13
  490. package/types/types/logging.d.ts.map +0 -1
  491. package/types/types/logic-error.d.ts +0 -37
  492. package/types/types/logic-error.d.ts.map +0 -1
  493. package/types/types/network-client.d.ts +0 -20
  494. package/types/types/network-client.d.ts.map +0 -1
  495. package/types/types/testing.d.ts +0 -95
  496. package/types/types/testing.d.ts.map +0 -1
  497. package/types/types/transaction.d.ts +0 -118
  498. package/types/types/transaction.d.ts.map +0 -1
  499. package/types/types/transfer.d.ts +0 -76
  500. package/types/types/transfer.d.ts.map +0 -1
  501. package/types/types/urlTokenBaseHTTPClient.d.ts +0 -41
  502. package/types/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  503. package/types/util.d.ts +0 -24
  504. package/types/util.d.ts.map +0 -1
  505. /package/{cjs/amount.d.ts → amount.d.ts} +0 -0
  506. /package/{cjs/app-client.d.ts → app-client.d.ts} +0 -0
  507. /package/{cjs/app-deploy.d.ts → app-deploy.d.ts} +0 -0
  508. /package/{cjs/asset.d.ts → asset.d.ts} +0 -0
  509. /package/{cjs/dispenser-client.d.ts → dispenser-client.d.ts} +0 -0
  510. /package/{cjs/indexer-lookup.d.ts → indexer-lookup.d.ts} +0 -0
  511. /package/{cjs/testing → testing}/_asset.d.ts +0 -0
  512. /package/{cjs/testing → testing}/account.d.ts +0 -0
  513. /package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.d.ts +0 -0
  514. /package/{cjs/testing → testing}/fixtures/algorand-fixture.d.ts +0 -0
  515. /package/{cjs/testing → testing}/fixtures/index.d.ts +0 -0
  516. /package/{cjs/testing → testing}/index.d.ts +0 -0
  517. /package/{cjs/testing → testing}/indexer.d.ts +0 -0
  518. /package/{cjs/testing → testing}/test-logger.d.ts +0 -0
  519. /package/{cjs/testing → testing}/transaction-logger.d.ts +0 -0
  520. /package/{cjs/types → types}/algo-http-client-with-retry.d.ts +0 -0
  521. /package/{cjs/types → types}/app-spec.d.ts +0 -0
  522. /package/{cjs/types → types}/config.d.ts +0 -0
  523. /package/{cjs/types → types}/indexer.d.ts +0 -0
  524. /package/{cjs/types → types}/logging.d.ts +0 -0
  525. /package/{cjs/types → types}/logic-error.d.ts +0 -0
  526. /package/{cjs/types → types}/testing.d.ts +0 -0
  527. /package/{cjs/types → types}/urlTokenBaseHTTPClient.d.ts +0 -0
  528. /package/{cjs/util.d.ts → util.d.ts} +0 -0
@@ -1,181 +1,118 @@
1
1
  import algosdk from 'algosdk';
2
- import { AlgoAmount } from './types/amount';
3
- import { AtomicTransactionComposerToSend, SendAtomicTransactionComposerResults, SendTransactionFrom, SendTransactionParams, SendTransactionResult, TransactionGroupToSend, TransactionNote, TransactionToSign } from './types/transaction';
4
- import Algodv2 = algosdk.Algodv2;
2
+ import { MultisigAccount, SigningAccount, TransactionSignerAccount } from './account';
3
+ import { AlgoAmount } from './amount';
4
+ import { ABIReturn } from './app';
5
+ import Account = algosdk.Account;
5
6
  import AtomicTransactionComposer = algosdk.AtomicTransactionComposer;
6
- import modelsv2 = algosdk.modelsv2;
7
- import SuggestedParams = algosdk.SuggestedParams;
7
+ import LogicSigAccount = algosdk.LogicSigAccount;
8
8
  import Transaction = algosdk.Transaction;
9
- import TransactionWithSigner = algosdk.TransactionWithSigner;
10
- export declare const MAX_TRANSACTION_GROUP_SIZE = 16;
11
- export declare const MAX_APP_CALL_FOREIGN_REFERENCES = 8;
12
- export declare const MAX_APP_CALL_ACCOUNT_REFERENCES = 4;
13
- /** Encodes a transaction note into a byte array ready to be included in an Algorand transaction.
14
- *
15
- * @param note The transaction note
16
- * @returns the transaction note ready for inclusion in a transaction
17
- *
18
- * Case on the value of `data` this either be:
19
- * * `null` | `undefined`: `undefined`
20
- * * `string`: The string value
21
- * * Uint8Array: passthrough
22
- * * Arc2TransactionNote object: ARC-0002 compatible transaction note
23
- * * Else: The object/value converted into a JSON string representation
24
- */
25
- export declare function encodeTransactionNote(note?: TransactionNote): Uint8Array | undefined;
26
- /** Encodes a transaction lease into a 32-byte array ready to be included in an Algorand transaction.
27
- *
28
- * @param lease The transaction lease as a string or binary array or null/undefined if there is no lease
29
- * @returns the transaction lease ready for inclusion in a transaction or `undefined` if there is no lease
30
- * @throws if the length of the data is > 32 bytes or empty
31
- * @example algokit.encodeLease('UNIQUE_ID')
32
- * @example algokit.encodeLease(new Uint8Array([1, 2, 3]))
33
- */
34
- export declare function encodeLease(lease?: string | Uint8Array): Uint8Array | undefined;
35
- /**
36
- * Returns the public address of the given transaction sender.
37
- * @param sender A transaction sender
38
- * @returns The public address
39
- */
40
- export declare const getSenderAddress: (sender: string | SendTransactionFrom) => string;
41
- /**
42
- * Given a transaction in a variety of supported formats, returns a TransactionWithSigner object ready to be passed to an
43
- * AtomicTransactionComposer's addTransaction method.
44
- * @param transaction One of: A TransactionWithSigner object (returned as is), a TransactionToSign object (signer is obtained from the
45
- * signer property), a Transaction object (signer is extracted from the defaultSender parameter), an async SendTransactionResult returned by
46
- * one of algokit utils' helpers (signer is obtained from the defaultSender parameter)
47
- * @param defaultSender The default sender to be used to obtain a signer where the object provided to the transaction parameter does not
48
- * include a signer.
49
- * @returns A TransactionWithSigner object.
50
- */
51
- export declare const getTransactionWithSigner: (transaction: TransactionWithSigner | TransactionToSign | Transaction | Promise<SendTransactionResult>, defaultSender?: SendTransactionFrom) => Promise<TransactionWithSigner>;
52
- /**
53
- * Returns a `TransactionSigner` for the given transaction sender.
54
- * This function has memoization, so will return the same transaction signer for a given sender.
55
- * @param sender A transaction sender
56
- * @returns A transaction signer
57
- */
58
- export declare const getSenderTransactionSigner: (val: SendTransactionFrom) => algosdk.TransactionSigner;
59
- /**
60
- * Signs a single transaction by the given signer.
61
- * @param transaction The transaction to sign
62
- * @param signer The signer to sign
63
- * @returns The signed transaction as a `Uint8Array`
64
- */
65
- export declare const signTransaction: (transaction: Transaction, signer: SendTransactionFrom) => Promise<Uint8Array>;
66
- /** Prepares a transaction for sending and then (if instructed) signs and sends the given transaction to the chain.
67
- *
68
- * @param send The details for the transaction to prepare/send, including:
69
- * * `transaction`: The unsigned transaction
70
- * * `from`: The account to sign the transaction with: either an account with private key loaded or a logic signature account
71
- * * `config`: The sending configuration for this transaction
72
- * @param algod An algod client
73
- *
74
- * @returns An object with transaction (`transaction`) and (if `skipWaiting` is `false` or `undefined`) confirmation (`confirmation`)
75
- */
76
- export declare const sendTransaction: (send: {
77
- transaction: Transaction;
78
- from: SendTransactionFrom;
79
- sendParams?: SendTransactionParams;
80
- }, algod: Algodv2) => Promise<SendTransactionResult>;
81
- /**
82
- * Take an existing Atomic Transaction Composer and return a new one with the required
83
- * app call resources packed into it
84
- *
85
- * @param algod The algod client to use for the simulation
86
- * @param atc The ATC containing the txn group
87
- * @returns A new ATC with the resources packed into the transactions
88
- *
89
- * @privateRemarks
90
- *
91
- * This entire function will eventually be implemented in simulate upstream in algod. The simulate endpoint will return
92
- * an array of refference arrays for each transaction, so this eventually will eventually just call simulate and set the
93
- * reference arrays in the transactions to the reference arrays returned by simulate.
94
- *
95
- * See https://github.com/algorand/go-algorand/pull/5684
96
- *
97
- */
98
- export declare function populateAppCallResources(atc: algosdk.AtomicTransactionComposer, algod: algosdk.Algodv2): Promise<algosdk.AtomicTransactionComposer>;
99
- /**
100
- * Signs and sends transactions that have been collected by an `AtomicTransactionComposer`.
101
- * @param atcSend The parameters controlling the send, including:
102
- * * `atc` The `AtomicTransactionComposer`
103
- * * `sendParams` The parameters to control the send behaviour
104
- * @param algod An algod client
105
- * @returns An object with transaction IDs, transactions, group transaction ID (`groupTransactionId`) if more than 1 transaction sent, and (if `skipWaiting` is `false` or unset) confirmation (`confirmation`)
106
- */
107
- export declare const sendAtomicTransactionComposer: (atcSend: AtomicTransactionComposerToSend, algod: Algodv2) => Promise<SendAtomicTransactionComposerResults>;
108
- /**
109
- * Performs a dry run of the transactions loaded into the given AtomicTransactionComposer`
110
- * @param atc The AtomicTransactionComposer` with transaction(s) loaded
111
- * @param algod An Algod client
112
- * @returns The dryrun result
113
- */
114
- export declare function performAtomicTransactionComposerDryrun(atc: AtomicTransactionComposer, algod: Algodv2): Promise<algosdk.DryrunResult>;
115
- /**
116
- * Performs a simulation of the transactions loaded into the given AtomicTransactionComposer.
117
- * @param atc The AtomicTransactionComposer with transaction(s) loaded.
118
- * @param algod An Algod client to perform the simulation.
119
- * @returns The simulation result, which includes various details about how the transactions would be processed.
120
- */
121
- export declare function performAtomicTransactionComposerSimulate(atc: AtomicTransactionComposer, algod: Algodv2): Promise<algosdk.modelsv2.SimulateResponse>;
122
- /**
123
- * Signs and sends a group of [up to 16](https://developer.algorand.org/docs/get-details/atomic_transfers/#create-transactions) transactions to the chain
124
- *
125
- * @param groupSend The group details to send, with:
126
- * * `transactions`: The array of transactions to send along with their signing account
127
- * * `sendParams`: The parameters to dictate how the group is sent
128
- * @param algod An algod client
129
- * @returns An object with transaction IDs, transactions, group transaction ID (`groupTransactionId`) if more than 1 transaction sent, and (if `skipWaiting` is `false` or unset) confirmation (`confirmation`)
130
- */
131
- export declare const sendGroupOfTransactions: (groupSend: TransactionGroupToSend, algod: Algodv2) => Promise<Omit<SendAtomicTransactionComposerResults, "returns">>;
132
- /**
133
- * Wait until the transaction is confirmed or rejected, or until `timeout`
134
- * number of rounds have passed.
135
- *
136
- * @param algod An algod client
137
- * @param transactionId The transaction ID to wait for
138
- * @param maxRoundsToWait Maximum number of rounds to wait
139
- *
140
- * @return Pending transaction information
141
- * @throws Throws an error if the transaction is not confirmed or rejected in the next `timeout` rounds
142
- */
143
- export declare const waitForConfirmation: (transactionId: string, maxRoundsToWait: number | bigint, algod: Algodv2) => Promise<modelsv2.PendingTransactionResponse>;
144
- /**
145
- * Limit the acceptable fee to a defined amount of µALGOs.
146
- * This also sets the transaction to be flatFee to ensure the transaction only succeeds at
147
- * the estimated rate.
148
- * @param transaction The transaction to cap or suggested params object about to be used to create a transaction
149
- * @param maxAcceptableFee The maximum acceptable fee to pay
150
- */
151
- export declare function capTransactionFee(transaction: algosdk.Transaction | SuggestedParams, maxAcceptableFee: AlgoAmount): void;
152
- /**
153
- * Allows for control of fees on a `Transaction` or `SuggestedParams` object
154
- * @param transaction The transaction or suggested params
155
- * @param feeControl The fee control parameters
156
- */
157
- export declare function controlFees<T extends SuggestedParams | Transaction>(transaction: T, feeControl: {
9
+ import modelsv2 = algosdk.modelsv2;
10
+ export type TransactionNote = Uint8Array | TransactionNoteData | Arc2TransactionNote;
11
+ export type TransactionNoteData = string | null | undefined | number | any[] | Record<string, any>;
12
+ /** ARC-0002 compatible transaction note components https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0002.md */
13
+ export type Arc2TransactionNote = {
14
+ dAppName: string;
15
+ format: 'm' | 'b' | 'u';
16
+ data: string;
17
+ } | {
18
+ dAppName: string;
19
+ format: 'j';
20
+ data: TransactionNoteData;
21
+ };
22
+ /** The sending configuration for a transaction */
23
+ export interface SendTransactionParams {
24
+ /** Whether to skip signing and sending the transaction to the chain (default: transaction signed and sent to chain, unless `atc` specified)
25
+ * and instead just return the raw transaction, e.g. so you can add it to a group of transactions */
26
+ skipSending?: boolean;
27
+ /** Whether to skip waiting for the submitted transaction (only relevant if `skipSending` is `false` or unset) */
28
+ skipWaiting?: boolean;
29
+ /** An optional `AtomicTransactionComposer` to add the transaction to, if specified then `skipSending: undefined` has the same effect as `skipSending: true` */
30
+ atc?: AtomicTransactionComposer;
31
+ /** Whether to suppress log messages from transaction send, default: do not suppress */
32
+ suppressLog?: boolean;
33
+ /** The flat fee you want to pay, useful for covering extra fees in a transaction group or app call */
158
34
  fee?: AlgoAmount;
35
+ /** The maximum fee that you are happy to pay (default: unbounded) - if this is set it's possible the transaction could get rejected during network congestion */
159
36
  maxFee?: AlgoAmount;
160
- }): T;
161
- /**
162
- * Returns suggested transaction parameters from algod unless some are already provided.
163
- * @param params Optionally provide parameters to use
164
- * @param algod Algod algod
165
- * @returns The suggested transaction parameters
166
- */
167
- export declare function getTransactionParams(params: SuggestedParams | undefined, algod: Algodv2): Promise<import("algosdk/dist/types/types/transactions/base").SuggestedParamsWithMinFee | {
168
- flatFee?: boolean | undefined;
169
- fee: number;
170
- firstRound: number;
171
- lastRound: number;
172
- genesisID: string;
173
- genesisHash: string;
174
- }>;
175
- /**
176
- * Returns the array of transactions currently present in the given `AtomicTransactionComposer`
177
- * @param atc The atomic transaction composer
178
- * @returns The array of transactions with signers
179
- */
180
- export declare function getAtomicTransactionComposerTransactions(atc: AtomicTransactionComposer): algosdk.TransactionWithSigner[];
37
+ /** The maximum number of rounds to wait for confirmation, only applies if `skipWaiting` is `undefined` or `false`, default: wait up to 5 rounds */
38
+ maxRoundsToWaitForConfirmation?: number;
39
+ /** **WARNING**: Not recommended for production use due to https://github.com/algorand/go-algorand/issues/5914. Whether to use simulate to automatically populate app call resources in the txn objects. Defaults to true when there are app calls in the group. */
40
+ populateAppCallResources?: boolean;
41
+ }
42
+ /** The result of sending a transaction */
43
+ export interface SendTransactionResult {
44
+ /** The transaction */
45
+ transaction: Transaction;
46
+ /** The response if the transaction was sent and waited for */
47
+ confirmation?: modelsv2.PendingTransactionResponse;
48
+ }
49
+ /** The result of preparing and/or sending multiple transactions */
50
+ export interface SendTransactionResults {
51
+ /** The transactions that have been prepared and/or sent */
52
+ transactions: Transaction[];
53
+ /** The responses if the transactions were sent and waited for,
54
+ * the index of the confirmation will match the index of the underlying transaction
55
+ */
56
+ confirmations?: modelsv2.PendingTransactionResponse[];
57
+ }
58
+ /** The result of preparing and/or sending multiple transactions using an `AtomicTransactionComposer` */
59
+ export interface SendAtomicTransactionComposerResults extends SendTransactionResults {
60
+ /** base64 encoded representation of the group ID of the atomic group */
61
+ groupId: string;
62
+ /** The transaction IDs that have been prepared and/or sent */
63
+ txIds: string[];
64
+ /** If ABI method(s) were called the processed return values */
65
+ returns?: ABIReturn[];
66
+ }
67
+ /** The result of sending and confirming a transaction */
68
+ export interface ConfirmedTransactionResult extends SendTransactionResult {
69
+ /** The response from sending and waiting for the transaction */
70
+ confirmation: modelsv2.PendingTransactionResponse;
71
+ }
72
+ /** The result of sending and confirming one or more transactions, but where there is a primary transaction of interest */
73
+ export interface ConfirmedTransactionResults extends SendTransactionResult, SendTransactionResults {
74
+ /** The response from sending and waiting for the primary transaction */
75
+ confirmation: modelsv2.PendingTransactionResponse;
76
+ /** The response from sending and waiting for the transactions */
77
+ confirmations: modelsv2.PendingTransactionResponse[];
78
+ }
79
+ /** Core account abstraction when signing/sending transactions
80
+ *
81
+ * This type is used across the entire AlgoKit Utils library and allows you to pass through
82
+ * many types of accounts, including:
83
+ * * `Account` - The in-built `algosdk.Account` type for mnemonic accounts
84
+ * * `SigningAccount` - An AlgoKit Utils class that wraps Account to provide support for rekeyed accounts
85
+ * * `LogicSigAccount` - The in-built `algosdk.LogicSigAccount` type for logic signatures
86
+ * * `MultisigAccount` - An AlgoKit Utils class that wraps a multisig account and provides mechanisms to get a multisig account
87
+ * * `TransactionSignerAccount` - An AlgoKitUtils class that wraps the in-built `algosdk.TransactionSigner` along with the sender address
88
+ */
89
+ export type SendTransactionFrom = Account | SigningAccount | LogicSigAccount | MultisigAccount | TransactionSignerAccount;
90
+ /** Defines an unsigned transaction that will appear in a group of transactions along with its signing information */
91
+ export interface TransactionToSign {
92
+ /** The unsigned transaction to sign and send */
93
+ transaction: Transaction;
94
+ /** The account to use to sign the transaction, either an account (with private key loaded) or a logic signature account */
95
+ signer: SendTransactionFrom;
96
+ }
97
+ /** A group of transactions to send together as an atomic group
98
+ * https://developer.algorand.org/docs/get-details/atomic_transfers/
99
+ */
100
+ export interface TransactionGroupToSend {
101
+ /** Any parameters to control the semantics of the send to the network */
102
+ sendParams?: Omit<SendTransactionParams, 'fee' | 'maxFee' | 'skipSending' | 'atc'>;
103
+ /** The list of transactions to send, which can either be a raw transaction (in which case `signer` is required),
104
+ * the async result of an AlgoKit utils method that returns a `SendTransactionResult` (saves unwrapping the promise, be sure to pass `skipSending: true`, `signer` is also required)
105
+ * or the transaction with its signer (`signer` is ignored)
106
+ **/
107
+ transactions: (TransactionToSign | Transaction | Promise<SendTransactionResult>)[];
108
+ /** Optional signer to pass in, required if at least one transaction provided is just the transaction, ignored otherwise */
109
+ signer?: SendTransactionFrom;
110
+ }
111
+ /** An `AtomicTransactionComposer` with transactions to send. */
112
+ export interface AtomicTransactionComposerToSend {
113
+ /** The `AtomicTransactionComposer` with transactions loaded to send */
114
+ atc: AtomicTransactionComposer;
115
+ /** Any parameters to control the semantics of the send to the network */
116
+ sendParams?: Omit<SendTransactionParams, 'fee' | 'maxFee' | 'skipSending' | 'atc'>;
117
+ }
181
118
  //# sourceMappingURL=transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,EACpC,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAA;AAEpE,OAAO,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;AAClC,OAAO,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;AAChD,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAExC,OAAO,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAA;AAE5D,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAC5C,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAChD,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD;;;;;;;;;;;GAWG;AACH,wBAAgB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yB,CAAA;IAC9B,yEAAyE;IACzE,UAAU,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,KAAK,CAAC,CAAA;CACnF"}
@@ -1,58 +1,76 @@
1
1
  import algosdk from 'algosdk';
2
- import { SendTransactionResult } from './types/transaction';
3
- import { AlgoRekeyParams, AlgoTransferParams, EnsureFundedParams, EnsureFundedReturnType, TransferAssetParams } from './types/transfer';
4
- import Algodv2 = algosdk.Algodv2;
5
- import Kmd = algosdk.Kmd;
6
- /**
7
- * Transfer ALGOs between two accounts.
8
- * @param transfer The transfer definition
9
- * @param algod An algod client
10
- * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
11
- *
12
- * @example Usage example
13
- * ```typescript
14
- * await algokit.transferAlgos({ from, to, amount: algokit.algos(1) }, algod)
15
- * ```
16
- */
17
- export declare function transferAlgos(transfer: AlgoTransferParams, algod: Algodv2): Promise<SendTransactionResult>;
18
- /**
19
- * Funds a given account using a funding source such that it has a certain amount of algos free to spend (accounting for ALGOs locked in minimum balance requirement).
20
- *
21
- * https://developer.algorand.org/docs/get-details/accounts/#minimum-balance
22
- *
23
- * @param funding The funding configuration of type `EnsureFundedParams`, including the account to fund, minimum spending balance, and optional parameters. If you set `useDispenserApi` to true, you must also set `ALGOKIT_DISPENSER_ACCESS_TOKEN` in your environment variables.
24
- * @param algod An instance of the Algodv2 client.
25
- * @param kmd An optional instance of the Kmd client.
26
- * @returns
27
- * - `EnsureFundedReturnType` if funds were transferred.
28
- * - `undefined` if no funds were needed.
29
- */
30
- export declare function ensureFunded<T extends EnsureFundedParams>(funding: T, algod: Algodv2, kmd?: Kmd): Promise<EnsureFundedReturnType | undefined>;
31
- /**
32
- * Transfer asset between two accounts.
33
- * @param transfer The transfer definition
34
- * @param algod An algod client
35
- * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
36
- *
37
- * @example Usage example
38
- * ```typescript
39
- * await algokit.transferAsset({ from, to, assetId, amount }, algod)
40
- * ```
41
- */
42
- export declare function transferAsset(transfer: TransferAssetParams, algod: Algodv2): Promise<SendTransactionResult>;
43
- /**
44
- * Rekey an account to a new address.
45
- *
46
- * **Note:** Please be careful with this function and be sure to read the [official rekey guidance](https://developer.algorand.org/docs/get-details/accounts/rekey/).
47
- *
48
- * @param rekey The rekey definition
49
- * @param algod An algod client
50
- * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
51
- *
52
- * @example Usage example
53
- * ```typescript
54
- * await algokit.rekeyAccount({ from, rekeyTo }, algod)
55
- * ```
56
- */
57
- export declare function rekeyAccount(rekey: AlgoRekeyParams, algod: Algodv2): Promise<SendTransactionResult>;
2
+ import { AlgoAmount } from './amount';
3
+ import { TestNetDispenserApiClient } from './dispenser-client';
4
+ import { SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
5
+ import SuggestedParams = algosdk.SuggestedParams;
6
+ /** Parameters for `transferAlgos` call. */
7
+ export interface AlgoTransferParams extends SendTransactionParams {
8
+ /** The account that will send the ALGOs */
9
+ from: SendTransactionFrom;
10
+ /** The account / account address that will receive the ALGOs */
11
+ to: SendTransactionFrom | string;
12
+ /** The amount to send */
13
+ amount: AlgoAmount;
14
+ /** Optional transaction parameters */
15
+ transactionParams?: SuggestedParams;
16
+ /** The (optional) transaction note */
17
+ note?: TransactionNote;
18
+ /** An (optional) [transaction lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) to apply */
19
+ lease?: string | Uint8Array;
20
+ }
21
+ /** Parameters for `rekeyAccount` call. */
22
+ export interface AlgoRekeyParams extends SendTransactionParams {
23
+ /** The account that will be rekeyed */
24
+ from: SendTransactionFrom;
25
+ /** The account / account address that will have the private key that is authorised to transact on behalf of the from account from now on */
26
+ rekeyTo: SendTransactionFrom | string;
27
+ /** Optional transaction parameters */
28
+ transactionParams?: SuggestedParams;
29
+ /** The (optional) transaction note */
30
+ note?: TransactionNote;
31
+ /** An (optional) [transaction lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) to apply */
32
+ lease?: string | Uint8Array;
33
+ }
34
+ /** Parameters for `ensureFunded` call. */
35
+ export interface EnsureFundedParams extends SendTransactionParams {
36
+ /** The account to fund */
37
+ accountToFund: SendTransactionFrom | string;
38
+ /** The account to use as a funding source, will default to using the dispenser account returned by `algokit.getDispenserAccount` */
39
+ fundingSource?: SendTransactionFrom | TestNetDispenserApiClient;
40
+ /** The minimum balance of ALGOs that the account should have available to spend (i.e. on top of minimum balance requirement) */
41
+ minSpendingBalance: AlgoAmount;
42
+ /** When issuing a funding amount, the minimum amount to transfer (avoids many small transfers if this gets called often on an active account) */
43
+ minFundingIncrement?: AlgoAmount;
44
+ /** Optional transaction parameters */
45
+ transactionParams?: SuggestedParams;
46
+ /** The (optional) transaction note, default: "Funding account to meet minimum requirement" */
47
+ note?: TransactionNote;
48
+ /** An (optional) [transaction lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) to apply */
49
+ lease?: string | Uint8Array;
50
+ }
51
+ /** Parameters for `transferAsset` call. */
52
+ export interface TransferAssetParams extends SendTransactionParams {
53
+ /** The account that will send the asset */
54
+ from: SendTransactionFrom;
55
+ /** The account / account address that will receive the asset */
56
+ to: SendTransactionFrom | string;
57
+ /** The asset id that will be transfered */
58
+ assetId: number;
59
+ /** The amount to send as the smallest divisible unit value */
60
+ amount: number | bigint;
61
+ /** Optional transaction parameters */
62
+ transactionParams?: SuggestedParams;
63
+ /** An address of a target account from which to perform a clawback operation. Please note, in such cases senderAccount must be equal to clawback field on ASA metadata. */
64
+ clawbackFrom?: SendTransactionFrom | string;
65
+ /** The (optional) transaction note */
66
+ note?: TransactionNote;
67
+ /** An (optional) [transaction lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) to apply */
68
+ lease?: string | Uint8Array;
69
+ }
70
+ export interface EnsureFundedReturnType {
71
+ /** The transaction */
72
+ transactionId: string;
73
+ /** The response if the transaction was sent and waited for */
74
+ amount: number;
75
+ }
58
76
  //# sourceMappingURL=transfer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAM7B,OAAO,EAAE,qBAAqB,EAAmB,MAAM,qBAAqB,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEvI,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AA+DxB;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyBhH;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,kBAAkB,EAC7D,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,GAAG,GACR,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAkC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA0BjH;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuBzG"}
1
+ {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/types/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,C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+ 'use strict';
2
+
3
+ var buffer = require('buffer');
4
+
5
5
  class URLTokenBaseHTTPError extends Error {
6
- response;
7
6
  constructor(message, response) {
8
7
  super(message);
9
8
  this.response = response;
@@ -17,9 +16,6 @@ class URLTokenBaseHTTPError extends Error {
17
16
  * This is the default implementation of BaseHTTPClient.
18
17
  */
19
18
  class URLTokenBaseHTTPClient {
20
- defaultHeaders;
21
- baseURL;
22
- tokenHeader;
23
19
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
20
  constructor(tokenHeader, baseServer, port,
25
21
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -82,7 +78,7 @@ class URLTokenBaseHTTPClient {
82
78
  try {
83
79
  body = new Uint8Array(await res.arrayBuffer());
84
80
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
- const decoded = JSON.parse(buffer_1.Buffer.from(body).toString());
81
+ const decoded = JSON.parse(buffer.Buffer.from(body).toString());
86
82
  if (decoded.message) {
87
83
  bodyErrorMessage = decoded.message;
88
84
  }
@@ -152,5 +148,6 @@ class URLTokenBaseHTTPClient {
152
148
  return URLTokenBaseHTTPClient.formatFetchResponse(res);
153
149
  }
154
150
  }
151
+
155
152
  exports.URLTokenBaseHTTPClient = URLTokenBaseHTTPClient;
156
- //# sourceMappingURL=urlTokenBaseHTTPClient.js.map
153
+ //# sourceMappingURL=urlTokenBaseHTTPClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urlTokenBaseHTTPClient.js","sources":["../../src/types/urlTokenBaseHTTPClient.ts"],"sourcesContent":[null],"names":["Buffer"],"mappings":";;;;AAuBA,MAAM,qBAAsB,SAAQ,KAAK,CAAA;IACvC,WACE,CAAA,OAAe,EACR,QAAgC,EAAA;QAEvC,KAAK,CAAC,OAAO,CAAC,CAAA;QAFP,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAwB;AAGvC,QAAA,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAA;AACnC,QAAA,IAAI,CAAC,QAAQ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,CAAC,cAAc;AACtB,YAAA,GAAG,cAAc;SAClB,CAAA;AAED,QAAA,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;AACxD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,IAAI,EAAE,IAAI;YACV,OAAO;AACR,SAAA,CAAC,CAAA;AAEF,QAAA,OAAO,sBAAsB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;KACvD;IAED,MAAM,MAAM,CACV,YAAoB,EACpB,IAAgB,EAChB,KAAqB,EACrB,cAAA,GAAyC,EAAE,EAAA;;AAG3C,QAAA,MAAM,OAAO,GAAG;YACd,GAAG,IAAI,CAAC,WAAW;YACnB,GAAG,IAAI,CAAC,cAAc;AACtB,YAAA,GAAG,cAAc;SAClB,CAAA;AAED,QAAA,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;AACxD,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,IAAI,EAAE,IAAI;YACV,OAAO;AACR,SAAA,CAAC,CAAA;AAEF,QAAA,OAAO,sBAAsB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;KACvD;AACF;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from 'buffer';
2
+
2
3
  class URLTokenBaseHTTPError extends Error {
3
- response;
4
4
  constructor(message, response) {
5
5
  super(message);
6
6
  this.response = response;
@@ -13,10 +13,7 @@ class URLTokenBaseHTTPError extends Error {
13
13
  * and make the REST queries using fetch.
14
14
  * This is the default implementation of BaseHTTPClient.
15
15
  */
16
- export class URLTokenBaseHTTPClient {
17
- defaultHeaders;
18
- baseURL;
19
- tokenHeader;
16
+ class URLTokenBaseHTTPClient {
20
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
18
  constructor(tokenHeader, baseServer, port,
22
19
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -149,4 +146,6 @@ export class URLTokenBaseHTTPClient {
149
146
  return URLTokenBaseHTTPClient.formatFetchResponse(res);
150
147
  }
151
148
  }
152
- //# sourceMappingURL=urlTokenBaseHTTPClient.js.map
149
+
150
+ export { URLTokenBaseHTTPClient };
151
+ //# sourceMappingURL=urlTokenBaseHTTPClient.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urlTokenBaseHTTPClient.mjs","sources":["../../src/types/urlTokenBaseHTTPClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAuBA,MAAM,qBAAsB,SAAQ,KAAK,CAAA;IACvC,WACE,CAAA,OAAe,EACR,QAAgC,EAAA;QAEvC,KAAK,CAAC,OAAO,CAAC,CAAA;QAFP,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAwB;AAGvC,QAAA,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAA;AACnC,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;KACzB;AACF,CAAA;AAID;;;;AAIG;MACU,sBAAsB,CAAA;;AAKjC,IAAA,WAAA,CACE,WAAwB,EACxB,UAAkB,EAClB,IAAsB;;AAEd,IAAA,cAAA,GAAsC,EAAE,EAAA;QAAxC,IAAc,CAAA,cAAA,GAAd,cAAc,CAA0B;;;;AAKhD,QAAA,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,UAAU,GAAG,CAAG,EAAA,UAAU,GAAG,CAAA;AAChF,QAAA,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;AAC9C,QAAA,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC/B,YAAA,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;SACrC;QAED,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACv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MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;AACxD,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,IAAI,EAAE,IAAI;YACV,OAAO;AACR,SAAA,CAAC,CAAA;AAEF,QAAA,OAAO,sBAAsB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;KACvD;AACF;;;;"}
package/util.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,UAAW,MAAM,GAAG,MAAM,WAa9C,CAAA;AAED,qBAAa,qBAAsB,SAAQ,KAAK;CAAG;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,uBACV,MAAM,0BACF,MAAM,uBACT,MAAM,KAC1B,MAAM,GAAG,IAOX,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,eAElB,CAAA"}
@@ -1,6 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNode = exports.calculateFundAmount = exports.UnsafeConversionError = exports.toNumber = void 0;
1
+ 'use strict';
2
+
4
3
  /**
5
4
  * Converts a value which might be a number or a bigint into a number to be used with apis that don't support bigint.
6
5
  *
@@ -18,10 +17,8 @@ const toNumber = (value) => {
18
17
  }
19
18
  return Number(value);
20
19
  };
21
- exports.toNumber = toNumber;
22
20
  class UnsafeConversionError extends Error {
23
21
  }
24
- exports.UnsafeConversionError = UnsafeConversionError;
25
22
  /**
26
23
  * Calculates the amount of funds to add to a wallet to bring it up to the minimum spending balance.
27
24
  * @param minSpendingBalance The minimum spending balance for the wallet
@@ -38,7 +35,6 @@ const calculateFundAmount = (minSpendingBalance, currentSpendingBalance, minFund
38
35
  return null;
39
36
  }
40
37
  };
41
- exports.calculateFundAmount = calculateFundAmount;
42
38
  /**
43
39
  * Checks if the current environment is Node.js
44
40
  *
@@ -47,5 +43,9 @@ exports.calculateFundAmount = calculateFundAmount;
47
43
  const isNode = () => {
48
44
  return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
49
45
  };
46
+
47
+ exports.UnsafeConversionError = UnsafeConversionError;
48
+ exports.calculateFundAmount = calculateFundAmount;
50
49
  exports.isNode = isNode;
51
- //# sourceMappingURL=util.js.map
50
+ exports.toNumber = toNumber;
51
+ //# sourceMappingURL=util.js.map
package/util.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sources":["../src/util.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;AAKG;AACU,MAAA,QAAQ,GAAG,CAAC,KAAsB,KAAI;IACjD,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK,CAAA;IAE3C,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE;AAC3C,QAAA,MAAM,IAAI,qBAAqB,CAC7B,kBAAkB,KAAK,CAAA,oFAAA,CAAsF,CAC9G,CAAA;KACF;SAAM,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE;AAClD,QAAA,MAAM,IAAI,qBAAqB,CAC7B,kBAAkB,KAAK,CAAA,qFAAA,CAAuF,CAC/G,CAAA;KACF;AACD,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,EAAC;AAEK,MAAO,qBAAsB,SAAQ,KAAK,CAAA;AAAG,CAAA;AAEnD;;;;;;AAMG;AACU,MAAA,mBAAmB,GAAG,CACjC,kBAA0B,EAC1B,sBAA8B,EAC9B,mBAA2B,KACV;AACjB,IAAA,IAAI,kBAAkB,GAAG,sBAAsB,EAAE;AAC/C,QAAA,MAAM,aAAa,GAAG,kBAAkB,GAAG,sBAAsB,CAAA;QACjE,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAA;KACpD;SAAM;AACL,QAAA,OAAO,IAAI,CAAA;KACZ;AACH,EAAC;AAED;;;;AAIG;AACI,MAAM,MAAM,GAAG,MAAK;AACzB,IAAA,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAA;AACpG;;;;;;;"}