@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,323 +1,20 @@
1
- import { Address, ReadableAddress } from "../packages/common/src/address.js";
2
- import { ABIValue } from "../packages/abi/src/abi-value.js";
3
- import { ABIType } from "../packages/abi/src/abi-type.js";
4
- import { ABIMethod, ABIReturn } from "../packages/abi/src/abi-method.js";
5
- import { BoxReference as BoxReference$1 } from "../packages/transact/src/transactions/app-call.js";
6
- import { AddressWithTransactionSigner } from "../packages/transact/src/signer.js";
7
- import { TealValue } from "../packages/algod_client/src/models/teal-value.js";
8
- import { EvalDelta } from "../packages/algod_client/src/models/eval-delta.js";
9
- import { PendingTransactionResponse } from "../packages/algod_client/src/models/pending-transaction-response.js";
10
- import { AlgodClient } from "../packages/algod_client/src/client.js";
11
- import { AppState, BoxName, CompiledTeal, TealTemplateParams } from "./app.js";
1
+ import { AppInformation as AppInformation$1, AppManager as AppManager$1, BoxIdentifier as BoxIdentifier$1, BoxReference as BoxReference$1, BoxValueRequestParams as BoxValueRequestParams$1, BoxValuesRequestParams as BoxValuesRequestParams$1 } from "../app-manager.js";
12
2
 
13
3
  //#region src/types/app-manager.d.ts
14
- /** Information about an app. */
15
- interface AppInformation {
16
- /** The ID of the app. */
17
- appId: bigint;
18
- /** The escrow address that the app operates with. */
19
- appAddress: Address;
20
- /**
21
- * Approval program.
22
- */
23
- approvalProgram: Uint8Array;
24
- /**
25
- * Clear state program.
26
- */
27
- clearStateProgram: Uint8Array;
28
- /**
29
- * The address that created this application. This is the address where the
30
- * parameters and global state for this application can be found.
31
- */
32
- creator: Address;
33
- /**
34
- * Current global state values.
35
- */
36
- globalState: AppState;
37
- /** The number of allocated ints in per-user local state. */
38
- localInts: number;
39
- /** The number of allocated byte slices in per-user local state. */
40
- localByteSlices: number;
41
- /** The number of allocated ints in global state. */
42
- globalInts: number;
43
- /** The number of allocated byte slices in global state. */
44
- globalByteSlices: number;
45
- /** Any extra pages that are needed for the smart contract. */
46
- extraProgramPages?: number;
47
- /** The number of updates to the application programs */
48
- version?: number;
49
- }
50
- /**
51
- * Something that identifies an app box name - either a:
52
- * * `Uint8Array` (the actual binary of the box name)
53
- * * `string` (that will be encoded to a `Uint8Array`)
54
- * * `AddressWithSigner` (that will be encoded into the
55
- * public key address of the corresponding account)
56
- */
57
- type BoxIdentifier = string | Uint8Array | AddressWithTransactionSigner;
58
- /**
59
- * A grouping of the app ID and name identifier to reference an app box.
60
- */
61
- interface BoxReference {
62
- /**
63
- * A unique application id
64
- */
65
- appId: bigint;
66
- /**
67
- * Identifier for a box name
68
- */
69
- name: BoxIdentifier;
70
- }
71
- /**
72
- * Parameters to get and decode a box value as an ABI type.
73
- */
74
- interface BoxValueRequestParams {
75
- /** The ID of the app return box names for */
76
- appId: bigint;
77
- /** The name of the box to return either as a string, binary array or `BoxName` */
78
- boxName: BoxIdentifier;
79
- /** The ABI type to decode the value using */
80
- type: ABIType;
81
- }
82
- /**
83
- * Parameters to get and decode a box value as an ABI type.
84
- */
85
- interface BoxValuesRequestParams {
86
- /** The ID of the app return box names for */
87
- appId: bigint;
88
- /** The names of the boxes to return either as a string, binary array or BoxName` */
89
- boxNames: BoxIdentifier[];
90
- /** The ABI type to decode the value using */
91
- type: ABIType;
92
- }
93
- /** Allows management of application information. */
94
- declare class AppManager {
95
- private _algod;
96
- private _compilationResults;
97
- /**
98
- * Creates an `AppManager`
99
- * @param algod An algod instance
100
- */
101
- constructor(algod: AlgodClient);
102
- /**
103
- * Compiles the given TEAL using algod and returns the result, including source map.
104
- *
105
- * The result of this compilation is also cached keyed by the TEAL
106
- * code so it can be retrieved via `getCompilationResult`.
107
- *
108
- * This function is re-entrant; it will only compile the same code once.
109
- *
110
- * @param tealCode The TEAL code
111
- * @returns The information about the compiled file
112
- * @example
113
- * ```typescript
114
- * const compiled = await appManager.compileTeal(tealProgram)
115
- * ```
116
- */
117
- compileTeal(tealCode: string): Promise<CompiledTeal>;
118
- /**
119
- * Performs template substitution of a teal template and compiles it, returning the compiled result.
120
- *
121
- * Looks for `TMPL_{parameter}` for template replacements and replaces AlgoKit deploy-time control parameters
122
- * if deployment metadata is specified.
123
- *
124
- * * `TMPL_UPDATABLE` for updatability / immutability control
125
- * * `TMPL_DELETABLE` for deletability / permanence control
126
- *
127
- * @param tealTemplateCode The TEAL logic to compile
128
- * @param templateParams Any parameters to replace in the .teal file before compiling
129
- * @param deploymentMetadata The deployment metadata the app will be deployed with
130
- * @returns The information about the compiled code
131
- * @example
132
- * ```typescript
133
- * const compiled = await appManager.compileTealTemplate(tealTemplate, { TMPL_APP_ID: 12345n }, { updatable: true, deletable: false })
134
- * ```
135
- */
136
- compileTealTemplate(tealTemplateCode: string, templateParams?: TealTemplateParams, deploymentMetadata?: {
137
- updatable?: boolean;
138
- deletable?: boolean;
139
- }): Promise<CompiledTeal>;
140
- /**
141
- * Returns a previous compilation result.
142
- * @param tealCode The TEAL code
143
- * @returns The information about the previously compiled file
144
- * or `undefined` if that TEAL code wasn't previously compiled
145
- * @example
146
- * ```typescript
147
- * const compiled = appManager.getCompilationResult(tealProgram)
148
- * ```
149
- */
150
- getCompilationResult(tealCode: string): CompiledTeal | undefined;
151
- /**
152
- * Returns the current app information for the app with the given ID.
153
- *
154
- * @example
155
- * ```typescript
156
- * const appInfo = await appManager.getById(12353n);
157
- * ```
158
- *
159
- * @param appId The ID of the app
160
- * @returns The app information
161
- */
162
- getById(appId: bigint): Promise<AppInformation>;
163
- /**
164
- * Returns the current global state values for the given app ID and account address
165
- *
166
- * @param appId The ID of the app to return global state for
167
- * @returns The current global state for the given app
168
- * @example
169
- * ```typescript
170
- * const globalState = await appManager.getGlobalState(12353n);
171
- * ```
172
- */
173
- getGlobalState(appId: bigint): Promise<AppState>;
174
- /**
175
- * Returns the current local state values for the given app ID and account address
176
- *
177
- * @param appId The ID of the app to return local state for
178
- * @param address The string address of the account to get local state for the given app
179
- * @returns The current local state for the given (app, account) combination
180
- * @example
181
- * ```typescript
182
- * const localState = await appManager.getLocalState(12353n, 'ACCOUNTADDRESS');
183
- * ```
184
- */
185
- getLocalState(appId: bigint, address: ReadableAddress): Promise<AppState>;
186
- /**
187
- * Returns the names of the current boxes for the given app.
188
- * @param appId The ID of the app return box names for
189
- * @returns The current box names
190
- * @example
191
- * ```typescript
192
- * const boxNames = await appManager.getBoxNames(12353n);
193
- * ```
194
- */
195
- getBoxNames(appId: bigint): Promise<BoxName[]>;
196
- /**
197
- * Returns the value of the given box name for the given app.
198
- * @param appId The ID of the app return box names for
199
- * @param boxName The name of the box to return either as a string, binary array or `BoxName`
200
- * @returns The current box value as a byte array
201
- * @example
202
- * ```typescript
203
- * const boxValue = await appManager.getBoxValue(12353n, 'boxName');
204
- * ```
205
- */
206
- getBoxValue(appId: bigint, boxName: BoxIdentifier | BoxName): Promise<Uint8Array>;
207
- /**
208
- * Returns the value of the given box names for the given app.
209
- * @param appId The ID of the app return box names for
210
- * @param boxNames The names of the boxes to return either as a string, binary array or `BoxName`
211
- * @returns The current box values as a byte array in the same order as the passed in box names
212
- * @example
213
- * ```typescript
214
- * const boxValues = await appManager.getBoxValues(12353n, ['boxName1', 'boxName2']);
215
- * ```
216
- */
217
- getBoxValues(appId: bigint, boxNames: (BoxIdentifier | BoxName)[]): Promise<Uint8Array[]>;
218
- /**
219
- * Returns the value of the given box name for the given app decoded based on the given ABI type.
220
- * @param request The parameters for the box value request
221
- * @returns The current box value as an ABI value
222
- * @example
223
- * ```typescript
224
- * const boxValue = await appManager.getBoxValueFromABIType({ appId: 12353n, boxName: 'boxName', type: new ABIUintType(32) });
225
- * ```
226
- */
227
- getBoxValueFromABIType(request: BoxValueRequestParams): Promise<ABIValue>;
228
- /**
229
- * Returns the value of the given box names for the given app decoded based on the given ABI type.
230
- * @param request The parameters for the box value request
231
- * @returns The current box values as an ABI value in the same order as the passed in box names
232
- * @example
233
- * ```typescript
234
- * const boxValues = await appManager.getBoxValuesFromABIType({ appId: 12353n, boxNames: ['boxName1', 'boxName2'], type: new ABIUintType(32) });
235
- * ```
236
- */
237
- getBoxValuesFromABIType(request: BoxValuesRequestParams): Promise<ABIValue[]>;
238
- /**
239
- * Returns a `algosdk.BoxReference` given a `BoxIdentifier` or `BoxReference`.
240
- * @param boxId The box to return a reference for
241
- * @returns The box reference ready to pass into a `algosdk.Transaction`
242
- * @example
243
- * ```typescript
244
- * const boxRef = AppManager.getBoxReference('boxName');
245
- * ```
246
- */
247
- static getBoxReference(boxId: BoxIdentifier | BoxReference): BoxReference$1;
248
- /**
249
- * Converts an array of global/local state values from the algod api to a more friendly
250
- * generic object keyed by the UTF-8 value of the key.
251
- * @param state A `global-state`, `local-state`, `global-state-deltas` or `local-state-deltas`
252
- * @returns An object keyeed by the UTF-8 representation of the key with various parsings of the values
253
- * @example
254
- * ```typescript
255
- * const stateValues = AppManager.decodeAppState(state);
256
- * ```
257
- */
258
- static decodeAppState(state: {
259
- key: Uint8Array;
260
- value: TealValue | EvalDelta;
261
- }[]): AppState;
262
- /**
263
- * Returns any ABI return values for the given app call arguments and transaction confirmation.
264
- * @param confirmation The transaction confirmation from algod
265
- * @param method The ABI method
266
- * @returns The return value for the method call
267
- * @example
268
- * ```typescript
269
- * const returnValue = AppManager.getABIReturn(confirmation, ABIMethod.fromSignature('hello(string)void'));
270
- * ```
271
- */
272
- static getABIReturn(confirmation: PendingTransactionResponse | undefined, method: ABIMethod | undefined): ABIReturn | undefined;
273
- private static hasAbiReturnPrefix;
274
- /**
275
- * Replaces AlgoKit deploy-time deployment control parameters within the given TEAL template code.
276
- *
277
- * * `TMPL_UPDATABLE` for updatability / immutability control
278
- * * `TMPL_DELETABLE` for deletability / permanence control
279
- *
280
- * Note: If these values are defined, but the corresponding `TMPL_*` value
281
- * isn't in the teal code it will throw an exception.
282
- *
283
- * @param tealTemplateCode The TEAL template code to substitute
284
- * @param params The deploy-time deployment control parameter value to replace
285
- * @returns The replaced TEAL code
286
- * @example
287
- * ```typescript
288
- * const tealCode = AppManager.replaceTealTemplateDeployTimeControlParams(tealTemplate, { updatable: true, deletable: false });
289
- * ```
290
- */
291
- static replaceTealTemplateDeployTimeControlParams(tealTemplateCode: string, params: {
292
- updatable?: boolean;
293
- deletable?: boolean;
294
- }): string;
295
- /**
296
- * Performs template substitution of a teal file.
297
- *
298
- * Looks for `TMPL_{parameter}` for template replacements.
299
- *
300
- * @param tealTemplateCode The TEAL template code to make parameter replacements in
301
- * @param templateParams Any parameters to replace in the teal code
302
- * @returns The TEAL code with replacements
303
- * @example
304
- * ```typescript
305
- * const tealCode = AppManager.replaceTealTemplateParams(tealTemplate, { TMPL_APP_ID: 12345n });
306
- * ```
307
- */
308
- static replaceTealTemplateParams(tealTemplateCode: string, templateParams?: TealTemplateParams): string;
309
- /**
310
- * Remove comments from TEAL code (useful to reduce code size before compilation).
311
- *
312
- * @param tealCode The TEAL logic to strip
313
- * @returns The TEAL without comments
314
- * @example
315
- * ```typescript
316
- * const stripped = AppManager.stripTealComments(tealProgram);
317
- * ```
318
- */
319
- static stripTealComments(tealCode: string): string;
320
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
5
+ type AppInformation = AppInformation$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
7
+ type BoxIdentifier = BoxIdentifier$1;
8
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
9
+ type BoxReference = BoxReference$1;
10
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
11
+ type BoxValueRequestParams = BoxValueRequestParams$1;
12
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
13
+ type BoxValuesRequestParams = BoxValuesRequestParams$1;
14
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
15
+ declare const AppManager: typeof AppManager$1;
16
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/app-manager` instead */
17
+ type AppManager = AppManager$1;
321
18
  //#endregion
322
19
  export { AppInformation, AppManager, BoxIdentifier, BoxReference, BoxValueRequestParams, BoxValuesRequestParams };
323
20
  //# sourceMappingURL=app-manager.d.ts.map