@algorandfoundation/algokit-utils 2.3.3-beta.3 → 2.3.3-beta.5

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 (340) hide show
  1. package/cjs/account.d.ts.map +1 -0
  2. package/cjs/account.js.map +1 -0
  3. package/cjs/amount.d.ts.map +1 -0
  4. package/cjs/amount.js.map +1 -0
  5. package/cjs/app-client.d.ts.map +1 -0
  6. package/cjs/app-client.js.map +1 -0
  7. package/cjs/app-deploy.d.ts.map +1 -0
  8. package/cjs/app-deploy.js.map +1 -0
  9. package/cjs/app.d.ts.map +1 -0
  10. package/cjs/app.js.map +1 -0
  11. package/cjs/index.d.ts.map +1 -0
  12. package/cjs/index.js.map +1 -0
  13. package/cjs/indexer-lookup.d.ts.map +1 -0
  14. package/cjs/indexer-lookup.js.map +1 -0
  15. package/cjs/localnet.d.ts.map +1 -0
  16. package/{localnet.js → cjs/localnet.js} +1 -1
  17. package/cjs/localnet.js.map +1 -0
  18. package/cjs/network-client.d.ts.map +1 -0
  19. package/cjs/network-client.js.map +1 -0
  20. package/cjs/testing/account.d.ts.map +1 -0
  21. package/cjs/testing/account.js.map +1 -0
  22. package/cjs/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
  23. package/cjs/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  24. package/cjs/testing/fixtures/algorand-fixture.d.ts.map +1 -0
  25. package/cjs/testing/fixtures/algorand-fixture.js.map +1 -0
  26. package/cjs/testing/fixtures/index.d.ts.map +1 -0
  27. package/cjs/testing/fixtures/index.js.map +1 -0
  28. package/cjs/testing/index.d.ts.map +1 -0
  29. package/cjs/testing/index.js.map +1 -0
  30. package/cjs/testing/indexer.d.ts.map +1 -0
  31. package/cjs/testing/indexer.js.map +1 -0
  32. package/cjs/testing/test-logger.d.ts.map +1 -0
  33. package/{testing → cjs/testing}/test-logger.js +2 -0
  34. package/cjs/testing/test-logger.js.map +1 -0
  35. package/cjs/testing/transaction-logger.d.ts.map +1 -0
  36. package/{testing → cjs/testing}/transaction-logger.js +2 -3
  37. package/cjs/testing/transaction-logger.js.map +1 -0
  38. package/cjs/transaction.d.ts.map +1 -0
  39. package/cjs/transaction.js.map +1 -0
  40. package/cjs/transfer.d.ts.map +1 -0
  41. package/cjs/transfer.js.map +1 -0
  42. package/cjs/types/account.d.ts +66 -0
  43. package/cjs/types/account.d.ts.map +1 -0
  44. package/{types → cjs/types}/account.js +7 -0
  45. package/cjs/types/account.js.map +1 -0
  46. package/cjs/types/algo-http-client-with-retry.d.ts.map +1 -0
  47. package/{types → cjs/types}/algo-http-client-with-retry.js +16 -16
  48. package/cjs/types/algo-http-client-with-retry.js.map +1 -0
  49. package/cjs/types/amount.d.ts +24 -0
  50. package/cjs/types/amount.d.ts.map +1 -0
  51. package/{types → cjs/types}/amount.js +1 -0
  52. package/cjs/types/amount.js.map +1 -0
  53. package/cjs/types/app-client.d.ts +408 -0
  54. package/cjs/types/app-client.d.ts.map +1 -0
  55. package/{types → cjs/types}/app-client.js +13 -0
  56. package/cjs/types/app-client.js.map +1 -0
  57. package/cjs/types/app-spec.d.ts.map +1 -0
  58. package/{types → cjs/types}/app-spec.js.map +1 -1
  59. package/cjs/types/app.d.ts +308 -0
  60. package/cjs/types/app.d.ts.map +1 -0
  61. package/cjs/types/app.js.map +1 -0
  62. package/cjs/types/config.d.ts.map +1 -0
  63. package/{types → cjs/types}/config.js +1 -0
  64. package/cjs/types/config.js.map +1 -0
  65. package/cjs/types/indexer.d.ts.map +1 -0
  66. package/cjs/types/indexer.js.map +1 -0
  67. package/cjs/types/logging.d.ts.map +1 -0
  68. package/cjs/types/logging.js.map +1 -0
  69. package/cjs/types/logic-error.d.ts.map +1 -0
  70. package/{types → cjs/types}/logic-error.js +5 -2
  71. package/cjs/types/logic-error.js.map +1 -0
  72. package/cjs/types/network-client.d.ts +20 -0
  73. package/cjs/types/network-client.d.ts.map +1 -0
  74. package/cjs/types/network-client.js.map +1 -0
  75. package/cjs/types/testing.d.ts.map +1 -0
  76. package/{types → cjs/types}/testing.js.map +1 -1
  77. package/cjs/types/transaction.d.ts +111 -0
  78. package/cjs/types/transaction.d.ts.map +1 -0
  79. package/{types → cjs/types}/transaction.js.map +1 -1
  80. package/cjs/types/transfer.d.ts +32 -0
  81. package/cjs/types/transfer.d.ts.map +1 -0
  82. package/{types → cjs/types}/transfer.js.map +1 -1
  83. package/cjs/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
  84. package/{types → cjs/types}/urlTokenBaseHTTPClient.js +4 -0
  85. package/cjs/types/urlTokenBaseHTTPClient.js.map +1 -0
  86. package/cjs/util.d.ts.map +1 -0
  87. package/cjs/util.js.map +1 -0
  88. package/esm/account.js +170 -0
  89. package/esm/account.js.map +1 -0
  90. package/esm/amount.js +27 -0
  91. package/esm/amount.js.map +1 -0
  92. package/esm/app-client.js +76 -0
  93. package/esm/app-client.js.map +1 -0
  94. package/esm/app-deploy.js +446 -0
  95. package/esm/app-deploy.js.map +1 -0
  96. package/esm/app.js +572 -0
  97. package/esm/app.js.map +1 -0
  98. package/esm/index.js +14 -0
  99. package/esm/index.js.map +1 -0
  100. package/esm/indexer-lookup.js +98 -0
  101. package/esm/indexer-lookup.js.map +1 -0
  102. package/esm/localnet.js +111 -0
  103. package/esm/localnet.js.map +1 -0
  104. package/esm/network-client.js +179 -0
  105. package/esm/network-client.js.map +1 -0
  106. package/esm/testing/account.js +24 -0
  107. package/esm/testing/account.js.map +1 -0
  108. package/esm/testing/fixtures/algokit-log-capture-fixture.js +39 -0
  109. package/esm/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  110. package/esm/testing/fixtures/algorand-fixture.js +53 -0
  111. package/esm/testing/fixtures/algorand-fixture.js.map +1 -0
  112. package/esm/testing/fixtures/index.js +3 -0
  113. package/esm/testing/fixtures/index.js.map +1 -0
  114. package/esm/testing/index.js +6 -0
  115. package/esm/testing/index.js.map +1 -0
  116. package/esm/testing/indexer.js +36 -0
  117. package/esm/testing/indexer.js.map +1 -0
  118. package/esm/testing/test-logger.js +69 -0
  119. package/esm/testing/test-logger.js.map +1 -0
  120. package/esm/testing/transaction-logger.js +66 -0
  121. package/esm/testing/transaction-logger.js.map +1 -0
  122. package/esm/transaction.js +365 -0
  123. package/esm/transaction.js.map +1 -0
  124. package/esm/transfer.js +59 -0
  125. package/esm/transfer.js.map +1 -0
  126. package/esm/types/account.js +90 -0
  127. package/esm/types/account.js.map +1 -0
  128. package/esm/types/algo-http-client-with-retry.js +58 -0
  129. package/esm/types/algo-http-client-with-retry.js.map +1 -0
  130. package/esm/types/amount.js +35 -0
  131. package/esm/types/amount.js.map +1 -0
  132. package/esm/types/app-client.js +624 -0
  133. package/esm/types/app-client.js.map +1 -0
  134. package/esm/types/app-spec.js +2 -0
  135. package/esm/types/app-spec.js.map +1 -0
  136. package/esm/types/app.js +33 -0
  137. package/esm/types/app.js.map +1 -0
  138. package/esm/types/config.js +50 -0
  139. package/esm/types/config.js.map +1 -0
  140. package/esm/types/indexer.js +31 -0
  141. package/esm/types/indexer.js.map +1 -0
  142. package/esm/types/logging.js +24 -0
  143. package/esm/types/logging.js.map +1 -0
  144. package/esm/types/logic-error.js +49 -0
  145. package/esm/types/logic-error.js.map +1 -0
  146. package/esm/types/network-client.js +2 -0
  147. package/esm/types/network-client.js.map +1 -0
  148. package/esm/types/testing.js +2 -0
  149. package/esm/types/testing.js.map +1 -0
  150. package/esm/types/transaction.js +2 -0
  151. package/esm/types/transaction.js.map +1 -0
  152. package/esm/types/transfer.js +2 -0
  153. package/esm/types/transfer.js.map +1 -0
  154. package/esm/types/urlTokenBaseHTTPClient.js +151 -0
  155. package/esm/types/urlTokenBaseHTTPClient.js.map +1 -0
  156. package/esm/util.js +20 -0
  157. package/esm/util.js.map +1 -0
  158. package/package.json +42 -6
  159. package/types/account.d.ts +125 -63
  160. package/types/account.d.ts.map +1 -1
  161. package/types/amount.d.ts +18 -22
  162. package/types/amount.d.ts.map +1 -1
  163. package/types/app-client.d.ts +70 -407
  164. package/types/app-client.d.ts.map +1 -1
  165. package/types/app-deploy.d.ts +101 -0
  166. package/types/app-deploy.d.ts.map +1 -0
  167. package/types/app.d.ts +145 -290
  168. package/types/app.d.ts.map +1 -1
  169. package/types/index.d.ts +14 -0
  170. package/types/index.d.ts.map +1 -0
  171. package/types/indexer-lookup.d.ts +38 -0
  172. package/types/indexer-lookup.d.ts.map +1 -0
  173. package/types/localnet.d.ts +54 -0
  174. package/types/localnet.d.ts.map +1 -0
  175. package/types/network-client.d.ts +96 -19
  176. package/types/network-client.d.ts.map +1 -1
  177. package/types/testing/account.d.ts +14 -0
  178. package/types/testing/account.d.ts.map +1 -0
  179. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts +19 -0
  180. package/types/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
  181. package/types/testing/fixtures/algorand-fixture.d.ts +48 -0
  182. package/types/testing/fixtures/algorand-fixture.d.ts.map +1 -0
  183. package/types/testing/fixtures/index.d.ts +3 -0
  184. package/types/testing/fixtures/index.d.ts.map +1 -0
  185. package/types/testing/index.d.ts +6 -0
  186. package/types/testing/index.d.ts.map +1 -0
  187. package/types/testing/indexer.d.ts +12 -0
  188. package/types/testing/indexer.d.ts.map +1 -0
  189. package/types/testing/test-logger.d.ts +41 -0
  190. package/types/testing/test-logger.d.ts.map +1 -0
  191. package/types/testing/transaction-logger.d.ts +29 -0
  192. package/types/testing/transaction-logger.d.ts.map +1 -0
  193. package/types/transaction.d.ts +133 -106
  194. package/types/transaction.d.ts.map +1 -1
  195. package/types/transfer.d.ts +21 -31
  196. package/types/transfer.d.ts.map +1 -1
  197. package/types/types/account.d.ts +66 -0
  198. package/types/types/account.d.ts.map +1 -0
  199. package/types/types/algo-http-client-with-retry.d.ts +14 -0
  200. package/types/types/algo-http-client-with-retry.d.ts.map +1 -0
  201. package/types/types/amount.d.ts +24 -0
  202. package/types/types/amount.d.ts.map +1 -0
  203. package/types/types/app-client.d.ts +408 -0
  204. package/types/types/app-client.d.ts.map +1 -0
  205. package/types/types/app-spec.d.ts +154 -0
  206. package/types/types/app-spec.d.ts.map +1 -0
  207. package/types/types/app.d.ts +308 -0
  208. package/types/types/app.d.ts.map +1 -0
  209. package/types/types/config.d.ts +32 -0
  210. package/types/types/config.d.ts.map +1 -0
  211. package/types/types/indexer.d.ts +623 -0
  212. package/types/types/indexer.d.ts.map +1 -0
  213. package/types/types/logging.d.ts +13 -0
  214. package/types/types/logging.d.ts.map +1 -0
  215. package/types/types/logic-error.d.ts +37 -0
  216. package/types/types/logic-error.d.ts.map +1 -0
  217. package/types/types/network-client.d.ts +20 -0
  218. package/types/types/network-client.d.ts.map +1 -0
  219. package/types/types/testing.d.ts +89 -0
  220. package/types/types/testing.d.ts.map +1 -0
  221. package/types/types/transaction.d.ts +111 -0
  222. package/types/types/transaction.d.ts.map +1 -0
  223. package/types/types/transfer.d.ts +32 -0
  224. package/types/types/transfer.d.ts.map +1 -0
  225. package/types/types/urlTokenBaseHTTPClient.d.ts +41 -0
  226. package/types/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
  227. package/types/util.d.ts +10 -0
  228. package/types/util.d.ts.map +1 -0
  229. package/account.d.ts.map +0 -1
  230. package/account.js.map +0 -1
  231. package/amount.d.ts.map +0 -1
  232. package/amount.js.map +0 -1
  233. package/app-client.d.ts.map +0 -1
  234. package/app-client.js.map +0 -1
  235. package/app-deploy.d.ts.map +0 -1
  236. package/app-deploy.js.map +0 -1
  237. package/app.d.ts.map +0 -1
  238. package/app.js.map +0 -1
  239. package/index.d.ts.map +0 -1
  240. package/index.js.map +0 -1
  241. package/indexer-lookup.d.ts.map +0 -1
  242. package/indexer-lookup.js.map +0 -1
  243. package/localnet.d.ts.map +0 -1
  244. package/localnet.js.map +0 -1
  245. package/network-client.d.ts.map +0 -1
  246. package/network-client.js.map +0 -1
  247. package/testing/account.d.ts.map +0 -1
  248. package/testing/account.js.map +0 -1
  249. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  250. package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
  251. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  252. package/testing/fixtures/algorand-fixture.js.map +0 -1
  253. package/testing/fixtures/index.d.ts.map +0 -1
  254. package/testing/fixtures/index.js.map +0 -1
  255. package/testing/index.d.ts.map +0 -1
  256. package/testing/index.js.map +0 -1
  257. package/testing/indexer.d.ts.map +0 -1
  258. package/testing/indexer.js.map +0 -1
  259. package/testing/test-logger.d.ts.map +0 -1
  260. package/testing/test-logger.js.map +0 -1
  261. package/testing/transaction-logger.d.ts.map +0 -1
  262. package/testing/transaction-logger.js.map +0 -1
  263. package/transaction.d.ts.map +0 -1
  264. package/transaction.js.map +0 -1
  265. package/transfer.d.ts.map +0 -1
  266. package/transfer.js.map +0 -1
  267. package/types/account.js.map +0 -1
  268. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  269. package/types/algo-http-client-with-retry.js.map +0 -1
  270. package/types/amount.js.map +0 -1
  271. package/types/app-client.js.map +0 -1
  272. package/types/app-spec.d.ts.map +0 -1
  273. package/types/app.js.map +0 -1
  274. package/types/config.d.ts.map +0 -1
  275. package/types/config.js.map +0 -1
  276. package/types/indexer.d.ts.map +0 -1
  277. package/types/indexer.js.map +0 -1
  278. package/types/logging.d.ts.map +0 -1
  279. package/types/logging.js.map +0 -1
  280. package/types/logic-error.d.ts.map +0 -1
  281. package/types/logic-error.js.map +0 -1
  282. package/types/network-client.js.map +0 -1
  283. package/types/testing.d.ts.map +0 -1
  284. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  285. package/types/urlTokenBaseHTTPClient.js.map +0 -1
  286. package/util.d.ts.map +0 -1
  287. package/util.js.map +0 -1
  288. /package/{account.d.ts → cjs/account.d.ts} +0 -0
  289. /package/{account.js → cjs/account.js} +0 -0
  290. /package/{amount.d.ts → cjs/amount.d.ts} +0 -0
  291. /package/{amount.js → cjs/amount.js} +0 -0
  292. /package/{app-client.d.ts → cjs/app-client.d.ts} +0 -0
  293. /package/{app-client.js → cjs/app-client.js} +0 -0
  294. /package/{app-deploy.d.ts → cjs/app-deploy.d.ts} +0 -0
  295. /package/{app-deploy.js → cjs/app-deploy.js} +0 -0
  296. /package/{app.d.ts → cjs/app.d.ts} +0 -0
  297. /package/{app.js → cjs/app.js} +0 -0
  298. /package/{index.d.ts → cjs/index.d.ts} +0 -0
  299. /package/{index.js → cjs/index.js} +0 -0
  300. /package/{indexer-lookup.d.ts → cjs/indexer-lookup.d.ts} +0 -0
  301. /package/{indexer-lookup.js → cjs/indexer-lookup.js} +0 -0
  302. /package/{localnet.d.ts → cjs/localnet.d.ts} +0 -0
  303. /package/{network-client.d.ts → cjs/network-client.d.ts} +0 -0
  304. /package/{network-client.js → cjs/network-client.js} +0 -0
  305. /package/{testing → cjs/testing}/account.d.ts +0 -0
  306. /package/{testing → cjs/testing}/account.js +0 -0
  307. /package/{testing → cjs/testing}/fixtures/algokit-log-capture-fixture.d.ts +0 -0
  308. /package/{testing → cjs/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
  309. /package/{testing → cjs/testing}/fixtures/algorand-fixture.d.ts +0 -0
  310. /package/{testing → cjs/testing}/fixtures/algorand-fixture.js +0 -0
  311. /package/{testing → cjs/testing}/fixtures/index.d.ts +0 -0
  312. /package/{testing → cjs/testing}/fixtures/index.js +0 -0
  313. /package/{testing → cjs/testing}/index.d.ts +0 -0
  314. /package/{testing → cjs/testing}/index.js +0 -0
  315. /package/{testing → cjs/testing}/indexer.d.ts +0 -0
  316. /package/{testing → cjs/testing}/indexer.js +0 -0
  317. /package/{testing → cjs/testing}/test-logger.d.ts +0 -0
  318. /package/{testing → cjs/testing}/transaction-logger.d.ts +0 -0
  319. /package/{transaction.d.ts → cjs/transaction.d.ts} +0 -0
  320. /package/{transaction.js → cjs/transaction.js} +0 -0
  321. /package/{transfer.d.ts → cjs/transfer.d.ts} +0 -0
  322. /package/{transfer.js → cjs/transfer.js} +0 -0
  323. /package/{types → cjs/types}/algo-http-client-with-retry.d.ts +0 -0
  324. /package/{types → cjs/types}/app-spec.d.ts +0 -0
  325. /package/{types → cjs/types}/app-spec.js +0 -0
  326. /package/{types → cjs/types}/app.js +0 -0
  327. /package/{types → cjs/types}/config.d.ts +0 -0
  328. /package/{types → cjs/types}/indexer.d.ts +0 -0
  329. /package/{types → cjs/types}/indexer.js +0 -0
  330. /package/{types → cjs/types}/logging.d.ts +0 -0
  331. /package/{types → cjs/types}/logging.js +0 -0
  332. /package/{types → cjs/types}/logic-error.d.ts +0 -0
  333. /package/{types → cjs/types}/network-client.js +0 -0
  334. /package/{types → cjs/types}/testing.d.ts +0 -0
  335. /package/{types → cjs/types}/testing.js +0 -0
  336. /package/{types → cjs/types}/transaction.js +0 -0
  337. /package/{types → cjs/types}/transfer.js +0 -0
  338. /package/{types → cjs/types}/urlTokenBaseHTTPClient.d.ts +0 -0
  339. /package/{util.d.ts → cjs/util.d.ts} +0 -0
  340. /package/{util.js → cjs/util.js} +0 -0
@@ -0,0 +1,154 @@
1
+ import { ABIContractParams, ABIMethodParams } from 'algosdk';
2
+ /** An ARC-0032 Application Specification see https://github.com/algorandfoundation/ARCs/pull/150 */
3
+ export interface AppSpec {
4
+ /** Method call hints */
5
+ hints: HintSpec;
6
+ /** The TEAL source */
7
+ source: AppSources;
8
+ /** The ABI-0004 contract definition see https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0004.md */
9
+ contract: ABIContractParams;
10
+ /** The values that make up the local and global state */
11
+ schema: SchemaSpec;
12
+ /** The rolled-up schema allocation values for local and global state */
13
+ state: StateSchemaSpec;
14
+ /** The config of all BARE calls (i.e. non ABI calls with no args) */
15
+ bare_call_config: CallConfig;
16
+ }
17
+ /** A lookup of encoded method call spec to hint */
18
+ export type HintSpec = Record<string, Hint>;
19
+ /** The TEAL source of a contract */
20
+ export interface AppSources {
21
+ /** The TEAL source of the approval program */
22
+ approval: string;
23
+ /** The TEAL source of the clear program */
24
+ clear: string;
25
+ }
26
+ /** The various call configs:
27
+ * * `NEVER`: Will not be called
28
+ * * `CALL`: Can be called during a non-create call i.e. app id != 0
29
+ * * `CREATE`: Can be called during a create call i.e. app id = 0
30
+ * * `ALL`: Can be during a create OR non-create call
31
+ **/
32
+ export type CallConfigValue = 'NEVER' | 'CALL' | 'CREATE' | 'ALL';
33
+ /** Call configuration for a method */
34
+ export interface CallConfig {
35
+ /** NoOp call config */
36
+ no_op?: CallConfigValue;
37
+ /** Opt-in call config */
38
+ opt_in?: CallConfigValue;
39
+ /** Close out call config */
40
+ close_out?: CallConfigValue;
41
+ /** Update call config */
42
+ update_application?: CallConfigValue;
43
+ /** Delete call config */
44
+ delete_application?: CallConfigValue;
45
+ }
46
+ /** Hint information for a given method call to allow client generation */
47
+ export interface Hint {
48
+ /** Any user-defined struct/tuple types used in the method call, keyed by parameter name or `output` for return type */
49
+ structs?: Record<string, Struct>;
50
+ read_only?: boolean;
51
+ default_arguments?: Record<string, DefaultArgument>;
52
+ call_config: CallConfig;
53
+ }
54
+ /** The name of a field */
55
+ export type FieldName = string;
56
+ /** The string name of an ABI type */
57
+ export type ABIType = string;
58
+ /** The elements of the struct/tuple: `FieldName`, `ABIType` */
59
+ export type StructElement = [FieldName, ABIType];
60
+ /** A user-defined struct/tuple type */
61
+ export interface Struct {
62
+ /** The name of the type */
63
+ name: string;
64
+ /** The elements (in order) that make up the struct/tuple */
65
+ elements: StructElement[];
66
+ }
67
+ /**
68
+ * Defines a strategy for obtaining a default value for a given ABI arg.
69
+ */
70
+ export type DefaultArgument = {
71
+ /**
72
+ * The default value should be fetched by invoking an ABI method
73
+ */
74
+ source: 'abi-method';
75
+ data: ABIMethodParams;
76
+ } | {
77
+ /**
78
+ * The default value should be fetched from global state
79
+ */
80
+ source: 'global-state';
81
+ /**
82
+ * The key of the state variable
83
+ */
84
+ data: string;
85
+ } | {
86
+ /**
87
+ * The default value should be fetched from the local state of the sender user
88
+ */
89
+ source: 'local-state';
90
+ /**
91
+ * The key of the state variable
92
+ */
93
+ data: string;
94
+ } | {
95
+ /**
96
+ * The default value is a constant.
97
+ */
98
+ source: 'constant';
99
+ /**
100
+ * The static default value to use.
101
+ */
102
+ data: string | number;
103
+ };
104
+ /** AVM data type */
105
+ export type AVMType = 'uint64' | 'bytes';
106
+ /** Declared schema value specification */
107
+ export interface DeclaredSchemaValueSpec {
108
+ /** The type of value */
109
+ type: AVMType;
110
+ /** The name of the key */
111
+ key: string;
112
+ /** A description of the variable */
113
+ descr?: string;
114
+ /** Whether or not the value is set statically (at create time only) or dynamically */
115
+ static?: boolean;
116
+ }
117
+ /** Reserved schema value specification */
118
+ export interface ReservedSchemaValueSpec {
119
+ /** The type of value */
120
+ type: AVMType;
121
+ /** The description of the reserved storage space */
122
+ descr: string;
123
+ /** The maximum number of slots to reserve */
124
+ max_keys: number;
125
+ }
126
+ /** The schema for global and local storage */
127
+ export interface SchemaSpec {
128
+ /** The local storage schema */
129
+ local: Schema;
130
+ /** The global storage schema */
131
+ global: Schema;
132
+ }
133
+ /** The storage schema definition */
134
+ export interface Schema {
135
+ /** Declared storage schema */
136
+ declared: Record<string, DeclaredSchemaValueSpec>;
137
+ /** Reserved storage schema */
138
+ reserved: Record<string, ReservedSchemaValueSpec>;
139
+ }
140
+ /** The rolled-up schema allocation specification for local and global state */
141
+ export interface StateSchemaSpec {
142
+ /** Global storage spec */
143
+ global: StateSchema;
144
+ /** Local storage spec */
145
+ local: StateSchema;
146
+ }
147
+ /** Schema spec summary for global or local storage */
148
+ export type StateSchema = {
149
+ /** Number of uint slots */
150
+ num_uints: number;
151
+ /** Number of byte slots */
152
+ num_byte_slices: number;
153
+ };
154
+ //# sourceMappingURL=app-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-spec.d.ts","sourceRoot":"","sources":["../../../src/types/app-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE5D,oGAAoG;AACpG,MAAM,WAAW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AA+B;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;CACf;AAED,oCAAoC;AACpC,MAAM,WAAW,MAAM;IACrB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;IACjD,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;CAClD;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAA;IACnB,yBAAyB;IACzB,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,sDAAsD;AACtD,MAAM,MAAM,WAAW,GAAG;IACxB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,2BAA2B;IAC3B,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA"}
@@ -0,0 +1,308 @@
1
+ import algosdk, { ABIArgument, ABIMethod, ABIMethodParams, ABIType, ABIValue, Address, OnApplicationComplete, SourceMap, SuggestedParams, Transaction } from 'algosdk';
2
+ import { SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from './transaction';
3
+ /** The name of the TEAL template variable for deploy-time immutability control */
4
+ export declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
5
+ /** The name of the TEAL template variable for deploy-time permanence control */
6
+ export declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
7
+ /** The app create/update ARC-2 transaction note prefix */
8
+ export declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
9
+ /** The maximum number of bytes in a single app code page */
10
+ export declare const APP_PAGE_MAX_SIZE = 2048;
11
+ /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
12
+ export declare const ABI_RETURN_PREFIX: Uint8Array;
13
+ /** Information about an Algorand app */
14
+ export interface AppReference {
15
+ /** The id of the app */
16
+ appId: number | bigint;
17
+ /** The Algorand address of the account associated with the app */
18
+ appAddress: string;
19
+ }
20
+ /**
21
+ * A grouping of the app ID and name of the box in an Uint8Array
22
+ */
23
+ export interface BoxReference {
24
+ /**
25
+ * A unique application id
26
+ */
27
+ appId: number | bigint;
28
+ /**
29
+ * Name of box to reference
30
+ */
31
+ name: BoxIdentifier;
32
+ }
33
+ /**
34
+ * Something that identifies a box name - either a:
35
+ * * `Uint8Array`
36
+ * * `string` (that will be encoded to a Uint8Array)
37
+ * * `SendTransactionFrom` (encoded into the public key address of the corresponding account)
38
+ */
39
+ export type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
40
+ /** Common app call arguments for ABI and non-ABI (raw) calls */
41
+ export interface CoreAppCallArgs {
42
+ /** The optional lease for the transaction */
43
+ lease?: string | Uint8Array;
44
+ /** Any box references to load */
45
+ boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
46
+ /** The address of any accounts to load in */
47
+ accounts?: (string | Address)[];
48
+ /** IDs of any apps to load into the foreignApps array */
49
+ apps?: number[];
50
+ /** IDs of any assets to load into the foreignAssets array */
51
+ assets?: number[];
52
+ }
53
+ /**
54
+ * App call args with non-ABI (raw) values (minus some processing like encoding strings as binary)
55
+ */
56
+ export interface RawAppCallArgs extends CoreAppCallArgs {
57
+ /** Any application arguments to pass through */
58
+ appArgs?: (Uint8Array | string)[];
59
+ /** Property to aid intellisense */
60
+ method?: undefined;
61
+ }
62
+ /** An argument for an ABI method, either a primitive value, or a transaction with or without signer, or the unawaited async return value of an algokit method that returns a `SendTransactionResult` */
63
+ export type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
64
+ /**
65
+ * App call args for an ABI call
66
+ */
67
+ export type ABIAppCallArgs = CoreAppCallArgs & {
68
+ /** The ABI method to call */
69
+ method: ABIMethodParams | ABIMethod;
70
+ /** The ABI method args to pass in */
71
+ methodArgs: ABIAppCallArg[];
72
+ };
73
+ /** Arguments to pass to an app call either:
74
+ * * The raw app call values to pass through into the transaction (after processing); or
75
+ * * An ABI method definition (method and args)
76
+ **/
77
+ export type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
78
+ /** Base interface for common data passed to an app create or update. */
79
+ interface CreateOrUpdateAppParams extends SendTransactionParams {
80
+ /** The account (with private key loaded) that will send the transaction */
81
+ from: SendTransactionFrom;
82
+ /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
83
+ approvalProgram: Uint8Array | string;
84
+ /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
85
+ clearStateProgram: Uint8Array | string;
86
+ /** Optional transaction parameters */
87
+ transactionParams?: SuggestedParams;
88
+ /** The (optional) transaction note */
89
+ note?: TransactionNote;
90
+ /** The arguments passed in to the app call */
91
+ args?: AppCallArgs;
92
+ }
93
+ /** Parameters that are passed in when creating an app. */
94
+ export interface CreateAppParams extends CreateOrUpdateAppParams {
95
+ /** The storage schema to request for the created app */
96
+ schema: AppStorageSchema;
97
+ /** Override the on-completion action for the create call; defaults to NoOp */
98
+ onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
99
+ }
100
+ /** Parameters that are passed in when updating an app. */
101
+ export interface UpdateAppParams extends CreateOrUpdateAppParams {
102
+ /** The id of the app to update */
103
+ appId: number | bigint;
104
+ }
105
+ /** The type of call / [on-completion action](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#the-lifecycle-of-a-smart-contract) for a smart contract call.
106
+ *
107
+ * Equivalent of `algosdk.OnApplicationComplete`, but as a more convenient string enum.
108
+ *
109
+ * * `no_op`: Normal smart contract call, no special on-complete action
110
+ * * `opt_in`: Opt-in to smart contract local storage
111
+ * * `close_out`: Close-out local storage storage
112
+ * * `clear_state`: Clear local storage state
113
+ * * `update_application`: Update the smart contract
114
+ * * `delete_application`: Delete the smart contract
115
+ */
116
+ export type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
117
+ /** Parameters representing a call to an app. */
118
+ export interface AppCallParams extends SendTransactionParams {
119
+ /** The id of the app to call */
120
+ appId: number | bigint;
121
+ /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
122
+ callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
123
+ /** The account to make the call from */
124
+ from: SendTransactionFrom;
125
+ /** Optional transaction parameters */
126
+ transactionParams?: SuggestedParams;
127
+ /** The (optional) transaction note */
128
+ note?: TransactionNote;
129
+ /** The arguments passed in to the app call */
130
+ args?: AppCallArgs;
131
+ }
132
+ /** Parameters representing the storage schema of an app. */
133
+ export interface AppStorageSchema {
134
+ /** Restricts number of ints in per-user local state */
135
+ localInts: number;
136
+ /** Restricts number of byte slices in per-user local state */
137
+ localByteSlices: number;
138
+ /** Restricts number of ints in global state */
139
+ globalInts: number;
140
+ /** Restricts number of byte slices in global state */
141
+ globalByteSlices: number;
142
+ /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
143
+ extraPages?: number;
144
+ }
145
+ /** Information about a compiled teal program */
146
+ export interface CompiledTeal {
147
+ /** Original TEAL code */
148
+ teal: string;
149
+ /** The compiled code */
150
+ compiled: string;
151
+ /** The has returned by the compiler */
152
+ compiledHash: string;
153
+ /** The base64 encoded code as a byte array */
154
+ compiledBase64ToBytes: Uint8Array;
155
+ /** Source map from the compilation */
156
+ sourceMap: SourceMap;
157
+ }
158
+ export interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
159
+ /** If an ABI method was called the processed return value */
160
+ return?: T;
161
+ }
162
+ /** Result from calling an app */
163
+ export interface AppCallTransactionResult extends AppCallTransactionResultOfType<ABIReturn> {
164
+ }
165
+ /** The return value of an ABI method call */
166
+ export type ABIReturn = {
167
+ rawReturnValue: Uint8Array;
168
+ returnValue: ABIValue;
169
+ decodeError: undefined;
170
+ } | {
171
+ rawReturnValue: undefined;
172
+ returnValue: undefined;
173
+ decodeError: Error;
174
+ };
175
+ /**
176
+ * The payload of the metadata to add to the transaction note when deploying an app, noting it will be prefixed with `APP_DEPLOY_NOTE_PREFIX`.
177
+ */
178
+ export interface AppDeployMetadata {
179
+ /** The unique name identifier of the app within the creator account */
180
+ name: string;
181
+ /** The version of app that is / will be deployed */
182
+ version: string;
183
+ /** Whether or not the app is deletable / permanent / unspecified */
184
+ deletable?: boolean;
185
+ /** Whether or not the app is updatable / immutable / unspecified */
186
+ updatable?: boolean;
187
+ }
188
+ /** The metadata that can be collected about a deployed app */
189
+ export interface AppMetadata extends AppReference, AppDeployMetadata {
190
+ /** The round the app was created */
191
+ createdRound: number;
192
+ /** The last round that the app was updated */
193
+ updatedRound: number;
194
+ /** The metadata when the app was created */
195
+ createdMetadata: AppDeployMetadata;
196
+ /** Whether or not the app is deleted */
197
+ deleted: boolean;
198
+ }
199
+ /** A lookup of name -> Algorand app for a creator */
200
+ export interface AppLookup {
201
+ creator: Readonly<string>;
202
+ apps: Readonly<{
203
+ [name: string]: AppMetadata;
204
+ }>;
205
+ }
206
+ /** Dictionary of deploy-time parameters to replace in a teal template.
207
+ *
208
+ * Note: Looks for `TMPL_{parameter}` for template replacements i.e. you can leave out the `TMPL_`.
209
+ *
210
+ */
211
+ export interface TealTemplateParams {
212
+ [key: string]: string | bigint | number | Uint8Array;
213
+ }
214
+ /** What action to perform when deploying an app and an update is detected in the TEAL code */
215
+ export declare enum OnUpdate {
216
+ /** Fail the deployment */
217
+ Fail = 0,
218
+ /** Update the app */
219
+ UpdateApp = 1,
220
+ /** Delete the app and create a new one in its place */
221
+ ReplaceApp = 2,
222
+ /** Create a new app */
223
+ AppendApp = 3
224
+ }
225
+ /** What action to perform when deploying an app and a breaking schema change is detected */
226
+ export declare enum OnSchemaBreak {
227
+ /** Fail the deployment */
228
+ Fail = 0,
229
+ /** Delete the app and create a new one in its place */
230
+ ReplaceApp = 1,
231
+ /** Create a new app */
232
+ AppendApp = 2
233
+ }
234
+ /** The parameters to deploy an app */
235
+ export interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
236
+ /** The deployment metadata */
237
+ metadata: AppDeployMetadata;
238
+ /** Any deploy-time parameters to replace in the TEAL code */
239
+ deployTimeParams?: TealTemplateParams;
240
+ /** What action to perform if a schema break is detected */
241
+ onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
242
+ /** What action to perform if a TEAL update is detected */
243
+ onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
244
+ /** Optional cached value of the existing apps for the given creator */
245
+ existingDeployments?: AppLookup;
246
+ /** Any args to pass to any create transaction that is issued as part of deployment */
247
+ createArgs?: AppCallArgs;
248
+ /** Override the on-completion action for the create call; defaults to NoOp */
249
+ createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
250
+ /** Any args to pass to any update transaction that is issued as part of deployment */
251
+ updateArgs?: AppCallArgs;
252
+ /** Any args to pass to any delete transaction that is issued as part of deployment */
253
+ deleteArgs?: AppCallArgs;
254
+ }
255
+ /** The result of compiling the approval and clear TEAL for an app */
256
+ export interface AppCompilationResult {
257
+ /** The compilation result of approval */
258
+ compiledApproval: CompiledTeal;
259
+ /** The compilation result of clear */
260
+ compiledClear: CompiledTeal;
261
+ }
262
+ /** Object holding app state values */
263
+ export interface AppState {
264
+ [key: string]: {
265
+ value: number | bigint;
266
+ keyRaw: Uint8Array;
267
+ keyBase64: string;
268
+ } | {
269
+ value: string;
270
+ valueRaw: Uint8Array;
271
+ valueBase64: string;
272
+ keyRaw: Uint8Array;
273
+ keyBase64: string;
274
+ };
275
+ }
276
+ /** The name of a box storage box */
277
+ export interface BoxName {
278
+ /** Name in UTF-8 */
279
+ name: string;
280
+ /** Name in binary bytes */
281
+ nameRaw: Uint8Array;
282
+ /** Name in Base64 */
283
+ nameBase64: string;
284
+ }
285
+ /**
286
+ * Parameters to get and decode a box value as an ABI type.
287
+ */
288
+ export interface BoxValueRequestParams {
289
+ /** The ID of the app return box names for */
290
+ appId: number | bigint;
291
+ /** The name of the box to return either as a string, binary array or `BoxName` */
292
+ boxName: string | Uint8Array | BoxName;
293
+ /** The ABI type to decode the value using */
294
+ type: ABIType;
295
+ }
296
+ /**
297
+ * Parameters to get and decode a box value as an ABI type.
298
+ */
299
+ export interface BoxValuesRequestParams {
300
+ /** The ID of the app return box names for */
301
+ appId: number;
302
+ /** The names of the boxes to return either as a string, binary array or BoxName` */
303
+ boxNames: (string | Uint8Array | BoxName)[];
304
+ /** The ABI type to decode the value using */
305
+ type: ABIType;
306
+ }
307
+ export {};
308
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/types/app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAO,EACP,qBAAqB,EACrB,SAAS,EACT,eAAe,EACf,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,eAAe,CAAA;AAEtB,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,mBAAmB,CAAA;AAEvD,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,mBAAmB,CAAA;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAEtD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,YAAqC,CAAA;AAEnE,wCAAwC;AACxC,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,KAAK,EAAE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AAU,CAAA;IACnB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,kFAAkF;IAClF,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAA;IACtC,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,QAAQ,EAAE,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,EAAE,CAAA;IAC3C,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd"}
@@ -0,0 +1,32 @@
1
+ import { Logger } from './logging';
2
+ /** The AlgoKit configuration type */
3
+ export interface Config {
4
+ /** Logger */
5
+ logger: Logger;
6
+ /** Whether or not debug mode is enabled */
7
+ debug: boolean;
8
+ }
9
+ /** Updatable AlgoKit config */
10
+ export declare class UpdatableConfig implements Readonly<Config> {
11
+ private config;
12
+ get logger(): Logger;
13
+ get debug(): boolean;
14
+ /**
15
+ * Returns the current logger, or the null logger if true is passed in to `returnNullLogger`
16
+ * @param returnNullLogger Whether or not to return the null logger
17
+ * @returns The requested logger
18
+ */
19
+ getLogger(returnNullLogger?: boolean): Logger;
20
+ /**
21
+ * Temporarily run with debug set to true.
22
+ * @param lambda A lambda expression with code to run with debug config set to true
23
+ */
24
+ withDebug(lambda: () => unknown): void;
25
+ constructor();
26
+ /**
27
+ * Update the AlgoKit configuration with your own configuration settings
28
+ * @param newConfig Partial or complete config to replace
29
+ */
30
+ configure(newConfig: Partial<Config>): void;
31
+ }
32
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAc,MAAM,WAAW,CAAA;AAE7D,qCAAqC;AACrC,MAAM,WAAW,MAAM;IACrB,aAAa;IACb,MAAM,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,KAAK,EAAE,OAAO,CAAA;CACf;AAED,+BAA+B;AAC/B,qBAAa,eAAgB,YAAW,QAAQ,CAAC,MAAM,CAAC;IACtD,OAAO,CAAC,MAAM,CAAQ;IAEtB,IAAI,MAAM,WAET;IAED,IAAI,KAAK,YAER;IAED;;;;OAIG;IACH,SAAS,CAAC,gBAAgB,CAAC,EAAE,OAAO;IAQpC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,OAAO;;IAiB/B;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;CAGrC"}