@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,324 +1,8 @@
1
- import { AppManager } from "./app-manager.mjs";
2
- import { TransactionComposer } from "./composer.mjs";
3
- import { ClientManager } from "./client-manager.mjs";
4
- import { AccountManager } from "./account-manager.mjs";
5
- import { AlgorandClientTransactionCreator } from "./algorand-client-transaction-creator.mjs";
6
- import { AlgorandClientTransactionSender } from "./algorand-client-transaction-sender.mjs";
7
- import { AppDeployer } from "./app-deployer.mjs";
8
- import { AssetManager } from "./asset-manager.mjs";
1
+ import { AlgorandClient as AlgorandClient$1 } from "../algorand-client.mjs";
9
2
 
10
3
  //#region src/types/algorand-client.ts
11
- /**
12
- * A client that brokers easy access to Algorand functionality.
13
- */
14
- var AlgorandClient = class AlgorandClient {
15
- _clientManager;
16
- _accountManager;
17
- _appManager;
18
- _appDeployer;
19
- _assetManager;
20
- _transactionSender;
21
- _transactionCreator;
22
- _cachedSuggestedParams;
23
- _cachedSuggestedParamsExpiry;
24
- _cachedSuggestedParamsTimeout = 3e3;
25
- _defaultValidityWindow = void 0;
26
- /**
27
- * A set of error transformers to use when an error is caught in simulate or execute
28
- * `registerErrorTransformer` and `unregisterErrorTransformer` can be used to add and remove
29
- * error transformers from the set.
30
- */
31
- _errorTransformers = /* @__PURE__ */ new Set();
32
- constructor(config) {
33
- this._clientManager = new ClientManager(config, this);
34
- this._accountManager = new AccountManager(this._clientManager);
35
- this._appManager = new AppManager(this._clientManager.algod);
36
- this._assetManager = new AssetManager(this._clientManager.algod, (config$1) => this.newGroup(config$1));
37
- this._transactionSender = new AlgorandClientTransactionSender((config$1) => this.newGroup(config$1), this._assetManager, this._appManager);
38
- this._transactionCreator = new AlgorandClientTransactionCreator((config$1) => this.newGroup(config$1));
39
- this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent);
40
- }
41
- /**
42
- * Sets the default validity window for transactions.
43
- * @param validityWindow The number of rounds between the first and last valid rounds
44
- * @returns The `AlgorandClient` so method calls can be chained
45
- * @example
46
- * ```typescript
47
- * const algorand = AlgorandClient.mainNet().setDefaultValidityWindow(1000);
48
- * ```
49
- */
50
- setDefaultValidityWindow(validityWindow) {
51
- this._defaultValidityWindow = BigInt(validityWindow);
52
- return this;
53
- }
54
- /**
55
- * Sets the default signer to use if no other signer is specified.
56
- * @param signer The signer to use, either a `TransactionSigner` or a `AddressWithSigner`
57
- * @returns The `AlgorandClient` so method calls can be chained
58
- * @example
59
- * ```typescript
60
- * const signer = new SigningAccount(account, account.addr)
61
- * const algorand = AlgorandClient.mainNet().setDefaultSigner(signer)
62
- * ```
63
- */
64
- setDefaultSigner(signer) {
65
- this._accountManager.setDefaultSigner(signer);
66
- return this;
67
- }
68
- /**
69
- * Tracks the given account (object that encapsulates an address and a signer) for later signing.
70
- * @param account The account to register, which can be a `AddressWithSigner` or
71
- * a `algosdk.Account`, `algosdk.LogicSigAccount`, `SigningAccount` or `MultisigAccount`
72
- * @example
73
- * ```typescript
74
- * const accountManager = AlgorandClient.mainNet()
75
- * .setSignerFromAccount(algosdk.generateAccount())
76
- * .setSignerFromAccount(new algosdk.LogicSigAccount(program, args))
77
- * .setSignerFromAccount(new SigningAccount(account, sender))
78
- * .setSignerFromAccount(new MultisigAccount({version: 1, threshold: 1, addrs: ["ADDRESS1...", "ADDRESS2..."]}, [account1, account2]))
79
- * .setSignerFromAccount({addr: "SENDERADDRESS", signer: transactionSigner})
80
- * ```
81
- * @returns The `AlgorandClient` so method calls can be chained
82
- */
83
- setSignerFromAccount(account) {
84
- this._accountManager.setSignerFromAccount(account);
85
- return this;
86
- }
87
- /**
88
- * Tracks the given signer against the given sender for later signing.
89
- * @param sender The sender address to use this signer for
90
- * @param signer The signer to sign transactions with for the given sender
91
- * @returns The `AlgorandClient` so method calls can be chained
92
- * @example
93
- * ```typescript
94
- * const signer = new SigningAccount(account, account.addr)
95
- * const algorand = AlgorandClient.mainNet().setSigner(signer.addr, signer.signer)
96
- * ```
97
- */
98
- setSigner(sender, signer) {
99
- this._accountManager.setSigner(sender, signer);
100
- return this;
101
- }
102
- /**
103
- * Sets a cache value to use for suggested transaction params.
104
- * @param suggestedParams The suggested params to use
105
- * @param until A date until which to cache, or if not specified then the timeout is used
106
- * @returns The `AlgorandClient` so method calls can be chained
107
- * @example
108
- * ```typescript
109
- * const algorand = AlgorandClient.mainNet().setSuggestedParamsCache(suggestedParams, new Date(+new Date() + 3_600_000))
110
- * ```
111
- */
112
- setSuggestedParamsCache(suggestedParams, until) {
113
- this._cachedSuggestedParams = suggestedParams;
114
- this._cachedSuggestedParamsExpiry = until ?? new Date(+/* @__PURE__ */ new Date() + this._cachedSuggestedParamsTimeout);
115
- return this;
116
- }
117
- /**
118
- * Sets the timeout for caching suggested params.
119
- * @param timeout The timeout in milliseconds
120
- * @returns The `AlgorandClient` so method calls can be chained
121
- * @example
122
- * ```typescript
123
- * const algorand = AlgorandClient.mainNet().setSuggestedParamsCacheTimeout(10_000)
124
- * ```
125
- */
126
- setSuggestedParamsCacheTimeout(timeout) {
127
- this._cachedSuggestedParamsTimeout = timeout;
128
- return this;
129
- }
130
- /**
131
- * Get suggested params for a transaction (either cached or from algod if the cache is stale or empty)
132
- * @returns The suggested transaction parameters.
133
- * @example
134
- * const params = await AlgorandClient.mainNet().getSuggestedParams();
135
- */
136
- async getSuggestedParams() {
137
- if (this._cachedSuggestedParams && (!this._cachedSuggestedParamsExpiry || this._cachedSuggestedParamsExpiry > /* @__PURE__ */ new Date())) return { ...this._cachedSuggestedParams };
138
- this._cachedSuggestedParams = await this._clientManager.algod.suggestedParams();
139
- this._cachedSuggestedParamsExpiry = new Date((/* @__PURE__ */ new Date()).getTime() + this._cachedSuggestedParamsTimeout);
140
- return { ...this._cachedSuggestedParams };
141
- }
142
- /**
143
- * Get clients, including algosdk clients and app clients.
144
- * @returns The `ClientManager` instance.
145
- * @example
146
- * const clientManager = AlgorandClient.mainNet().client;
147
- */
148
- get client() {
149
- return this._clientManager;
150
- }
151
- /**
152
- * Get or create accounts that can sign transactions.
153
- * @returns The `AccountManager` instance.
154
- * @example
155
- * const accountManager = AlgorandClient.mainNet().account;
156
- */
157
- get account() {
158
- return this._accountManager;
159
- }
160
- /**
161
- * Methods for interacting with assets.
162
- * @returns The `AssetManager` instance.
163
- * @example
164
- * const assetManager = AlgorandClient.mainNet().asset;
165
- */
166
- get asset() {
167
- return this._assetManager;
168
- }
169
- /**
170
- * Methods for interacting with apps.
171
- * @returns The `AppManager` instance.
172
- * @example
173
- * const appManager = AlgorandClient.mainNet().app;
174
- */
175
- get app() {
176
- return this._appManager;
177
- }
178
- /**
179
- * Methods for deploying apps and managing app deployment metadata.
180
- * @returns The `AppDeployer` instance.
181
- * @example
182
- * const deployer = AlgorandClient.mainNet().appDeployer;
183
- */
184
- get appDeployer() {
185
- return this._appDeployer;
186
- }
187
- /**
188
- * Register a function that will be used to transform an error caught when simulating or executing
189
- * composed transaction groups made from `newGroup`
190
- */
191
- registerErrorTransformer(transformer) {
192
- this._errorTransformers.add(transformer);
193
- }
194
- unregisterErrorTransformer(transformer) {
195
- this._errorTransformers.delete(transformer);
196
- }
197
- /** Start a new `TransactionComposer` transaction group
198
- * @returns A new instance of `TransactionComposer`.
199
- * @example
200
- * const composer = AlgorandClient.mainNet().newGroup();
201
- * const result = await composer.addTransaction(payment).send()
202
- */
203
- newGroup(composerConfig) {
204
- return new TransactionComposer({
205
- algod: this.client.algod,
206
- getSigner: (addr) => this.account.getSigner(addr),
207
- getSuggestedParams: () => this.getSuggestedParams(),
208
- defaultValidityWindow: this._defaultValidityWindow,
209
- appManager: this._appManager,
210
- errorTransformers: [...this._errorTransformers],
211
- composerConfig
212
- });
213
- }
214
- /**
215
- * Methods for sending a transaction.
216
- * @returns The `AlgorandClientTransactionSender` instance.
217
- * @example
218
- * const result = await AlgorandClient.mainNet().send.payment({
219
- * sender: "SENDERADDRESS",
220
- * receiver: "RECEIVERADDRESS",
221
- * amount: algo(1)
222
- * })
223
- */
224
- get send() {
225
- return this._transactionSender;
226
- }
227
- /**
228
- * Methods for creating a transaction.
229
- * @returns The `AlgorandClientTransactionCreator` instance.
230
- * @example
231
- * const payment = await AlgorandClient.mainNet().createTransaction.payment({
232
- * sender: "SENDERADDRESS",
233
- * receiver: "RECEIVERADDRESS",
234
- * amount: algo(1)
235
- * })
236
- */
237
- get createTransaction() {
238
- return this._transactionCreator;
239
- }
240
- /**
241
- * Creates an `AlgorandClient` pointing at default LocalNet ports and API token.
242
- * @returns An instance of the `AlgorandClient`.
243
- * @example
244
- * const algorand = AlgorandClient.defaultLocalNet();
245
- */
246
- static defaultLocalNet() {
247
- return new AlgorandClient({
248
- algodConfig: ClientManager.getDefaultLocalNetConfig("algod"),
249
- indexerConfig: ClientManager.getDefaultLocalNetConfig("indexer"),
250
- kmdConfig: ClientManager.getDefaultLocalNetConfig("kmd")
251
- });
252
- }
253
- /**
254
- * Creates an `AlgorandClient` pointing at TestNet using AlgoNode.
255
- * @returns An instance of the `AlgorandClient`.
256
- * @example
257
- * const algorand = AlgorandClient.testNet();
258
- */
259
- static testNet() {
260
- return new AlgorandClient({
261
- algodConfig: ClientManager.getAlgoNodeConfig("testnet", "algod"),
262
- indexerConfig: ClientManager.getAlgoNodeConfig("testnet", "indexer"),
263
- kmdConfig: void 0
264
- });
265
- }
266
- /**
267
- * Creates an `AlgorandClient` pointing at MainNet using AlgoNode.
268
- * @returns An instance of the `AlgorandClient`.
269
- * @example
270
- * const algorand = AlgorandClient.mainNet();
271
- */
272
- static mainNet() {
273
- return new AlgorandClient({
274
- algodConfig: ClientManager.getAlgoNodeConfig("mainnet", "algod"),
275
- indexerConfig: ClientManager.getAlgoNodeConfig("mainnet", "indexer"),
276
- kmdConfig: void 0
277
- });
278
- }
279
- /**
280
- * Creates an `AlgorandClient` pointing to the given client(s).
281
- * @param clients The clients to use.
282
- * @returns An instance of the `AlgorandClient`.
283
- * @example
284
- * const algorand = AlgorandClient.fromClients({ algod, indexer, kmd });
285
- */
286
- static fromClients(clients) {
287
- return new AlgorandClient(clients);
288
- }
289
- /**
290
- * Creates an `AlgorandClient` loading the configuration from environment variables.
291
- *
292
- * Retrieve configurations from environment variables when defined or get default LocalNet configuration if they aren't defined.
293
- *
294
- * Expects to be called from a Node.js environment.
295
- *
296
- * If `process.env.ALGOD_SERVER` is defined it will use that along with optional `process.env.ALGOD_PORT` and `process.env.ALGOD_TOKEN`.
297
- *
298
- * If `process.env.INDEXER_SERVER` is defined it will use that along with optional `process.env.INDEXER_PORT` and `process.env.INDEXER_TOKEN`.
299
- *
300
- * If either aren't defined it will use the default LocalNet config.
301
- *
302
- * It will return a KMD configuration that uses `process.env.KMD_PORT` (or port 4002) if `process.env.ALGOD_SERVER` is defined,
303
- * otherwise it will use the default LocalNet config unless it detects testnet or mainnet.
304
- * @returns An instance of the `AlgorandClient`.
305
- * @example
306
- * const client = AlgorandClient.fromEnvironment();
307
- */
308
- static fromEnvironment() {
309
- return new AlgorandClient(ClientManager.getConfigFromEnvironmentOrLocalNet());
310
- }
311
- /**
312
- * Creates an `AlgorandClient` from the given config.
313
- * @param config The config to use.
314
- * @returns An instance of the `AlgorandClient`.
315
- * @example
316
- * const client = AlgorandClient.fromConfig({ algodConfig, indexerConfig, kmdConfig });
317
- */
318
- static fromConfig(config) {
319
- return new AlgorandClient(config);
320
- }
321
- };
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/algorand-client` instead */
5
+ const AlgorandClient = AlgorandClient$1;
322
6
 
323
7
  //#endregion
324
8
  export { AlgorandClient };
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client.mjs","names":["config"],"sources":["../../src/types/algorand-client.ts"],"sourcesContent":["import { SuggestedParams } from '@algorandfoundation/algokit-algod-client'\nimport { Address, ReadableAddress } from '@algorandfoundation/algokit-common'\nimport { AddressWithTransactionSigner, LogicSigAccount, TransactionSigner, MultisigAccount } from '@algorandfoundation/algokit-transact'\nimport { AccountManager } from './account-manager'\nimport { AlgorandClientTransactionCreator } from './algorand-client-transaction-creator'\nimport { AlgorandClientTransactionSender } from './algorand-client-transaction-sender'\nimport { AppDeployer } from './app-deployer'\nimport { AppManager } from './app-manager'\nimport { AssetManager } from './asset-manager'\nimport { AlgoSdkClients, ClientManager } from './client-manager'\nimport { ErrorTransformer, TransactionComposer, TransactionComposerConfig } from './composer'\nimport { AlgoConfig } from './network-client'\n\n/**\n * A client that brokers easy access to Algorand functionality.\n */\nexport class AlgorandClient {\n private _clientManager: ClientManager\n private _accountManager: AccountManager\n private _appManager: AppManager\n private _appDeployer: AppDeployer\n private _assetManager: AssetManager\n private _transactionSender: AlgorandClientTransactionSender\n private _transactionCreator: AlgorandClientTransactionCreator\n\n private _cachedSuggestedParams?: SuggestedParams\n private _cachedSuggestedParamsExpiry?: Date\n private _cachedSuggestedParamsTimeout: number = 3_000 // three seconds\n\n private _defaultValidityWindow: bigint | undefined = undefined\n\n /**\n * A set of error transformers to use when an error is caught in simulate or execute\n * `registerErrorTransformer` and `unregisterErrorTransformer` can be used to add and remove\n * error transformers from the set.\n */\n private _errorTransformers: Set<ErrorTransformer> = new Set()\n\n private constructor(config: AlgoConfig | AlgoSdkClients) {\n this._clientManager = new ClientManager(config, this)\n this._accountManager = new AccountManager(this._clientManager)\n this._appManager = new AppManager(this._clientManager.algod)\n this._assetManager = new AssetManager(this._clientManager.algod, (config) => this.newGroup(config))\n this._transactionSender = new AlgorandClientTransactionSender((config) => this.newGroup(config), this._assetManager, this._appManager)\n this._transactionCreator = new AlgorandClientTransactionCreator((config) => this.newGroup(config))\n this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent)\n }\n\n /**\n * Sets the default validity window for transactions.\n * @param validityWindow The number of rounds between the first and last valid rounds\n * @returns The `AlgorandClient` so method calls can be chained\n * @example\n * ```typescript\n * const algorand = AlgorandClient.mainNet().setDefaultValidityWindow(1000);\n * ```\n */\n public setDefaultValidityWindow(validityWindow: number | bigint) {\n this._defaultValidityWindow = BigInt(validityWindow)\n return this\n }\n\n /**\n * Sets the default signer to use if no other signer is specified.\n * @param signer The signer to use, either a `TransactionSigner` or a `AddressWithSigner`\n * @returns The `AlgorandClient` so method calls can be chained\n * @example\n * ```typescript\n * const signer = new SigningAccount(account, account.addr)\n * const algorand = AlgorandClient.mainNet().setDefaultSigner(signer)\n * ```\n */\n public setDefaultSigner(signer: TransactionSigner | AddressWithTransactionSigner): AlgorandClient {\n this._accountManager.setDefaultSigner(signer)\n return this\n }\n\n /**\n * Tracks the given account (object that encapsulates an address and a signer) for later signing.\n * @param account The account to register, which can be a `AddressWithSigner` or\n * a `algosdk.Account`, `algosdk.LogicSigAccount`, `SigningAccount` or `MultisigAccount`\n * @example\n * ```typescript\n * const accountManager = AlgorandClient.mainNet()\n * .setSignerFromAccount(algosdk.generateAccount())\n * .setSignerFromAccount(new algosdk.LogicSigAccount(program, args))\n * .setSignerFromAccount(new SigningAccount(account, sender))\n * .setSignerFromAccount(new MultisigAccount({version: 1, threshold: 1, addrs: [\"ADDRESS1...\", \"ADDRESS2...\"]}, [account1, account2]))\n * .setSignerFromAccount({addr: \"SENDERADDRESS\", signer: transactionSigner})\n * ```\n * @returns The `AlgorandClient` so method calls can be chained\n */\n public setSignerFromAccount(account: AddressWithTransactionSigner | LogicSigAccount | MultisigAccount) {\n this._accountManager.setSignerFromAccount(account)\n return this\n }\n\n /**\n * Tracks the given signer against the given sender for later signing.\n * @param sender The sender address to use this signer for\n * @param signer The signer to sign transactions with for the given sender\n * @returns The `AlgorandClient` so method calls can be chained\n * @example\n * ```typescript\n * const signer = new SigningAccount(account, account.addr)\n * const algorand = AlgorandClient.mainNet().setSigner(signer.addr, signer.signer)\n * ```\n */\n public setSigner(sender: string | Address, signer: TransactionSigner) {\n this._accountManager.setSigner(sender, signer)\n return this\n }\n\n /**\n * Sets a cache value to use for suggested transaction params.\n * @param suggestedParams The suggested params to use\n * @param until A date until which to cache, or if not specified then the timeout is used\n * @returns The `AlgorandClient` so method calls can be chained\n * @example\n * ```typescript\n * const algorand = AlgorandClient.mainNet().setSuggestedParamsCache(suggestedParams, new Date(+new Date() + 3_600_000))\n * ```\n */\n public setSuggestedParamsCache(suggestedParams: SuggestedParams, until?: Date) {\n this._cachedSuggestedParams = suggestedParams\n this._cachedSuggestedParamsExpiry = until ?? new Date(+new Date() + this._cachedSuggestedParamsTimeout)\n return this\n }\n\n /**\n * Sets the timeout for caching suggested params.\n * @param timeout The timeout in milliseconds\n * @returns The `AlgorandClient` so method calls can be chained\n * @example\n * ```typescript\n * const algorand = AlgorandClient.mainNet().setSuggestedParamsCacheTimeout(10_000)\n * ```\n */\n public setSuggestedParamsCacheTimeout(timeout: number) {\n this._cachedSuggestedParamsTimeout = timeout\n return this\n }\n\n /**\n * Get suggested params for a transaction (either cached or from algod if the cache is stale or empty)\n * @returns The suggested transaction parameters.\n * @example\n * const params = await AlgorandClient.mainNet().getSuggestedParams();\n */\n public async getSuggestedParams(): Promise<SuggestedParams> {\n if (this._cachedSuggestedParams && (!this._cachedSuggestedParamsExpiry || this._cachedSuggestedParamsExpiry > new Date())) {\n return {\n ...this._cachedSuggestedParams,\n }\n }\n\n this._cachedSuggestedParams = await this._clientManager.algod.suggestedParams()\n this._cachedSuggestedParamsExpiry = new Date(new Date().getTime() + this._cachedSuggestedParamsTimeout)\n\n return {\n ...this._cachedSuggestedParams,\n }\n }\n\n /**\n * Get clients, including algosdk clients and app clients.\n * @returns The `ClientManager` instance.\n * @example\n * const clientManager = AlgorandClient.mainNet().client;\n */\n public get client() {\n return this._clientManager\n }\n\n /**\n * Get or create accounts that can sign transactions.\n * @returns The `AccountManager` instance.\n * @example\n * const accountManager = AlgorandClient.mainNet().account;\n */\n public get account() {\n return this._accountManager\n }\n\n /**\n * Methods for interacting with assets.\n * @returns The `AssetManager` instance.\n * @example\n * const assetManager = AlgorandClient.mainNet().asset;\n */\n public get asset() {\n return this._assetManager\n }\n\n /**\n * Methods for interacting with apps.\n * @returns The `AppManager` instance.\n * @example\n * const appManager = AlgorandClient.mainNet().app;\n */\n public get app() {\n return this._appManager\n }\n\n /**\n * Methods for deploying apps and managing app deployment metadata.\n * @returns The `AppDeployer` instance.\n * @example\n * const deployer = AlgorandClient.mainNet().appDeployer;\n */\n public get appDeployer() {\n return this._appDeployer\n }\n\n /**\n * Register a function that will be used to transform an error caught when simulating or executing\n * composed transaction groups made from `newGroup`\n */\n public registerErrorTransformer(transformer: ErrorTransformer) {\n this._errorTransformers.add(transformer)\n }\n\n public unregisterErrorTransformer(transformer: ErrorTransformer) {\n this._errorTransformers.delete(transformer)\n }\n\n /** Start a new `TransactionComposer` transaction group\n * @returns A new instance of `TransactionComposer`.\n * @example\n * const composer = AlgorandClient.mainNet().newGroup();\n * const result = await composer.addTransaction(payment).send()\n */\n public newGroup(composerConfig?: TransactionComposerConfig) {\n return new TransactionComposer({\n algod: this.client.algod,\n getSigner: (addr: ReadableAddress) => this.account.getSigner(addr),\n getSuggestedParams: () => this.getSuggestedParams(),\n defaultValidityWindow: this._defaultValidityWindow,\n appManager: this._appManager,\n errorTransformers: [...this._errorTransformers],\n composerConfig: composerConfig,\n })\n }\n\n /**\n * Methods for sending a transaction.\n * @returns The `AlgorandClientTransactionSender` instance.\n * @example\n * const result = await AlgorandClient.mainNet().send.payment({\n * sender: \"SENDERADDRESS\",\n * receiver: \"RECEIVERADDRESS\",\n * amount: algo(1)\n * })\n */\n public get send() {\n return this._transactionSender\n }\n\n /**\n * Methods for creating a transaction.\n * @returns The `AlgorandClientTransactionCreator` instance.\n * @example\n * const payment = await AlgorandClient.mainNet().createTransaction.payment({\n * sender: \"SENDERADDRESS\",\n * receiver: \"RECEIVERADDRESS\",\n * amount: algo(1)\n * })\n */\n public get createTransaction() {\n return this._transactionCreator\n }\n\n // Static methods to create an `AlgorandClient`\n\n /**\n * Creates an `AlgorandClient` pointing at default LocalNet ports and API token.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const algorand = AlgorandClient.defaultLocalNet();\n */\n public static defaultLocalNet() {\n return new AlgorandClient({\n algodConfig: ClientManager.getDefaultLocalNetConfig('algod'),\n indexerConfig: ClientManager.getDefaultLocalNetConfig('indexer'),\n kmdConfig: ClientManager.getDefaultLocalNetConfig('kmd'),\n })\n }\n\n /**\n * Creates an `AlgorandClient` pointing at TestNet using AlgoNode.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const algorand = AlgorandClient.testNet();\n */\n public static testNet() {\n return new AlgorandClient({\n algodConfig: ClientManager.getAlgoNodeConfig('testnet', 'algod'),\n indexerConfig: ClientManager.getAlgoNodeConfig('testnet', 'indexer'),\n kmdConfig: undefined,\n })\n }\n\n /**\n * Creates an `AlgorandClient` pointing at MainNet using AlgoNode.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const algorand = AlgorandClient.mainNet();\n */\n public static mainNet() {\n return new AlgorandClient({\n algodConfig: ClientManager.getAlgoNodeConfig('mainnet', 'algod'),\n indexerConfig: ClientManager.getAlgoNodeConfig('mainnet', 'indexer'),\n kmdConfig: undefined,\n })\n }\n\n /**\n * Creates an `AlgorandClient` pointing to the given client(s).\n * @param clients The clients to use.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const algorand = AlgorandClient.fromClients({ algod, indexer, kmd });\n */\n public static fromClients(clients: AlgoSdkClients) {\n return new AlgorandClient(clients)\n }\n\n /**\n * Creates an `AlgorandClient` loading the configuration from environment variables.\n *\n * Retrieve configurations from environment variables when defined or get default LocalNet configuration if they aren't defined.\n *\n * Expects to be called from a Node.js environment.\n *\n * If `process.env.ALGOD_SERVER` is defined it will use that along with optional `process.env.ALGOD_PORT` and `process.env.ALGOD_TOKEN`.\n *\n * If `process.env.INDEXER_SERVER` is defined it will use that along with optional `process.env.INDEXER_PORT` and `process.env.INDEXER_TOKEN`.\n *\n * If either aren't defined it will use the default LocalNet config.\n *\n * It will return a KMD configuration that uses `process.env.KMD_PORT` (or port 4002) if `process.env.ALGOD_SERVER` is defined,\n * otherwise it will use the default LocalNet config unless it detects testnet or mainnet.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const client = AlgorandClient.fromEnvironment();\n */\n public static fromEnvironment() {\n return new AlgorandClient(ClientManager.getConfigFromEnvironmentOrLocalNet())\n }\n\n /**\n * Creates an `AlgorandClient` from the given config.\n * @param config The config to use.\n * @returns An instance of the `AlgorandClient`.\n * @example\n * const client = AlgorandClient.fromConfig({ algodConfig, indexerConfig, kmdConfig });\n */\n public static fromConfig(config: AlgoConfig) {\n return new AlgorandClient(config)\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,iBAAb,MAAa,eAAe;CAC1B,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,AAAQ;CACR,AAAQ;CACR,AAAQ,gCAAwC;CAEhD,AAAQ,yBAA6C;;;;;;CAOrD,AAAQ,qCAA4C,IAAI,KAAK;CAE7D,AAAQ,YAAY,QAAqC;AACvD,OAAK,iBAAiB,IAAI,cAAc,QAAQ,KAAK;AACrD,OAAK,kBAAkB,IAAI,eAAe,KAAK,eAAe;AAC9D,OAAK,cAAc,IAAI,WAAW,KAAK,eAAe,MAAM;AAC5D,OAAK,gBAAgB,IAAI,aAAa,KAAK,eAAe,QAAQ,aAAW,KAAK,SAASA,SAAO,CAAC;AACnG,OAAK,qBAAqB,IAAI,iCAAiC,aAAW,KAAK,SAASA,SAAO,EAAE,KAAK,eAAe,KAAK,YAAY;AACtI,OAAK,sBAAsB,IAAI,kCAAkC,aAAW,KAAK,SAASA,SAAO,CAAC;AAClG,OAAK,eAAe,IAAI,YAAY,KAAK,aAAa,KAAK,oBAAoB,KAAK,eAAe,iBAAiB;;;;;;;;;;;CAYtH,AAAO,yBAAyB,gBAAiC;AAC/D,OAAK,yBAAyB,OAAO,eAAe;AACpD,SAAO;;;;;;;;;;;;CAaT,AAAO,iBAAiB,QAA0E;AAChG,OAAK,gBAAgB,iBAAiB,OAAO;AAC7C,SAAO;;;;;;;;;;;;;;;;;CAkBT,AAAO,qBAAqB,SAA2E;AACrG,OAAK,gBAAgB,qBAAqB,QAAQ;AAClD,SAAO;;;;;;;;;;;;;CAcT,AAAO,UAAU,QAA0B,QAA2B;AACpE,OAAK,gBAAgB,UAAU,QAAQ,OAAO;AAC9C,SAAO;;;;;;;;;;;;CAaT,AAAO,wBAAwB,iBAAkC,OAAc;AAC7E,OAAK,yBAAyB;AAC9B,OAAK,+BAA+B,SAAS,IAAI,KAAK,iBAAC,IAAI,MAAM,GAAG,KAAK,8BAA8B;AACvG,SAAO;;;;;;;;;;;CAYT,AAAO,+BAA+B,SAAiB;AACrD,OAAK,gCAAgC;AACrC,SAAO;;;;;;;;CAST,MAAa,qBAA+C;AAC1D,MAAI,KAAK,2BAA2B,CAAC,KAAK,gCAAgC,KAAK,+CAA+B,IAAI,MAAM,EACtH,QAAO,EACL,GAAG,KAAK,wBACT;AAGH,OAAK,yBAAyB,MAAM,KAAK,eAAe,MAAM,iBAAiB;AAC/E,OAAK,+BAA+B,IAAI,sBAAK,IAAI,MAAM,EAAC,SAAS,GAAG,KAAK,8BAA8B;AAEvG,SAAO,EACL,GAAG,KAAK,wBACT;;;;;;;;CASH,IAAW,SAAS;AAClB,SAAO,KAAK;;;;;;;;CASd,IAAW,UAAU;AACnB,SAAO,KAAK;;;;;;;;CASd,IAAW,QAAQ;AACjB,SAAO,KAAK;;;;;;;;CASd,IAAW,MAAM;AACf,SAAO,KAAK;;;;;;;;CASd,IAAW,cAAc;AACvB,SAAO,KAAK;;;;;;CAOd,AAAO,yBAAyB,aAA+B;AAC7D,OAAK,mBAAmB,IAAI,YAAY;;CAG1C,AAAO,2BAA2B,aAA+B;AAC/D,OAAK,mBAAmB,OAAO,YAAY;;;;;;;;CAS7C,AAAO,SAAS,gBAA4C;AAC1D,SAAO,IAAI,oBAAoB;GAC7B,OAAO,KAAK,OAAO;GACnB,YAAY,SAA0B,KAAK,QAAQ,UAAU,KAAK;GAClE,0BAA0B,KAAK,oBAAoB;GACnD,uBAAuB,KAAK;GAC5B,YAAY,KAAK;GACjB,mBAAmB,CAAC,GAAG,KAAK,mBAAmB;GAC/B;GACjB,CAAC;;;;;;;;;;;;CAaJ,IAAW,OAAO;AAChB,SAAO,KAAK;;;;;;;;;;;;CAad,IAAW,oBAAoB;AAC7B,SAAO,KAAK;;;;;;;;CAWd,OAAc,kBAAkB;AAC9B,SAAO,IAAI,eAAe;GACxB,aAAa,cAAc,yBAAyB,QAAQ;GAC5D,eAAe,cAAc,yBAAyB,UAAU;GAChE,WAAW,cAAc,yBAAyB,MAAM;GACzD,CAAC;;;;;;;;CASJ,OAAc,UAAU;AACtB,SAAO,IAAI,eAAe;GACxB,aAAa,cAAc,kBAAkB,WAAW,QAAQ;GAChE,eAAe,cAAc,kBAAkB,WAAW,UAAU;GACpE,WAAW;GACZ,CAAC;;;;;;;;CASJ,OAAc,UAAU;AACtB,SAAO,IAAI,eAAe;GACxB,aAAa,cAAc,kBAAkB,WAAW,QAAQ;GAChE,eAAe,cAAc,kBAAkB,WAAW,UAAU;GACpE,WAAW;GACZ,CAAC;;;;;;;;;CAUJ,OAAc,YAAY,SAAyB;AACjD,SAAO,IAAI,eAAe,QAAQ;;;;;;;;;;;;;;;;;;;;;CAsBpC,OAAc,kBAAkB;AAC9B,SAAO,IAAI,eAAe,cAAc,oCAAoC,CAAC;;;;;;;;;CAU/E,OAAc,WAAW,QAAoB;AAC3C,SAAO,IAAI,eAAe,OAAO"}
1
+ {"version":3,"file":"algorand-client.mjs","names":["_AlgorandClient"],"sources":["../../src/types/algorand-client.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/algorand-client'\n\nimport { AlgorandClient as _AlgorandClient } from '../algorand-client'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/algorand-client` instead */\nexport const AlgorandClient = _AlgorandClient\n/** @deprecated Import from `@algorandfoundation/algokit-utils/algorand-client` instead */\nexport type AlgorandClient = _AlgorandClient\n"],"mappings":";;;;AAMA,MAAa,iBAAiBA"}
package/types/amount.d.ts CHANGED
@@ -1,49 +1,10 @@
1
+ import { AlgoAmount as AlgoAmount$1 } from "../amount.js";
2
+
1
3
  //#region src/types/amount.d.ts
2
- /** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */
3
- declare class AlgoAmount {
4
- private amountInMicroAlgo;
5
- /** Return the amount as a number in µAlgo */
6
- get microAlgos(): bigint;
7
- /** Return the amount as a number in µAlgo */
8
- get microAlgo(): bigint;
9
- /** Return the amount as a number in Algo */
10
- get algos(): number;
11
- /** Return the amount as a number in Algo */
12
- get algo(): number;
13
- /**
14
- * Create a new `AlgoAmount` instance.
15
- *
16
- * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.
17
- * @returns A new instance of `AlgoAmount` representing the specified amount.
18
- * @example
19
- * ```typescript
20
- * const amount = new AlgoAmount({ algo: 5 });
21
- * ```
22
- */
23
- constructor(amount: {
24
- algos: number | bigint;
25
- } | {
26
- algo: number | bigint;
27
- } | {
28
- microAlgos: number | bigint;
29
- } | {
30
- microAlgo: number | bigint;
31
- });
32
- toString(): string;
33
- /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,
34
- * but it's not recommended to use this to convert to a number, it's much safer to explicitly call
35
- * the algos or microAlgos properties
36
- */
37
- valueOf(): number;
38
- /** Create a `AlgoAmount` object representing the given number of Algo */
39
- static Algos(amount: number | bigint): AlgoAmount;
40
- /** Create a `AlgoAmount` object representing the given number of Algo */
41
- static Algo(amount: number | bigint): AlgoAmount;
42
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
43
- static MicroAlgos(amount: number | bigint): AlgoAmount;
44
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
45
- static MicroAlgo(amount: number | bigint): AlgoAmount;
46
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */
5
+ declare const AlgoAmount: typeof AlgoAmount$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */
7
+ type AlgoAmount = AlgoAmount$1;
47
8
  //#endregion
48
9
  export { AlgoAmount };
49
10
  //# sourceMappingURL=amount.d.ts.map
package/types/amount.js CHANGED
@@ -1,84 +1,8 @@
1
+ const require_amount = require('../amount.js');
1
2
 
2
3
  //#region src/types/amount.ts
3
- /** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */
4
- var AlgoAmount = class AlgoAmount {
5
- amountInMicroAlgo;
6
- /** Return the amount as a number in µAlgo */
7
- get microAlgos() {
8
- return this.amountInMicroAlgo;
9
- }
10
- /** Return the amount as a number in µAlgo */
11
- get microAlgo() {
12
- return this.amountInMicroAlgo;
13
- }
14
- /** Return the amount as a number in Algo */
15
- get algos() {
16
- return microalgosToAlgos(Number(this.amountInMicroAlgo));
17
- }
18
- /** Return the amount as a number in Algo */
19
- get algo() {
20
- return microalgosToAlgos(Number(this.amountInMicroAlgo));
21
- }
22
- /**
23
- * Create a new `AlgoAmount` instance.
24
- *
25
- * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.
26
- * @returns A new instance of `AlgoAmount` representing the specified amount.
27
- * @example
28
- * ```typescript
29
- * const amount = new AlgoAmount({ algo: 5 });
30
- * ```
31
- */
32
- constructor(amount) {
33
- this.amountInMicroAlgo = "microAlgos" in amount ? BigInt(amount.microAlgos) : "microAlgo" in amount ? BigInt(amount.microAlgo) : "algos" in amount ? BigInt(algosToMicroalgos(Number(amount.algos))) : BigInt(algosToMicroalgos(Number(amount.algo)));
34
- }
35
- toString() {
36
- return `${this.microAlgo.toLocaleString("en-US")} µALGO`;
37
- }
38
- /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,
39
- * but it's not recommended to use this to convert to a number, it's much safer to explicitly call
40
- * the algos or microAlgos properties
41
- */
42
- valueOf() {
43
- return Number(this.microAlgo);
44
- }
45
- /** Create a `AlgoAmount` object representing the given number of Algo */
46
- static Algos(amount) {
47
- return new AlgoAmount({ algos: amount });
48
- }
49
- /** Create a `AlgoAmount` object representing the given number of Algo */
50
- static Algo(amount) {
51
- return new AlgoAmount({ algos: amount });
52
- }
53
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
54
- static MicroAlgos(amount) {
55
- return new AlgoAmount({ microAlgos: amount });
56
- }
57
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
58
- static MicroAlgo(amount) {
59
- return new AlgoAmount({ microAlgos: amount });
60
- }
61
- };
62
- const MICROALGOS_TO_ALGOS_RATIO = 1e6;
63
- const INVALID_MICROALGOS_ERROR_MSG = "Microalgos should be positive and less than 2^53 - 1.";
64
- /**
65
- * microalgosToAlgos converts microalgos to algos
66
- * @param microalgos - number
67
- * @returns number
68
- */
69
- function microalgosToAlgos(microalgos) {
70
- if (microalgos < 0 || !Number.isSafeInteger(microalgos)) throw new Error(INVALID_MICROALGOS_ERROR_MSG);
71
- return microalgos / MICROALGOS_TO_ALGOS_RATIO;
72
- }
73
- /**
74
- * algosToMicroalgos converts algos to microalgos
75
- * @param algos - number
76
- * @returns number
77
- */
78
- function algosToMicroalgos(algos) {
79
- const microalgos = algos * MICROALGOS_TO_ALGOS_RATIO;
80
- return Math.round(microalgos);
81
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */
5
+ const AlgoAmount = require_amount.AlgoAmount;
82
6
 
83
7
  //#endregion
84
8
  exports.AlgoAmount = AlgoAmount;
@@ -1 +1 @@
1
- {"version":3,"file":"amount.js","names":[],"sources":["../../src/types/amount.ts"],"sourcesContent":["/** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */\nexport class AlgoAmount {\n private amountInMicroAlgo: bigint\n\n /** Return the amount as a number in µAlgo */\n get microAlgos() {\n return this.amountInMicroAlgo\n }\n\n /** Return the amount as a number in µAlgo */\n get microAlgo() {\n return this.amountInMicroAlgo\n }\n\n /** Return the amount as a number in Algo */\n get algos() {\n return microalgosToAlgos(Number(this.amountInMicroAlgo))\n }\n\n /** Return the amount as a number in Algo */\n get algo() {\n return microalgosToAlgos(Number(this.amountInMicroAlgo))\n }\n\n /**\n * Create a new `AlgoAmount` instance.\n *\n * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.\n * @returns A new instance of `AlgoAmount` representing the specified amount.\n * @example\n * ```typescript\n * const amount = new AlgoAmount({ algo: 5 });\n * ```\n */\n constructor(\n amount: { algos: number | bigint } | { algo: number | bigint } | { microAlgos: number | bigint } | { microAlgo: number | bigint },\n ) {\n this.amountInMicroAlgo =\n 'microAlgos' in amount\n ? BigInt(amount.microAlgos)\n : 'microAlgo' in amount\n ? BigInt(amount.microAlgo)\n : 'algos' in amount\n ? BigInt(algosToMicroalgos(Number(amount.algos)))\n : BigInt(algosToMicroalgos(Number(amount.algo)))\n }\n\n toString(): string {\n return `${this.microAlgo.toLocaleString('en-US')} µALGO`\n }\n\n /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,\n * but it's not recommended to use this to convert to a number, it's much safer to explicitly call\n * the algos or microAlgos properties\n */\n valueOf(): number {\n return Number(this.microAlgo)\n }\n\n /** Create a `AlgoAmount` object representing the given number of Algo */\n static Algos(amount: number | bigint) {\n return new AlgoAmount({ algos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of Algo */\n static Algo(amount: number | bigint) {\n return new AlgoAmount({ algos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of µAlgo */\n static MicroAlgos(amount: number | bigint) {\n return new AlgoAmount({ microAlgos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of µAlgo */\n static MicroAlgo(amount: number | bigint) {\n return new AlgoAmount({ microAlgos: amount })\n }\n}\n\nconst MICROALGOS_TO_ALGOS_RATIO = 1e6\nconst INVALID_MICROALGOS_ERROR_MSG = 'Microalgos should be positive and less than 2^53 - 1.'\n\n/**\n * microalgosToAlgos converts microalgos to algos\n * @param microalgos - number\n * @returns number\n */\nfunction microalgosToAlgos(microalgos: number) {\n if (microalgos < 0 || !Number.isSafeInteger(microalgos)) {\n throw new Error(INVALID_MICROALGOS_ERROR_MSG)\n }\n return microalgos / MICROALGOS_TO_ALGOS_RATIO\n}\n\n/**\n * algosToMicroalgos converts algos to microalgos\n * @param algos - number\n * @returns number\n */\nfunction algosToMicroalgos(algos: number) {\n const microalgos = algos * MICROALGOS_TO_ALGOS_RATIO\n return Math.round(microalgos)\n}\n"],"mappings":";;;AACA,IAAa,aAAb,MAAa,WAAW;CACtB,AAAQ;;CAGR,IAAI,aAAa;AACf,SAAO,KAAK;;;CAId,IAAI,YAAY;AACd,SAAO,KAAK;;;CAId,IAAI,QAAQ;AACV,SAAO,kBAAkB,OAAO,KAAK,kBAAkB,CAAC;;;CAI1D,IAAI,OAAO;AACT,SAAO,kBAAkB,OAAO,KAAK,kBAAkB,CAAC;;;;;;;;;;;;CAa1D,YACE,QACA;AACA,OAAK,oBACH,gBAAgB,SACZ,OAAO,OAAO,WAAW,GACzB,eAAe,SACb,OAAO,OAAO,UAAU,GACxB,WAAW,SACT,OAAO,kBAAkB,OAAO,OAAO,MAAM,CAAC,CAAC,GAC/C,OAAO,kBAAkB,OAAO,OAAO,KAAK,CAAC,CAAC;;CAG1D,WAAmB;AACjB,SAAO,GAAG,KAAK,UAAU,eAAe,QAAQ,CAAC;;;;;;CAOnD,UAAkB;AAChB,SAAO,OAAO,KAAK,UAAU;;;CAI/B,OAAO,MAAM,QAAyB;AACpC,SAAO,IAAI,WAAW,EAAE,OAAO,QAAQ,CAAC;;;CAI1C,OAAO,KAAK,QAAyB;AACnC,SAAO,IAAI,WAAW,EAAE,OAAO,QAAQ,CAAC;;;CAI1C,OAAO,WAAW,QAAyB;AACzC,SAAO,IAAI,WAAW,EAAE,YAAY,QAAQ,CAAC;;;CAI/C,OAAO,UAAU,QAAyB;AACxC,SAAO,IAAI,WAAW,EAAE,YAAY,QAAQ,CAAC;;;AAIjD,MAAM,4BAA4B;AAClC,MAAM,+BAA+B;;;;;;AAOrC,SAAS,kBAAkB,YAAoB;AAC7C,KAAI,aAAa,KAAK,CAAC,OAAO,cAAc,WAAW,CACrD,OAAM,IAAI,MAAM,6BAA6B;AAE/C,QAAO,aAAa;;;;;;;AAQtB,SAAS,kBAAkB,OAAe;CACxC,MAAM,aAAa,QAAQ;AAC3B,QAAO,KAAK,MAAM,WAAW"}
1
+ {"version":3,"file":"amount.js","names":["_AlgoAmount"],"sources":["../../src/types/amount.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/amount'\n\nimport { AlgoAmount as _AlgoAmount } from '../amount'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */\nexport const AlgoAmount = _AlgoAmount\n/** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */\nexport type AlgoAmount = _AlgoAmount\n"],"mappings":";;;;AAMA,MAAa,aAAaA"}
package/types/amount.mjs CHANGED
@@ -1,83 +1,8 @@
1
+ import { AlgoAmount as AlgoAmount$1 } from "../amount.mjs";
2
+
1
3
  //#region src/types/amount.ts
2
- /** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */
3
- var AlgoAmount = class AlgoAmount {
4
- amountInMicroAlgo;
5
- /** Return the amount as a number in µAlgo */
6
- get microAlgos() {
7
- return this.amountInMicroAlgo;
8
- }
9
- /** Return the amount as a number in µAlgo */
10
- get microAlgo() {
11
- return this.amountInMicroAlgo;
12
- }
13
- /** Return the amount as a number in Algo */
14
- get algos() {
15
- return microalgosToAlgos(Number(this.amountInMicroAlgo));
16
- }
17
- /** Return the amount as a number in Algo */
18
- get algo() {
19
- return microalgosToAlgos(Number(this.amountInMicroAlgo));
20
- }
21
- /**
22
- * Create a new `AlgoAmount` instance.
23
- *
24
- * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.
25
- * @returns A new instance of `AlgoAmount` representing the specified amount.
26
- * @example
27
- * ```typescript
28
- * const amount = new AlgoAmount({ algo: 5 });
29
- * ```
30
- */
31
- constructor(amount) {
32
- this.amountInMicroAlgo = "microAlgos" in amount ? BigInt(amount.microAlgos) : "microAlgo" in amount ? BigInt(amount.microAlgo) : "algos" in amount ? BigInt(algosToMicroalgos(Number(amount.algos))) : BigInt(algosToMicroalgos(Number(amount.algo)));
33
- }
34
- toString() {
35
- return `${this.microAlgo.toLocaleString("en-US")} µALGO`;
36
- }
37
- /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,
38
- * but it's not recommended to use this to convert to a number, it's much safer to explicitly call
39
- * the algos or microAlgos properties
40
- */
41
- valueOf() {
42
- return Number(this.microAlgo);
43
- }
44
- /** Create a `AlgoAmount` object representing the given number of Algo */
45
- static Algos(amount) {
46
- return new AlgoAmount({ algos: amount });
47
- }
48
- /** Create a `AlgoAmount` object representing the given number of Algo */
49
- static Algo(amount) {
50
- return new AlgoAmount({ algos: amount });
51
- }
52
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
53
- static MicroAlgos(amount) {
54
- return new AlgoAmount({ microAlgos: amount });
55
- }
56
- /** Create a `AlgoAmount` object representing the given number of µAlgo */
57
- static MicroAlgo(amount) {
58
- return new AlgoAmount({ microAlgos: amount });
59
- }
60
- };
61
- const MICROALGOS_TO_ALGOS_RATIO = 1e6;
62
- const INVALID_MICROALGOS_ERROR_MSG = "Microalgos should be positive and less than 2^53 - 1.";
63
- /**
64
- * microalgosToAlgos converts microalgos to algos
65
- * @param microalgos - number
66
- * @returns number
67
- */
68
- function microalgosToAlgos(microalgos) {
69
- if (microalgos < 0 || !Number.isSafeInteger(microalgos)) throw new Error(INVALID_MICROALGOS_ERROR_MSG);
70
- return microalgos / MICROALGOS_TO_ALGOS_RATIO;
71
- }
72
- /**
73
- * algosToMicroalgos converts algos to microalgos
74
- * @param algos - number
75
- * @returns number
76
- */
77
- function algosToMicroalgos(algos) {
78
- const microalgos = algos * MICROALGOS_TO_ALGOS_RATIO;
79
- return Math.round(microalgos);
80
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */
5
+ const AlgoAmount = AlgoAmount$1;
81
6
 
82
7
  //#endregion
83
8
  export { AlgoAmount };
@@ -1 +1 @@
1
- {"version":3,"file":"amount.mjs","names":[],"sources":["../../src/types/amount.ts"],"sourcesContent":["/** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */\nexport class AlgoAmount {\n private amountInMicroAlgo: bigint\n\n /** Return the amount as a number in µAlgo */\n get microAlgos() {\n return this.amountInMicroAlgo\n }\n\n /** Return the amount as a number in µAlgo */\n get microAlgo() {\n return this.amountInMicroAlgo\n }\n\n /** Return the amount as a number in Algo */\n get algos() {\n return microalgosToAlgos(Number(this.amountInMicroAlgo))\n }\n\n /** Return the amount as a number in Algo */\n get algo() {\n return microalgosToAlgos(Number(this.amountInMicroAlgo))\n }\n\n /**\n * Create a new `AlgoAmount` instance.\n *\n * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.\n * @returns A new instance of `AlgoAmount` representing the specified amount.\n * @example\n * ```typescript\n * const amount = new AlgoAmount({ algo: 5 });\n * ```\n */\n constructor(\n amount: { algos: number | bigint } | { algo: number | bigint } | { microAlgos: number | bigint } | { microAlgo: number | bigint },\n ) {\n this.amountInMicroAlgo =\n 'microAlgos' in amount\n ? BigInt(amount.microAlgos)\n : 'microAlgo' in amount\n ? BigInt(amount.microAlgo)\n : 'algos' in amount\n ? BigInt(algosToMicroalgos(Number(amount.algos)))\n : BigInt(algosToMicroalgos(Number(amount.algo)))\n }\n\n toString(): string {\n return `${this.microAlgo.toLocaleString('en-US')} µALGO`\n }\n\n /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,\n * but it's not recommended to use this to convert to a number, it's much safer to explicitly call\n * the algos or microAlgos properties\n */\n valueOf(): number {\n return Number(this.microAlgo)\n }\n\n /** Create a `AlgoAmount` object representing the given number of Algo */\n static Algos(amount: number | bigint) {\n return new AlgoAmount({ algos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of Algo */\n static Algo(amount: number | bigint) {\n return new AlgoAmount({ algos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of µAlgo */\n static MicroAlgos(amount: number | bigint) {\n return new AlgoAmount({ microAlgos: amount })\n }\n\n /** Create a `AlgoAmount` object representing the given number of µAlgo */\n static MicroAlgo(amount: number | bigint) {\n return new AlgoAmount({ microAlgos: amount })\n }\n}\n\nconst MICROALGOS_TO_ALGOS_RATIO = 1e6\nconst INVALID_MICROALGOS_ERROR_MSG = 'Microalgos should be positive and less than 2^53 - 1.'\n\n/**\n * microalgosToAlgos converts microalgos to algos\n * @param microalgos - number\n * @returns number\n */\nfunction microalgosToAlgos(microalgos: number) {\n if (microalgos < 0 || !Number.isSafeInteger(microalgos)) {\n throw new Error(INVALID_MICROALGOS_ERROR_MSG)\n }\n return microalgos / MICROALGOS_TO_ALGOS_RATIO\n}\n\n/**\n * algosToMicroalgos converts algos to microalgos\n * @param algos - number\n * @returns number\n */\nfunction algosToMicroalgos(algos: number) {\n const microalgos = algos * MICROALGOS_TO_ALGOS_RATIO\n return Math.round(microalgos)\n}\n"],"mappings":";;AACA,IAAa,aAAb,MAAa,WAAW;CACtB,AAAQ;;CAGR,IAAI,aAAa;AACf,SAAO,KAAK;;;CAId,IAAI,YAAY;AACd,SAAO,KAAK;;;CAId,IAAI,QAAQ;AACV,SAAO,kBAAkB,OAAO,KAAK,kBAAkB,CAAC;;;CAI1D,IAAI,OAAO;AACT,SAAO,kBAAkB,OAAO,KAAK,kBAAkB,CAAC;;;;;;;;;;;;CAa1D,YACE,QACA;AACA,OAAK,oBACH,gBAAgB,SACZ,OAAO,OAAO,WAAW,GACzB,eAAe,SACb,OAAO,OAAO,UAAU,GACxB,WAAW,SACT,OAAO,kBAAkB,OAAO,OAAO,MAAM,CAAC,CAAC,GAC/C,OAAO,kBAAkB,OAAO,OAAO,KAAK,CAAC,CAAC;;CAG1D,WAAmB;AACjB,SAAO,GAAG,KAAK,UAAU,eAAe,QAAQ,CAAC;;;;;;CAOnD,UAAkB;AAChB,SAAO,OAAO,KAAK,UAAU;;;CAI/B,OAAO,MAAM,QAAyB;AACpC,SAAO,IAAI,WAAW,EAAE,OAAO,QAAQ,CAAC;;;CAI1C,OAAO,KAAK,QAAyB;AACnC,SAAO,IAAI,WAAW,EAAE,OAAO,QAAQ,CAAC;;;CAI1C,OAAO,WAAW,QAAyB;AACzC,SAAO,IAAI,WAAW,EAAE,YAAY,QAAQ,CAAC;;;CAI/C,OAAO,UAAU,QAAyB;AACxC,SAAO,IAAI,WAAW,EAAE,YAAY,QAAQ,CAAC;;;AAIjD,MAAM,4BAA4B;AAClC,MAAM,+BAA+B;;;;;;AAOrC,SAAS,kBAAkB,YAAoB;AAC7C,KAAI,aAAa,KAAK,CAAC,OAAO,cAAc,WAAW,CACrD,OAAM,IAAI,MAAM,6BAA6B;AAE/C,QAAO,aAAa;;;;;;;AAQtB,SAAS,kBAAkB,OAAe;CACxC,MAAM,aAAa,QAAQ;AAC3B,QAAO,KAAK,MAAM,WAAW"}
1
+ {"version":3,"file":"amount.mjs","names":["_AlgoAmount"],"sources":["../../src/types/amount.ts"],"sourcesContent":["// Re-exports with deprecation notices for backwards compatibility\n// New imports should use '@algorandfoundation/algokit-utils/amount'\n\nimport { AlgoAmount as _AlgoAmount } from '../amount'\n\n/** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */\nexport const AlgoAmount = _AlgoAmount\n/** @deprecated Import from `@algorandfoundation/algokit-utils/amount` instead */\nexport type AlgoAmount = _AlgoAmount\n"],"mappings":";;;;AAMA,MAAa,aAAaA"}