@algorandfoundation/algokit-utils 7.0.0-beta.2 → 7.0.0-beta.21

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