@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
@@ -0,0 +1,965 @@
1
+ import { Address, ReadableAddress } from "./packages/common/src/address.js";
2
+ import { Expand } from "./packages/common/src/expand.js";
3
+ import { ABIValue } from "./packages/abi/src/abi-value.js";
4
+ import { Arc56Contract } from "./packages/abi/src/arc56-contract.js";
5
+ import { ABIMethod, ABIReturn } from "./packages/abi/src/abi-method.js";
6
+ import { OnApplicationComplete, ResourceReference } from "./packages/transact/src/transactions/app-call.js";
7
+ import { Transaction } from "./packages/transact/src/transactions/transaction.js";
8
+ import { AddressWithTransactionSigner, SendingAddress, TransactionSigner } from "./packages/transact/src/signer.js";
9
+ import { PendingTransactionResponse } from "./packages/algod_client/src/models/pending-transaction-response.js";
10
+ import { AlgoAmount } from "./amount.js";
11
+ import { ConfirmedTransactionResult, SendParams } from "./transaction/types.js";
12
+ import { TransactionWithSigner } from "./transaction/transaction.js";
13
+ import { AppDeployMetadata, CompiledTeal, TealTemplateParams } from "./app.js";
14
+ import { BoxIdentifier, BoxReference } from "./app-manager.js";
15
+ import { AppMethodCallParams } from "./transactions/app-call.js";
16
+ import { AppMethodCall, AppMethodCallTransactionArgument } from "./transactions/method-call.js";
17
+ import { AppDeployParams } from "./app-deployer.js";
18
+ import { AlgorandClient } from "./algorand-client.js";
19
+ import { AppSpec } from "./app-spec.js";
20
+ import { AppClient, AppClientBareCallParams, AppClientCompilationParams, AppClientCompilationResult, AppClientMethodCallParams, AppClientParams, AppSourceMaps, ResolveAppClientByCreatorAndName } from "./app-client.js";
21
+
22
+ //#region src/app-factory.d.ts
23
+ /** Parameters to create an app client */
24
+ interface AppFactoryParams {
25
+ /** The ARC-56 or ARC-32 application spec as either:
26
+ * * Parsed JSON ARC-56 `Contract`
27
+ * * Parsed JSON ARC-32 `AppSpec`
28
+ * * Raw JSON string (in either ARC-56 or ARC-32 format)
29
+ */
30
+ appSpec: Arc56Contract | AppSpec | string;
31
+ /** `AlgorandClient` instance */
32
+ algorand: AlgorandClient;
33
+ /**
34
+ * Optional override for the app name; used for on-chain metadata and lookups.
35
+ * Defaults to the ARC-32/ARC-56 app spec name.
36
+ */
37
+ appName?: string;
38
+ /** Optional address to use for the account to use as the default sender for calls. */
39
+ defaultSender?: ReadableAddress;
40
+ /** Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from `AlgorandClient`). */
41
+ defaultSigner?: TransactionSigner;
42
+ /** The version of app that is / will be deployed; defaults to 1.0 */
43
+ version?: string;
44
+ /**
45
+ * Whether or not the contract should have deploy-time immutability control set, undefined = ignore.
46
+ * If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
47
+ *
48
+ * Useful if you want to vend multiple contracts from the same factory without specifying this value
49
+ * for each call.
50
+ */
51
+ updatable?: boolean;
52
+ /**
53
+ * Whether or not the contract should have deploy-time permanence control set, undefined = ignore.
54
+ * If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
55
+ *
56
+ * Useful if you want to vend multiple contracts from the same factory without specifying this value
57
+ * for each call.
58
+ */
59
+ deletable?: boolean;
60
+ /**
61
+ * Optional deploy-time TEAL template replacement parameters.
62
+ * If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
63
+ *
64
+ * Useful if you want to vend multiple contracts from the same factory without specifying this value
65
+ * for each call.
66
+ */
67
+ deployTimeParams?: TealTemplateParams;
68
+ }
69
+ /** onComplete parameter for a create app call */
70
+ type CreateOnComplete = {
71
+ onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.ClearState>;
72
+ };
73
+ /** Specifies a schema used for creating an app */
74
+ type CreateSchema = {
75
+ /** The state schema for the app. This is immutable once the app is created. By default uses the ARC32/ARC-56 spec. */
76
+ schema?: {
77
+ /** The number of integers saved in global state. */
78
+ globalInts: number;
79
+ /** The number of byte slices saved in global state. */
80
+ globalByteSlices: number;
81
+ /** The number of integers saved in local state. */
82
+ localInts: number;
83
+ /** The number of byte slices saved in local state. */
84
+ localByteSlices: number;
85
+ };
86
+ /** Number of extra pages required for the programs.
87
+ * Defaults to the number needed for the programs in this call if not specified.
88
+ * This is immutable once the app is created. */
89
+ extraProgramPages?: number;
90
+ };
91
+ /** Params to specify a bare (raw) create call for an app */
92
+ type AppFactoryCreateParams = Expand<AppClientBareCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
93
+ /** Params to specify a create method call for an app */
94
+ type AppFactoryCreateMethodCallParams = Expand<AppClientMethodCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
95
+ /** Params to get an app client by ID from an app factory. */
96
+ type AppFactoryAppClientParams = Expand<Omit<AppClientParams, 'algorand' | 'appSpec'>>;
97
+ /** Params to get an app client by creator address and name from an app factory. */
98
+ type AppFactoryResolveAppClientByCreatorAndNameParams = Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand' | 'appSpec'>>;
99
+ /** Parameters to define a deployment for an `AppFactory` */
100
+ type AppFactoryDeployParams = Expand<Omit<AppDeployParams, 'createParams' | 'updateParams' | 'deleteParams' | 'metadata'> & {
101
+ /** Create transaction parameters to use if a create needs to be issued as part of deployment */
102
+ createParams?: Expand<AppClientMethodCallParams & CreateOnComplete & CreateSchema> | Expand<AppClientBareCallParams & CreateOnComplete & CreateSchema>;
103
+ /** Update transaction parameters to use if a create needs to be issued as part of deployment */
104
+ updateParams?: AppClientMethodCallParams | AppClientBareCallParams;
105
+ /** Delete transaction parameters to use if a create needs to be issued as part of deployment */
106
+ deleteParams?: AppClientMethodCallParams | AppClientBareCallParams;
107
+ /**
108
+ * Whether or not the contract should have deploy-time immutability control set.
109
+ * `undefined` = use AppFactory constructor value if set or base it on the app spec.
110
+ */
111
+ updatable?: boolean;
112
+ /**
113
+ * Whether or not the contract should have deploy-time permanence control set.
114
+ * `undefined` = use AppFactory constructor value if set or base it on the app spec.
115
+ */
116
+ deletable?: boolean;
117
+ /** Override the app name for this deployment */
118
+ appName?: string;
119
+ }>;
120
+ /**
121
+ * ARC-56/ARC-32 app factory that, for a given app spec, allows you to create
122
+ * and deploy one or more app instances and to create one or more app clients
123
+ * to interact with those (or other) app instances.
124
+ */
125
+ declare class AppFactory {
126
+ private _appSpec;
127
+ private _appName;
128
+ private _algorand;
129
+ private _version;
130
+ private _defaultSender?;
131
+ private _defaultSigner?;
132
+ private _deployTimeParams?;
133
+ private _updatable?;
134
+ private _deletable?;
135
+ private _approvalSourceMap;
136
+ private _clearSourceMap;
137
+ private _paramsMethods;
138
+ /**
139
+ * Create a new app factory.
140
+ * @param params The parameters to create the app factory
141
+ * @returns The `AppFactory` instance
142
+ * @example
143
+ * ```typescript
144
+ * const appFactory = new AppFactory({
145
+ * appSpec: appSpec,
146
+ * algorand: AlgorandClient.mainNet(),
147
+ * })
148
+ */
149
+ constructor(params: AppFactoryParams);
150
+ /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */
151
+ get appName(): string;
152
+ /** The ARC-56 app spec being used */
153
+ get appSpec(): Arc56Contract;
154
+ /** Return the algorand client this factory is using. */
155
+ get algorand(): AlgorandClient;
156
+ /** Get parameters to create transactions (create and deploy related calls) for the current app.
157
+ *
158
+ * A good mental model for this is that these parameters represent a deferred transaction creation.
159
+ * @example Create a transaction in the future using Algorand Client
160
+ * ```typescript
161
+ * const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
162
+ * // ...
163
+ * await algorand.send.AppCreateMethodCall(createAppParams)
164
+ * ```
165
+ * @example Define a nested transaction as an ABI argument
166
+ * ```typescript
167
+ * const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
168
+ * await appClient.send.call({method: 'my_method', args: [createAppParams]})
169
+ * ```
170
+ */
171
+ get params(): {
172
+ /** Return params for a create ABI call, including deploy-time TEAL template replacements and compilation if provided */
173
+ create: (params: {
174
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
175
+ rekeyTo?: ReadableAddress | undefined;
176
+ note?: string | Uint8Array | undefined;
177
+ lease?: string | Uint8Array | undefined;
178
+ staticFee?: AlgoAmount | undefined;
179
+ extraFee?: AlgoAmount | undefined;
180
+ maxFee?: AlgoAmount | undefined;
181
+ validityWindow?: number | bigint | undefined;
182
+ firstValidRound?: bigint | undefined;
183
+ lastValidRound?: bigint | undefined;
184
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
185
+ accountReferences?: ReadableAddress[] | undefined;
186
+ appReferences?: bigint[] | undefined;
187
+ assetReferences?: bigint[] | undefined;
188
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
189
+ accessReferences?: ResourceReference[] | undefined;
190
+ rejectVersion?: number | undefined;
191
+ sender?: ReadableAddress | undefined;
192
+ method: string;
193
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
194
+ deployTimeParams?: TealTemplateParams | undefined;
195
+ updatable?: boolean | undefined;
196
+ deletable?: boolean | undefined;
197
+ schema?: {
198
+ /** The number of integers saved in global state. */
199
+ globalInts: number;
200
+ /** The number of byte slices saved in global state. */
201
+ globalByteSlices: number;
202
+ /** The number of integers saved in local state. */
203
+ localInts: number;
204
+ /** The number of byte slices saved in local state. */
205
+ localByteSlices: number;
206
+ } | undefined;
207
+ extraProgramPages?: number | undefined;
208
+ }) => Promise<{
209
+ deployTimeParams: TealTemplateParams | undefined;
210
+ schema: {
211
+ /** The number of integers saved in global state. */
212
+ globalInts: number;
213
+ /** The number of byte slices saved in global state. */
214
+ globalByteSlices: number;
215
+ /** The number of integers saved in local state. */
216
+ localInts: number;
217
+ /** The number of byte slices saved in local state. */
218
+ localByteSlices: number;
219
+ };
220
+ approvalProgram: Uint8Array;
221
+ clearStateProgram: Uint8Array;
222
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
223
+ rekeyTo?: ReadableAddress | undefined;
224
+ note?: string | Uint8Array | undefined;
225
+ lease?: string | Uint8Array | undefined;
226
+ staticFee?: AlgoAmount | undefined;
227
+ extraFee?: AlgoAmount | undefined;
228
+ maxFee?: AlgoAmount | undefined;
229
+ validityWindow?: number | bigint | undefined;
230
+ firstValidRound?: bigint | undefined;
231
+ lastValidRound?: bigint | undefined;
232
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
233
+ accountReferences?: ReadableAddress[] | undefined;
234
+ appReferences?: bigint[] | undefined;
235
+ assetReferences?: bigint[] | undefined;
236
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
237
+ accessReferences?: ResourceReference[] | undefined;
238
+ rejectVersion?: number | undefined;
239
+ sender?: ReadableAddress | undefined;
240
+ method: string;
241
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
242
+ updatable?: boolean | undefined;
243
+ deletable?: boolean | undefined;
244
+ extraProgramPages?: number | undefined;
245
+ } & {
246
+ sender: Address;
247
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
248
+ method: ABIMethod;
249
+ args: (ABIValue | TransactionWithSigner | Transaction | AppMethodCall<{
250
+ sender: SendingAddress;
251
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
252
+ rekeyTo?: ReadableAddress | undefined;
253
+ note?: string | Uint8Array | undefined;
254
+ lease?: string | Uint8Array | undefined;
255
+ staticFee?: AlgoAmount | undefined;
256
+ extraFee?: AlgoAmount | undefined;
257
+ maxFee?: AlgoAmount | undefined;
258
+ validityWindow?: number | bigint | undefined;
259
+ firstValidRound?: bigint | undefined;
260
+ lastValidRound?: bigint | undefined;
261
+ appId: bigint;
262
+ onComplete?: OnApplicationComplete.UpdateApplication | undefined;
263
+ args?: Uint8Array[] | undefined;
264
+ accountReferences?: ReadableAddress[] | undefined;
265
+ appReferences?: bigint[] | undefined;
266
+ assetReferences?: bigint[] | undefined;
267
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
268
+ accessReferences?: ResourceReference[] | undefined;
269
+ rejectVersion?: number | undefined;
270
+ approvalProgram: string | Uint8Array;
271
+ clearStateProgram: string | Uint8Array;
272
+ }> | AppMethodCall<AppMethodCallParams> | AppMethodCall<{
273
+ sender: SendingAddress;
274
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
275
+ rekeyTo?: ReadableAddress | undefined;
276
+ note?: string | Uint8Array | undefined;
277
+ lease?: string | Uint8Array | undefined;
278
+ staticFee?: AlgoAmount | undefined;
279
+ extraFee?: AlgoAmount | undefined;
280
+ maxFee?: AlgoAmount | undefined;
281
+ validityWindow?: number | bigint | undefined;
282
+ firstValidRound?: bigint | undefined;
283
+ lastValidRound?: bigint | undefined;
284
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
285
+ args?: Uint8Array[] | undefined;
286
+ accountReferences?: ReadableAddress[] | undefined;
287
+ appReferences?: bigint[] | undefined;
288
+ assetReferences?: bigint[] | undefined;
289
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
290
+ accessReferences?: ResourceReference[] | undefined;
291
+ rejectVersion?: number | undefined;
292
+ appId?: 0 | undefined;
293
+ approvalProgram: string | Uint8Array;
294
+ clearStateProgram: string | Uint8Array;
295
+ schema?: {
296
+ globalInts: number;
297
+ globalByteSlices: number;
298
+ localInts: number;
299
+ localByteSlices: number;
300
+ } | undefined;
301
+ extraProgramPages?: number | undefined;
302
+ }> | Promise<Transaction> | undefined)[] | undefined;
303
+ onComplete: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication;
304
+ }>;
305
+ /** Return params for a deployment update ABI call */
306
+ deployUpdate: (params: {
307
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
308
+ rekeyTo?: ReadableAddress | undefined;
309
+ note?: string | Uint8Array | undefined;
310
+ lease?: string | Uint8Array | undefined;
311
+ staticFee?: AlgoAmount | undefined;
312
+ extraFee?: AlgoAmount | undefined;
313
+ maxFee?: AlgoAmount | undefined;
314
+ validityWindow?: number | bigint | undefined;
315
+ firstValidRound?: bigint | undefined;
316
+ lastValidRound?: bigint | undefined;
317
+ onComplete?: OnApplicationComplete | undefined;
318
+ accountReferences?: ReadableAddress[] | undefined;
319
+ appReferences?: bigint[] | undefined;
320
+ assetReferences?: bigint[] | undefined;
321
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
322
+ accessReferences?: ResourceReference[] | undefined;
323
+ rejectVersion?: number | undefined;
324
+ sender?: ReadableAddress | undefined;
325
+ method: string;
326
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
327
+ }) => {
328
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
329
+ rekeyTo?: ReadableAddress | undefined;
330
+ note?: string | Uint8Array | undefined;
331
+ lease?: string | Uint8Array | undefined;
332
+ staticFee?: AlgoAmount | undefined;
333
+ extraFee?: AlgoAmount | undefined;
334
+ maxFee?: AlgoAmount | undefined;
335
+ validityWindow?: number | bigint | undefined;
336
+ firstValidRound?: bigint | undefined;
337
+ lastValidRound?: bigint | undefined;
338
+ onComplete?: OnApplicationComplete | undefined;
339
+ accountReferences?: ReadableAddress[] | undefined;
340
+ appReferences?: bigint[] | undefined;
341
+ assetReferences?: bigint[] | undefined;
342
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
343
+ accessReferences?: ResourceReference[] | undefined;
344
+ rejectVersion?: number | undefined;
345
+ sender?: ReadableAddress | undefined;
346
+ method: string;
347
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
348
+ } & {
349
+ sender: Address;
350
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
351
+ method: ABIMethod;
352
+ args: (ABIValue | TransactionWithSigner | Transaction | AppMethodCall<{
353
+ sender: SendingAddress;
354
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
355
+ rekeyTo?: ReadableAddress | undefined;
356
+ note?: string | Uint8Array | undefined;
357
+ lease?: string | Uint8Array | undefined;
358
+ staticFee?: AlgoAmount | undefined;
359
+ extraFee?: AlgoAmount | undefined;
360
+ maxFee?: AlgoAmount | undefined;
361
+ validityWindow?: number | bigint | undefined;
362
+ firstValidRound?: bigint | undefined;
363
+ lastValidRound?: bigint | undefined;
364
+ appId: bigint;
365
+ onComplete?: OnApplicationComplete.UpdateApplication | undefined;
366
+ args?: Uint8Array[] | undefined;
367
+ accountReferences?: ReadableAddress[] | undefined;
368
+ appReferences?: bigint[] | undefined;
369
+ assetReferences?: bigint[] | undefined;
370
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
371
+ accessReferences?: ResourceReference[] | undefined;
372
+ rejectVersion?: number | undefined;
373
+ approvalProgram: string | Uint8Array;
374
+ clearStateProgram: string | Uint8Array;
375
+ }> | AppMethodCall<AppMethodCallParams> | AppMethodCall<{
376
+ sender: SendingAddress;
377
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
378
+ rekeyTo?: ReadableAddress | undefined;
379
+ note?: string | Uint8Array | undefined;
380
+ lease?: string | Uint8Array | undefined;
381
+ staticFee?: AlgoAmount | undefined;
382
+ extraFee?: AlgoAmount | undefined;
383
+ maxFee?: AlgoAmount | undefined;
384
+ validityWindow?: number | bigint | undefined;
385
+ firstValidRound?: bigint | undefined;
386
+ lastValidRound?: bigint | undefined;
387
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
388
+ args?: Uint8Array[] | undefined;
389
+ accountReferences?: ReadableAddress[] | undefined;
390
+ appReferences?: bigint[] | undefined;
391
+ assetReferences?: bigint[] | undefined;
392
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
393
+ accessReferences?: ResourceReference[] | undefined;
394
+ rejectVersion?: number | undefined;
395
+ appId?: 0 | undefined;
396
+ approvalProgram: string | Uint8Array;
397
+ clearStateProgram: string | Uint8Array;
398
+ schema?: {
399
+ globalInts: number;
400
+ globalByteSlices: number;
401
+ localInts: number;
402
+ localByteSlices: number;
403
+ } | undefined;
404
+ extraProgramPages?: number | undefined;
405
+ }> | Promise<Transaction> | undefined)[] | undefined;
406
+ onComplete: OnApplicationComplete.UpdateApplication;
407
+ };
408
+ /** Return params for a deployment delete ABI call */
409
+ deployDelete: (params: {
410
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
411
+ rekeyTo?: ReadableAddress | undefined;
412
+ note?: string | Uint8Array | undefined;
413
+ lease?: string | Uint8Array | undefined;
414
+ staticFee?: AlgoAmount | undefined;
415
+ extraFee?: AlgoAmount | undefined;
416
+ maxFee?: AlgoAmount | undefined;
417
+ validityWindow?: number | bigint | undefined;
418
+ firstValidRound?: bigint | undefined;
419
+ lastValidRound?: bigint | undefined;
420
+ onComplete?: OnApplicationComplete | undefined;
421
+ accountReferences?: ReadableAddress[] | undefined;
422
+ appReferences?: bigint[] | undefined;
423
+ assetReferences?: bigint[] | undefined;
424
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
425
+ accessReferences?: ResourceReference[] | undefined;
426
+ rejectVersion?: number | undefined;
427
+ sender?: ReadableAddress | undefined;
428
+ method: string;
429
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
430
+ }) => {
431
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
432
+ rekeyTo?: ReadableAddress | undefined;
433
+ note?: string | Uint8Array | undefined;
434
+ lease?: string | Uint8Array | undefined;
435
+ staticFee?: AlgoAmount | undefined;
436
+ extraFee?: AlgoAmount | undefined;
437
+ maxFee?: AlgoAmount | undefined;
438
+ validityWindow?: number | bigint | undefined;
439
+ firstValidRound?: bigint | undefined;
440
+ lastValidRound?: bigint | undefined;
441
+ onComplete?: OnApplicationComplete | undefined;
442
+ accountReferences?: ReadableAddress[] | undefined;
443
+ appReferences?: bigint[] | undefined;
444
+ assetReferences?: bigint[] | undefined;
445
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
446
+ accessReferences?: ResourceReference[] | undefined;
447
+ rejectVersion?: number | undefined;
448
+ sender?: ReadableAddress | undefined;
449
+ method: string;
450
+ args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
451
+ } & {
452
+ sender: Address;
453
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
454
+ method: ABIMethod;
455
+ args: (ABIValue | TransactionWithSigner | Transaction | AppMethodCall<{
456
+ sender: SendingAddress;
457
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
458
+ rekeyTo?: ReadableAddress | undefined;
459
+ note?: string | Uint8Array | undefined;
460
+ lease?: string | Uint8Array | undefined;
461
+ staticFee?: AlgoAmount | undefined;
462
+ extraFee?: AlgoAmount | undefined;
463
+ maxFee?: AlgoAmount | undefined;
464
+ validityWindow?: number | bigint | undefined;
465
+ firstValidRound?: bigint | undefined;
466
+ lastValidRound?: bigint | undefined;
467
+ appId: bigint;
468
+ onComplete?: OnApplicationComplete.UpdateApplication | undefined;
469
+ args?: Uint8Array[] | undefined;
470
+ accountReferences?: ReadableAddress[] | undefined;
471
+ appReferences?: bigint[] | undefined;
472
+ assetReferences?: bigint[] | undefined;
473
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
474
+ accessReferences?: ResourceReference[] | undefined;
475
+ rejectVersion?: number | undefined;
476
+ approvalProgram: string | Uint8Array;
477
+ clearStateProgram: string | Uint8Array;
478
+ }> | AppMethodCall<AppMethodCallParams> | AppMethodCall<{
479
+ sender: SendingAddress;
480
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
481
+ rekeyTo?: ReadableAddress | undefined;
482
+ note?: string | Uint8Array | undefined;
483
+ lease?: string | Uint8Array | undefined;
484
+ staticFee?: AlgoAmount | undefined;
485
+ extraFee?: AlgoAmount | undefined;
486
+ maxFee?: AlgoAmount | undefined;
487
+ validityWindow?: number | bigint | undefined;
488
+ firstValidRound?: bigint | undefined;
489
+ lastValidRound?: bigint | undefined;
490
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
491
+ args?: Uint8Array[] | undefined;
492
+ accountReferences?: ReadableAddress[] | undefined;
493
+ appReferences?: bigint[] | undefined;
494
+ assetReferences?: bigint[] | undefined;
495
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
496
+ accessReferences?: ResourceReference[] | undefined;
497
+ rejectVersion?: number | undefined;
498
+ appId?: 0 | undefined;
499
+ approvalProgram: string | Uint8Array;
500
+ clearStateProgram: string | Uint8Array;
501
+ schema?: {
502
+ globalInts: number;
503
+ globalByteSlices: number;
504
+ localInts: number;
505
+ localByteSlices: number;
506
+ } | undefined;
507
+ extraProgramPages?: number | undefined;
508
+ }> | Promise<Transaction> | undefined)[] | undefined;
509
+ onComplete: OnApplicationComplete.DeleteApplication;
510
+ };
511
+ bare: {
512
+ /** Return params for a create bare call, including deploy-time TEAL template replacements and compilation if provided */
513
+ create: (params?: {
514
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
515
+ rekeyTo?: ReadableAddress | undefined;
516
+ note?: string | Uint8Array | undefined;
517
+ lease?: string | Uint8Array | undefined;
518
+ staticFee?: AlgoAmount | undefined;
519
+ extraFee?: AlgoAmount | undefined;
520
+ maxFee?: AlgoAmount | undefined;
521
+ validityWindow?: number | bigint | undefined;
522
+ firstValidRound?: bigint | undefined;
523
+ lastValidRound?: bigint | undefined;
524
+ args?: Uint8Array[] | undefined;
525
+ accountReferences?: ReadableAddress[] | undefined;
526
+ appReferences?: bigint[] | undefined;
527
+ assetReferences?: bigint[] | undefined;
528
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
529
+ accessReferences?: ResourceReference[] | undefined;
530
+ rejectVersion?: number | undefined;
531
+ sender?: ReadableAddress | undefined;
532
+ deployTimeParams?: TealTemplateParams | undefined;
533
+ updatable?: boolean | undefined;
534
+ deletable?: boolean | undefined;
535
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
536
+ schema?: {
537
+ /** The number of integers saved in global state. */
538
+ globalInts: number;
539
+ /** The number of byte slices saved in global state. */
540
+ globalByteSlices: number;
541
+ /** The number of integers saved in local state. */
542
+ localInts: number;
543
+ /** The number of byte slices saved in local state. */
544
+ localByteSlices: number;
545
+ } | undefined;
546
+ extraProgramPages?: number | undefined;
547
+ } | undefined) => Promise<{
548
+ approvalProgram: Uint8Array;
549
+ clearStateProgram: Uint8Array;
550
+ compiledApproval?: CompiledTeal | undefined;
551
+ compiledClear?: CompiledTeal | undefined;
552
+ deployTimeParams: TealTemplateParams | undefined;
553
+ schema: {
554
+ /** The number of integers saved in global state. */
555
+ globalInts: number;
556
+ /** The number of byte slices saved in global state. */
557
+ globalByteSlices: number;
558
+ /** The number of integers saved in local state. */
559
+ localInts: number;
560
+ /** The number of byte slices saved in local state. */
561
+ localByteSlices: number;
562
+ };
563
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
564
+ rekeyTo?: ReadableAddress | undefined;
565
+ note?: string | Uint8Array | undefined;
566
+ lease?: string | Uint8Array | undefined;
567
+ staticFee?: AlgoAmount | undefined;
568
+ extraFee?: AlgoAmount | undefined;
569
+ maxFee?: AlgoAmount | undefined;
570
+ validityWindow?: number | bigint | undefined;
571
+ firstValidRound?: bigint | undefined;
572
+ lastValidRound?: bigint | undefined;
573
+ args?: Uint8Array[] | undefined;
574
+ accountReferences?: ReadableAddress[] | undefined;
575
+ appReferences?: bigint[] | undefined;
576
+ assetReferences?: bigint[] | undefined;
577
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
578
+ accessReferences?: ResourceReference[] | undefined;
579
+ rejectVersion?: number | undefined;
580
+ sender?: ReadableAddress | undefined;
581
+ updatable?: boolean | undefined;
582
+ deletable?: boolean | undefined;
583
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
584
+ extraProgramPages?: number | undefined;
585
+ } & {
586
+ sender: Address;
587
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
588
+ onComplete: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication;
589
+ }>;
590
+ /** Return params for a deployment update bare call */
591
+ deployUpdate: (params?: {
592
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
593
+ rekeyTo?: ReadableAddress | undefined;
594
+ note?: string | Uint8Array | undefined;
595
+ lease?: string | Uint8Array | undefined;
596
+ staticFee?: AlgoAmount | undefined;
597
+ extraFee?: AlgoAmount | undefined;
598
+ maxFee?: AlgoAmount | undefined;
599
+ validityWindow?: number | bigint | undefined;
600
+ firstValidRound?: bigint | undefined;
601
+ lastValidRound?: bigint | undefined;
602
+ args?: Uint8Array[] | undefined;
603
+ accountReferences?: ReadableAddress[] | undefined;
604
+ appReferences?: bigint[] | undefined;
605
+ assetReferences?: bigint[] | undefined;
606
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
607
+ accessReferences?: ResourceReference[] | undefined;
608
+ rejectVersion?: number | undefined;
609
+ sender?: ReadableAddress | undefined;
610
+ } | undefined) => {
611
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
612
+ rekeyTo?: ReadableAddress | undefined;
613
+ note?: string | Uint8Array | undefined;
614
+ lease?: string | Uint8Array | undefined;
615
+ staticFee?: AlgoAmount | undefined;
616
+ extraFee?: AlgoAmount | undefined;
617
+ maxFee?: AlgoAmount | undefined;
618
+ validityWindow?: number | bigint | undefined;
619
+ firstValidRound?: bigint | undefined;
620
+ lastValidRound?: bigint | undefined;
621
+ args?: Uint8Array[] | undefined;
622
+ accountReferences?: ReadableAddress[] | undefined;
623
+ appReferences?: bigint[] | undefined;
624
+ assetReferences?: bigint[] | undefined;
625
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
626
+ accessReferences?: ResourceReference[] | undefined;
627
+ rejectVersion?: number | undefined;
628
+ sender?: ReadableAddress | undefined;
629
+ } & {
630
+ sender: Address;
631
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
632
+ onComplete: OnApplicationComplete.UpdateApplication;
633
+ };
634
+ /** Return params for a deployment delete bare call */
635
+ deployDelete: (params?: {
636
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
637
+ rekeyTo?: ReadableAddress | undefined;
638
+ note?: string | Uint8Array | undefined;
639
+ lease?: string | Uint8Array | undefined;
640
+ staticFee?: AlgoAmount | undefined;
641
+ extraFee?: AlgoAmount | undefined;
642
+ maxFee?: AlgoAmount | undefined;
643
+ validityWindow?: number | bigint | undefined;
644
+ firstValidRound?: bigint | undefined;
645
+ lastValidRound?: bigint | undefined;
646
+ args?: Uint8Array[] | undefined;
647
+ accountReferences?: ReadableAddress[] | undefined;
648
+ appReferences?: bigint[] | undefined;
649
+ assetReferences?: bigint[] | undefined;
650
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
651
+ accessReferences?: ResourceReference[] | undefined;
652
+ rejectVersion?: number | undefined;
653
+ sender?: ReadableAddress | undefined;
654
+ } | undefined) => {
655
+ signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
656
+ rekeyTo?: ReadableAddress | undefined;
657
+ note?: string | Uint8Array | undefined;
658
+ lease?: string | Uint8Array | undefined;
659
+ staticFee?: AlgoAmount | undefined;
660
+ extraFee?: AlgoAmount | undefined;
661
+ maxFee?: AlgoAmount | undefined;
662
+ validityWindow?: number | bigint | undefined;
663
+ firstValidRound?: bigint | undefined;
664
+ lastValidRound?: bigint | undefined;
665
+ args?: Uint8Array[] | undefined;
666
+ accountReferences?: ReadableAddress[] | undefined;
667
+ appReferences?: bigint[] | undefined;
668
+ assetReferences?: bigint[] | undefined;
669
+ boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
670
+ accessReferences?: ResourceReference[] | undefined;
671
+ rejectVersion?: number | undefined;
672
+ sender?: ReadableAddress | undefined;
673
+ } & {
674
+ sender: Address;
675
+ signer: AddressWithTransactionSigner | TransactionSigner | undefined;
676
+ onComplete: OnApplicationComplete.DeleteApplication;
677
+ };
678
+ };
679
+ };
680
+ /** Create transactions for the current app */
681
+ readonly createTransaction: {
682
+ /** Create bare (raw) transactions for the current app */
683
+ bare: {
684
+ /**
685
+ * Create a create app call transaction using a bare (raw) create call.
686
+ *
687
+ * Performs deploy-time TEAL template placeholder substitutions (if specified).
688
+ * @param params The parameters to create the create call transaction
689
+ * @returns The create call transaction
690
+ */
691
+ create: (params?: AppFactoryCreateParams) => Promise<Transaction>;
692
+ };
693
+ /**
694
+ * Create a create app call transaction using an ABI create call.
695
+ *
696
+ * Performs deploy-time TEAL template placeholder substitutions (if specified).
697
+ * @param params The parameters to create the create call transaction
698
+ * @returns The create call transaction
699
+ */
700
+ create: (params: AppFactoryCreateMethodCallParams) => Promise<{
701
+ transactions: Transaction[];
702
+ methodCalls: Map<number, ABIMethod>;
703
+ signers: Map<number, TransactionSigner>;
704
+ }>;
705
+ };
706
+ /** Send transactions to the current app */
707
+ readonly send: {
708
+ /** Send bare (raw) transactions for the current app */
709
+ bare: {
710
+ /**
711
+ * Creates an instance of the app using a bare (raw) create call and returns the result
712
+ * of the creation transaction and an app client to interact with that app instance.
713
+ *
714
+ * Performs deploy-time TEAL template placeholder substitutions (if specified).
715
+ * @param params The parameters to create the app
716
+ * @returns The app client and the result of the creation transaction
717
+ */
718
+ create: (params?: AppFactoryCreateParams & SendParams) => Promise<{
719
+ appClient: AppClient;
720
+ result: {
721
+ compiledApproval?: CompiledTeal | undefined;
722
+ compiledClear?: CompiledTeal | undefined;
723
+ return: undefined;
724
+ groupId: string | undefined;
725
+ txIds: string[];
726
+ returns?: ABIReturn[] | undefined;
727
+ confirmations: PendingTransactionResponse[];
728
+ transactions: Transaction[];
729
+ confirmation: PendingTransactionResponse;
730
+ transaction: Transaction;
731
+ appId: bigint;
732
+ appAddress: Address;
733
+ };
734
+ }>;
735
+ };
736
+ /**
737
+ * Creates an instance of the app and returns the result of the creation
738
+ * transaction and an app client to interact with that app instance.
739
+ *
740
+ * Performs deploy-time TEAL template placeholder substitutions (if specified).
741
+ * @param params The parameters to create the app
742
+ * @returns The app client and the result of the creation transaction
743
+ */
744
+ create: (params: AppFactoryCreateMethodCallParams & SendParams) => Promise<{
745
+ appClient: AppClient;
746
+ result: {
747
+ compiledApproval?: CompiledTeal | undefined;
748
+ compiledClear?: CompiledTeal | undefined;
749
+ return: ABIValue | undefined;
750
+ groupId: string | undefined;
751
+ txIds: string[];
752
+ returns?: ABIReturn[] | undefined;
753
+ confirmations: PendingTransactionResponse[];
754
+ transactions: Transaction[];
755
+ confirmation: PendingTransactionResponse;
756
+ transaction: Transaction;
757
+ appId: bigint;
758
+ appAddress: Address;
759
+ };
760
+ }>;
761
+ };
762
+ /**
763
+ * Idempotently deploy (create if not exists, update if changed) an app against the given name for the given creator account, including deploy-time TEAL template placeholder substitutions (if specified).
764
+ *
765
+ * **Note:** When using the return from this function be sure to check `operationPerformed` to get access to various return properties like `transaction`, `confirmation` and `deleteResult`.
766
+ *
767
+ * **Note:** if there is a breaking state schema change to an existing app (and `onSchemaBreak` is set to `'replace'`) the existing app will be deleted and re-created.
768
+ *
769
+ * **Note:** if there is an update (different TEAL code) to an existing app (and `onUpdate` is set to `'replace'`) the existing app will be deleted and re-created.
770
+ * @param params The arguments to control the app deployment
771
+ * @returns The app client and the result of the deployment
772
+ * @example
773
+ * ```ts
774
+ * const { appClient, result } = await factory.deploy({
775
+ * createParams: {
776
+ * sender: 'SENDER_ADDRESS',
777
+ * approvalProgram: 'APPROVAL PROGRAM',
778
+ * clearStateProgram: 'CLEAR PROGRAM',
779
+ * schema: {
780
+ * globalByteSlices: 0,
781
+ * globalInts: 0,
782
+ * localByteSlices: 0,
783
+ * localInts: 0
784
+ * }
785
+ * },
786
+ * updateParams: {
787
+ * sender: 'SENDER_ADDRESS'
788
+ * },
789
+ * deleteParams: {
790
+ * sender: 'SENDER_ADDRESS'
791
+ * },
792
+ * onSchemaBreak: 'append',
793
+ * onUpdate: 'append'
794
+ * })
795
+ * ```
796
+ */
797
+ deploy(params: AppFactoryDeployParams): Promise<{
798
+ appClient: AppClient;
799
+ result: {
800
+ return: ABIValue | undefined;
801
+ deleteReturn: ABIValue | undefined;
802
+ compiledApproval?: CompiledTeal | undefined;
803
+ compiledClear?: CompiledTeal | undefined;
804
+ operationPerformed: "create";
805
+ createdRound: bigint;
806
+ updatedRound: bigint;
807
+ createdMetadata: AppDeployMetadata;
808
+ deleted: boolean;
809
+ name: string;
810
+ version: string;
811
+ deletable?: boolean | undefined;
812
+ updatable?: boolean | undefined;
813
+ groupId: string | undefined;
814
+ txIds: string[];
815
+ returns?: ABIReturn[] | undefined;
816
+ confirmations: PendingTransactionResponse[];
817
+ transactions: Transaction[];
818
+ confirmation: PendingTransactionResponse;
819
+ transaction: Transaction;
820
+ appId: bigint;
821
+ appAddress: Address;
822
+ } | {
823
+ return: ABIValue | undefined;
824
+ deleteReturn: ABIValue | undefined;
825
+ compiledApproval?: CompiledTeal | undefined;
826
+ compiledClear?: CompiledTeal | undefined;
827
+ operationPerformed: "update";
828
+ appId: bigint;
829
+ appAddress: Address;
830
+ createdRound: bigint;
831
+ updatedRound: bigint;
832
+ createdMetadata: AppDeployMetadata;
833
+ deleted: boolean;
834
+ name: string;
835
+ version: string;
836
+ deletable?: boolean | undefined;
837
+ updatable?: boolean | undefined;
838
+ groupId: string | undefined;
839
+ txIds: string[];
840
+ returns?: ABIReturn[] | undefined;
841
+ confirmations: PendingTransactionResponse[];
842
+ transactions: Transaction[];
843
+ confirmation: PendingTransactionResponse;
844
+ transaction: Transaction;
845
+ } | {
846
+ return: ABIValue | undefined;
847
+ deleteReturn: ABIValue | undefined;
848
+ compiledApproval?: CompiledTeal | undefined;
849
+ compiledClear?: CompiledTeal | undefined;
850
+ operationPerformed: "replace";
851
+ createdRound: bigint;
852
+ updatedRound: bigint;
853
+ createdMetadata: AppDeployMetadata;
854
+ deleted: boolean;
855
+ name: string;
856
+ version: string;
857
+ deletable?: boolean | undefined;
858
+ updatable?: boolean | undefined;
859
+ groupId: string | undefined;
860
+ txIds: string[];
861
+ returns?: ABIReturn[] | undefined;
862
+ confirmations: PendingTransactionResponse[];
863
+ transactions: Transaction[];
864
+ confirmation: PendingTransactionResponse;
865
+ transaction: Transaction;
866
+ appId: bigint;
867
+ appAddress: Address;
868
+ deleteResult: ConfirmedTransactionResult;
869
+ } | {
870
+ return: ABIValue | undefined;
871
+ deleteReturn: ABIValue | undefined;
872
+ compiledApproval?: CompiledTeal | undefined;
873
+ compiledClear?: CompiledTeal | undefined;
874
+ operationPerformed: "nothing";
875
+ appId: bigint;
876
+ appAddress: Address;
877
+ createdRound: bigint;
878
+ updatedRound: bigint;
879
+ createdMetadata: AppDeployMetadata;
880
+ deleted: boolean;
881
+ name: string;
882
+ version: string;
883
+ deletable?: boolean | undefined;
884
+ updatable?: boolean | undefined;
885
+ };
886
+ }>;
887
+ /**
888
+ * Returns a new `AppClient` client for an app instance of the given ID.
889
+ *
890
+ * Automatically populates appName, defaultSender and source maps from the factory
891
+ * if not specified in the params.
892
+ * @param params The parameters to create the app client
893
+ * @returns The `AppClient` instance
894
+ * @example
895
+ * ```typescript
896
+ * const appClient = factory.getAppClientById({ appId: 12345n })
897
+ * ```
898
+ */
899
+ getAppClientById(params: AppFactoryAppClientParams): AppClient;
900
+ /**
901
+ * Returns a new `AppClient` client, resolving the app by creator address and name
902
+ * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
903
+ *
904
+ * Automatically populates appName, defaultSender and source maps from the factory
905
+ * if not specified in the params.
906
+ * @param params The parameters to create the app client
907
+ * @returns The `AppClient` instance
908
+ * @example
909
+ * ```typescript
910
+ * const appClient = factory.getAppClientByCreatorAndName({ creatorAddress: 'CREATOR_ADDRESS', appName: 'my_app' })
911
+ * ```
912
+ */
913
+ getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<AppClient>;
914
+ /**
915
+ * Takes an error that may include a logic error from a call to the current app and re-exposes the
916
+ * error to include source code information via the source map and ARC-56 spec.
917
+ * @param e The error to parse
918
+ * @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
919
+ * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
920
+ */
921
+ exposeLogicError(e: Error, isClearStateProgram?: boolean): Error;
922
+ /**
923
+ * Export the current source maps for the app.
924
+ * @returns The source maps
925
+ */
926
+ exportSourceMaps(): AppSourceMaps;
927
+ /**
928
+ * Import source maps for the app.
929
+ * @param sourceMaps The source maps to import
930
+ */
931
+ importSourceMaps(sourceMaps: AppSourceMaps): void;
932
+ private getDeployTimeControl;
933
+ private getParamsMethods;
934
+ /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
935
+ private handleCallErrors;
936
+ /**
937
+ * Compiles the approval and clear state programs (if TEAL templates provided),
938
+ * performing any provided deploy-time parameter replacement and stores
939
+ * the source maps.
940
+ *
941
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
942
+ *
943
+ * Will store any generated source maps for later use in debugging.
944
+ * @param compilation Optional compilation parameters to use for the compilation
945
+ * @returns The compilation result
946
+ * @example
947
+ * ```typescript
948
+ * const result = await factory.compile()
949
+ * ```
950
+ */
951
+ compile(compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
952
+ private getBareParams;
953
+ private getABIParams;
954
+ private getCreateABIArgsWithDefaultValues;
955
+ /** Returns the sender for a call, using the `defaultSender`
956
+ * if none provided and throws an error if neither provided */
957
+ private getSender;
958
+ /** Returns the signer for a call, using the provided signer or the `defaultSigner`
959
+ * if no signer was provided and the sender resolves to the default sender, the call will use default signer
960
+ * or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
961
+ private getSigner;
962
+ }
963
+ //#endregion
964
+ export { AppFactory, AppFactoryAppClientParams, AppFactoryCreateMethodCallParams, AppFactoryCreateParams, AppFactoryDeployParams, AppFactoryParams, AppFactoryResolveAppClientByCreatorAndNameParams, CreateOnComplete, CreateSchema };
965
+ //# sourceMappingURL=app-factory.d.ts.map