@algorandfoundation/algokit-utils 10.0.0-alpha.31 → 10.0.0-alpha.32

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 (318) hide show
  1. package/account-manager.d.ts +448 -0
  2. package/account-manager.js +623 -0
  3. package/account-manager.js.map +1 -0
  4. package/account-manager.mjs +620 -0
  5. package/account-manager.mjs.map +1 -0
  6. package/account.d.ts +156 -0
  7. package/account.js +10 -0
  8. package/account.js.map +1 -0
  9. package/account.mjs +9 -0
  10. package/account.mjs.map +1 -0
  11. package/algorand-client-transaction-creator.d.ts +1103 -0
  12. package/algorand-client-transaction-creator.js +735 -0
  13. package/algorand-client-transaction-creator.js.map +1 -0
  14. package/algorand-client-transaction-creator.mjs +734 -0
  15. package/algorand-client-transaction-creator.mjs.map +1 -0
  16. package/algorand-client-transaction-sender.d.ts +1317 -0
  17. package/algorand-client-transaction-sender.js +933 -0
  18. package/algorand-client-transaction-sender.js.map +1 -0
  19. package/algorand-client-transaction-sender.mjs +932 -0
  20. package/algorand-client-transaction-sender.mjs.map +1 -0
  21. package/algorand-client.d.ts +246 -0
  22. package/algorand-client.js +325 -0
  23. package/algorand-client.js.map +1 -0
  24. package/algorand-client.mjs +325 -0
  25. package/algorand-client.mjs.map +1 -0
  26. package/amount.d.ts +46 -3
  27. package/amount.js +92 -13
  28. package/amount.js.map +1 -1
  29. package/amount.mjs +80 -3
  30. package/amount.mjs.map +1 -1
  31. package/app-client.d.ts +2130 -0
  32. package/app-client.js +909 -0
  33. package/app-client.js.map +1 -0
  34. package/app-client.mjs +908 -0
  35. package/app-client.mjs.map +1 -0
  36. package/app-deployer.d.ts +166 -0
  37. package/app-deployer.js +353 -0
  38. package/app-deployer.js.map +1 -0
  39. package/app-deployer.mjs +353 -0
  40. package/app-deployer.mjs.map +1 -0
  41. package/app-factory.d.ts +965 -0
  42. package/app-factory.js +448 -0
  43. package/app-factory.js.map +1 -0
  44. package/app-factory.mjs +448 -0
  45. package/app-factory.mjs.map +1 -0
  46. package/app-manager.d.ts +323 -0
  47. package/app-manager.js +468 -0
  48. package/app-manager.js.map +1 -0
  49. package/app-manager.mjs +468 -0
  50. package/app-manager.mjs.map +1 -0
  51. package/app-spec.d.ts +203 -0
  52. package/app-spec.js +137 -0
  53. package/app-spec.js.map +1 -0
  54. package/app-spec.mjs +137 -0
  55. package/app-spec.mjs.map +1 -0
  56. package/app.d.ts +257 -0
  57. package/app.js +49 -0
  58. package/app.js.map +1 -0
  59. package/app.mjs +42 -0
  60. package/app.mjs.map +1 -0
  61. package/asset-manager.d.ts +212 -0
  62. package/asset-manager.js +166 -0
  63. package/asset-manager.js.map +1 -0
  64. package/asset-manager.mjs +166 -0
  65. package/asset-manager.mjs.map +1 -0
  66. package/async-event-emitter.d.ts +16 -0
  67. package/async-event-emitter.js +38 -0
  68. package/async-event-emitter.js.map +1 -0
  69. package/async-event-emitter.mjs +37 -0
  70. package/async-event-emitter.mjs.map +1 -0
  71. package/client-manager.d.ts +475 -0
  72. package/client-manager.js +616 -0
  73. package/client-manager.js.map +1 -0
  74. package/client-manager.mjs +616 -0
  75. package/client-manager.mjs.map +1 -0
  76. package/composer.d.ts +947 -0
  77. package/composer.js +1584 -0
  78. package/composer.js.map +1 -0
  79. package/composer.mjs +1583 -0
  80. package/composer.mjs.map +1 -0
  81. package/config.d.ts +1 -1
  82. package/config.js +2 -2
  83. package/config.js.map +1 -1
  84. package/config.mjs +1 -1
  85. package/config.mjs.map +1 -1
  86. package/debugging.d.ts +47 -0
  87. package/debugging.js +20 -0
  88. package/debugging.js.map +1 -0
  89. package/debugging.mjs +15 -0
  90. package/debugging.mjs.map +1 -0
  91. package/dispenser-client.d.ts +90 -0
  92. package/dispenser-client.js +127 -0
  93. package/dispenser-client.js.map +1 -0
  94. package/dispenser-client.mjs +127 -0
  95. package/dispenser-client.mjs.map +1 -0
  96. package/expand.d.ts +2 -0
  97. package/expand.js +0 -0
  98. package/expand.mjs +0 -0
  99. package/index.d.ts +6 -5
  100. package/index.js +4 -3
  101. package/index.mjs +5 -5
  102. package/indexer-client/indexer-lookup.d.ts +1 -1
  103. package/indexer-client/indexer-lookup.js.map +1 -1
  104. package/indexer-client/indexer-lookup.mjs.map +1 -1
  105. package/indexer.d.ts +40 -0
  106. package/indexer.js +38 -0
  107. package/indexer.js.map +1 -0
  108. package/indexer.mjs +35 -0
  109. package/indexer.mjs.map +1 -0
  110. package/instance-of.d.ts +8 -0
  111. package/kmd-account-manager.d.ts +74 -0
  112. package/kmd-account-manager.js +167 -0
  113. package/kmd-account-manager.js.map +1 -0
  114. package/kmd-account-manager.mjs +165 -0
  115. package/kmd-account-manager.mjs.map +1 -0
  116. package/lifecycle-events.d.ts +14 -0
  117. package/lifecycle-events.js +11 -0
  118. package/lifecycle-events.js.map +1 -0
  119. package/lifecycle-events.mjs +10 -0
  120. package/lifecycle-events.mjs.map +1 -0
  121. package/logging.d.ts +13 -0
  122. package/logging.js +47 -0
  123. package/logging.js.map +1 -0
  124. package/logging.mjs +42 -0
  125. package/logging.mjs.map +1 -0
  126. package/logic-error.d.ts +39 -0
  127. package/logic-error.js +54 -0
  128. package/logic-error.js.map +1 -0
  129. package/logic-error.mjs +53 -0
  130. package/logic-error.mjs.map +1 -0
  131. package/network-client.d.ts +43 -0
  132. package/network-client.js +14 -0
  133. package/network-client.js.map +1 -0
  134. package/network-client.mjs +13 -0
  135. package/network-client.mjs.map +1 -0
  136. package/package.json +11 -1
  137. package/testing/account.d.ts +2 -2
  138. package/testing/account.js +1 -1
  139. package/testing/account.js.map +1 -1
  140. package/testing/account.mjs +1 -1
  141. package/testing/account.mjs.map +1 -1
  142. package/testing/fixtures/algokit-log-capture-fixture.d.ts +1 -1
  143. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  144. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  145. package/testing/fixtures/algorand-fixture.d.ts +2 -2
  146. package/testing/fixtures/algorand-fixture.js +2 -2
  147. package/testing/fixtures/algorand-fixture.js.map +1 -1
  148. package/testing/fixtures/algorand-fixture.mjs +2 -2
  149. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  150. package/testing/index.d.ts +2 -1
  151. package/testing/test-logger.d.ts +1 -1
  152. package/testing/test-logger.js.map +1 -1
  153. package/testing/test-logger.mjs.map +1 -1
  154. package/testing/types.d.ts +156 -0
  155. package/transaction/index.d.ts +4 -0
  156. package/transaction/index.js +9 -0
  157. package/transaction/index.mjs +4 -0
  158. package/transaction/perform-transaction-composer-simulate.d.ts +1 -1
  159. package/transaction/perform-transaction-composer-simulate.js.map +1 -1
  160. package/transaction/perform-transaction-composer-simulate.mjs.map +1 -1
  161. package/transaction/transaction.d.ts +2 -2
  162. package/transaction/transaction.js.map +1 -1
  163. package/transaction/transaction.mjs.map +1 -1
  164. package/transaction/types.d.ts +133 -0
  165. package/transactions/app-call.d.ts +1 -1
  166. package/transactions/app-call.js +1 -1
  167. package/transactions/app-call.js.map +1 -1
  168. package/transactions/app-call.mjs +1 -1
  169. package/transactions/app-call.mjs.map +1 -1
  170. package/transactions/common.d.ts +1 -1
  171. package/transactions/common.js.map +1 -1
  172. package/transactions/common.mjs.map +1 -1
  173. package/transactions/method-call.d.ts +1 -1
  174. package/transactions/method-call.js +1 -1
  175. package/transactions/method-call.js.map +1 -1
  176. package/transactions/method-call.mjs +1 -1
  177. package/transactions/method-call.mjs.map +1 -1
  178. package/transactions/payment.d.ts +1 -1
  179. package/transactions/payment.js.map +1 -1
  180. package/transactions/payment.mjs.map +1 -1
  181. package/types/account-manager.d.ts +11 -442
  182. package/types/account-manager.js +5 -616
  183. package/types/account-manager.js.map +1 -1
  184. package/types/account-manager.mjs +5 -614
  185. package/types/account-manager.mjs.map +1 -1
  186. package/types/account.d.ts +8 -150
  187. package/types/account.js +3 -4
  188. package/types/account.js.map +1 -1
  189. package/types/account.mjs +4 -4
  190. package/types/account.mjs.map +1 -1
  191. package/types/algorand-client-transaction-creator.d.ts +5 -1098
  192. package/types/algorand-client-transaction-creator.js +3 -729
  193. package/types/algorand-client-transaction-creator.js.map +1 -1
  194. package/types/algorand-client-transaction-creator.mjs +4 -729
  195. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  196. package/types/algorand-client-transaction-sender.d.ts +5 -1312
  197. package/types/algorand-client-transaction-sender.js +3 -927
  198. package/types/algorand-client-transaction-sender.js.map +1 -1
  199. package/types/algorand-client-transaction-sender.mjs +3 -926
  200. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  201. package/types/algorand-client.d.ts +5 -241
  202. package/types/algorand-client.js +3 -319
  203. package/types/algorand-client.js.map +1 -1
  204. package/types/algorand-client.mjs +3 -319
  205. package/types/algorand-client.mjs.map +1 -1
  206. package/types/amount.d.ts +6 -45
  207. package/types/amount.js +3 -79
  208. package/types/amount.js.map +1 -1
  209. package/types/amount.mjs +4 -79
  210. package/types/amount.mjs.map +1 -1
  211. package/types/app-client.d.ts +75 -2125
  212. package/types/app-client.js +3 -903
  213. package/types/app-client.js.map +1 -1
  214. package/types/app-client.mjs +3 -902
  215. package/types/app-client.mjs.map +1 -1
  216. package/types/app-deployer.d.ts +21 -161
  217. package/types/app-deployer.js +3 -347
  218. package/types/app-deployer.js.map +1 -1
  219. package/types/app-deployer.mjs +3 -347
  220. package/types/app-deployer.mjs.map +1 -1
  221. package/types/app-factory.d.ts +21 -960
  222. package/types/app-factory.js +3 -442
  223. package/types/app-factory.js.map +1 -1
  224. package/types/app-factory.mjs +3 -442
  225. package/types/app-factory.mjs.map +1 -1
  226. package/types/app-manager.d.ts +15 -318
  227. package/types/app-manager.js +3 -462
  228. package/types/app-manager.js.map +1 -1
  229. package/types/app-manager.mjs +3 -462
  230. package/types/app-manager.mjs.map +1 -1
  231. package/types/app-spec.d.ts +39 -198
  232. package/types/app-spec.js +3 -131
  233. package/types/app-spec.js.map +1 -1
  234. package/types/app-spec.mjs +3 -131
  235. package/types/app-spec.mjs.map +1 -1
  236. package/types/app.d.ts +62 -247
  237. package/types/app.js +15 -37
  238. package/types/app.js.map +1 -1
  239. package/types/app.mjs +16 -37
  240. package/types/app.mjs.map +1 -1
  241. package/types/asset-manager.d.ts +9 -207
  242. package/types/asset-manager.js +3 -160
  243. package/types/asset-manager.js.map +1 -1
  244. package/types/asset-manager.mjs +3 -160
  245. package/types/asset-manager.mjs.map +1 -1
  246. package/types/async-event-emitter.d.ts +7 -11
  247. package/types/async-event-emitter.js +3 -32
  248. package/types/async-event-emitter.js.map +1 -1
  249. package/types/async-event-emitter.mjs +4 -32
  250. package/types/async-event-emitter.mjs.map +1 -1
  251. package/types/client-manager.d.ts +27 -470
  252. package/types/client-manager.js +3 -610
  253. package/types/client-manager.js.map +1 -1
  254. package/types/client-manager.mjs +3 -610
  255. package/types/client-manager.mjs.map +1 -1
  256. package/types/composer.d.ts +79 -943
  257. package/types/composer.js +3 -1578
  258. package/types/composer.js.map +1 -1
  259. package/types/composer.mjs +3 -1577
  260. package/types/composer.mjs.map +1 -1
  261. package/types/config.d.ts +7 -52
  262. package/types/config.js +3 -74
  263. package/types/config.js.map +1 -1
  264. package/types/config.mjs +3 -74
  265. package/types/config.mjs.map +1 -1
  266. package/types/debugging.d.ts +12 -37
  267. package/types/debugging.js +11 -10
  268. package/types/debugging.js.map +1 -1
  269. package/types/debugging.mjs +12 -10
  270. package/types/debugging.mjs.map +1 -1
  271. package/types/dispenser-client.d.ts +11 -85
  272. package/types/dispenser-client.js +3 -121
  273. package/types/dispenser-client.js.map +1 -1
  274. package/types/dispenser-client.mjs +3 -121
  275. package/types/dispenser-client.mjs.map +1 -1
  276. package/types/expand.d.ts +8 -2
  277. package/types/indexer.d.ts +16 -36
  278. package/types/indexer.js +7 -30
  279. package/types/indexer.js.map +1 -1
  280. package/types/indexer.mjs +8 -30
  281. package/types/indexer.mjs.map +1 -1
  282. package/types/instance-of.d.ts +4 -4
  283. package/types/kmd-account-manager.d.ts +5 -69
  284. package/types/kmd-account-manager.js +3 -161
  285. package/types/kmd-account-manager.js.map +1 -1
  286. package/types/kmd-account-manager.mjs +3 -159
  287. package/types/kmd-account-manager.mjs.map +1 -1
  288. package/types/lifecycle-events.d.ts +7 -9
  289. package/types/lifecycle-events.js +3 -5
  290. package/types/lifecycle-events.js.map +1 -1
  291. package/types/lifecycle-events.mjs +4 -5
  292. package/types/lifecycle-events.mjs.map +1 -1
  293. package/types/logging.d.ts +14 -9
  294. package/types/logging.js +11 -37
  295. package/types/logging.js.map +1 -1
  296. package/types/logging.mjs +12 -37
  297. package/types/logging.mjs.map +1 -1
  298. package/types/logic-error.d.ts +8 -35
  299. package/types/logic-error.js +3 -48
  300. package/types/logic-error.js.map +1 -1
  301. package/types/logic-error.mjs +4 -48
  302. package/types/logic-error.mjs.map +1 -1
  303. package/types/network-client.d.ts +10 -39
  304. package/types/network-client.js +3 -8
  305. package/types/network-client.js.map +1 -1
  306. package/types/network-client.mjs +4 -8
  307. package/types/network-client.mjs.map +1 -1
  308. package/types/testing.d.ts +13 -151
  309. package/types/transaction.d.ts +33 -128
  310. package/updatable-config.d.ts +57 -0
  311. package/updatable-config.js +80 -0
  312. package/updatable-config.js.map +1 -0
  313. package/updatable-config.mjs +80 -0
  314. package/updatable-config.mjs.map +1 -0
  315. package/util.js +1 -1
  316. package/util.js.map +1 -1
  317. package/util.mjs +1 -1
  318. package/util.mjs.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"debugging.js","names":[],"sources":["../../src/types/debugging.ts"],"sourcesContent":["/**\n * An asynchronous event listener\n */\n\nimport { SimulateResponse, SourceMap } from '@algorandfoundation/algokit-algod-client'\nimport { Expand } from '@algorandfoundation/algokit-common'\nimport { CompiledTeal } from './app'\n\n/** The directory name for AlgoKit project related files */\nexport const ALGOKIT_DIR = '.algokit'\n\n/** The directory name for debug source files */\nexport const SOURCES_DIR = 'sources'\n\n/** The file extension for TEAL files */\nexport const TEAL_FILE_EXT = '.teal'\n\n/** The file extension for TEAL source map files */\nexport const TEAL_SOURCEMAP_EXT = '.teal.map'\n\n/** The default maximum search depth for file operations */\nexport const DEFAULT_MAX_SEARCH_DEPTH = 10\n\n/**\n * Represents the data for a single TEAL source\n */\nexport type TealSourceDebugEventData = {\n /** The name of the application */\n appName: string\n /** The name of the file */\n fileName: string\n /** The compiled TEAL code */\n compiledTeal: Expand<Omit<CompiledTeal, 'sourceMap'> & { sourceMap: SourceMap }>\n}\n\n/**\n * Represents the data for multiple TEAL sources debug events emitted whenever an app is compiled as part of a deploy in debug mode\n */\nexport type TealSourcesDebugEventData = {\n /** An array of TEAL source debug event data */\n sources: TealSourceDebugEventData[]\n}\n\n/**\n * Represents the data for AVM traces debug events emitted whenever a transaction is simulated in debug mode\n */\nexport type AVMTracesEventData = {\n /** The simulation response from Algod */\n simulateResponse: SimulateResponse\n}\n"],"mappings":";;;AASA,MAAa,cAAc;;AAG3B,MAAa,cAAc;;AAG3B,MAAa,gBAAgB;;AAG7B,MAAa,qBAAqB;;AAGlC,MAAa,2BAA2B"}
1
+ {"version":3,"file":"debugging.js","names":["_ALGOKIT_DIR","_SOURCES_DIR","_TEAL_FILE_EXT","_TEAL_SOURCEMAP_EXT","_DEFAULT_MAX_SEARCH_DEPTH"],"sources":["../../src/types/debugging.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/debugging'\n\nimport {\n ALGOKIT_DIR as _ALGOKIT_DIR,\n SOURCES_DIR as _SOURCES_DIR,\n TEAL_FILE_EXT as _TEAL_FILE_EXT,\n TEAL_SOURCEMAP_EXT as _TEAL_SOURCEMAP_EXT,\n DEFAULT_MAX_SEARCH_DEPTH as _DEFAULT_MAX_SEARCH_DEPTH,\n type TealSourceDebugEventData as _TealSourceDebugEventData,\n type TealSourcesDebugEventData as _TealSourcesDebugEventData,\n type AVMTracesEventData as _AVMTracesEventData,\n} from '../debugging'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const ALGOKIT_DIR = _ALGOKIT_DIR\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const SOURCES_DIR = _SOURCES_DIR\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const TEAL_FILE_EXT = _TEAL_FILE_EXT\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const TEAL_SOURCEMAP_EXT = _TEAL_SOURCEMAP_EXT\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const DEFAULT_MAX_SEARCH_DEPTH = _DEFAULT_MAX_SEARCH_DEPTH\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type TealSourceDebugEventData = _TealSourceDebugEventData\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type TealSourcesDebugEventData = _TealSourcesDebugEventData\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type AVMTracesEventData = _AVMTracesEventData\n"],"mappings":";;;;AAeA,MAAa,cAAcA;;AAG3B,MAAa,cAAcC;;AAG3B,MAAa,gBAAgBC;;AAG7B,MAAa,qBAAqBC;;AAGlC,MAAa,2BAA2BC"}
@@ -1,14 +1,16 @@
1
+ import { ALGOKIT_DIR as ALGOKIT_DIR$1, DEFAULT_MAX_SEARCH_DEPTH as DEFAULT_MAX_SEARCH_DEPTH$1, SOURCES_DIR as SOURCES_DIR$1, TEAL_FILE_EXT as TEAL_FILE_EXT$1, TEAL_SOURCEMAP_EXT as TEAL_SOURCEMAP_EXT$1 } from "../debugging.mjs";
2
+
1
3
  //#region src/types/debugging.ts
2
- /** The directory name for AlgoKit project related files */
3
- const ALGOKIT_DIR = ".algokit";
4
- /** The directory name for debug source files */
5
- const SOURCES_DIR = "sources";
6
- /** The file extension for TEAL files */
7
- const TEAL_FILE_EXT = ".teal";
8
- /** The file extension for TEAL source map files */
9
- const TEAL_SOURCEMAP_EXT = ".teal.map";
10
- /** The default maximum search depth for file operations */
11
- const DEFAULT_MAX_SEARCH_DEPTH = 10;
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */
5
+ const ALGOKIT_DIR = ALGOKIT_DIR$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */
7
+ const SOURCES_DIR = SOURCES_DIR$1;
8
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */
9
+ const TEAL_FILE_EXT = TEAL_FILE_EXT$1;
10
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */
11
+ const TEAL_SOURCEMAP_EXT = TEAL_SOURCEMAP_EXT$1;
12
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */
13
+ const DEFAULT_MAX_SEARCH_DEPTH = DEFAULT_MAX_SEARCH_DEPTH$1;
12
14
 
13
15
  //#endregion
14
16
  export { ALGOKIT_DIR, DEFAULT_MAX_SEARCH_DEPTH, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT };
@@ -1 +1 @@
1
- {"version":3,"file":"debugging.mjs","names":[],"sources":["../../src/types/debugging.ts"],"sourcesContent":["/**\n * An asynchronous event listener\n */\n\nimport { SimulateResponse, SourceMap } from '@algorandfoundation/algokit-algod-client'\nimport { Expand } from '@algorandfoundation/algokit-common'\nimport { CompiledTeal } from './app'\n\n/** The directory name for AlgoKit project related files */\nexport const ALGOKIT_DIR = '.algokit'\n\n/** The directory name for debug source files */\nexport const SOURCES_DIR = 'sources'\n\n/** The file extension for TEAL files */\nexport const TEAL_FILE_EXT = '.teal'\n\n/** The file extension for TEAL source map files */\nexport const TEAL_SOURCEMAP_EXT = '.teal.map'\n\n/** The default maximum search depth for file operations */\nexport const DEFAULT_MAX_SEARCH_DEPTH = 10\n\n/**\n * Represents the data for a single TEAL source\n */\nexport type TealSourceDebugEventData = {\n /** The name of the application */\n appName: string\n /** The name of the file */\n fileName: string\n /** The compiled TEAL code */\n compiledTeal: Expand<Omit<CompiledTeal, 'sourceMap'> & { sourceMap: SourceMap }>\n}\n\n/**\n * Represents the data for multiple TEAL sources debug events emitted whenever an app is compiled as part of a deploy in debug mode\n */\nexport type TealSourcesDebugEventData = {\n /** An array of TEAL source debug event data */\n sources: TealSourceDebugEventData[]\n}\n\n/**\n * Represents the data for AVM traces debug events emitted whenever a transaction is simulated in debug mode\n */\nexport type AVMTracesEventData = {\n /** The simulation response from Algod */\n simulateResponse: SimulateResponse\n}\n"],"mappings":";;AASA,MAAa,cAAc;;AAG3B,MAAa,cAAc;;AAG3B,MAAa,gBAAgB;;AAG7B,MAAa,qBAAqB;;AAGlC,MAAa,2BAA2B"}
1
+ {"version":3,"file":"debugging.mjs","names":["_ALGOKIT_DIR","_SOURCES_DIR","_TEAL_FILE_EXT","_TEAL_SOURCEMAP_EXT","_DEFAULT_MAX_SEARCH_DEPTH"],"sources":["../../src/types/debugging.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/debugging'\n\nimport {\n ALGOKIT_DIR as _ALGOKIT_DIR,\n SOURCES_DIR as _SOURCES_DIR,\n TEAL_FILE_EXT as _TEAL_FILE_EXT,\n TEAL_SOURCEMAP_EXT as _TEAL_SOURCEMAP_EXT,\n DEFAULT_MAX_SEARCH_DEPTH as _DEFAULT_MAX_SEARCH_DEPTH,\n type TealSourceDebugEventData as _TealSourceDebugEventData,\n type TealSourcesDebugEventData as _TealSourcesDebugEventData,\n type AVMTracesEventData as _AVMTracesEventData,\n} from '../debugging'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const ALGOKIT_DIR = _ALGOKIT_DIR\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const SOURCES_DIR = _SOURCES_DIR\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const TEAL_FILE_EXT = _TEAL_FILE_EXT\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const TEAL_SOURCEMAP_EXT = _TEAL_SOURCEMAP_EXT\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport const DEFAULT_MAX_SEARCH_DEPTH = _DEFAULT_MAX_SEARCH_DEPTH\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type TealSourceDebugEventData = _TealSourceDebugEventData\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type TealSourcesDebugEventData = _TealSourcesDebugEventData\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/debugging` instead */\nexport type AVMTracesEventData = _AVMTracesEventData\n"],"mappings":";;;;AAeA,MAAa,cAAcA;;AAG3B,MAAa,cAAcC;;AAG3B,MAAa,gBAAgBC;;AAG7B,MAAa,qBAAqBC;;AAGlC,MAAa,2BAA2BC"}
@@ -1,90 +1,16 @@
1
- import { Address } from "../packages/common/src/address.js";
1
+ import { DispenserFundResponse as DispenserFundResponse$1, DispenserLimitResponse as DispenserLimitResponse$1, TestNetDispenserApiClient as TestNetDispenserApiClient$1, TestNetDispenserApiClientParams as TestNetDispenserApiClientParams$1 } from "../dispenser-client.js";
2
2
 
3
3
  //#region src/types/dispenser-client.d.ts
4
- /** The TestNet Dispenser API response when funding. */
5
- interface DispenserFundResponse {
6
- /** The ID of the transaction that was issued to fund the account. */
7
- txId: string;
8
- /** The number of µAlgo that was funded. */
9
- amount: number;
10
- }
11
- /** The TestNet Dispenser API response when getting the current limit. */
12
- interface DispenserLimitResponse {
13
- /** The limit, in µAlgo, that you can currently fund. */
14
- amount: number;
15
- }
16
- /** The parameters to construct a TestNet Dispenser API client. */
17
- interface TestNetDispenserApiClientParams {
18
- /** The API auth token */
19
- authToken: string;
20
- /** The request timeout in seconds */
21
- requestTimeout?: number;
22
- }
23
- /**
24
- * `TestNetDispenserApiClient` is a class that provides methods to interact with the [Algorand TestNet Dispenser API](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md).
25
- * It allows you to fund an address with Algo, refund a transaction, and get the funding limit for the Algo asset.
26
- *
27
- * The class requires an authentication token and a request timeout to be initialized. The authentication token can be provided
28
- * either directly as a parameter or through an `ALGOKIT_DISPENSER_ACCESS_TOKEN` environment variable. If neither is provided, an error is thrown.
29
- *
30
- * The request timeout can be provided as a parameter. If not provided, a default value is used.
31
- *
32
- * @property {string} authToken - The authentication token used for API requests.
33
- * @property {number} requestTimeout - The timeout for API requests, in seconds.
34
- *
35
- * @method fund - Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
36
- * @method refund - Sends a refund request to the dispenser API for the specified refundTxnId.
37
- * @method limit - Sends a request to the dispenser API to get the funding limit for the Algo asset.
38
- *
39
- * @example
40
- * ```typescript
41
- * const client = new TestNetDispenserApiClient({ authToken: 'your_auth_token', requestTimeout: 30 });
42
- * const fundResponse = await client.fund('your_address', 100);
43
- * const limitResponse = await client.getLimit();
44
- * await client.refund('your_transaction_id');
45
- * ```
46
- *
47
- * @throws {Error} If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the authToken parameter were provided.
48
- */
49
- declare class TestNetDispenserApiClient {
50
- private _authToken;
51
- private _requestTimeout;
52
- constructor(params?: TestNetDispenserApiClientParams);
53
- get authToken(): string;
54
- get requestTimeout(): number;
55
- /**
56
- * Processes a dispenser API request.
57
- *
58
- * @param authToken - The authentication token.
59
- * @param urlSuffix - The URL suffix for the API request.
60
- * @param body - The request body.
61
- * @param method - The HTTP method.
62
- *
63
- * @returns The API response.
64
- */
65
- private processDispenserRequest;
66
- /**
67
- * Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
68
- *
69
- * @param address - The address to fund.
70
- * @param amount - The amount of µAlgo to fund.
71
- *
72
- * @returns DispenserFundResponse: An object containing the transaction ID and funded amount.
73
- */
74
- fund(address: string | Address, amount: number | bigint): Promise<DispenserFundResponse>;
75
- /**
76
- * Sends a refund request to the dispenser API for the specified refundTxnId.
77
- *
78
- * @param refundTxnId - The transaction ID to refund.
79
- */
80
- refund(refundTxnId: string): Promise<void>;
81
- /**
82
- * Sends a request to the dispenser API to get the funding limit for the Algo asset.
83
- *
84
- * @returns DispenserLimitResponse: An object containing the funding limit amount.
85
- */
86
- getLimit(): Promise<DispenserLimitResponse>;
87
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
5
+ type DispenserFundResponse = DispenserFundResponse$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
7
+ type DispenserLimitResponse = DispenserLimitResponse$1;
8
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
9
+ type TestNetDispenserApiClientParams = TestNetDispenserApiClientParams$1;
10
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
11
+ declare const TestNetDispenserApiClient: typeof TestNetDispenserApiClient$1;
12
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
13
+ type TestNetDispenserApiClient = TestNetDispenserApiClient$1;
88
14
  //#endregion
89
15
  export { DispenserFundResponse, DispenserLimitResponse, TestNetDispenserApiClient, TestNetDispenserApiClientParams };
90
16
  //# sourceMappingURL=dispenser-client.d.ts.map
@@ -1,126 +1,8 @@
1
- const require_util = require('../util.js');
1
+ const require_dispenser_client = require('../dispenser-client.js');
2
2
 
3
3
  //#region src/types/dispenser-client.ts
4
- const DISPENSER_BASE_URL = "https://api.dispenser.algorandfoundation.tools";
5
- const DEFAULT_DISPENSER_REQUEST_TIMEOUT = 15;
6
- const DISPENSER_ACCESS_TOKEN_KEY = "ALGOKIT_DISPENSER_ACCESS_TOKEN";
7
- var DispenserAssetName = /* @__PURE__ */ function(DispenserAssetName$1) {
8
- DispenserAssetName$1[DispenserAssetName$1["Algo"] = 0] = "Algo";
9
- return DispenserAssetName$1;
10
- }(DispenserAssetName || {});
11
- const dispenserAssets = { [DispenserAssetName.Algo]: {
12
- assetId: 0,
13
- decimals: 6,
14
- description: "Algo"
15
- } };
16
- /**
17
- * `TestNetDispenserApiClient` is a class that provides methods to interact with the [Algorand TestNet Dispenser API](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md).
18
- * It allows you to fund an address with Algo, refund a transaction, and get the funding limit for the Algo asset.
19
- *
20
- * The class requires an authentication token and a request timeout to be initialized. The authentication token can be provided
21
- * either directly as a parameter or through an `ALGOKIT_DISPENSER_ACCESS_TOKEN` environment variable. If neither is provided, an error is thrown.
22
- *
23
- * The request timeout can be provided as a parameter. If not provided, a default value is used.
24
- *
25
- * @property {string} authToken - The authentication token used for API requests.
26
- * @property {number} requestTimeout - The timeout for API requests, in seconds.
27
- *
28
- * @method fund - Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
29
- * @method refund - Sends a refund request to the dispenser API for the specified refundTxnId.
30
- * @method limit - Sends a request to the dispenser API to get the funding limit for the Algo asset.
31
- *
32
- * @example
33
- * ```typescript
34
- * const client = new TestNetDispenserApiClient({ authToken: 'your_auth_token', requestTimeout: 30 });
35
- * const fundResponse = await client.fund('your_address', 100);
36
- * const limitResponse = await client.getLimit();
37
- * await client.refund('your_transaction_id');
38
- * ```
39
- *
40
- * @throws {Error} If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the authToken parameter were provided.
41
- */
42
- var TestNetDispenserApiClient = class {
43
- _authToken;
44
- _requestTimeout;
45
- constructor(params) {
46
- const authTokenFromEnv = process?.env?.[DISPENSER_ACCESS_TOKEN_KEY];
47
- if (params?.authToken) this._authToken = params.authToken;
48
- else if (authTokenFromEnv) this._authToken = authTokenFromEnv;
49
- else throw new Error(`Can't init AlgoKit TestNet Dispenser API client because neither environment variable ${DISPENSER_ACCESS_TOKEN_KEY} or the authToken were provided.`);
50
- this._requestTimeout = params?.requestTimeout || DEFAULT_DISPENSER_REQUEST_TIMEOUT;
51
- }
52
- get authToken() {
53
- return this._authToken;
54
- }
55
- get requestTimeout() {
56
- return this._requestTimeout;
57
- }
58
- /**
59
- * Processes a dispenser API request.
60
- *
61
- * @param authToken - The authentication token.
62
- * @param urlSuffix - The URL suffix for the API request.
63
- * @param body - The request body.
64
- * @param method - The HTTP method.
65
- *
66
- * @returns The API response.
67
- */
68
- async processDispenserRequest(authToken, urlSuffix, body = null, method = "POST") {
69
- const requestArgs = {
70
- method,
71
- headers: { Authorization: `Bearer ${authToken}` },
72
- signal: AbortSignal.timeout(this.requestTimeout * 1e3)
73
- };
74
- if (body) requestArgs.body = require_util.asJson(body);
75
- const response = await fetch(`${DISPENSER_BASE_URL}/${urlSuffix}`, requestArgs);
76
- if (!response.ok) {
77
- let error_message = `Error processing dispenser API request: ${response.status}`;
78
- let error_response = null;
79
- try {
80
- error_response = await response.json();
81
- } catch {}
82
- if (error_response && error_response.code) error_message = error_response.code;
83
- else if (response.status === 400) error_message = (await response.json()).message;
84
- throw new Error(error_message);
85
- }
86
- return response;
87
- }
88
- /**
89
- * Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
90
- *
91
- * @param address - The address to fund.
92
- * @param amount - The amount of µAlgo to fund.
93
- *
94
- * @returns DispenserFundResponse: An object containing the transaction ID and funded amount.
95
- */
96
- async fund(address, amount) {
97
- const content = await (await this.processDispenserRequest(this.authToken, `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}`, {
98
- receiver: typeof address === "string" ? address : address.toString(),
99
- amount: Number(amount),
100
- assetID: dispenserAssets[DispenserAssetName.Algo].assetId
101
- }, "POST")).json();
102
- return {
103
- txId: content.txID,
104
- amount: content.amount
105
- };
106
- }
107
- /**
108
- * Sends a refund request to the dispenser API for the specified refundTxnId.
109
- *
110
- * @param refundTxnId - The transaction ID to refund.
111
- */
112
- async refund(refundTxnId) {
113
- await this.processDispenserRequest(this.authToken, "refund", { refundTransactionID: refundTxnId }, "POST");
114
- }
115
- /**
116
- * Sends a request to the dispenser API to get the funding limit for the Algo asset.
117
- *
118
- * @returns DispenserLimitResponse: An object containing the funding limit amount.
119
- */
120
- async getLimit() {
121
- return { amount: (await (await this.processDispenserRequest(this.authToken, `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}/limit`, null, "GET")).json()).amount };
122
- }
123
- };
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
5
+ const TestNetDispenserApiClient = require_dispenser_client.TestNetDispenserApiClient;
124
6
 
125
7
  //#endregion
126
8
  exports.TestNetDispenserApiClient = TestNetDispenserApiClient;
@@ -1 +1 @@
1
- {"version":3,"file":"dispenser-client.js","names":["requestArgs: RequestInit","asJson"],"sources":["../../src/types/dispenser-client.ts"],"sourcesContent":["import { Address } from '@algorandfoundation/algokit-common'\nimport { asJson } from '../util'\n\nconst DISPENSER_BASE_URL = 'https://api.dispenser.algorandfoundation.tools'\nconst DEFAULT_DISPENSER_REQUEST_TIMEOUT = 15\nconst DISPENSER_ACCESS_TOKEN_KEY = 'ALGOKIT_DISPENSER_ACCESS_TOKEN'\n\ninterface ErrorResponse {\n code?: string\n}\n\nenum DispenserAssetName {\n Algo = 0,\n}\n\nconst dispenserAssets = {\n [DispenserAssetName.Algo]: {\n assetId: 0,\n decimals: 6,\n description: 'Algo',\n },\n}\n\n/** The TestNet Dispenser API response when funding. */\nexport interface DispenserFundResponse {\n /** The ID of the transaction that was issued to fund the account. */\n txId: string\n /** The number of µAlgo that was funded. */\n amount: number\n}\n\n/** The TestNet Dispenser API response when getting the current limit. */\nexport interface DispenserLimitResponse {\n /** The limit, in µAlgo, that you can currently fund. */\n amount: number\n}\n\n/** The parameters to construct a TestNet Dispenser API client. */\nexport interface TestNetDispenserApiClientParams {\n /** The API auth token */\n authToken: string\n /** The request timeout in seconds */\n requestTimeout?: number\n}\n\n/**\n * `TestNetDispenserApiClient` is a class that provides methods to interact with the [Algorand TestNet Dispenser API](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md).\n * It allows you to fund an address with Algo, refund a transaction, and get the funding limit for the Algo asset.\n *\n * The class requires an authentication token and a request timeout to be initialized. The authentication token can be provided\n * either directly as a parameter or through an `ALGOKIT_DISPENSER_ACCESS_TOKEN` environment variable. If neither is provided, an error is thrown.\n *\n * The request timeout can be provided as a parameter. If not provided, a default value is used.\n *\n * @property {string} authToken - The authentication token used for API requests.\n * @property {number} requestTimeout - The timeout for API requests, in seconds.\n *\n * @method fund - Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.\n * @method refund - Sends a refund request to the dispenser API for the specified refundTxnId.\n * @method limit - Sends a request to the dispenser API to get the funding limit for the Algo asset.\n *\n * @example\n * ```typescript\n * const client = new TestNetDispenserApiClient({ authToken: 'your_auth_token', requestTimeout: 30 });\n * const fundResponse = await client.fund('your_address', 100);\n * const limitResponse = await client.getLimit();\n * await client.refund('your_transaction_id');\n * ```\n *\n * @throws {Error} If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the authToken parameter were provided.\n */\nexport class TestNetDispenserApiClient {\n private _authToken: string\n private _requestTimeout: number\n\n constructor(params?: TestNetDispenserApiClientParams) {\n const authTokenFromEnv = process?.env?.[DISPENSER_ACCESS_TOKEN_KEY]\n\n if (params?.authToken) {\n this._authToken = params.authToken\n } else if (authTokenFromEnv) {\n this._authToken = authTokenFromEnv\n } else {\n throw new Error(\n `Can't init AlgoKit TestNet Dispenser API client because neither environment variable ${DISPENSER_ACCESS_TOKEN_KEY} or the authToken were provided.`,\n )\n }\n\n this._requestTimeout = params?.requestTimeout || DEFAULT_DISPENSER_REQUEST_TIMEOUT\n }\n\n get authToken(): string {\n return this._authToken\n }\n\n get requestTimeout(): number {\n return this._requestTimeout\n }\n\n /**\n * Processes a dispenser API request.\n *\n * @param authToken - The authentication token.\n * @param urlSuffix - The URL suffix for the API request.\n * @param body - The request body.\n * @param method - The HTTP method.\n *\n * @returns The API response.\n */\n private async processDispenserRequest(\n authToken: string,\n urlSuffix: string,\n body: Record<string, string | number> | null = null,\n method = 'POST',\n ): Promise<Response> {\n const headers = { Authorization: `Bearer ${authToken}` }\n\n const requestArgs: RequestInit = {\n method: method,\n headers: headers,\n signal: AbortSignal.timeout(this.requestTimeout * 1000),\n }\n\n if (body) {\n requestArgs.body = asJson(body)\n }\n\n const response = await fetch(`${DISPENSER_BASE_URL}/${urlSuffix}`, requestArgs)\n if (!response.ok) {\n let error_message = `Error processing dispenser API request: ${response.status}`\n let error_response = null\n try {\n error_response = await response.json()\n } catch {\n // suppress exception\n }\n\n if (error_response && (error_response as ErrorResponse).code) {\n error_message = (error_response as ErrorResponse).code!\n } else if (response.status === 400) {\n const errorResponse = (await response.json()) as { message: string }\n error_message = errorResponse.message\n }\n\n throw new Error(error_message)\n }\n return response\n }\n\n /**\n * Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.\n *\n * @param address - The address to fund.\n * @param amount - The amount of µAlgo to fund.\n *\n * @returns DispenserFundResponse: An object containing the transaction ID and funded amount.\n */\n async fund(address: string | Address, amount: number | bigint): Promise<DispenserFundResponse> {\n const response = await this.processDispenserRequest(\n this.authToken,\n `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}`,\n {\n receiver: typeof address === 'string' ? address : address.toString(),\n amount: Number(amount),\n assetID: dispenserAssets[DispenserAssetName.Algo].assetId,\n },\n 'POST',\n )\n\n const content = (await response.json()) as { txID: string; amount: number }\n return { txId: content.txID, amount: content.amount }\n }\n\n /**\n * Sends a refund request to the dispenser API for the specified refundTxnId.\n *\n * @param refundTxnId - The transaction ID to refund.\n */\n async refund(refundTxnId: string): Promise<void> {\n await this.processDispenserRequest(this.authToken, 'refund', { refundTransactionID: refundTxnId }, 'POST')\n }\n\n /**\n * Sends a request to the dispenser API to get the funding limit for the Algo asset.\n *\n * @returns DispenserLimitResponse: An object containing the funding limit amount.\n */\n async getLimit(): Promise<DispenserLimitResponse> {\n const response = await this.processDispenserRequest(\n this.authToken,\n `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}/limit`,\n null,\n 'GET',\n )\n const content = (await response.json()) as { amount: number }\n\n return { amount: content.amount }\n }\n}\n"],"mappings":";;;AAGA,MAAM,qBAAqB;AAC3B,MAAM,oCAAoC;AAC1C,MAAM,6BAA6B;AAMnC,IAAK,oEAAL;AACE;;EADG;AAIL,MAAM,kBAAkB,GACrB,mBAAmB,OAAO;CACzB,SAAS;CACT,UAAU;CACV,aAAa;CACd,EACF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDD,IAAa,4BAAb,MAAuC;CACrC,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;EACpD,MAAM,mBAAmB,SAAS,MAAM;AAExC,MAAI,QAAQ,UACV,MAAK,aAAa,OAAO;WAChB,iBACT,MAAK,aAAa;MAElB,OAAM,IAAI,MACR,wFAAwF,2BAA2B,kCACpH;AAGH,OAAK,kBAAkB,QAAQ,kBAAkB;;CAGnD,IAAI,YAAoB;AACtB,SAAO,KAAK;;CAGd,IAAI,iBAAyB;AAC3B,SAAO,KAAK;;;;;;;;;;;;CAad,MAAc,wBACZ,WACA,WACA,OAA+C,MAC/C,SAAS,QACU;EAGnB,MAAMA,cAA2B;GACvB;GACR,SAJc,EAAE,eAAe,UAAU,aAAa;GAKtD,QAAQ,YAAY,QAAQ,KAAK,iBAAiB,IAAK;GACxD;AAED,MAAI,KACF,aAAY,OAAOC,oBAAO,KAAK;EAGjC,MAAM,WAAW,MAAM,MAAM,GAAG,mBAAmB,GAAG,aAAa,YAAY;AAC/E,MAAI,CAAC,SAAS,IAAI;GAChB,IAAI,gBAAgB,2CAA2C,SAAS;GACxE,IAAI,iBAAiB;AACrB,OAAI;AACF,qBAAiB,MAAM,SAAS,MAAM;WAChC;AAIR,OAAI,kBAAmB,eAAiC,KACtD,iBAAiB,eAAiC;YACzC,SAAS,WAAW,IAE7B,kBADuB,MAAM,SAAS,MAAM,EACd;AAGhC,SAAM,IAAI,MAAM,cAAc;;AAEhC,SAAO;;;;;;;;;;CAWT,MAAM,KAAK,SAA2B,QAAyD;EAY7F,MAAM,UAAW,OAXA,MAAM,KAAK,wBAC1B,KAAK,WACL,QAAQ,gBAAgB,mBAAmB,MAAM,WACjD;GACE,UAAU,OAAO,YAAY,WAAW,UAAU,QAAQ,UAAU;GACpE,QAAQ,OAAO,OAAO;GACtB,SAAS,gBAAgB,mBAAmB,MAAM;GACnD,EACD,OACD,EAE+B,MAAM;AACtC,SAAO;GAAE,MAAM,QAAQ;GAAM,QAAQ,QAAQ;GAAQ;;;;;;;CAQvD,MAAM,OAAO,aAAoC;AAC/C,QAAM,KAAK,wBAAwB,KAAK,WAAW,UAAU,EAAE,qBAAqB,aAAa,EAAE,OAAO;;;;;;;CAQ5G,MAAM,WAA4C;AAShD,SAAO,EAAE,SAFQ,OANA,MAAM,KAAK,wBAC1B,KAAK,WACL,QAAQ,gBAAgB,mBAAmB,MAAM,QAAQ,SACzD,MACA,MACD,EAC+B,MAAM,EAEb,QAAQ"}
1
+ {"version":3,"file":"dispenser-client.js","names":["_TestNetDispenserApiClient"],"sources":["../../src/types/dispenser-client.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/dispenser-client'\n\nimport {\n type DispenserFundResponse as _DispenserFundResponse,\n type DispenserLimitResponse as _DispenserLimitResponse,\n type TestNetDispenserApiClientParams as _TestNetDispenserApiClientParams,\n TestNetDispenserApiClient as _TestNetDispenserApiClient,\n} from '../dispenser-client'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type DispenserFundResponse = _DispenserFundResponse\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type DispenserLimitResponse = _DispenserLimitResponse\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type TestNetDispenserApiClientParams = _TestNetDispenserApiClientParams\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport const TestNetDispenserApiClient = _TestNetDispenserApiClient\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type TestNetDispenserApiClient = _TestNetDispenserApiClient\n"],"mappings":";;;;AAoBA,MAAa,4BAA4BA"}
@@ -1,126 +1,8 @@
1
- import { asJson } from "../util.mjs";
1
+ import { TestNetDispenserApiClient as TestNetDispenserApiClient$1 } from "../dispenser-client.mjs";
2
2
 
3
3
  //#region src/types/dispenser-client.ts
4
- const DISPENSER_BASE_URL = "https://api.dispenser.algorandfoundation.tools";
5
- const DEFAULT_DISPENSER_REQUEST_TIMEOUT = 15;
6
- const DISPENSER_ACCESS_TOKEN_KEY = "ALGOKIT_DISPENSER_ACCESS_TOKEN";
7
- var DispenserAssetName = /* @__PURE__ */ function(DispenserAssetName$1) {
8
- DispenserAssetName$1[DispenserAssetName$1["Algo"] = 0] = "Algo";
9
- return DispenserAssetName$1;
10
- }(DispenserAssetName || {});
11
- const dispenserAssets = { [DispenserAssetName.Algo]: {
12
- assetId: 0,
13
- decimals: 6,
14
- description: "Algo"
15
- } };
16
- /**
17
- * `TestNetDispenserApiClient` is a class that provides methods to interact with the [Algorand TestNet Dispenser API](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md).
18
- * It allows you to fund an address with Algo, refund a transaction, and get the funding limit for the Algo asset.
19
- *
20
- * The class requires an authentication token and a request timeout to be initialized. The authentication token can be provided
21
- * either directly as a parameter or through an `ALGOKIT_DISPENSER_ACCESS_TOKEN` environment variable. If neither is provided, an error is thrown.
22
- *
23
- * The request timeout can be provided as a parameter. If not provided, a default value is used.
24
- *
25
- * @property {string} authToken - The authentication token used for API requests.
26
- * @property {number} requestTimeout - The timeout for API requests, in seconds.
27
- *
28
- * @method fund - Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
29
- * @method refund - Sends a refund request to the dispenser API for the specified refundTxnId.
30
- * @method limit - Sends a request to the dispenser API to get the funding limit for the Algo asset.
31
- *
32
- * @example
33
- * ```typescript
34
- * const client = new TestNetDispenserApiClient({ authToken: 'your_auth_token', requestTimeout: 30 });
35
- * const fundResponse = await client.fund('your_address', 100);
36
- * const limitResponse = await client.getLimit();
37
- * await client.refund('your_transaction_id');
38
- * ```
39
- *
40
- * @throws {Error} If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the authToken parameter were provided.
41
- */
42
- var TestNetDispenserApiClient = class {
43
- _authToken;
44
- _requestTimeout;
45
- constructor(params) {
46
- const authTokenFromEnv = process?.env?.[DISPENSER_ACCESS_TOKEN_KEY];
47
- if (params?.authToken) this._authToken = params.authToken;
48
- else if (authTokenFromEnv) this._authToken = authTokenFromEnv;
49
- else throw new Error(`Can't init AlgoKit TestNet Dispenser API client because neither environment variable ${DISPENSER_ACCESS_TOKEN_KEY} or the authToken were provided.`);
50
- this._requestTimeout = params?.requestTimeout || DEFAULT_DISPENSER_REQUEST_TIMEOUT;
51
- }
52
- get authToken() {
53
- return this._authToken;
54
- }
55
- get requestTimeout() {
56
- return this._requestTimeout;
57
- }
58
- /**
59
- * Processes a dispenser API request.
60
- *
61
- * @param authToken - The authentication token.
62
- * @param urlSuffix - The URL suffix for the API request.
63
- * @param body - The request body.
64
- * @param method - The HTTP method.
65
- *
66
- * @returns The API response.
67
- */
68
- async processDispenserRequest(authToken, urlSuffix, body = null, method = "POST") {
69
- const requestArgs = {
70
- method,
71
- headers: { Authorization: `Bearer ${authToken}` },
72
- signal: AbortSignal.timeout(this.requestTimeout * 1e3)
73
- };
74
- if (body) requestArgs.body = asJson(body);
75
- const response = await fetch(`${DISPENSER_BASE_URL}/${urlSuffix}`, requestArgs);
76
- if (!response.ok) {
77
- let error_message = `Error processing dispenser API request: ${response.status}`;
78
- let error_response = null;
79
- try {
80
- error_response = await response.json();
81
- } catch {}
82
- if (error_response && error_response.code) error_message = error_response.code;
83
- else if (response.status === 400) error_message = (await response.json()).message;
84
- throw new Error(error_message);
85
- }
86
- return response;
87
- }
88
- /**
89
- * Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.
90
- *
91
- * @param address - The address to fund.
92
- * @param amount - The amount of µAlgo to fund.
93
- *
94
- * @returns DispenserFundResponse: An object containing the transaction ID and funded amount.
95
- */
96
- async fund(address, amount) {
97
- const content = await (await this.processDispenserRequest(this.authToken, `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}`, {
98
- receiver: typeof address === "string" ? address : address.toString(),
99
- amount: Number(amount),
100
- assetID: dispenserAssets[DispenserAssetName.Algo].assetId
101
- }, "POST")).json();
102
- return {
103
- txId: content.txID,
104
- amount: content.amount
105
- };
106
- }
107
- /**
108
- * Sends a refund request to the dispenser API for the specified refundTxnId.
109
- *
110
- * @param refundTxnId - The transaction ID to refund.
111
- */
112
- async refund(refundTxnId) {
113
- await this.processDispenserRequest(this.authToken, "refund", { refundTransactionID: refundTxnId }, "POST");
114
- }
115
- /**
116
- * Sends a request to the dispenser API to get the funding limit for the Algo asset.
117
- *
118
- * @returns DispenserLimitResponse: An object containing the funding limit amount.
119
- */
120
- async getLimit() {
121
- return { amount: (await (await this.processDispenserRequest(this.authToken, `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}/limit`, null, "GET")).json()).amount };
122
- }
123
- };
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */
5
+ const TestNetDispenserApiClient = TestNetDispenserApiClient$1;
124
6
 
125
7
  //#endregion
126
8
  export { TestNetDispenserApiClient };
@@ -1 +1 @@
1
- {"version":3,"file":"dispenser-client.mjs","names":["requestArgs: RequestInit"],"sources":["../../src/types/dispenser-client.ts"],"sourcesContent":["import { Address } from '@algorandfoundation/algokit-common'\nimport { asJson } from '../util'\n\nconst DISPENSER_BASE_URL = 'https://api.dispenser.algorandfoundation.tools'\nconst DEFAULT_DISPENSER_REQUEST_TIMEOUT = 15\nconst DISPENSER_ACCESS_TOKEN_KEY = 'ALGOKIT_DISPENSER_ACCESS_TOKEN'\n\ninterface ErrorResponse {\n code?: string\n}\n\nenum DispenserAssetName {\n Algo = 0,\n}\n\nconst dispenserAssets = {\n [DispenserAssetName.Algo]: {\n assetId: 0,\n decimals: 6,\n description: 'Algo',\n },\n}\n\n/** The TestNet Dispenser API response when funding. */\nexport interface DispenserFundResponse {\n /** The ID of the transaction that was issued to fund the account. */\n txId: string\n /** The number of µAlgo that was funded. */\n amount: number\n}\n\n/** The TestNet Dispenser API response when getting the current limit. */\nexport interface DispenserLimitResponse {\n /** The limit, in µAlgo, that you can currently fund. */\n amount: number\n}\n\n/** The parameters to construct a TestNet Dispenser API client. */\nexport interface TestNetDispenserApiClientParams {\n /** The API auth token */\n authToken: string\n /** The request timeout in seconds */\n requestTimeout?: number\n}\n\n/**\n * `TestNetDispenserApiClient` is a class that provides methods to interact with the [Algorand TestNet Dispenser API](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md).\n * It allows you to fund an address with Algo, refund a transaction, and get the funding limit for the Algo asset.\n *\n * The class requires an authentication token and a request timeout to be initialized. The authentication token can be provided\n * either directly as a parameter or through an `ALGOKIT_DISPENSER_ACCESS_TOKEN` environment variable. If neither is provided, an error is thrown.\n *\n * The request timeout can be provided as a parameter. If not provided, a default value is used.\n *\n * @property {string} authToken - The authentication token used for API requests.\n * @property {number} requestTimeout - The timeout for API requests, in seconds.\n *\n * @method fund - Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.\n * @method refund - Sends a refund request to the dispenser API for the specified refundTxnId.\n * @method limit - Sends a request to the dispenser API to get the funding limit for the Algo asset.\n *\n * @example\n * ```typescript\n * const client = new TestNetDispenserApiClient({ authToken: 'your_auth_token', requestTimeout: 30 });\n * const fundResponse = await client.fund('your_address', 100);\n * const limitResponse = await client.getLimit();\n * await client.refund('your_transaction_id');\n * ```\n *\n * @throws {Error} If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the authToken parameter were provided.\n */\nexport class TestNetDispenserApiClient {\n private _authToken: string\n private _requestTimeout: number\n\n constructor(params?: TestNetDispenserApiClientParams) {\n const authTokenFromEnv = process?.env?.[DISPENSER_ACCESS_TOKEN_KEY]\n\n if (params?.authToken) {\n this._authToken = params.authToken\n } else if (authTokenFromEnv) {\n this._authToken = authTokenFromEnv\n } else {\n throw new Error(\n `Can't init AlgoKit TestNet Dispenser API client because neither environment variable ${DISPENSER_ACCESS_TOKEN_KEY} or the authToken were provided.`,\n )\n }\n\n this._requestTimeout = params?.requestTimeout || DEFAULT_DISPENSER_REQUEST_TIMEOUT\n }\n\n get authToken(): string {\n return this._authToken\n }\n\n get requestTimeout(): number {\n return this._requestTimeout\n }\n\n /**\n * Processes a dispenser API request.\n *\n * @param authToken - The authentication token.\n * @param urlSuffix - The URL suffix for the API request.\n * @param body - The request body.\n * @param method - The HTTP method.\n *\n * @returns The API response.\n */\n private async processDispenserRequest(\n authToken: string,\n urlSuffix: string,\n body: Record<string, string | number> | null = null,\n method = 'POST',\n ): Promise<Response> {\n const headers = { Authorization: `Bearer ${authToken}` }\n\n const requestArgs: RequestInit = {\n method: method,\n headers: headers,\n signal: AbortSignal.timeout(this.requestTimeout * 1000),\n }\n\n if (body) {\n requestArgs.body = asJson(body)\n }\n\n const response = await fetch(`${DISPENSER_BASE_URL}/${urlSuffix}`, requestArgs)\n if (!response.ok) {\n let error_message = `Error processing dispenser API request: ${response.status}`\n let error_response = null\n try {\n error_response = await response.json()\n } catch {\n // suppress exception\n }\n\n if (error_response && (error_response as ErrorResponse).code) {\n error_message = (error_response as ErrorResponse).code!\n } else if (response.status === 400) {\n const errorResponse = (await response.json()) as { message: string }\n error_message = errorResponse.message\n }\n\n throw new Error(error_message)\n }\n return response\n }\n\n /**\n * Sends a funding request to the dispenser API to fund the specified address with the given amount of Algo.\n *\n * @param address - The address to fund.\n * @param amount - The amount of µAlgo to fund.\n *\n * @returns DispenserFundResponse: An object containing the transaction ID and funded amount.\n */\n async fund(address: string | Address, amount: number | bigint): Promise<DispenserFundResponse> {\n const response = await this.processDispenserRequest(\n this.authToken,\n `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}`,\n {\n receiver: typeof address === 'string' ? address : address.toString(),\n amount: Number(amount),\n assetID: dispenserAssets[DispenserAssetName.Algo].assetId,\n },\n 'POST',\n )\n\n const content = (await response.json()) as { txID: string; amount: number }\n return { txId: content.txID, amount: content.amount }\n }\n\n /**\n * Sends a refund request to the dispenser API for the specified refundTxnId.\n *\n * @param refundTxnId - The transaction ID to refund.\n */\n async refund(refundTxnId: string): Promise<void> {\n await this.processDispenserRequest(this.authToken, 'refund', { refundTransactionID: refundTxnId }, 'POST')\n }\n\n /**\n * Sends a request to the dispenser API to get the funding limit for the Algo asset.\n *\n * @returns DispenserLimitResponse: An object containing the funding limit amount.\n */\n async getLimit(): Promise<DispenserLimitResponse> {\n const response = await this.processDispenserRequest(\n this.authToken,\n `fund/${dispenserAssets[DispenserAssetName.Algo].assetId}/limit`,\n null,\n 'GET',\n )\n const content = (await response.json()) as { amount: number }\n\n return { amount: content.amount }\n }\n}\n"],"mappings":";;;AAGA,MAAM,qBAAqB;AAC3B,MAAM,oCAAoC;AAC1C,MAAM,6BAA6B;AAMnC,IAAK,oEAAL;AACE;;EADG;AAIL,MAAM,kBAAkB,GACrB,mBAAmB,OAAO;CACzB,SAAS;CACT,UAAU;CACV,aAAa;CACd,EACF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDD,IAAa,4BAAb,MAAuC;CACrC,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;EACpD,MAAM,mBAAmB,SAAS,MAAM;AAExC,MAAI,QAAQ,UACV,MAAK,aAAa,OAAO;WAChB,iBACT,MAAK,aAAa;MAElB,OAAM,IAAI,MACR,wFAAwF,2BAA2B,kCACpH;AAGH,OAAK,kBAAkB,QAAQ,kBAAkB;;CAGnD,IAAI,YAAoB;AACtB,SAAO,KAAK;;CAGd,IAAI,iBAAyB;AAC3B,SAAO,KAAK;;;;;;;;;;;;CAad,MAAc,wBACZ,WACA,WACA,OAA+C,MAC/C,SAAS,QACU;EAGnB,MAAMA,cAA2B;GACvB;GACR,SAJc,EAAE,eAAe,UAAU,aAAa;GAKtD,QAAQ,YAAY,QAAQ,KAAK,iBAAiB,IAAK;GACxD;AAED,MAAI,KACF,aAAY,OAAO,OAAO,KAAK;EAGjC,MAAM,WAAW,MAAM,MAAM,GAAG,mBAAmB,GAAG,aAAa,YAAY;AAC/E,MAAI,CAAC,SAAS,IAAI;GAChB,IAAI,gBAAgB,2CAA2C,SAAS;GACxE,IAAI,iBAAiB;AACrB,OAAI;AACF,qBAAiB,MAAM,SAAS,MAAM;WAChC;AAIR,OAAI,kBAAmB,eAAiC,KACtD,iBAAiB,eAAiC;YACzC,SAAS,WAAW,IAE7B,kBADuB,MAAM,SAAS,MAAM,EACd;AAGhC,SAAM,IAAI,MAAM,cAAc;;AAEhC,SAAO;;;;;;;;;;CAWT,MAAM,KAAK,SAA2B,QAAyD;EAY7F,MAAM,UAAW,OAXA,MAAM,KAAK,wBAC1B,KAAK,WACL,QAAQ,gBAAgB,mBAAmB,MAAM,WACjD;GACE,UAAU,OAAO,YAAY,WAAW,UAAU,QAAQ,UAAU;GACpE,QAAQ,OAAO,OAAO;GACtB,SAAS,gBAAgB,mBAAmB,MAAM;GACnD,EACD,OACD,EAE+B,MAAM;AACtC,SAAO;GAAE,MAAM,QAAQ;GAAM,QAAQ,QAAQ;GAAQ;;;;;;;CAQvD,MAAM,OAAO,aAAoC;AAC/C,QAAM,KAAK,wBAAwB,KAAK,WAAW,UAAU,EAAE,qBAAqB,aAAa,EAAE,OAAO;;;;;;;CAQ5G,MAAM,WAA4C;AAShD,SAAO,EAAE,SAFQ,OANA,MAAM,KAAK,wBAC1B,KAAK,WACL,QAAQ,gBAAgB,mBAAmB,MAAM,QAAQ,SACzD,MACA,MACD,EAC+B,MAAM,EAEb,QAAQ"}
1
+ {"version":3,"file":"dispenser-client.mjs","names":["_TestNetDispenserApiClient"],"sources":["../../src/types/dispenser-client.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/dispenser-client'\n\nimport {\n type DispenserFundResponse as _DispenserFundResponse,\n type DispenserLimitResponse as _DispenserLimitResponse,\n type TestNetDispenserApiClientParams as _TestNetDispenserApiClientParams,\n TestNetDispenserApiClient as _TestNetDispenserApiClient,\n} from '../dispenser-client'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type DispenserFundResponse = _DispenserFundResponse\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type DispenserLimitResponse = _DispenserLimitResponse\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type TestNetDispenserApiClientParams = _TestNetDispenserApiClientParams\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport const TestNetDispenserApiClient = _TestNetDispenserApiClient\n/** @deprecated Import from `@algorandfoundation/algokit-utils/dispenser-client` instead */\nexport type TestNetDispenserApiClient = _TestNetDispenserApiClient\n"],"mappings":";;;;AAoBA,MAAa,4BAA4BA"}
package/types/expand.d.ts CHANGED
@@ -1,2 +1,8 @@
1
- import { Expand } from "../packages/common/src/expand.js";
2
- export { type Expand };
1
+ import { Expand as Expand$1 } from "../packages/common/src/expand.js";
2
+
3
+ //#region src/types/expand.d.ts
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/expand` instead */
5
+ type Expand<T> = Expand$1<T>;
6
+ //#endregion
7
+ export { Expand };
8
+ //# sourceMappingURL=expand.d.ts.map
@@ -1,40 +1,20 @@
1
+ import { AccountStatus as AccountStatus$1, ApplicationOnComplete as ApplicationOnComplete$1, LookupAssetHoldingsOptions as LookupAssetHoldingsOptions$1, SignatureType as SignatureType$1 } from "../indexer.js";
2
+
1
3
  //#region src/types/indexer.d.ts
2
- /** Options when looking up an asset's account holdings, https://dev.algorand.co/reference/rest-apis/indexer#get-v2assetsasset-idbalances */
3
- interface LookupAssetHoldingsOptions {
4
- /** Results should have a decimal units amount less than this value. */
5
- currencyLessThan?: number | bigint;
6
- /** Results should have a decimal units amount greater than this value. */
7
- currencyGreaterThan?: number | bigint;
8
- /** Include all items including closed accounts and opted-out asset holdings. */
9
- includeAll?: boolean;
10
- }
11
- /** Defines the what additional actions occur with the transaction https://dev.algorand.co/reference/rest-apis/indexer/#oncompletion */
12
- declare enum ApplicationOnComplete {
13
- noop = "noop",
14
- optin = "optin",
15
- closeout = "closeout",
16
- clear = "clear",
17
- update = "update",
18
- delete = "delete",
19
- }
20
- /** Type of signature used by an account */
21
- declare enum SignatureType {
22
- /** Normal signature */
23
- sig = "sig",
24
- /** Multisig */
25
- msig = "msig",
26
- /** Logic signature */
27
- lsig = "lsig",
28
- }
29
- /** Delegation status of the account */
30
- declare enum AccountStatus {
31
- /** Indicates that the associated account is delegated */
32
- Offline = "Offline",
33
- /** Indicates that the associated account used as part of the delegation pool */
34
- Online = "Online",
35
- /** Indicates that the associated account is neither a delegator nor a delegate */
36
- NotParticipating = "NotParticipating",
37
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
5
+ type LookupAssetHoldingsOptions = LookupAssetHoldingsOptions$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
7
+ declare const ApplicationOnComplete: typeof ApplicationOnComplete$1;
8
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
9
+ type ApplicationOnComplete = ApplicationOnComplete$1;
10
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
11
+ declare const SignatureType: typeof SignatureType$1;
12
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
13
+ type SignatureType = SignatureType$1;
14
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
15
+ declare const AccountStatus: typeof AccountStatus$1;
16
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
17
+ type AccountStatus = AccountStatus$1;
38
18
  //#endregion
39
19
  export { AccountStatus, ApplicationOnComplete, LookupAssetHoldingsOptions, SignatureType };
40
20
  //# sourceMappingURL=indexer.d.ts.map
package/types/indexer.js CHANGED
@@ -1,35 +1,12 @@
1
+ const require_indexer = require('../indexer.js');
1
2
 
2
3
  //#region src/types/indexer.ts
3
- /** Defines the what additional actions occur with the transaction https://dev.algorand.co/reference/rest-apis/indexer/#oncompletion */
4
- let ApplicationOnComplete = /* @__PURE__ */ function(ApplicationOnComplete$1) {
5
- ApplicationOnComplete$1["noop"] = "noop";
6
- ApplicationOnComplete$1["optin"] = "optin";
7
- ApplicationOnComplete$1["closeout"] = "closeout";
8
- ApplicationOnComplete$1["clear"] = "clear";
9
- ApplicationOnComplete$1["update"] = "update";
10
- ApplicationOnComplete$1["delete"] = "delete";
11
- return ApplicationOnComplete$1;
12
- }({});
13
- /** Type of signature used by an account */
14
- let SignatureType = /* @__PURE__ */ function(SignatureType$1) {
15
- /** Normal signature */
16
- SignatureType$1["sig"] = "sig";
17
- /** Multisig */
18
- SignatureType$1["msig"] = "msig";
19
- /** Logic signature */
20
- SignatureType$1["lsig"] = "lsig";
21
- return SignatureType$1;
22
- }({});
23
- /** Delegation status of the account */
24
- let AccountStatus = /* @__PURE__ */ function(AccountStatus$1) {
25
- /** Indicates that the associated account is delegated */
26
- AccountStatus$1["Offline"] = "Offline";
27
- /** Indicates that the associated account used as part of the delegation pool */
28
- AccountStatus$1["Online"] = "Online";
29
- /** Indicates that the associated account is neither a delegator nor a delegate */
30
- AccountStatus$1["NotParticipating"] = "NotParticipating";
31
- return AccountStatus$1;
32
- }({});
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
5
+ const ApplicationOnComplete = require_indexer.ApplicationOnComplete;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
7
+ const SignatureType = require_indexer.SignatureType;
8
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */
9
+ const AccountStatus = require_indexer.AccountStatus;
33
10
 
34
11
  //#endregion
35
12
  exports.AccountStatus = AccountStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"indexer.js","names":[],"sources":["../../src/types/indexer.ts"],"sourcesContent":["/** Options when looking up an asset's account holdings, https://dev.algorand.co/reference/rest-apis/indexer#get-v2assetsasset-idbalances */\nexport interface LookupAssetHoldingsOptions {\n /** Results should have a decimal units amount less than this value. */\n currencyLessThan?: number | bigint\n /** Results should have a decimal units amount greater than this value. */\n currencyGreaterThan?: number | bigint\n /** Include all items including closed accounts and opted-out asset holdings. */\n includeAll?: boolean\n}\n\n/** Defines the what additional actions occur with the transaction https://dev.algorand.co/reference/rest-apis/indexer/#oncompletion */\nexport enum ApplicationOnComplete {\n noop = 'noop',\n optin = 'optin',\n closeout = 'closeout',\n clear = 'clear',\n update = 'update',\n delete = 'delete',\n}\n\n/** Type of signature used by an account */\nexport enum SignatureType {\n /** Normal signature */\n sig = 'sig',\n /** Multisig */\n msig = 'msig',\n /** Logic signature */\n lsig = 'lsig',\n}\n\n/** Delegation status of the account */\nexport enum AccountStatus {\n /** Indicates that the associated account is delegated */\n Offline = 'Offline',\n /** Indicates that the associated account used as part of the delegation pool */\n Online = 'Online',\n /** Indicates that the associated account is neither a delegator nor a delegate */\n NotParticipating = 'NotParticipating',\n}\n"],"mappings":";;;AAWA,IAAY,0EAAL;AACL;AACA;AACA;AACA;AACA;AACA;;;;AAIF,IAAY,0DAAL;;AAEL;;AAEA;;AAEA;;;;AAIF,IAAY,0DAAL;;AAEL;;AAEA;;AAEA"}
1
+ {"version":3,"file":"indexer.js","names":["_ApplicationOnComplete","_SignatureType","_AccountStatus"],"sources":["../../src/types/indexer.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/indexer'\n\nimport {\n type LookupAssetHoldingsOptions as _LookupAssetHoldingsOptions,\n ApplicationOnComplete as _ApplicationOnComplete,\n SignatureType as _SignatureType,\n AccountStatus as _AccountStatus,\n} from '../indexer'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport type LookupAssetHoldingsOptions = _LookupAssetHoldingsOptions\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport const ApplicationOnComplete = _ApplicationOnComplete\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport type ApplicationOnComplete = _ApplicationOnComplete\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport const SignatureType = _SignatureType\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport type SignatureType = _SignatureType\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport const AccountStatus = _AccountStatus\n/** @deprecated Import from `@algorandfoundation/algokit-utils/indexer` instead */\nexport type AccountStatus = _AccountStatus\n"],"mappings":";;;;AAcA,MAAa,wBAAwBA;;AAKrC,MAAa,gBAAgBC;;AAK7B,MAAa,gBAAgBC"}