@algorandfoundation/algokit-utils 7.0.0-beta.1 → 7.0.0-beta.11

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 (360) hide show
  1. package/README.md +3 -25
  2. package/account/account.d.ts +8 -9
  3. package/account/account.js +7 -7
  4. package/account/account.js.map +1 -1
  5. package/account/account.mjs +7 -7
  6. package/account/account.mjs.map +1 -1
  7. package/account/get-account-config-from-environment.d.ts +0 -1
  8. package/account/get-account-config-from-environment.js.map +1 -1
  9. package/account/get-account-config-from-environment.mjs.map +1 -1
  10. package/account/get-account.d.ts +2 -3
  11. package/account/get-account.js +1 -1
  12. package/account/get-account.js.map +1 -1
  13. package/account/get-account.mjs +1 -1
  14. package/account/get-account.mjs.map +1 -1
  15. package/account/get-dispenser-account.d.ts +1 -2
  16. package/account/get-dispenser-account.js +1 -1
  17. package/account/get-dispenser-account.js.map +1 -1
  18. package/account/get-dispenser-account.mjs +1 -1
  19. package/account/get-dispenser-account.mjs.map +1 -1
  20. package/account/index.d.ts +0 -1
  21. package/account/mnemonic-account.d.ts +1 -2
  22. package/account/mnemonic-account.js +1 -1
  23. package/account/mnemonic-account.js.map +1 -1
  24. package/account/mnemonic-account.mjs +1 -1
  25. package/account/mnemonic-account.mjs.map +1 -1
  26. package/amount.d.ts +14 -5
  27. package/amount.js +6 -0
  28. package/amount.js.map +1 -1
  29. package/amount.mjs +6 -0
  30. package/amount.mjs.map +1 -1
  31. package/app-client.d.ts +15 -1
  32. package/app-client.js +15 -0
  33. package/app-client.js.map +1 -1
  34. package/app-client.mjs +15 -0
  35. package/app-client.mjs.map +1 -1
  36. package/app-deploy.d.ts +18 -2
  37. package/app-deploy.js +140 -333
  38. package/app-deploy.js.map +1 -1
  39. package/app-deploy.mjs +143 -336
  40. package/app-deploy.mjs.map +1 -1
  41. package/app.d.ts +39 -3
  42. package/app.js +116 -369
  43. package/app.js.map +1 -1
  44. package/app.mjs +117 -370
  45. package/app.mjs.map +1 -1
  46. package/asset.d.ts +5 -6
  47. package/asset.js +5 -8
  48. package/asset.js.map +1 -1
  49. package/asset.mjs +5 -8
  50. package/asset.mjs.map +1 -1
  51. package/config.d.ts +0 -1
  52. package/config.js.map +1 -1
  53. package/config.mjs.map +1 -1
  54. package/debugging/debugging.d.ts +3 -5
  55. package/debugging/debugging.js +4 -128
  56. package/debugging/debugging.js.map +1 -1
  57. package/debugging/debugging.mjs +4 -109
  58. package/debugging/debugging.mjs.map +1 -1
  59. package/debugging/index.d.ts +0 -2
  60. package/dispenser-client.d.ts +0 -1
  61. package/dispenser-client.js.map +1 -1
  62. package/dispenser-client.mjs.map +1 -1
  63. package/index.d.ts +4 -4
  64. package/index.js +31 -26
  65. package/index.js.map +1 -1
  66. package/index.mjs +4 -4
  67. package/indexer-lookup.d.ts +0 -1
  68. package/indexer-lookup.js.map +1 -1
  69. package/indexer-lookup.mjs.map +1 -1
  70. package/localnet/get-kmd-wallet-account.d.ts +1 -2
  71. package/localnet/get-kmd-wallet-account.js +1 -1
  72. package/localnet/get-kmd-wallet-account.js.map +1 -1
  73. package/localnet/get-kmd-wallet-account.mjs +1 -1
  74. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  75. package/localnet/get-localnet-dispenser-account.d.ts +1 -2
  76. package/localnet/get-localnet-dispenser-account.js +1 -1
  77. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  78. package/localnet/get-localnet-dispenser-account.mjs +1 -1
  79. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  80. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
  81. package/localnet/get-or-create-kmd-wallet-account.js +1 -1
  82. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  83. package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
  84. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  85. package/localnet/index.d.ts +0 -1
  86. package/localnet/is-localnet.d.ts +1 -2
  87. package/localnet/is-localnet.js +1 -1
  88. package/localnet/is-localnet.js.map +1 -1
  89. package/localnet/is-localnet.mjs +1 -1
  90. package/localnet/is-localnet.mjs.map +1 -1
  91. package/network-client.d.ts +2 -3
  92. package/network-client.js +2 -2
  93. package/network-client.js.map +1 -1
  94. package/network-client.mjs +2 -2
  95. package/network-client.mjs.map +1 -1
  96. package/package.json +1 -1
  97. package/testing/_asset.d.ts +0 -1
  98. package/testing/account.d.ts +0 -1
  99. package/testing/account.js.map +1 -1
  100. package/testing/account.mjs.map +1 -1
  101. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  102. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  103. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  104. package/testing/fixtures/algorand-fixture.d.ts +0 -1
  105. package/testing/fixtures/algorand-fixture.js +12 -12
  106. package/testing/fixtures/algorand-fixture.js.map +1 -1
  107. package/testing/fixtures/algorand-fixture.mjs +12 -12
  108. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  109. package/testing/fixtures/index.d.ts +0 -1
  110. package/testing/index.d.ts +0 -1
  111. package/testing/indexer.d.ts +0 -1
  112. package/testing/indexer.js.map +1 -1
  113. package/testing/indexer.mjs.map +1 -1
  114. package/testing/test-logger.d.ts +0 -1
  115. package/testing/test-logger.js +1 -3
  116. package/testing/test-logger.js.map +1 -1
  117. package/testing/test-logger.mjs +1 -3
  118. package/testing/test-logger.mjs.map +1 -1
  119. package/testing/transaction-logger.d.ts +0 -1
  120. package/testing/transaction-logger.js.map +1 -1
  121. package/testing/transaction-logger.mjs.map +1 -1
  122. package/transaction/index.d.ts +0 -1
  123. package/transaction/legacy-bridge.d.ts +31 -6
  124. package/transaction/legacy-bridge.js +100 -6
  125. package/transaction/legacy-bridge.js.map +1 -1
  126. package/transaction/legacy-bridge.mjs +99 -8
  127. package/transaction/legacy-bridge.mjs.map +1 -1
  128. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +0 -1
  129. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  130. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  131. package/transaction/transaction.d.ts +41 -6
  132. package/transaction/transaction.js +108 -45
  133. package/transaction/transaction.js.map +1 -1
  134. package/transaction/transaction.mjs +108 -46
  135. package/transaction/transaction.mjs.map +1 -1
  136. package/transfer/index.d.ts +0 -1
  137. package/transfer/transfer-algos.d.ts +1 -2
  138. package/transfer/transfer-algos.js +1 -1
  139. package/transfer/transfer-algos.js.map +1 -1
  140. package/transfer/transfer-algos.mjs +1 -1
  141. package/transfer/transfer-algos.mjs.map +1 -1
  142. package/transfer/transfer.d.ts +1 -2
  143. package/transfer/transfer.js +3 -3
  144. package/transfer/transfer.js.map +1 -1
  145. package/transfer/transfer.mjs +3 -3
  146. package/transfer/transfer.mjs.map +1 -1
  147. package/types/account-manager.d.ts +14 -6
  148. package/types/account-manager.js +18 -4
  149. package/types/account-manager.js.map +1 -1
  150. package/types/account-manager.mjs +18 -4
  151. package/types/account-manager.mjs.map +1 -1
  152. package/types/account.d.ts +0 -1
  153. package/types/account.js.map +1 -1
  154. package/types/account.mjs.map +1 -1
  155. package/types/algo-http-client-with-retry.d.ts +0 -1
  156. package/types/algo-http-client-with-retry.js.map +1 -1
  157. package/types/algo-http-client-with-retry.mjs.map +1 -1
  158. package/types/algorand-client-interface.d.ts +28 -0
  159. package/types/algorand-client-interface.js +3 -0
  160. package/types/algorand-client-interface.js.map +1 -0
  161. package/types/algorand-client-interface.mjs +2 -0
  162. package/types/algorand-client-interface.mjs.map +1 -0
  163. package/types/algorand-client-transaction-creator.d.ts +450 -21
  164. package/types/algorand-client-transaction-creator.js +406 -22
  165. package/types/algorand-client-transaction-creator.js.map +1 -1
  166. package/types/algorand-client-transaction-creator.mjs +406 -22
  167. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  168. package/types/algorand-client-transaction-sender.d.ts +758 -33
  169. package/types/algorand-client-transaction-sender.js +444 -14
  170. package/types/algorand-client-transaction-sender.js.map +1 -1
  171. package/types/algorand-client-transaction-sender.mjs +444 -14
  172. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  173. package/types/algorand-client.d.ts +18 -10
  174. package/types/algorand-client.js +23 -10
  175. package/types/algorand-client.js.map +1 -1
  176. package/types/algorand-client.mjs +23 -10
  177. package/types/algorand-client.mjs.map +1 -1
  178. package/types/amount.d.ts +10 -11
  179. package/types/amount.js +7 -7
  180. package/types/amount.js.map +1 -1
  181. package/types/amount.mjs +7 -7
  182. package/types/amount.mjs.map +1 -1
  183. package/types/app-arc56.d.ts +348 -0
  184. package/types/app-arc56.js +184 -0
  185. package/types/app-arc56.js.map +1 -0
  186. package/types/app-arc56.mjs +175 -0
  187. package/types/app-arc56.mjs.map +1 -0
  188. package/types/app-client.d.ts +1496 -9
  189. package/types/app-client.js +903 -21
  190. package/types/app-client.js.map +1 -1
  191. package/types/app-client.mjs +904 -23
  192. package/types/app-client.mjs.map +1 -1
  193. package/types/app-deployer.d.ts +126 -0
  194. package/types/app-deployer.js +354 -0
  195. package/types/app-deployer.js.map +1 -0
  196. package/types/app-deployer.mjs +352 -0
  197. package/types/app-deployer.mjs.map +1 -0
  198. package/types/app-factory.d.ts +846 -0
  199. package/types/app-factory.js +411 -0
  200. package/types/app-factory.js.map +1 -0
  201. package/types/app-factory.mjs +409 -0
  202. package/types/app-factory.mjs.map +1 -0
  203. package/types/app-manager.d.ts +244 -0
  204. package/types/app-manager.js +334 -0
  205. package/types/app-manager.js.map +1 -0
  206. package/types/app-manager.mjs +332 -0
  207. package/types/app-manager.mjs.map +1 -0
  208. package/types/app-spec.d.ts +2 -1
  209. package/types/app-spec.js +121 -0
  210. package/types/app-spec.js.map +1 -1
  211. package/types/app-spec.mjs +120 -0
  212. package/types/app-spec.mjs.map +1 -1
  213. package/types/app.d.ts +53 -13
  214. package/types/app.js +1 -1
  215. package/types/app.js.map +1 -1
  216. package/types/app.mjs +1 -1
  217. package/types/app.mjs.map +1 -1
  218. package/types/asset-manager.d.ts +4 -4
  219. package/types/asset-manager.js +3 -4
  220. package/types/asset-manager.js.map +1 -1
  221. package/types/asset-manager.mjs +3 -4
  222. package/types/asset-manager.mjs.map +1 -1
  223. package/types/asset.d.ts +0 -1
  224. package/types/async-event-emitter.d.ts +23 -0
  225. package/types/async-event-emitter.js +55 -0
  226. package/types/async-event-emitter.js.map +1 -0
  227. package/types/async-event-emitter.mjs +53 -0
  228. package/types/async-event-emitter.mjs.map +1 -0
  229. package/types/client-manager.d.ts +133 -51
  230. package/types/client-manager.js +147 -23
  231. package/types/client-manager.js.map +1 -1
  232. package/types/client-manager.mjs +148 -24
  233. package/types/client-manager.mjs.map +1 -1
  234. package/types/composer.d.ts +232 -49
  235. package/types/composer.js +320 -65
  236. package/types/composer.js.map +1 -1
  237. package/types/composer.mjs +321 -66
  238. package/types/composer.mjs.map +1 -1
  239. package/types/config.d.ts +3 -6
  240. package/types/config.js +5 -44
  241. package/types/config.js.map +1 -1
  242. package/types/config.mjs +5 -27
  243. package/types/config.mjs.map +1 -1
  244. package/types/debugging.d.ts +29 -101
  245. package/types/debugging.js +16 -109
  246. package/types/debugging.js.map +1 -1
  247. package/types/debugging.mjs +12 -107
  248. package/types/debugging.mjs.map +1 -1
  249. package/types/dispenser-client.d.ts +1 -2
  250. package/types/dispenser-client.js +6 -5
  251. package/types/dispenser-client.js.map +1 -1
  252. package/types/dispenser-client.mjs +6 -5
  253. package/types/dispenser-client.mjs.map +1 -1
  254. package/types/expand.d.ts +7 -0
  255. package/types/expand.js +3 -0
  256. package/types/expand.js.map +1 -0
  257. package/types/expand.mjs +2 -0
  258. package/types/expand.mjs.map +1 -0
  259. package/types/indexer.d.ts +0 -1
  260. package/types/indexer.js.map +1 -1
  261. package/types/indexer.mjs.map +1 -1
  262. package/types/kmd-account-manager.d.ts +0 -1
  263. package/types/kmd-account-manager.js +2 -2
  264. package/types/kmd-account-manager.js.map +1 -1
  265. package/types/kmd-account-manager.mjs +2 -2
  266. package/types/kmd-account-manager.mjs.map +1 -1
  267. package/types/logging.d.ts +0 -1
  268. package/types/logging.js.map +1 -1
  269. package/types/logging.mjs.map +1 -1
  270. package/types/logic-error.d.ts +0 -1
  271. package/types/logic-error.js.map +1 -1
  272. package/types/logic-error.mjs.map +1 -1
  273. package/types/network-client.d.ts +13 -1
  274. package/types/network-client.js.map +1 -1
  275. package/types/network-client.mjs.map +1 -1
  276. package/types/testing.d.ts +3 -4
  277. package/types/transaction.d.ts +17 -4
  278. package/types/transfer.d.ts +0 -1
  279. package/types/urlTokenBaseHTTPClient.d.ts +0 -1
  280. package/types/urlTokenBaseHTTPClient.js +1 -1
  281. package/types/urlTokenBaseHTTPClient.js.map +1 -1
  282. package/types/urlTokenBaseHTTPClient.mjs +1 -1
  283. package/types/urlTokenBaseHTTPClient.mjs.map +1 -1
  284. package/util.d.ts +2 -2
  285. package/util.js +11 -10
  286. package/util.js.map +1 -1
  287. package/util.mjs +11 -10
  288. package/util.mjs.map +1 -1
  289. package/account/account.d.ts.map +0 -1
  290. package/account/get-account-config-from-environment.d.ts.map +0 -1
  291. package/account/get-account.d.ts.map +0 -1
  292. package/account/get-dispenser-account.d.ts.map +0 -1
  293. package/account/index.d.ts.map +0 -1
  294. package/account/mnemonic-account.d.ts.map +0 -1
  295. package/amount.d.ts.map +0 -1
  296. package/app-client.d.ts.map +0 -1
  297. package/app-deploy.d.ts.map +0 -1
  298. package/app.d.ts.map +0 -1
  299. package/asset.d.ts.map +0 -1
  300. package/config.d.ts.map +0 -1
  301. package/debugging/debugging.d.ts.map +0 -1
  302. package/debugging/index.d.ts.map +0 -1
  303. package/debugging/simulate-and-persist-response.d.ts +0 -20
  304. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  305. package/debugging/simulate-and-persist-response.js +0 -108
  306. package/debugging/simulate-and-persist-response.js.map +0 -1
  307. package/debugging/simulate-and-persist-response.mjs +0 -89
  308. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  309. package/dispenser-client.d.ts.map +0 -1
  310. package/index.d.ts.map +0 -1
  311. package/indexer-lookup.d.ts.map +0 -1
  312. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  313. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  314. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  315. package/localnet/index.d.ts.map +0 -1
  316. package/localnet/is-localnet.d.ts.map +0 -1
  317. package/network-client.d.ts.map +0 -1
  318. package/testing/_asset.d.ts.map +0 -1
  319. package/testing/account.d.ts.map +0 -1
  320. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  321. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  322. package/testing/fixtures/index.d.ts.map +0 -1
  323. package/testing/index.d.ts.map +0 -1
  324. package/testing/indexer.d.ts.map +0 -1
  325. package/testing/test-logger.d.ts.map +0 -1
  326. package/testing/transaction-logger.d.ts.map +0 -1
  327. package/transaction/index.d.ts.map +0 -1
  328. package/transaction/legacy-bridge.d.ts.map +0 -1
  329. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  330. package/transaction/transaction.d.ts.map +0 -1
  331. package/transfer/index.d.ts.map +0 -1
  332. package/transfer/transfer-algos.d.ts.map +0 -1
  333. package/transfer/transfer.d.ts.map +0 -1
  334. package/types/account-manager.d.ts.map +0 -1
  335. package/types/account.d.ts.map +0 -1
  336. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  337. package/types/algorand-client-transaction-creator.d.ts.map +0 -1
  338. package/types/algorand-client-transaction-sender.d.ts.map +0 -1
  339. package/types/algorand-client.d.ts.map +0 -1
  340. package/types/amount.d.ts.map +0 -1
  341. package/types/app-client.d.ts.map +0 -1
  342. package/types/app-spec.d.ts.map +0 -1
  343. package/types/app.d.ts.map +0 -1
  344. package/types/asset-manager.d.ts.map +0 -1
  345. package/types/asset.d.ts.map +0 -1
  346. package/types/client-manager.d.ts.map +0 -1
  347. package/types/composer.d.ts.map +0 -1
  348. package/types/config.d.ts.map +0 -1
  349. package/types/debugging.d.ts.map +0 -1
  350. package/types/dispenser-client.d.ts.map +0 -1
  351. package/types/indexer.d.ts.map +0 -1
  352. package/types/kmd-account-manager.d.ts.map +0 -1
  353. package/types/logging.d.ts.map +0 -1
  354. package/types/logic-error.d.ts.map +0 -1
  355. package/types/network-client.d.ts.map +0 -1
  356. package/types/testing.d.ts.map +0 -1
  357. package/types/transaction.d.ts.map +0 -1
  358. package/types/transfer.d.ts.map +0 -1
  359. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  360. package/util.d.ts.map +0 -1
@@ -1,8 +1,15 @@
1
1
  import algosdk from 'algosdk';
2
+ import { TransactionSignerAccount } from './account';
3
+ import { AlgorandClientInterface } from './algorand-client-interface';
2
4
  import { AlgoAmount } from './amount';
3
- import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppLookup, AppMetadata, AppReference, AppState, AppStorageSchema, BoxName, OnSchemaBreak, OnUpdate, RawAppCallArgs, TealTemplateParams } from './app';
5
+ import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
6
+ import { ABIStruct, Arc56Contract, Arc56Method } from './app-arc56';
7
+ import { AppLookup } from './app-deployer';
8
+ import { AppManager, BoxIdentifier } from './app-manager';
4
9
  import { AppSpec } from './app-spec';
5
- import { SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
10
+ import AlgoKitComposer, { AppCallMethodCall, AppCallParams, AppDeleteMethodCall, AppDeleteParams, AppMethodCall, AppMethodCallTransactionArgument, CommonAppCallParams, PaymentParams } from './composer';
11
+ import { Expand } from './expand';
12
+ import { SendParams, SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
6
13
  import ABIMethod = algosdk.ABIMethod;
7
14
  import ABIMethodParams = algosdk.ABIMethodParams;
8
15
  import ABIType = algosdk.ABIType;
@@ -10,7 +17,9 @@ import ABIValue = algosdk.ABIValue;
10
17
  import Algodv2 = algosdk.Algodv2;
11
18
  import Indexer = algosdk.Indexer;
12
19
  import OnApplicationComplete = algosdk.OnApplicationComplete;
20
+ import SourceMap = algosdk.SourceMap;
13
21
  import SuggestedParams = algosdk.SuggestedParams;
22
+ import TransactionSigner = algosdk.TransactionSigner;
14
23
  /** Configuration to resolve app by creator and name `getCreatorAppsByName` */
15
24
  export type ResolveAppByCreatorAndNameBase = {
16
25
  /** The address of the app creator account to resolve the app by */
@@ -21,7 +30,7 @@ export type ResolveAppByCreatorAndNameBase = {
21
30
  * * An indexer instance to search the creator account apps; or
22
31
  * * The cached value of the existing apps for the given creator from `getCreatorAppsByName`
23
32
  */
24
- findExistingUsing: Indexer | AppLookup;
33
+ findExistingUsing: Indexer | LegacyAppLookup;
25
34
  };
26
35
  /** Configuration to resolve app by creator and name `getCreatorAppsByName` */
27
36
  export type ResolveAppByCreatorAndName = ResolveAppByCreatorAndNameBase & {
@@ -129,7 +138,9 @@ export type AppClientClearStateParams = AppClientCallRawArgs & AppClientCallCore
129
138
  export interface AppClientCompilationParams {
130
139
  /** Any deploy-time parameters to replace in the TEAL code */
131
140
  deployTimeParams?: TealTemplateParams;
141
+ /** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
132
142
  updatable?: boolean;
143
+ /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
133
144
  deletable?: boolean;
134
145
  }
135
146
  /** On-complete action parameter for creating a contract using ApplicationClient */
@@ -167,7 +178,1440 @@ export interface SourceMapExport {
167
178
  names: string[];
168
179
  mappings: string;
169
180
  }
170
- /** Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */
181
+ /**
182
+ * The result of asking an `AppClient` to compile a program.
183
+ *
184
+ * Always contains the compiled bytecode, and may contain the result of compiling TEAL (including sourcemap) if it was available.
185
+ */
186
+ export interface AppClientCompilationResult extends Partial<AppCompilationResult> {
187
+ /** The compiled bytecode of the approval program, ready to deploy to algod */
188
+ approvalProgram: Uint8Array;
189
+ /** The compiled bytecode of the clear state program, ready to deploy to algod */
190
+ clearStateProgram: Uint8Array;
191
+ }
192
+ /** Parameters to create an app client */
193
+ export interface AppClientParams {
194
+ /** The ID of the app instance this client should make calls against. */
195
+ appId: bigint;
196
+ /** The ARC-56 or ARC-32 application spec as either:
197
+ * * Parsed JSON ARC-56 `Contract`
198
+ * * Parsed JSON ARC-32 `AppSpec`
199
+ * * Raw JSON string (in either ARC-56 or ARC-32 format)
200
+ */
201
+ appSpec: Arc56Contract | AppSpec | string;
202
+ /** An `AlgorandClient` instance */
203
+ algorand: AlgorandClientInterface;
204
+ /**
205
+ * Optional override for the app name; used for on-chain metadata and lookups.
206
+ * Defaults to the ARC-32/ARC-56 app spec name
207
+ */
208
+ appName?: string;
209
+ /** Optional address to use for the account to use as the default sender for calls. */
210
+ defaultSender?: string;
211
+ /** Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from `AlgorandClient`). */
212
+ defaultSigner?: TransactionSigner;
213
+ /** Optional source map for the approval program */
214
+ approvalSourceMap?: SourceMap;
215
+ /** Optional source map for the clear state program */
216
+ clearSourceMap?: SourceMap;
217
+ }
218
+ /** onComplete parameter for a non-update app call */
219
+ export type CallOnComplete = {
220
+ /** On-complete of the call; defaults to no-op */
221
+ onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
222
+ };
223
+ /** AppClient common parameters for a bare app call */
224
+ export type AppClientBareCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'onComplete'> & {
225
+ /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
226
+ sender?: string;
227
+ }>;
228
+ /** AppClient common parameters for an ABI method call */
229
+ export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args'> & {
230
+ /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
231
+ sender?: string;
232
+ /** The method name or method signature to call if an ABI call is being emitted
233
+ * @example Method name
234
+ * `my_method`
235
+ * @example Method signature
236
+ * `my_method(unit64,string)bytes`
237
+ */
238
+ method: string;
239
+ /** Arguments to the ABI method, either:
240
+ * * An ABI value
241
+ * * An ARC-56 struct
242
+ * * A transaction with explicit signer
243
+ * * A transaction (where the signer will be automatically assigned)
244
+ * * An unawaited transaction (e.g. from algorand.createTransaction.transactionType())
245
+ * * Another method call (via method call params object)
246
+ */
247
+ args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
248
+ }>;
249
+ /** Parameters for funding an app account */
250
+ export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & SendParams & {
251
+ /** The optional sender to send the transaction from, will use the application client's default sender by default if specified */
252
+ sender?: string;
253
+ }>;
254
+ /** Resolve an app client instance by looking up an app created by the given creator with the given name */
255
+ export type ResolveAppClientByCreatorAndName = Expand<Omit<AppClientParams, 'appId'> & {
256
+ /** The address of the creator account for the app */
257
+ creatorAddress: string;
258
+ /** An optional cached app lookup that matches a name to on-chain details;
259
+ * either this is needed or indexer is required to be passed in to this `ClientManager` on construction.
260
+ */
261
+ appLookupCache?: AppLookup;
262
+ /** Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value */
263
+ ignoreCache?: boolean;
264
+ }>;
265
+ /** Resolve an app client instance by looking up the current network. */
266
+ export type ResolveAppClientByNetwork = Expand<Omit<AppClientParams, 'appId'>>;
267
+ /** ARC-56/ARC-32 application client that allows you to manage calls and
268
+ * state for a specific deployed instance of an app (with a known app ID). */
269
+ export declare class AppClient {
270
+ private _appId;
271
+ private _appAddress;
272
+ private _appName;
273
+ private _appSpec;
274
+ private _algorand;
275
+ private _defaultSender?;
276
+ private _defaultSigner?;
277
+ private _approvalSourceMap;
278
+ private _clearSourceMap;
279
+ private _localStateMethods;
280
+ private _globalStateMethods;
281
+ private _boxStateMethods;
282
+ private _paramsMethods;
283
+ private _createTransactionsMethods;
284
+ private _sendMethods;
285
+ constructor(params: AppClientParams);
286
+ /** Start a new `AlgoKitComposer` transaction group */
287
+ newGroup(): AlgoKitComposer;
288
+ /**
289
+ * Returns a new `AppClient` client, resolving the app by creator address and name
290
+ * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
291
+ * @param params The parameters to create the app client
292
+ */
293
+ static fromCreatorAndName(params: ResolveAppClientByCreatorAndName): Promise<AppClient>;
294
+ /**
295
+ * Returns an `AppClient` instance for the current network based on
296
+ * pre-determined network-specific app IDs specified in the ARC-56 app spec.
297
+ *
298
+ * If no IDs are in the app spec or the network isn't recognised, an error is thrown.
299
+ * @param params The parameters to create the app client
300
+ */
301
+ static fromNetwork(params: ResolveAppClientByNetwork): Promise<AppClient>;
302
+ /**
303
+ * Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and
304
+ * normalises it into a parsed ARC-56 contract object.
305
+ * @param spec The spec to normalise
306
+ * @returns The normalised ARC-56 contract object
307
+ */
308
+ static normaliseAppSpec(spec: Arc56Contract | AppSpec | string): Arc56Contract;
309
+ /** The ID of the app instance this client is linked to. */
310
+ get appId(): bigint;
311
+ /** The app address of the app instance this client is linked to. */
312
+ get appAddress(): string;
313
+ /** The name of the app (from the ARC-32 / ARC-56 app spec). */
314
+ get appName(): string;
315
+ /** The ARC-56 app spec being used */
316
+ get appSpec(): Arc56Contract;
317
+ /** A reference to the underlying `AlgorandClient` this app client is using. */
318
+ get algorand(): AlgorandClientInterface;
319
+ /** Get parameters to create transactions for the current app.
320
+ *
321
+ * A good mental model for this is that these parameters represent a deferred transaction creation.
322
+ * @example Create a transaction in the future using Algorand Client
323
+ * ```typescript
324
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
325
+ * // ...
326
+ * await algorand.send.AppMethodCall(myMethodCall)
327
+ * ```
328
+ * @example Define a nested transaction as an ABI argument
329
+ * ```typescript
330
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
331
+ * await appClient.send.call({method: 'my_method2', args: [myMethodCall]})
332
+ * ```
333
+ */
334
+ get params(): {
335
+ /** Return params for a payment transaction to fund the app account */
336
+ fundAppAccount: (params: {
337
+ lease?: string | Uint8Array | undefined;
338
+ note?: string | Uint8Array | undefined;
339
+ amount: AlgoAmount;
340
+ closeRemainderTo?: string | undefined;
341
+ maxFee?: AlgoAmount | undefined;
342
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
343
+ rekeyTo?: string | undefined;
344
+ staticFee?: AlgoAmount | undefined;
345
+ extraFee?: AlgoAmount | undefined;
346
+ validityWindow?: number | undefined;
347
+ firstValidRound?: bigint | undefined;
348
+ lastValidRound?: bigint | undefined;
349
+ maxRoundsToWaitForConfirmation?: number | undefined;
350
+ suppressLog?: boolean | undefined;
351
+ populateAppCallResources?: boolean | undefined;
352
+ sender?: string | undefined;
353
+ }) => {
354
+ sender: string;
355
+ signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
356
+ receiver: string;
357
+ lease?: string | Uint8Array | undefined;
358
+ note?: string | Uint8Array | undefined;
359
+ amount: AlgoAmount;
360
+ closeRemainderTo?: string | undefined;
361
+ maxFee?: AlgoAmount | undefined;
362
+ rekeyTo?: string | undefined;
363
+ staticFee?: AlgoAmount | undefined;
364
+ extraFee?: AlgoAmount | undefined;
365
+ validityWindow?: number | undefined;
366
+ firstValidRound?: bigint | undefined;
367
+ lastValidRound?: bigint | undefined;
368
+ maxRoundsToWaitForConfirmation?: number | undefined;
369
+ suppressLog?: boolean | undefined;
370
+ populateAppCallResources?: boolean | undefined;
371
+ };
372
+ /** Return params for an update ABI call, including deploy-time TEAL template replacements and compilation if provided */
373
+ update: (params: {
374
+ lease?: string | Uint8Array | undefined;
375
+ note?: string | Uint8Array | undefined;
376
+ maxFee?: AlgoAmount | undefined;
377
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
378
+ rekeyTo?: string | undefined;
379
+ staticFee?: AlgoAmount | undefined;
380
+ extraFee?: AlgoAmount | undefined;
381
+ validityWindow?: number | undefined;
382
+ firstValidRound?: bigint | undefined;
383
+ lastValidRound?: bigint | undefined;
384
+ onComplete?: algosdk.OnApplicationComplete | undefined;
385
+ accountReferences?: string[] | undefined;
386
+ appReferences?: bigint[] | undefined;
387
+ assetReferences?: bigint[] | undefined;
388
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
389
+ sender?: string | undefined;
390
+ method: string;
391
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
392
+ } & AppClientCompilationParams) => Promise<{
393
+ /** The compiled bytecode of the approval program, ready to deploy to algod */
394
+ approvalProgram: Uint8Array;
395
+ /** The compiled bytecode of the clear state program, ready to deploy to algod */
396
+ clearStateProgram: Uint8Array;
397
+ compiledApproval?: import("./app").CompiledTeal | undefined;
398
+ compiledClear?: import("./app").CompiledTeal | undefined;
399
+ lease?: string | Uint8Array | undefined;
400
+ note?: string | Uint8Array | undefined;
401
+ maxFee?: AlgoAmount | undefined;
402
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
403
+ rekeyTo?: string | undefined;
404
+ staticFee?: AlgoAmount | undefined;
405
+ extraFee?: AlgoAmount | undefined;
406
+ validityWindow?: number | undefined;
407
+ firstValidRound?: bigint | undefined;
408
+ lastValidRound?: bigint | undefined;
409
+ onComplete?: algosdk.OnApplicationComplete | undefined;
410
+ accountReferences?: string[] | undefined;
411
+ appReferences?: bigint[] | undefined;
412
+ assetReferences?: bigint[] | undefined;
413
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
414
+ sender?: string | undefined;
415
+ method: string;
416
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
417
+ /** Any deploy-time parameters to replace in the TEAL code */
418
+ deployTimeParams?: TealTemplateParams | undefined;
419
+ /** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
420
+ updatable?: boolean | undefined;
421
+ /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
422
+ deletable?: boolean | undefined;
423
+ } & {
424
+ appId: bigint;
425
+ sender: string;
426
+ signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
427
+ method: Arc56Method;
428
+ onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
429
+ args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
430
+ lease?: string | Uint8Array | undefined;
431
+ note?: string | Uint8Array | undefined;
432
+ maxFee?: AlgoAmount | undefined;
433
+ args?: Uint8Array[] | undefined;
434
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
435
+ sender: string;
436
+ rekeyTo?: string | undefined;
437
+ staticFee?: AlgoAmount | undefined;
438
+ extraFee?: AlgoAmount | undefined;
439
+ validityWindow?: number | undefined;
440
+ firstValidRound?: bigint | undefined;
441
+ lastValidRound?: bigint | undefined;
442
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
443
+ accountReferences?: string[] | undefined;
444
+ appReferences?: bigint[] | undefined;
445
+ assetReferences?: bigint[] | undefined;
446
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
447
+ approvalProgram: string | Uint8Array;
448
+ clearStateProgram: string | Uint8Array;
449
+ schema?: {
450
+ globalInts: number;
451
+ globalByteSlices: number;
452
+ localInts: number;
453
+ localByteSlices: number;
454
+ } | undefined;
455
+ extraProgramPages?: number | undefined;
456
+ }> | AppMethodCall<{
457
+ sender: string;
458
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
459
+ rekeyTo?: string | undefined;
460
+ note?: string | Uint8Array | undefined;
461
+ lease?: string | Uint8Array | undefined;
462
+ staticFee?: AlgoAmount | undefined;
463
+ extraFee?: AlgoAmount | undefined;
464
+ maxFee?: AlgoAmount | undefined;
465
+ validityWindow?: number | undefined;
466
+ firstValidRound?: bigint | undefined;
467
+ lastValidRound?: bigint | undefined;
468
+ appId: bigint;
469
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
470
+ args?: Uint8Array[] | undefined;
471
+ accountReferences?: string[] | undefined;
472
+ appReferences?: bigint[] | undefined;
473
+ assetReferences?: bigint[] | undefined;
474
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
475
+ approvalProgram: string | Uint8Array;
476
+ clearStateProgram: string | Uint8Array;
477
+ }> | AppMethodCall<import("./composer").AppMethodCallParams>)[] | undefined;
478
+ }>;
479
+ /** Return params for an opt-in ABI call */
480
+ optIn: (params: {
481
+ lease?: string | Uint8Array | undefined;
482
+ note?: string | Uint8Array | undefined;
483
+ maxFee?: AlgoAmount | undefined;
484
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
485
+ rekeyTo?: string | undefined;
486
+ staticFee?: AlgoAmount | undefined;
487
+ extraFee?: AlgoAmount | undefined;
488
+ validityWindow?: number | undefined;
489
+ firstValidRound?: bigint | undefined;
490
+ lastValidRound?: bigint | undefined;
491
+ onComplete?: algosdk.OnApplicationComplete | undefined;
492
+ accountReferences?: string[] | undefined;
493
+ appReferences?: bigint[] | undefined;
494
+ assetReferences?: bigint[] | undefined;
495
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
496
+ sender?: string | undefined;
497
+ method: string;
498
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
499
+ }) => Promise<AppCallMethodCall>;
500
+ /** Return params for an delete ABI call */
501
+ delete: (params: {
502
+ lease?: string | Uint8Array | undefined;
503
+ note?: string | Uint8Array | undefined;
504
+ maxFee?: AlgoAmount | undefined;
505
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
506
+ rekeyTo?: string | undefined;
507
+ staticFee?: AlgoAmount | undefined;
508
+ extraFee?: AlgoAmount | undefined;
509
+ validityWindow?: number | undefined;
510
+ firstValidRound?: bigint | undefined;
511
+ lastValidRound?: bigint | undefined;
512
+ onComplete?: algosdk.OnApplicationComplete | undefined;
513
+ accountReferences?: string[] | undefined;
514
+ appReferences?: bigint[] | undefined;
515
+ assetReferences?: bigint[] | undefined;
516
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
517
+ sender?: string | undefined;
518
+ method: string;
519
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
520
+ }) => Promise<AppDeleteMethodCall>;
521
+ /** Return params for an close out ABI call */
522
+ closeOut: (params: {
523
+ lease?: string | Uint8Array | undefined;
524
+ note?: string | Uint8Array | undefined;
525
+ maxFee?: AlgoAmount | undefined;
526
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
527
+ rekeyTo?: string | undefined;
528
+ staticFee?: AlgoAmount | undefined;
529
+ extraFee?: AlgoAmount | undefined;
530
+ validityWindow?: number | undefined;
531
+ firstValidRound?: bigint | undefined;
532
+ lastValidRound?: bigint | undefined;
533
+ onComplete?: algosdk.OnApplicationComplete | undefined;
534
+ accountReferences?: string[] | undefined;
535
+ appReferences?: bigint[] | undefined;
536
+ assetReferences?: bigint[] | undefined;
537
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
538
+ sender?: string | undefined;
539
+ method: string;
540
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
541
+ }) => Promise<AppCallMethodCall>;
542
+ /** Return params for an ABI call */
543
+ call: (params: {
544
+ lease?: string | Uint8Array | undefined;
545
+ note?: string | Uint8Array | undefined;
546
+ maxFee?: AlgoAmount | undefined;
547
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
548
+ rekeyTo?: string | undefined;
549
+ staticFee?: AlgoAmount | undefined;
550
+ extraFee?: AlgoAmount | undefined;
551
+ validityWindow?: number | undefined;
552
+ firstValidRound?: bigint | undefined;
553
+ lastValidRound?: bigint | undefined;
554
+ onComplete?: algosdk.OnApplicationComplete | undefined;
555
+ accountReferences?: string[] | undefined;
556
+ appReferences?: bigint[] | undefined;
557
+ assetReferences?: bigint[] | undefined;
558
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
559
+ sender?: string | undefined;
560
+ method: string;
561
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
562
+ } & CallOnComplete) => Promise<AppCallMethodCall>;
563
+ } & {
564
+ /** Interact with bare (raw) call parameters */ bare: {
565
+ /** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */
566
+ update: (params?: ({
567
+ lease?: string | Uint8Array | undefined;
568
+ note?: string | Uint8Array | undefined;
569
+ maxFee?: AlgoAmount | undefined;
570
+ args?: Uint8Array[] | undefined;
571
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
572
+ rekeyTo?: string | undefined;
573
+ staticFee?: AlgoAmount | undefined;
574
+ extraFee?: AlgoAmount | undefined;
575
+ validityWindow?: number | undefined;
576
+ firstValidRound?: bigint | undefined;
577
+ lastValidRound?: bigint | undefined;
578
+ accountReferences?: string[] | undefined;
579
+ appReferences?: bigint[] | undefined;
580
+ assetReferences?: bigint[] | undefined;
581
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
582
+ sender?: string | undefined;
583
+ } & AppClientCompilationParams) | undefined) => Promise<{
584
+ sender: string;
585
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
586
+ rekeyTo?: string | undefined;
587
+ note?: string | Uint8Array | undefined;
588
+ lease?: string | Uint8Array | undefined;
589
+ staticFee?: AlgoAmount | undefined;
590
+ extraFee?: AlgoAmount | undefined;
591
+ maxFee?: AlgoAmount | undefined;
592
+ validityWindow?: number | undefined;
593
+ firstValidRound?: bigint | undefined;
594
+ lastValidRound?: bigint | undefined;
595
+ appId: bigint;
596
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
597
+ args?: Uint8Array[] | undefined;
598
+ accountReferences?: string[] | undefined;
599
+ appReferences?: bigint[] | undefined;
600
+ assetReferences?: bigint[] | undefined;
601
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
602
+ approvalProgram: string | Uint8Array;
603
+ clearStateProgram: string | Uint8Array;
604
+ }>;
605
+ /** Return params for an opt-in call */
606
+ optIn: (params?: {
607
+ lease?: string | Uint8Array | undefined;
608
+ note?: string | Uint8Array | undefined;
609
+ maxFee?: AlgoAmount | undefined;
610
+ args?: Uint8Array[] | undefined;
611
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
612
+ rekeyTo?: string | undefined;
613
+ staticFee?: AlgoAmount | undefined;
614
+ extraFee?: AlgoAmount | undefined;
615
+ validityWindow?: number | undefined;
616
+ firstValidRound?: bigint | undefined;
617
+ lastValidRound?: bigint | undefined;
618
+ accountReferences?: string[] | undefined;
619
+ appReferences?: bigint[] | undefined;
620
+ assetReferences?: bigint[] | undefined;
621
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
622
+ sender?: string | undefined;
623
+ } | undefined) => AppCallParams;
624
+ /** Return params for a delete call */
625
+ delete: (params?: {
626
+ lease?: string | Uint8Array | undefined;
627
+ note?: string | Uint8Array | undefined;
628
+ maxFee?: AlgoAmount | undefined;
629
+ args?: Uint8Array[] | undefined;
630
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
631
+ rekeyTo?: string | undefined;
632
+ staticFee?: AlgoAmount | undefined;
633
+ extraFee?: AlgoAmount | undefined;
634
+ validityWindow?: number | undefined;
635
+ firstValidRound?: bigint | undefined;
636
+ lastValidRound?: bigint | undefined;
637
+ accountReferences?: string[] | undefined;
638
+ appReferences?: bigint[] | undefined;
639
+ assetReferences?: bigint[] | undefined;
640
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
641
+ sender?: string | undefined;
642
+ } | undefined) => AppDeleteParams;
643
+ /** Return params for a clear state call */
644
+ clearState: (params?: {
645
+ lease?: string | Uint8Array | undefined;
646
+ note?: string | Uint8Array | undefined;
647
+ maxFee?: AlgoAmount | undefined;
648
+ args?: Uint8Array[] | undefined;
649
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
650
+ rekeyTo?: string | undefined;
651
+ staticFee?: AlgoAmount | undefined;
652
+ extraFee?: AlgoAmount | undefined;
653
+ validityWindow?: number | undefined;
654
+ firstValidRound?: bigint | undefined;
655
+ lastValidRound?: bigint | undefined;
656
+ accountReferences?: string[] | undefined;
657
+ appReferences?: bigint[] | undefined;
658
+ assetReferences?: bigint[] | undefined;
659
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
660
+ sender?: string | undefined;
661
+ } | undefined) => AppCallParams;
662
+ /** Return params for a close out call */
663
+ closeOut: (params?: {
664
+ lease?: string | Uint8Array | undefined;
665
+ note?: string | Uint8Array | undefined;
666
+ maxFee?: AlgoAmount | undefined;
667
+ args?: Uint8Array[] | undefined;
668
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
669
+ rekeyTo?: string | undefined;
670
+ staticFee?: AlgoAmount | undefined;
671
+ extraFee?: AlgoAmount | undefined;
672
+ validityWindow?: number | undefined;
673
+ firstValidRound?: bigint | undefined;
674
+ lastValidRound?: bigint | undefined;
675
+ accountReferences?: string[] | undefined;
676
+ appReferences?: bigint[] | undefined;
677
+ assetReferences?: bigint[] | undefined;
678
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
679
+ sender?: string | undefined;
680
+ } | undefined) => AppCallParams;
681
+ /** Return params for a call (defaults to no-op) */
682
+ call: (params?: ({
683
+ lease?: string | Uint8Array | undefined;
684
+ note?: string | Uint8Array | undefined;
685
+ maxFee?: AlgoAmount | undefined;
686
+ args?: Uint8Array[] | undefined;
687
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
688
+ rekeyTo?: string | undefined;
689
+ staticFee?: AlgoAmount | undefined;
690
+ extraFee?: AlgoAmount | undefined;
691
+ validityWindow?: number | undefined;
692
+ firstValidRound?: bigint | undefined;
693
+ lastValidRound?: bigint | undefined;
694
+ accountReferences?: string[] | undefined;
695
+ appReferences?: bigint[] | undefined;
696
+ assetReferences?: bigint[] | undefined;
697
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
698
+ sender?: string | undefined;
699
+ } & CallOnComplete) | undefined) => AppCallParams;
700
+ };
701
+ };
702
+ /** Create transactions for the current app */
703
+ get createTransaction(): {
704
+ /** Return transaction for a payment transaction to fund the app account */
705
+ fundAppAccount: (params: {
706
+ lease?: string | Uint8Array | undefined;
707
+ note?: string | Uint8Array | undefined;
708
+ amount: AlgoAmount;
709
+ closeRemainderTo?: string | undefined;
710
+ maxFee?: AlgoAmount | undefined;
711
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
712
+ rekeyTo?: string | undefined;
713
+ staticFee?: AlgoAmount | undefined;
714
+ extraFee?: AlgoAmount | undefined;
715
+ validityWindow?: number | undefined;
716
+ firstValidRound?: bigint | undefined;
717
+ lastValidRound?: bigint | undefined;
718
+ maxRoundsToWaitForConfirmation?: number | undefined;
719
+ suppressLog?: boolean | undefined;
720
+ populateAppCallResources?: boolean | undefined;
721
+ sender?: string | undefined;
722
+ }) => Promise<algosdk.Transaction>;
723
+ /**
724
+ * Return transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
725
+ */
726
+ update: (params: {
727
+ lease?: string | Uint8Array | undefined;
728
+ note?: string | Uint8Array | undefined;
729
+ maxFee?: AlgoAmount | undefined;
730
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
731
+ rekeyTo?: string | undefined;
732
+ staticFee?: AlgoAmount | undefined;
733
+ extraFee?: AlgoAmount | undefined;
734
+ validityWindow?: number | undefined;
735
+ firstValidRound?: bigint | undefined;
736
+ lastValidRound?: bigint | undefined;
737
+ onComplete?: algosdk.OnApplicationComplete | undefined;
738
+ accountReferences?: string[] | undefined;
739
+ appReferences?: bigint[] | undefined;
740
+ assetReferences?: bigint[] | undefined;
741
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
742
+ sender?: string | undefined;
743
+ method: string;
744
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
745
+ } & AppClientCompilationParams) => Promise<{
746
+ transactions: algosdk.Transaction[];
747
+ methodCalls: Map<number, algosdk.ABIMethod>;
748
+ signers: Map<number, algosdk.TransactionSigner>;
749
+ }>;
750
+ /**
751
+ * Return transactions for an opt-in ABI call
752
+ */
753
+ optIn: (params: {
754
+ lease?: string | Uint8Array | undefined;
755
+ note?: string | Uint8Array | undefined;
756
+ maxFee?: AlgoAmount | undefined;
757
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
758
+ rekeyTo?: string | undefined;
759
+ staticFee?: AlgoAmount | undefined;
760
+ extraFee?: AlgoAmount | undefined;
761
+ validityWindow?: number | undefined;
762
+ firstValidRound?: bigint | undefined;
763
+ lastValidRound?: bigint | undefined;
764
+ onComplete?: algosdk.OnApplicationComplete | undefined;
765
+ accountReferences?: string[] | undefined;
766
+ appReferences?: bigint[] | undefined;
767
+ assetReferences?: bigint[] | undefined;
768
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
769
+ sender?: string | undefined;
770
+ method: string;
771
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
772
+ }) => Promise<{
773
+ transactions: algosdk.Transaction[];
774
+ methodCalls: Map<number, algosdk.ABIMethod>;
775
+ signers: Map<number, algosdk.TransactionSigner>;
776
+ }>;
777
+ /**
778
+ * Return transactions for a delete ABI call
779
+ */
780
+ delete: (params: {
781
+ lease?: string | Uint8Array | undefined;
782
+ note?: string | Uint8Array | undefined;
783
+ maxFee?: AlgoAmount | undefined;
784
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
785
+ rekeyTo?: string | undefined;
786
+ staticFee?: AlgoAmount | undefined;
787
+ extraFee?: AlgoAmount | undefined;
788
+ validityWindow?: number | undefined;
789
+ firstValidRound?: bigint | undefined;
790
+ lastValidRound?: bigint | undefined;
791
+ onComplete?: algosdk.OnApplicationComplete | undefined;
792
+ accountReferences?: string[] | undefined;
793
+ appReferences?: bigint[] | undefined;
794
+ assetReferences?: bigint[] | undefined;
795
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
796
+ sender?: string | undefined;
797
+ method: string;
798
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
799
+ }) => Promise<{
800
+ transactions: algosdk.Transaction[];
801
+ methodCalls: Map<number, algosdk.ABIMethod>;
802
+ signers: Map<number, algosdk.TransactionSigner>;
803
+ }>;
804
+ /**
805
+ * Return transactions for a close out ABI call
806
+ */
807
+ closeOut: (params: {
808
+ lease?: string | Uint8Array | undefined;
809
+ note?: string | Uint8Array | undefined;
810
+ maxFee?: AlgoAmount | undefined;
811
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
812
+ rekeyTo?: string | undefined;
813
+ staticFee?: AlgoAmount | undefined;
814
+ extraFee?: AlgoAmount | undefined;
815
+ validityWindow?: number | undefined;
816
+ firstValidRound?: bigint | undefined;
817
+ lastValidRound?: bigint | undefined;
818
+ onComplete?: algosdk.OnApplicationComplete | undefined;
819
+ accountReferences?: string[] | undefined;
820
+ appReferences?: bigint[] | undefined;
821
+ assetReferences?: bigint[] | undefined;
822
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
823
+ sender?: string | undefined;
824
+ method: string;
825
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
826
+ }) => Promise<{
827
+ transactions: algosdk.Transaction[];
828
+ methodCalls: Map<number, algosdk.ABIMethod>;
829
+ signers: Map<number, algosdk.TransactionSigner>;
830
+ }>;
831
+ /**
832
+ * Return transactions for an ABI call (defaults to no-op)
833
+ */
834
+ call: (params: {
835
+ lease?: string | Uint8Array | undefined;
836
+ note?: string | Uint8Array | undefined;
837
+ maxFee?: AlgoAmount | undefined;
838
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
839
+ rekeyTo?: string | undefined;
840
+ staticFee?: AlgoAmount | undefined;
841
+ extraFee?: AlgoAmount | undefined;
842
+ validityWindow?: number | undefined;
843
+ firstValidRound?: bigint | undefined;
844
+ lastValidRound?: bigint | undefined;
845
+ onComplete?: algosdk.OnApplicationComplete | undefined;
846
+ accountReferences?: string[] | undefined;
847
+ appReferences?: bigint[] | undefined;
848
+ assetReferences?: bigint[] | undefined;
849
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
850
+ sender?: string | undefined;
851
+ method: string;
852
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
853
+ } & CallOnComplete) => Promise<{
854
+ transactions: algosdk.Transaction[];
855
+ methodCalls: Map<number, algosdk.ABIMethod>;
856
+ signers: Map<number, algosdk.TransactionSigner>;
857
+ }>;
858
+ } & {
859
+ /** Interact with bare (raw) call transactions */ bare: {
860
+ /** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */
861
+ update: (params?: ({
862
+ lease?: string | Uint8Array | undefined;
863
+ note?: string | Uint8Array | undefined;
864
+ maxFee?: AlgoAmount | undefined;
865
+ args?: Uint8Array[] | undefined;
866
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
867
+ rekeyTo?: string | undefined;
868
+ staticFee?: AlgoAmount | undefined;
869
+ extraFee?: AlgoAmount | undefined;
870
+ validityWindow?: number | undefined;
871
+ firstValidRound?: bigint | undefined;
872
+ lastValidRound?: bigint | undefined;
873
+ accountReferences?: string[] | undefined;
874
+ appReferences?: bigint[] | undefined;
875
+ assetReferences?: bigint[] | undefined;
876
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
877
+ sender?: string | undefined;
878
+ } & AppClientCompilationParams) | undefined) => Promise<algosdk.Transaction>;
879
+ /** Returns a transaction for an opt-in call */
880
+ optIn: (params?: {
881
+ lease?: string | Uint8Array | undefined;
882
+ note?: string | Uint8Array | undefined;
883
+ maxFee?: AlgoAmount | undefined;
884
+ args?: Uint8Array[] | undefined;
885
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
886
+ rekeyTo?: string | undefined;
887
+ staticFee?: AlgoAmount | undefined;
888
+ extraFee?: AlgoAmount | undefined;
889
+ validityWindow?: number | undefined;
890
+ firstValidRound?: bigint | undefined;
891
+ lastValidRound?: bigint | undefined;
892
+ accountReferences?: string[] | undefined;
893
+ appReferences?: bigint[] | undefined;
894
+ assetReferences?: bigint[] | undefined;
895
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
896
+ sender?: string | undefined;
897
+ } | undefined) => Promise<algosdk.Transaction>;
898
+ /** Returns a transaction for a delete call */
899
+ delete: (params?: {
900
+ lease?: string | Uint8Array | undefined;
901
+ note?: string | Uint8Array | undefined;
902
+ maxFee?: AlgoAmount | undefined;
903
+ args?: Uint8Array[] | undefined;
904
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
905
+ rekeyTo?: string | undefined;
906
+ staticFee?: AlgoAmount | undefined;
907
+ extraFee?: AlgoAmount | undefined;
908
+ validityWindow?: number | undefined;
909
+ firstValidRound?: bigint | undefined;
910
+ lastValidRound?: bigint | undefined;
911
+ accountReferences?: string[] | undefined;
912
+ appReferences?: bigint[] | undefined;
913
+ assetReferences?: bigint[] | undefined;
914
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
915
+ sender?: string | undefined;
916
+ } | undefined) => Promise<algosdk.Transaction>;
917
+ /** Returns a transaction for a clear state call */
918
+ clearState: (params?: {
919
+ lease?: string | Uint8Array | undefined;
920
+ note?: string | Uint8Array | undefined;
921
+ maxFee?: AlgoAmount | undefined;
922
+ args?: Uint8Array[] | undefined;
923
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
924
+ rekeyTo?: string | undefined;
925
+ staticFee?: AlgoAmount | undefined;
926
+ extraFee?: AlgoAmount | undefined;
927
+ validityWindow?: number | undefined;
928
+ firstValidRound?: bigint | undefined;
929
+ lastValidRound?: bigint | undefined;
930
+ accountReferences?: string[] | undefined;
931
+ appReferences?: bigint[] | undefined;
932
+ assetReferences?: bigint[] | undefined;
933
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
934
+ sender?: string | undefined;
935
+ } | undefined) => Promise<algosdk.Transaction>;
936
+ /** Returns a transaction for a close out call */
937
+ closeOut: (params?: {
938
+ lease?: string | Uint8Array | undefined;
939
+ note?: string | Uint8Array | undefined;
940
+ maxFee?: AlgoAmount | undefined;
941
+ args?: Uint8Array[] | undefined;
942
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
943
+ rekeyTo?: string | undefined;
944
+ staticFee?: AlgoAmount | undefined;
945
+ extraFee?: AlgoAmount | undefined;
946
+ validityWindow?: number | undefined;
947
+ firstValidRound?: bigint | undefined;
948
+ lastValidRound?: bigint | undefined;
949
+ accountReferences?: string[] | undefined;
950
+ appReferences?: bigint[] | undefined;
951
+ assetReferences?: bigint[] | undefined;
952
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
953
+ sender?: string | undefined;
954
+ } | undefined) => Promise<algosdk.Transaction>;
955
+ /** Returns a transaction for a call (defaults to no-op) */
956
+ call: (params?: ({
957
+ lease?: string | Uint8Array | undefined;
958
+ note?: string | Uint8Array | undefined;
959
+ maxFee?: AlgoAmount | undefined;
960
+ args?: Uint8Array[] | undefined;
961
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
962
+ rekeyTo?: string | undefined;
963
+ staticFee?: AlgoAmount | undefined;
964
+ extraFee?: AlgoAmount | undefined;
965
+ validityWindow?: number | undefined;
966
+ firstValidRound?: bigint | undefined;
967
+ lastValidRound?: bigint | undefined;
968
+ accountReferences?: string[] | undefined;
969
+ appReferences?: bigint[] | undefined;
970
+ assetReferences?: bigint[] | undefined;
971
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
972
+ sender?: string | undefined;
973
+ } & CallOnComplete) | undefined) => Promise<algosdk.Transaction>;
974
+ };
975
+ };
976
+ /** Send transactions to the current app */
977
+ get send(): {
978
+ /** Sign and send transactions for a payment transaction to fund the app account */
979
+ fundAppAccount: (params: {
980
+ lease?: string | Uint8Array | undefined;
981
+ note?: string | Uint8Array | undefined;
982
+ amount: AlgoAmount;
983
+ closeRemainderTo?: string | undefined;
984
+ maxFee?: AlgoAmount | undefined;
985
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
986
+ rekeyTo?: string | undefined;
987
+ staticFee?: AlgoAmount | undefined;
988
+ extraFee?: AlgoAmount | undefined;
989
+ validityWindow?: number | undefined;
990
+ firstValidRound?: bigint | undefined;
991
+ lastValidRound?: bigint | undefined;
992
+ maxRoundsToWaitForConfirmation?: number | undefined;
993
+ suppressLog?: boolean | undefined;
994
+ populateAppCallResources?: boolean | undefined;
995
+ sender?: string | undefined;
996
+ } & SendParams) => Promise<{
997
+ groupId: string;
998
+ txIds: string[];
999
+ returns?: ABIReturn[] | undefined;
1000
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1001
+ transactions: algosdk.Transaction[];
1002
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1003
+ transaction: algosdk.Transaction;
1004
+ }>;
1005
+ /**
1006
+ * Sign and send transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
1007
+ */
1008
+ update: (params: {
1009
+ lease?: string | Uint8Array | undefined;
1010
+ note?: string | Uint8Array | undefined;
1011
+ maxFee?: AlgoAmount | undefined;
1012
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1013
+ rekeyTo?: string | undefined;
1014
+ staticFee?: AlgoAmount | undefined;
1015
+ extraFee?: AlgoAmount | undefined;
1016
+ validityWindow?: number | undefined;
1017
+ firstValidRound?: bigint | undefined;
1018
+ lastValidRound?: bigint | undefined;
1019
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1020
+ accountReferences?: string[] | undefined;
1021
+ appReferences?: bigint[] | undefined;
1022
+ assetReferences?: bigint[] | undefined;
1023
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1024
+ sender?: string | undefined;
1025
+ method: string;
1026
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1027
+ } & AppClientCompilationParams & SendParams) => Promise<{
1028
+ compiledApproval?: import("./app").CompiledTeal | undefined;
1029
+ compiledClear?: import("./app").CompiledTeal | undefined;
1030
+ groupId: string;
1031
+ txIds: string[];
1032
+ returns?: ABIReturn[] | undefined;
1033
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1034
+ transactions: algosdk.Transaction[];
1035
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1036
+ transaction: algosdk.Transaction;
1037
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1038
+ }>;
1039
+ /**
1040
+ * Sign and send transactions for an opt-in ABI call
1041
+ */
1042
+ optIn: (params: {
1043
+ lease?: string | Uint8Array | undefined;
1044
+ note?: string | Uint8Array | undefined;
1045
+ maxFee?: AlgoAmount | undefined;
1046
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1047
+ rekeyTo?: string | undefined;
1048
+ staticFee?: AlgoAmount | undefined;
1049
+ extraFee?: AlgoAmount | undefined;
1050
+ validityWindow?: number | undefined;
1051
+ firstValidRound?: bigint | undefined;
1052
+ lastValidRound?: bigint | undefined;
1053
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1054
+ accountReferences?: string[] | undefined;
1055
+ appReferences?: bigint[] | undefined;
1056
+ assetReferences?: bigint[] | undefined;
1057
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1058
+ sender?: string | undefined;
1059
+ method: string;
1060
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1061
+ } & SendParams) => Promise<Omit<{
1062
+ groupId: string;
1063
+ txIds: string[];
1064
+ returns?: ABIReturn[] | undefined;
1065
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1066
+ transactions: algosdk.Transaction[];
1067
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1068
+ transaction: algosdk.Transaction;
1069
+ return?: ABIReturn | undefined;
1070
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1071
+ /**
1072
+ * Sign and send transactions for a delete ABI call
1073
+ */
1074
+ delete: (params: {
1075
+ lease?: string | Uint8Array | undefined;
1076
+ note?: string | Uint8Array | undefined;
1077
+ maxFee?: AlgoAmount | undefined;
1078
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1079
+ rekeyTo?: string | undefined;
1080
+ staticFee?: AlgoAmount | undefined;
1081
+ extraFee?: AlgoAmount | undefined;
1082
+ validityWindow?: number | undefined;
1083
+ firstValidRound?: bigint | undefined;
1084
+ lastValidRound?: bigint | undefined;
1085
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1086
+ accountReferences?: string[] | undefined;
1087
+ appReferences?: bigint[] | undefined;
1088
+ assetReferences?: bigint[] | undefined;
1089
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1090
+ sender?: string | undefined;
1091
+ method: string;
1092
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1093
+ } & SendParams) => Promise<Omit<{
1094
+ groupId: string;
1095
+ txIds: string[];
1096
+ returns?: ABIReturn[] | undefined;
1097
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1098
+ transactions: algosdk.Transaction[];
1099
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1100
+ transaction: algosdk.Transaction;
1101
+ return?: ABIReturn | undefined;
1102
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1103
+ /**
1104
+ * Sign and send transactions for a close out ABI call
1105
+ */
1106
+ closeOut: (params: {
1107
+ lease?: string | Uint8Array | undefined;
1108
+ note?: string | Uint8Array | undefined;
1109
+ maxFee?: AlgoAmount | undefined;
1110
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1111
+ rekeyTo?: string | undefined;
1112
+ staticFee?: AlgoAmount | undefined;
1113
+ extraFee?: AlgoAmount | undefined;
1114
+ validityWindow?: number | undefined;
1115
+ firstValidRound?: bigint | undefined;
1116
+ lastValidRound?: bigint | undefined;
1117
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1118
+ accountReferences?: string[] | undefined;
1119
+ appReferences?: bigint[] | undefined;
1120
+ assetReferences?: bigint[] | undefined;
1121
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1122
+ sender?: string | undefined;
1123
+ method: string;
1124
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1125
+ } & SendParams) => Promise<Omit<{
1126
+ groupId: string;
1127
+ txIds: string[];
1128
+ returns?: ABIReturn[] | undefined;
1129
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1130
+ transactions: algosdk.Transaction[];
1131
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1132
+ transaction: algosdk.Transaction;
1133
+ return?: ABIReturn | undefined;
1134
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1135
+ /**
1136
+ * Sign and send transactions for a call (defaults to no-op)
1137
+ */
1138
+ call: (params: {
1139
+ lease?: string | Uint8Array | undefined;
1140
+ note?: string | Uint8Array | undefined;
1141
+ maxFee?: AlgoAmount | undefined;
1142
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1143
+ rekeyTo?: string | undefined;
1144
+ staticFee?: AlgoAmount | undefined;
1145
+ extraFee?: AlgoAmount | undefined;
1146
+ validityWindow?: number | undefined;
1147
+ firstValidRound?: bigint | undefined;
1148
+ lastValidRound?: bigint | undefined;
1149
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1150
+ accountReferences?: string[] | undefined;
1151
+ appReferences?: bigint[] | undefined;
1152
+ assetReferences?: bigint[] | undefined;
1153
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1154
+ sender?: string | undefined;
1155
+ method: string;
1156
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1157
+ } & CallOnComplete & SendParams) => Promise<Omit<{
1158
+ groupId: string;
1159
+ txIds: string[];
1160
+ returns?: ABIReturn[] | undefined;
1161
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1162
+ transactions: algosdk.Transaction[];
1163
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1164
+ transaction: algosdk.Transaction;
1165
+ return?: ABIReturn | undefined;
1166
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1167
+ } & {
1168
+ /** Interact with bare (raw) calls */ bare: {
1169
+ /** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */
1170
+ update: (params?: ({
1171
+ lease?: string | Uint8Array | undefined;
1172
+ note?: string | Uint8Array | undefined;
1173
+ maxFee?: AlgoAmount | undefined;
1174
+ args?: Uint8Array[] | undefined;
1175
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1176
+ rekeyTo?: string | undefined;
1177
+ staticFee?: AlgoAmount | undefined;
1178
+ extraFee?: AlgoAmount | undefined;
1179
+ validityWindow?: number | undefined;
1180
+ firstValidRound?: bigint | undefined;
1181
+ lastValidRound?: bigint | undefined;
1182
+ accountReferences?: string[] | undefined;
1183
+ appReferences?: bigint[] | undefined;
1184
+ assetReferences?: bigint[] | undefined;
1185
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1186
+ sender?: string | undefined;
1187
+ } & AppClientCompilationParams & SendParams) | undefined) => Promise<{
1188
+ compiledApproval?: import("./app").CompiledTeal | undefined;
1189
+ compiledClear?: import("./app").CompiledTeal | undefined;
1190
+ groupId: string;
1191
+ txIds: string[];
1192
+ returns?: ABIReturn[] | undefined;
1193
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1194
+ transactions: algosdk.Transaction[];
1195
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1196
+ transaction: algosdk.Transaction;
1197
+ return?: ABIReturn | undefined;
1198
+ }>;
1199
+ /** Signs and sends an opt-in call */
1200
+ optIn: (params?: ({
1201
+ lease?: string | Uint8Array | undefined;
1202
+ note?: string | Uint8Array | undefined;
1203
+ maxFee?: AlgoAmount | undefined;
1204
+ args?: Uint8Array[] | undefined;
1205
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1206
+ rekeyTo?: string | undefined;
1207
+ staticFee?: AlgoAmount | undefined;
1208
+ extraFee?: AlgoAmount | undefined;
1209
+ validityWindow?: number | undefined;
1210
+ firstValidRound?: bigint | undefined;
1211
+ lastValidRound?: bigint | undefined;
1212
+ accountReferences?: string[] | undefined;
1213
+ appReferences?: bigint[] | undefined;
1214
+ assetReferences?: bigint[] | undefined;
1215
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1216
+ sender?: string | undefined;
1217
+ } & SendParams) | undefined) => Promise<{
1218
+ groupId: string;
1219
+ txIds: string[];
1220
+ returns?: ABIReturn[] | undefined;
1221
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1222
+ transactions: algosdk.Transaction[];
1223
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1224
+ transaction: algosdk.Transaction;
1225
+ return?: ABIReturn | undefined;
1226
+ }>;
1227
+ /** Signs and sends a delete call */
1228
+ delete: (params?: ({
1229
+ lease?: string | Uint8Array | undefined;
1230
+ note?: string | Uint8Array | undefined;
1231
+ maxFee?: AlgoAmount | undefined;
1232
+ args?: Uint8Array[] | undefined;
1233
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1234
+ rekeyTo?: string | undefined;
1235
+ staticFee?: AlgoAmount | undefined;
1236
+ extraFee?: AlgoAmount | undefined;
1237
+ validityWindow?: number | undefined;
1238
+ firstValidRound?: bigint | undefined;
1239
+ lastValidRound?: bigint | undefined;
1240
+ accountReferences?: string[] | undefined;
1241
+ appReferences?: bigint[] | undefined;
1242
+ assetReferences?: bigint[] | undefined;
1243
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1244
+ sender?: string | undefined;
1245
+ } & SendParams) | undefined) => Promise<{
1246
+ groupId: string;
1247
+ txIds: string[];
1248
+ returns?: ABIReturn[] | undefined;
1249
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1250
+ transactions: algosdk.Transaction[];
1251
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1252
+ transaction: algosdk.Transaction;
1253
+ return?: ABIReturn | undefined;
1254
+ }>;
1255
+ /** Signs and sends a clear state call */
1256
+ clearState: (params?: ({
1257
+ lease?: string | Uint8Array | undefined;
1258
+ note?: string | Uint8Array | undefined;
1259
+ maxFee?: AlgoAmount | undefined;
1260
+ args?: Uint8Array[] | undefined;
1261
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1262
+ rekeyTo?: string | undefined;
1263
+ staticFee?: AlgoAmount | undefined;
1264
+ extraFee?: AlgoAmount | undefined;
1265
+ validityWindow?: number | undefined;
1266
+ firstValidRound?: bigint | undefined;
1267
+ lastValidRound?: bigint | undefined;
1268
+ accountReferences?: string[] | undefined;
1269
+ appReferences?: bigint[] | undefined;
1270
+ assetReferences?: bigint[] | undefined;
1271
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1272
+ sender?: string | undefined;
1273
+ } & SendParams) | undefined) => Promise<{
1274
+ groupId: string;
1275
+ txIds: string[];
1276
+ returns?: ABIReturn[] | undefined;
1277
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1278
+ transactions: algosdk.Transaction[];
1279
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1280
+ transaction: algosdk.Transaction;
1281
+ return?: ABIReturn | undefined;
1282
+ }>;
1283
+ /** Signs and sends a close out call */
1284
+ closeOut: (params?: ({
1285
+ lease?: string | Uint8Array | undefined;
1286
+ note?: string | Uint8Array | undefined;
1287
+ maxFee?: AlgoAmount | undefined;
1288
+ args?: Uint8Array[] | undefined;
1289
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1290
+ rekeyTo?: string | undefined;
1291
+ staticFee?: AlgoAmount | undefined;
1292
+ extraFee?: AlgoAmount | undefined;
1293
+ validityWindow?: number | undefined;
1294
+ firstValidRound?: bigint | undefined;
1295
+ lastValidRound?: bigint | undefined;
1296
+ accountReferences?: string[] | undefined;
1297
+ appReferences?: bigint[] | undefined;
1298
+ assetReferences?: bigint[] | undefined;
1299
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1300
+ sender?: string | undefined;
1301
+ } & SendParams) | undefined) => Promise<{
1302
+ groupId: string;
1303
+ txIds: string[];
1304
+ returns?: ABIReturn[] | undefined;
1305
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1306
+ transactions: algosdk.Transaction[];
1307
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1308
+ transaction: algosdk.Transaction;
1309
+ return?: ABIReturn | undefined;
1310
+ }>;
1311
+ /** Signs and sends a call (defaults to no-op) */
1312
+ call: (params?: ({
1313
+ lease?: string | Uint8Array | undefined;
1314
+ note?: string | Uint8Array | undefined;
1315
+ maxFee?: AlgoAmount | undefined;
1316
+ args?: Uint8Array[] | undefined;
1317
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
1318
+ rekeyTo?: string | undefined;
1319
+ staticFee?: AlgoAmount | undefined;
1320
+ extraFee?: AlgoAmount | undefined;
1321
+ validityWindow?: number | undefined;
1322
+ firstValidRound?: bigint | undefined;
1323
+ lastValidRound?: bigint | undefined;
1324
+ accountReferences?: string[] | undefined;
1325
+ appReferences?: bigint[] | undefined;
1326
+ assetReferences?: bigint[] | undefined;
1327
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1328
+ sender?: string | undefined;
1329
+ } & CallOnComplete & SendParams) | undefined) => Promise<{
1330
+ groupId: string;
1331
+ txIds: string[];
1332
+ returns?: ABIReturn[] | undefined;
1333
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1334
+ transactions: algosdk.Transaction[];
1335
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1336
+ transaction: algosdk.Transaction;
1337
+ return?: ABIReturn | undefined;
1338
+ }>;
1339
+ };
1340
+ };
1341
+ /** Get state (local, global, box) from the current app */
1342
+ get state(): {
1343
+ /**
1344
+ * Methods to access local state for the current app
1345
+ * @param address The address of the account to get the local state for
1346
+ */
1347
+ local: (address: string) => {
1348
+ /**
1349
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1350
+ */
1351
+ getAll: () => Promise<Record<string, any>>;
1352
+ /**
1353
+ * Returns a single state value for the current app with the value a decoded ABI value.
1354
+ * @param name The name of the state value to retrieve the value for
1355
+ * @param appState Optional cached value of the current state
1356
+ * @returns
1357
+ */
1358
+ getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1359
+ /**
1360
+ * Returns a single value from the given map for the current app with the value a decoded ABI value.
1361
+ * @param mapName The name of the map to read from
1362
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1363
+ * that will be converted to bytes by encoding it using the specified ABI key type
1364
+ * in the ARC-56 spec
1365
+ * @param appState Optional cached value of the current state
1366
+ */
1367
+ getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1368
+ /**
1369
+ * Returns all map values for the given map.
1370
+ * @param mapName The name of the map to read from
1371
+ * @param appState Optional cached value of the current state
1372
+ * @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
1373
+ */
1374
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1375
+ };
1376
+ /**
1377
+ * Methods to access global state for the current app
1378
+ */
1379
+ global: {
1380
+ /**
1381
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1382
+ */
1383
+ getAll: () => Promise<Record<string, any>>;
1384
+ /**
1385
+ * Returns a single state value for the current app with the value a decoded ABI value.
1386
+ * @param name The name of the state value to retrieve the value for
1387
+ * @param appState Optional cached value of the current state
1388
+ * @returns
1389
+ */
1390
+ getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1391
+ /**
1392
+ * Returns a single value from the given map for the current app with the value a decoded ABI value.
1393
+ * @param mapName The name of the map to read from
1394
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1395
+ * that will be converted to bytes by encoding it using the specified ABI key type
1396
+ * in the ARC-56 spec
1397
+ * @param appState Optional cached value of the current state
1398
+ */
1399
+ getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1400
+ /**
1401
+ * Returns all map values for the given map.
1402
+ * @param mapName The name of the map to read from
1403
+ * @param appState Optional cached value of the current state
1404
+ * @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
1405
+ */
1406
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1407
+ };
1408
+ /**
1409
+ * Methods to access box storage for the current app
1410
+ */
1411
+ box: {
1412
+ /**
1413
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1414
+ */
1415
+ getAll: () => Promise<Record<string, any>>;
1416
+ /**
1417
+ * Returns a single state value for the current app with the value a decoded ABI value.
1418
+ * @param name The name of the state value to retrieve the value for
1419
+ * @returns
1420
+ */
1421
+ getValue: (name: string) => Promise<algosdk.ABIValue | ABIStruct>;
1422
+ /**
1423
+ *
1424
+ * @param mapName The name of the map to read from
1425
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1426
+ * that will be converted to bytes by encoding it using the specified ABI key type
1427
+ * in the ARC-56 spec
1428
+ */
1429
+ getMapValue: (mapName: string, key: any) => Promise<algosdk.ABIValue | ABIStruct>;
1430
+ /**
1431
+ *
1432
+ * @param mapName The name of the map to read from
1433
+ * @param key The key within the map as either a Buffer with the bytes or a value
1434
+ * that will be converted to bytes by encoding it using the specified ABI key type
1435
+ * in the ARC-56 spec
1436
+ * @param appState
1437
+ */
1438
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1439
+ };
1440
+ };
1441
+ /**
1442
+ * Funds Algo into the app account for this app.
1443
+ *
1444
+ * An alias for `appClient.send.fundAppAccount(params)`.
1445
+ * @param params The parameters for the funding transaction
1446
+ * @returns The result of the funding
1447
+ */
1448
+ fundAppAccount(params: FundAppParams): Promise<{
1449
+ groupId: string;
1450
+ txIds: string[];
1451
+ returns?: ABIReturn[] | undefined;
1452
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1453
+ transactions: algosdk.Transaction[];
1454
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1455
+ transaction: algosdk.Transaction;
1456
+ }>;
1457
+ /**
1458
+ * Returns raw global state for the current app.
1459
+ * @returns The global state
1460
+ */
1461
+ getGlobalState(): Promise<AppState>;
1462
+ /**
1463
+ * Returns raw local state for the given account address.
1464
+ * @param address The address of the account to get the local state for
1465
+ * @returns The local state
1466
+ */
1467
+ getLocalState(address: string): Promise<AppState>;
1468
+ /**
1469
+ * Returns the names of all current boxes for the current app.
1470
+ * @returns The names of the boxes
1471
+ */
1472
+ getBoxNames(): Promise<BoxName[]>;
1473
+ /**
1474
+ * Returns the value of the given box for the current app.
1475
+ * @param name The identifier of the box to return
1476
+ * @returns The current box value as a byte array
1477
+ */
1478
+ getBoxValue(name: BoxIdentifier): Promise<Uint8Array>;
1479
+ /**
1480
+ * Returns the value of the given box for the current app.
1481
+ * @param name The identifier of the box to return
1482
+ * @param type
1483
+ * @returns The current box value as a byte array
1484
+ */
1485
+ getBoxValueFromABIType(name: BoxIdentifier, type: ABIType): Promise<ABIValue>;
1486
+ /**
1487
+ * Returns the values of all current boxes for the current app.
1488
+ * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
1489
+ * @param filter Optional filter to filter which boxes' values are returned
1490
+ * @returns The (name, value) pair of the boxes with values as raw byte arrays
1491
+ */
1492
+ getBoxValues(filter?: (name: BoxName) => boolean): Promise<{
1493
+ name: BoxName;
1494
+ value: Uint8Array;
1495
+ }[]>;
1496
+ /**
1497
+ * Returns the values of all current boxes for the current app decoded using an ABI Type.
1498
+ * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
1499
+ * @param type The ABI type to decode the values with
1500
+ * @param filter Optional filter to filter which boxes' values are returned
1501
+ * @returns The (name, value) pair of the boxes with values as the ABI Value
1502
+ */
1503
+ getBoxValuesFromABIType(type: ABIType, filter?: (name: BoxName) => boolean): Promise<{
1504
+ name: BoxName;
1505
+ value: ABIValue;
1506
+ }[]>;
1507
+ /**
1508
+ * Takes an error that may include a logic error from a call to the current app and re-exposes the
1509
+ * error to include source code information via the source map and ARC-56 spec.
1510
+ * @param e The error to parse
1511
+ * @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
1512
+ * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
1513
+ */
1514
+ exposeLogicError(e: Error, isClearStateProgram?: boolean): Error;
1515
+ /**
1516
+ * Export the current source maps for the app.
1517
+ * @returns The source maps
1518
+ */
1519
+ exportSourceMaps(): AppSourceMaps;
1520
+ /**
1521
+ * Import source maps for the app.
1522
+ * @param sourceMaps The source maps to import
1523
+ */
1524
+ importSourceMaps(sourceMaps: AppSourceMaps): void;
1525
+ /**
1526
+ * Returns the ABI Method spec for the given method string for the app represented by this application client instance
1527
+ * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1528
+ * e.g. `my_method` or `my_method(unit64,string)bytes`
1529
+ * @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]
1530
+ */
1531
+ getABIMethod(methodNameOrSignature: string): Arc56Method;
1532
+ /**
1533
+ * Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
1534
+ * on the ARC-56 method, replacing the `return` property with the decoded type.
1535
+ *
1536
+ * If the return type is an ARC-56 struct then the struct will be returned.
1537
+ *
1538
+ * @param result The SendAppTransactionResult to be mapped
1539
+ * @param method The method that was called
1540
+ * @returns The smart contract response with an updated return value
1541
+ */
1542
+ processMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
1543
+ /**
1544
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1545
+ * performing any provided deploy-time parameter replacement and stores
1546
+ * the source maps.
1547
+ *
1548
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1549
+ *
1550
+ * Will store any generated source maps for later use in debugging.
1551
+ */
1552
+ compile(compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
1553
+ /**
1554
+ * Takes an error that may include a logic error from a call to the current app and re-exposes the
1555
+ * error to include source code information via the source map and ARC-56 spec.
1556
+ * @param e The error to parse
1557
+ * @param appSpec The app spec for the app
1558
+ * @param details Additional information to inform the error
1559
+ * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
1560
+ */
1561
+ static exposeLogicError(e: Error, appSpec: Arc56Contract, details: {
1562
+ /** Whether or not the code was running the clear state program (defaults to approval program) */ isClearStateProgram?: boolean;
1563
+ /** Approval program source map */ approvalSourceMap?: SourceMap;
1564
+ /** Clear state program source map */ clearSourceMap?: SourceMap;
1565
+ }): Error;
1566
+ /**
1567
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1568
+ * performing any provided deploy-time parameter replacement and returns
1569
+ * the compiled code and any compilation results (including source maps).
1570
+ *
1571
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1572
+ *
1573
+ * Will store any generated source maps for later use in debugging.
1574
+ * @param appSpec The app spec for the app
1575
+ * @param compilation Any compilation parameters to use
1576
+ */
1577
+ static compile(appSpec: Arc56Contract, appManager: AppManager, compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
1578
+ /**
1579
+ * Returns ABI method arguments ready for a method call params object with default values populated
1580
+ * and structs replaced with tuples.
1581
+ *
1582
+ * It does this by replacing any `undefined` values with the equivalent default value from the given ARC-56 app spec.
1583
+ * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1584
+ * e.g. `my_method` or `my_method(unit64,string)bytes`
1585
+ * @param args The arguments to the method with `undefined` for any that should be populated with a default value
1586
+ */
1587
+ private getABIArgsWithDefaultValues;
1588
+ private getBareParamsMethods;
1589
+ private getBareCreateTransactionMethods;
1590
+ private getBareSendMethods;
1591
+ private getMethodCallParamsMethods;
1592
+ private getMethodCallSendMethods;
1593
+ private getMethodCallCreateTransactionMethods;
1594
+ /** Returns the sender for a call, using the provided sender or using the `defaultSender`
1595
+ * if none provided and throws an error if neither provided */
1596
+ private getSender;
1597
+ /** Returns the signer for a call, using the provided signer or the `defaultSigner`
1598
+ * if no signer was provided and the call will use default sender
1599
+ * or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
1600
+ private getSigner;
1601
+ private getBareParams;
1602
+ private getABIParams;
1603
+ /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
1604
+ private handleCallErrors;
1605
+ private getBoxMethods;
1606
+ private getStateMethods;
1607
+ }
1608
+ /**
1609
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
1610
+ * `algorand.client.getAppClientByCreatorAndName`.
1611
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
1612
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
1613
+ *
1614
+ * Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */
171
1615
  export declare class ApplicationClient {
172
1616
  private algod;
173
1617
  private indexer?;
@@ -183,15 +1627,22 @@ export declare class ApplicationClient {
183
1627
  private _approvalSourceMap;
184
1628
  private _clearSourceMap;
185
1629
  /**
1630
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
1631
+ * `algorand.client.getAppClientByCreatorAndName`.
1632
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
1633
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
1634
+ *
186
1635
  * Create a new ApplicationClient instance
187
1636
  * @param appDetails The details of the app
188
1637
  * @param algod An algod instance
189
1638
  */
190
1639
  constructor(appDetails: AppSpecAppDetails, algod: Algodv2);
191
1640
  /**
192
- * Compiles the approval and clear programs and sets up the source map.
1641
+ * @deprecated Use `AppClient.compile()` instead.
1642
+ *
1643
+ * Compiles the approval and clear state programs and sets up the source map.
193
1644
  * @param compilation The deploy-time parameters for the compilation
194
- * @returns The compiled approval and clear programs
1645
+ * @returns The compiled approval and clear state programs
195
1646
  */
196
1647
  compile(compilation?: AppClientCompilationParams): Promise<{
197
1648
  approvalCompiled: import("./app").CompiledTeal;
@@ -208,6 +1659,8 @@ export declare class ApplicationClient {
208
1659
  */
209
1660
  importSourceMaps(sourceMaps: AppSourceMaps): void;
210
1661
  /**
1662
+ * @deprecated Use `deploy` from an `AppFactory` instance instead.
1663
+ *
211
1664
  * Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
212
1665
  *
213
1666
  * To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
@@ -229,6 +1682,7 @@ export declare class ApplicationClient {
229
1682
  transactions: algosdk.Transaction[];
230
1683
  createdRound: number;
231
1684
  updatedRound: number;
1685
+ /** Parameters for creating a contract using ApplicationClient */
232
1686
  createdMetadata: import("./app").AppDeployMetadata;
233
1687
  deleted: boolean;
234
1688
  appId: number | bigint;
@@ -248,6 +1702,7 @@ export declare class ApplicationClient {
248
1702
  transactions: algosdk.Transaction[];
249
1703
  createdRound: number;
250
1704
  updatedRound: number;
1705
+ /** Parameters for creating a contract using ApplicationClient */
251
1706
  createdMetadata: import("./app").AppDeployMetadata;
252
1707
  deleted: boolean;
253
1708
  appId: number | bigint;
@@ -258,10 +1713,12 @@ export declare class ApplicationClient {
258
1713
  updatable?: boolean | undefined;
259
1714
  return?: ABIReturn | undefined;
260
1715
  deleteReturn?: ABIReturn | undefined;
261
- deleteResult: import("./transaction").ConfirmedTransactionResult;
1716
+ deleteResult: import("./transaction").ConfirmedTransactionResult; /** The optional name override to resolve the app by within the creator account (default: uses the name in the ABI contract) */
262
1717
  operationPerformed: "replace";
263
1718
  }>;
264
1719
  /**
1720
+ * @deprecated Use `create` from an `AppFactory` instance instead.
1721
+ *
265
1722
  * Creates a smart contract app, returns the details of the created app.
266
1723
  * @param create The parameters to create the app with
267
1724
  * @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result
@@ -278,6 +1735,8 @@ export declare class ApplicationClient {
278
1735
  appAddress: string;
279
1736
  }>;
280
1737
  /**
1738
+ * @deprecated Use `appClient.send.update` or `appClient.createTransaction.update` from an `AppClient` instance instead.
1739
+ *
281
1740
  * Updates the smart contract app.
282
1741
  * @param update The parameters to update the app with
283
1742
  * @returns The transaction send result and the compilation result
@@ -292,36 +1751,48 @@ export declare class ApplicationClient {
292
1751
  confirmation?: algosdk.modelsv2.PendingTransactionResponse | undefined;
293
1752
  }>;
294
1753
  /**
1754
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1755
+ *
295
1756
  * Issues a no_op (normal) call to the app.
296
1757
  * @param call The call details.
297
1758
  * @returns The result of the call
298
1759
  */
299
1760
  call(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
300
1761
  /**
1762
+ * @deprecated Use `appClient.send.optIn` or `appClient.createTransaction.optIn` from an `AppClient` instance instead.
1763
+ *
301
1764
  * Issues a opt_in call to the app.
302
1765
  * @param call The call details.
303
1766
  * @returns The result of the call
304
1767
  */
305
1768
  optIn(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
306
1769
  /**
1770
+ * @deprecated Use `appClient.send.closeOut` or `appClient.createTransaction.closeOut` from an `AppClient` instance instead.
1771
+ *
307
1772
  * Issues a close_out call to the app.
308
1773
  * @param call The call details.
309
1774
  * @returns The result of the call
310
1775
  */
311
1776
  closeOut(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
312
1777
  /**
1778
+ * @deprecated Use `appClient.send.clearState` or `appClient.createTransaction.clearState` from an `AppClient` instance instead.
1779
+ *
313
1780
  * Issues a clear_state call to the app.
314
1781
  * @param call The call details.
315
1782
  * @returns The result of the call
316
1783
  */
317
1784
  clearState(call?: AppClientClearStateParams): Promise<AppCallTransactionResult>;
318
1785
  /**
1786
+ * @deprecated Use `appClient.send.delete` or `appClient.createTransaction.delete` from an `AppClient` instance instead.
1787
+ *
319
1788
  * Issues a delete_application call to the app.
320
1789
  * @param call The call details.
321
1790
  * @returns The result of the call
322
1791
  */
323
1792
  delete(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
324
1793
  /**
1794
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1795
+ *
325
1796
  * Issues a call to the app with the given call type.
326
1797
  * @param call The call details.
327
1798
  * @param callType The call type
@@ -333,7 +1804,17 @@ export declare class ApplicationClient {
333
1804
  * @param fund The parameters for the funding or the funding amount
334
1805
  * @returns The result of the funding
335
1806
  */
336
- fundAppAccount(fund: FundAppAccountParams | AlgoAmount): Promise<import("./transaction").SendTransactionResult>;
1807
+ fundAppAccount(fund: FundAppAccountParams | AlgoAmount): Promise<(import("./transaction").SendTransactionResult | {
1808
+ groupId: string;
1809
+ txIds: string[];
1810
+ returns?: ABIReturn[] | undefined;
1811
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1812
+ transactions: algosdk.Transaction[];
1813
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1814
+ transaction: algosdk.Transaction;
1815
+ }) & {
1816
+ transactions: algosdk.Transaction[];
1817
+ }>;
337
1818
  /**
338
1819
  * Returns global state for the current app.
339
1820
  * @returns The global state
@@ -384,6 +1865,8 @@ export declare class ApplicationClient {
384
1865
  value: ABIValue;
385
1866
  }[]>;
386
1867
  /**
1868
+ * @deprecated Use `appClient.params.*` from an `AppClient` instance instead.
1869
+ *
387
1870
  * Returns the arguments for an app call for the given ABI method or raw method specification.
388
1871
  * @param args The call args specific to this application client
389
1872
  * @param sender The sender of this call. Will be used to fetch any default argument values if applicable
@@ -391,6 +1874,8 @@ export declare class ApplicationClient {
391
1874
  */
392
1875
  getCallArgs(args: AppClientCallArgs | undefined, sender: SendTransactionFrom): Promise<AppCallArgs | undefined>;
393
1876
  /**
1877
+ * @deprecated Use `appClient.getABIMethod` instead.
1878
+ *
394
1879
  * Returns the ABI Method parameters for the given method name string for the app represented by this application client instance
395
1880
  * @param method Either the name of the method or the ABI method spec definition string
396
1881
  * @returns The ABI method params for the given method
@@ -403,6 +1888,8 @@ export declare class ApplicationClient {
403
1888
  */
404
1889
  getABIMethod(method: string): ABIMethod | undefined;
405
1890
  /**
1891
+ * @deprecated Use `appClient.appId` and `appClient.appAddress` from an `AppClient` instance instead.
1892
+ *
406
1893
  * Gets the reference information for the current application instance.
407
1894
  * `appId` will be 0 if it can't find an app.
408
1895
  * @returns The app reference, or if deployed using the `deploy` method, the app metadata too
@@ -417,5 +1904,5 @@ export declare class ApplicationClient {
417
1904
  * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
418
1905
  */
419
1906
  exposeLogicError(e: Error, isClear?: boolean): Error;
1907
+ private getABIMethodSignature;
420
1908
  }
421
- //# sourceMappingURL=app-client.d.ts.map