@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/_virtual/_rolldown/runtime.js +33 -0
  2. package/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/account/account.d.ts +25 -30
  4. package/account/account.js +151 -146
  5. package/account/account.js.map +1 -1
  6. package/account/account.mjs +149 -144
  7. package/account/account.mjs.map +1 -1
  8. package/account/get-account-config-from-environment.d.ts +7 -2
  9. package/account/get-account-config-from-environment.js +19 -21
  10. package/account/get-account-config-from-environment.js.map +1 -1
  11. package/account/get-account-config-from-environment.mjs +19 -19
  12. package/account/get-account-config-from-environment.mjs.map +1 -1
  13. package/account/get-account.d.ts +14 -12
  14. package/account/get-account.js +56 -59
  15. package/account/get-account.js.map +1 -1
  16. package/account/get-account.mjs +56 -57
  17. package/account/get-account.mjs.map +1 -1
  18. package/account/get-dispenser-account.d.ts +9 -5
  19. package/account/get-dispenser-account.js +20 -18
  20. package/account/get-dispenser-account.js.map +1 -1
  21. package/account/get-dispenser-account.mjs +20 -16
  22. package/account/get-dispenser-account.mjs.map +1 -1
  23. package/account/mnemonic-account.d.ts +7 -3
  24. package/account/mnemonic-account.js +17 -17
  25. package/account/mnemonic-account.js.map +1 -1
  26. package/account/mnemonic-account.mjs +15 -15
  27. package/account/mnemonic-account.mjs.map +1 -1
  28. package/amount.d.ts +40 -35
  29. package/amount.js +33 -34
  30. package/amount.js.map +1 -1
  31. package/amount.mjs +33 -32
  32. package/amount.mjs.map +1 -1
  33. package/app-client.d.ts +10 -6
  34. package/app-client.js +91 -86
  35. package/app-client.js.map +1 -1
  36. package/app-client.mjs +91 -84
  37. package/app-client.mjs.map +1 -1
  38. package/app-deploy.d.ts +26 -24
  39. package/app-deploy.js +235 -253
  40. package/app-deploy.js.map +1 -1
  41. package/app-deploy.mjs +233 -251
  42. package/app-deploy.mjs.map +1 -1
  43. package/app.d.ts +45 -46
  44. package/app.js +253 -271
  45. package/app.js.map +1 -1
  46. package/app.mjs +249 -267
  47. package/app.mjs.map +1 -1
  48. package/asset.d.ts +16 -12
  49. package/asset.js +116 -122
  50. package/asset.js.map +1 -1
  51. package/asset.mjs +116 -120
  52. package/asset.mjs.map +1 -1
  53. package/config.d.ts +7 -2
  54. package/config.js +5 -7
  55. package/config.js.map +1 -1
  56. package/config.mjs +5 -4
  57. package/config.mjs.map +1 -1
  58. package/debugging/debugging.d.ts +5 -1
  59. package/debugging/debugging.js +11 -11
  60. package/debugging/debugging.js.map +1 -1
  61. package/debugging/debugging.mjs +11 -9
  62. package/debugging/debugging.mjs.map +1 -1
  63. package/dispenser-client.d.ts +7 -2
  64. package/dispenser-client.js +23 -24
  65. package/dispenser-client.js.map +1 -1
  66. package/dispenser-client.mjs +23 -22
  67. package/dispenser-client.mjs.map +1 -1
  68. package/index.d.ts +27 -18
  69. package/index.js +140 -143
  70. package/index.mjs +27 -29
  71. package/indexer-lookup.d.ts +18 -11
  72. package/indexer-lookup.js +112 -120
  73. package/indexer-lookup.js.map +1 -1
  74. package/indexer-lookup.mjs +105 -118
  75. package/indexer-lookup.mjs.map +1 -1
  76. package/localnet/get-kmd-wallet-account.d.ts +9 -7
  77. package/localnet/get-kmd-wallet-account.js +28 -26
  78. package/localnet/get-kmd-wallet-account.js.map +1 -1
  79. package/localnet/get-kmd-wallet-account.mjs +28 -24
  80. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  81. package/localnet/get-localnet-dispenser-account.d.ts +7 -5
  82. package/localnet/get-localnet-dispenser-account.js +17 -15
  83. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  84. package/localnet/get-localnet-dispenser-account.mjs +17 -13
  85. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  86. package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
  87. package/localnet/get-or-create-kmd-wallet-account.js +28 -26
  88. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  89. package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
  90. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  91. package/localnet/is-localnet.d.ts +7 -3
  92. package/localnet/is-localnet.js +9 -10
  93. package/localnet/is-localnet.js.map +1 -1
  94. package/localnet/is-localnet.mjs +9 -8
  95. package/localnet/is-localnet.mjs.map +1 -1
  96. package/network-client.d.ts +17 -15
  97. package/network-client.js +115 -116
  98. package/network-client.js.map +1 -1
  99. package/network-client.mjs +115 -114
  100. package/network-client.mjs.map +1 -1
  101. package/package.json +12 -3
  102. package/testing/account.d.ts +11 -9
  103. package/testing/account.js +31 -33
  104. package/testing/account.js.map +1 -1
  105. package/testing/account.mjs +29 -31
  106. package/testing/account.mjs.map +1 -1
  107. package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
  108. package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
  109. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  110. package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
  111. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  112. package/testing/fixtures/algorand-fixture.d.ts +9 -4
  113. package/testing/fixtures/algorand-fixture.js +67 -62
  114. package/testing/fixtures/algorand-fixture.js.map +1 -1
  115. package/testing/fixtures/algorand-fixture.mjs +66 -59
  116. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  117. package/testing/index.d.ts +7 -5
  118. package/testing/index.js +13 -18
  119. package/testing/index.mjs +7 -7
  120. package/testing/indexer.d.ts +5 -1
  121. package/testing/indexer.js +28 -37
  122. package/testing/indexer.js.map +1 -1
  123. package/testing/indexer.mjs +28 -35
  124. package/testing/indexer.mjs.map +1 -1
  125. package/testing/test-logger.d.ts +41 -36
  126. package/testing/test-logger.js +71 -76
  127. package/testing/test-logger.js.map +1 -1
  128. package/testing/test-logger.mjs +71 -74
  129. package/testing/test-logger.mjs.map +1 -1
  130. package/testing/transaction-logger.d.ts +30 -27
  131. package/testing/transaction-logger.js +77 -93
  132. package/testing/transaction-logger.js.map +1 -1
  133. package/testing/transaction-logger.mjs +74 -90
  134. package/testing/transaction-logger.mjs.map +1 -1
  135. package/transaction/legacy-bridge.js +100 -111
  136. package/transaction/legacy-bridge.js.map +1 -1
  137. package/transaction/legacy-bridge.mjs +97 -108
  138. package/transaction/legacy-bridge.mjs.map +1 -1
  139. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
  140. package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
  141. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  142. package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
  143. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  144. package/transaction/transaction.d.ts +34 -35
  145. package/transaction/transaction.js +716 -914
  146. package/transaction/transaction.js.map +1 -1
  147. package/transaction/transaction.mjs +713 -911
  148. package/transaction/transaction.mjs.map +1 -1
  149. package/transfer/transfer-algos.d.ts +9 -5
  150. package/transfer/transfer-algos.js +26 -27
  151. package/transfer/transfer-algos.js.map +1 -1
  152. package/transfer/transfer-algos.mjs +26 -25
  153. package/transfer/transfer-algos.mjs.map +1 -1
  154. package/transfer/transfer.d.ts +11 -8
  155. package/transfer/transfer.js +94 -100
  156. package/transfer/transfer.js.map +1 -1
  157. package/transfer/transfer.mjs +94 -98
  158. package/transfer/transfer.mjs.map +1 -1
  159. package/types/account-manager.d.ts +432 -429
  160. package/types/account-manager.js +591 -602
  161. package/types/account-manager.js.map +1 -1
  162. package/types/account-manager.mjs +587 -599
  163. package/types/account-manager.mjs.map +1 -1
  164. package/types/account.d.ts +192 -202
  165. package/types/account.js +91 -88
  166. package/types/account.js.map +1 -1
  167. package/types/account.mjs +88 -86
  168. package/types/account.mjs.map +1 -1
  169. package/types/algo-http-client-with-retry.d.ts +15 -10
  170. package/types/algo-http-client-with-retry.js +70 -92
  171. package/types/algo-http-client-with-retry.js.map +1 -1
  172. package/types/algo-http-client-with-retry.mjs +69 -90
  173. package/types/algo-http-client-with-retry.mjs.map +1 -1
  174. package/types/algorand-client-transaction-creator.d.ts +778 -771
  175. package/types/algorand-client-transaction-creator.js +733 -732
  176. package/types/algorand-client-transaction-creator.js.map +1 -1
  177. package/types/algorand-client-transaction-creator.mjs +732 -730
  178. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  179. package/types/algorand-client-transaction-sender.d.ts +1090 -1360
  180. package/types/algorand-client-transaction-sender.js +930 -961
  181. package/types/algorand-client-transaction-sender.js.map +1 -1
  182. package/types/algorand-client-transaction-sender.mjs +927 -959
  183. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  184. package/types/algorand-client.d.ts +239 -236
  185. package/types/algorand-client.js +322 -320
  186. package/types/algorand-client.js.map +1 -1
  187. package/types/algorand-client.mjs +321 -318
  188. package/types/algorand-client.mjs.map +1 -1
  189. package/types/amount.d.ts +47 -43
  190. package/types/amount.js +66 -70
  191. package/types/amount.js.map +1 -1
  192. package/types/amount.mjs +63 -68
  193. package/types/amount.mjs.map +1 -1
  194. package/types/app-arc56.d.ts +235 -272
  195. package/types/app-arc56.js +124 -170
  196. package/types/app-arc56.js.map +1 -1
  197. package/types/app-arc56.mjs +121 -168
  198. package/types/app-arc56.mjs.map +1 -1
  199. package/types/app-client.d.ts +1128 -2009
  200. package/types/app-client.js +1633 -1791
  201. package/types/app-client.js.map +1 -1
  202. package/types/app-client.mjs +1624 -1783
  203. package/types/app-client.mjs.map +1 -1
  204. package/types/app-deployer.d.ts +139 -141
  205. package/types/app-deployer.js +344 -384
  206. package/types/app-deployer.js.map +1 -1
  207. package/types/app-deployer.mjs +341 -382
  208. package/types/app-deployer.mjs.map +1 -1
  209. package/types/app-factory.d.ts +762 -932
  210. package/types/app-factory.js +496 -488
  211. package/types/app-factory.js.map +1 -1
  212. package/types/app-factory.mjs +491 -484
  213. package/types/app-factory.mjs.map +1 -1
  214. package/types/app-manager.d.ts +304 -310
  215. package/types/app-manager.js +422 -475
  216. package/types/app-manager.js.map +1 -1
  217. package/types/app-manager.mjs +419 -473
  218. package/types/app-manager.mjs.map +1 -1
  219. package/types/app-spec.d.ts +118 -117
  220. package/types/app-spec.js +125 -135
  221. package/types/app-spec.js.map +1 -1
  222. package/types/app-spec.mjs +121 -132
  223. package/types/app-spec.mjs.map +1 -1
  224. package/types/app.d.ts +229 -241
  225. package/types/app.js +36 -28
  226. package/types/app.js.map +1 -1
  227. package/types/app.mjs +33 -26
  228. package/types/app.mjs.map +1 -1
  229. package/types/asset-manager.d.ts +204 -199
  230. package/types/asset-manager.js +165 -174
  231. package/types/asset-manager.js.map +1 -1
  232. package/types/asset-manager.mjs +164 -172
  233. package/types/asset-manager.mjs.map +1 -1
  234. package/types/asset.d.ts +95 -91
  235. package/types/asset.js +0 -3
  236. package/types/asset.mjs +0 -2
  237. package/types/async-event-emitter.d.ts +18 -13
  238. package/types/async-event-emitter.js +37 -49
  239. package/types/async-event-emitter.js.map +1 -1
  240. package/types/async-event-emitter.mjs +36 -47
  241. package/types/async-event-emitter.mjs.map +1 -1
  242. package/types/client-manager.d.ts +453 -451
  243. package/types/client-manager.js +602 -598
  244. package/types/client-manager.js.map +1 -1
  245. package/types/client-manager.mjs +597 -594
  246. package/types/client-manager.mjs.map +1 -1
  247. package/types/composer.d.ts +1211 -1258
  248. package/types/composer.js +1436 -1498
  249. package/types/composer.js.map +1 -1
  250. package/types/composer.mjs +1430 -1493
  251. package/types/composer.mjs.map +1 -1
  252. package/types/config.d.ts +53 -48
  253. package/types/config.js +78 -77
  254. package/types/config.js.map +1 -1
  255. package/types/config.mjs +77 -75
  256. package/types/config.mjs.map +1 -1
  257. package/types/debugging.d.ts +25 -23
  258. package/types/debugging.js +9 -11
  259. package/types/debugging.js.map +1 -1
  260. package/types/debugging.mjs +8 -9
  261. package/types/debugging.mjs.map +1 -1
  262. package/types/dispenser-client.d.ts +57 -52
  263. package/types/dispenser-client.js +120 -141
  264. package/types/dispenser-client.js.map +1 -1
  265. package/types/dispenser-client.mjs +119 -139
  266. package/types/dispenser-client.mjs.map +1 -1
  267. package/types/expand.d.ts +5 -3
  268. package/types/expand.js +0 -3
  269. package/types/expand.mjs +0 -2
  270. package/types/indexer.d.ts +104 -100
  271. package/types/indexer.js +36 -31
  272. package/types/indexer.js.map +1 -1
  273. package/types/indexer.mjs +32 -30
  274. package/types/indexer.mjs.map +1 -1
  275. package/types/instance-of.d.ts +5 -3
  276. package/types/instance-of.js +0 -3
  277. package/types/instance-of.mjs +0 -2
  278. package/types/kmd-account-manager.d.ts +75 -70
  279. package/types/kmd-account-manager.js +150 -184
  280. package/types/kmd-account-manager.js.map +1 -1
  281. package/types/kmd-account-manager.mjs +147 -182
  282. package/types/kmd-account-manager.mjs.map +1 -1
  283. package/types/lifecycle-events.d.ts +13 -8
  284. package/types/lifecycle-events.js +10 -7
  285. package/types/lifecycle-events.js.map +1 -1
  286. package/types/lifecycle-events.mjs +9 -7
  287. package/types/lifecycle-events.mjs.map +1 -1
  288. package/types/logging.d.ts +15 -11
  289. package/types/logging.js +30 -31
  290. package/types/logging.js.map +1 -1
  291. package/types/logging.mjs +29 -29
  292. package/types/logging.mjs.map +1 -1
  293. package/types/logic-error.d.ts +33 -29
  294. package/types/logic-error.js +50 -49
  295. package/types/logic-error.js.map +1 -1
  296. package/types/logic-error.mjs +49 -47
  297. package/types/logic-error.mjs.map +1 -1
  298. package/types/network-client.d.ts +32 -27
  299. package/types/network-client.js +10 -9
  300. package/types/network-client.js.map +1 -1
  301. package/types/network-client.mjs +9 -7
  302. package/types/network-client.mjs.map +1 -1
  303. package/types/testing.d.ts +131 -132
  304. package/types/testing.js +0 -3
  305. package/types/testing.mjs +0 -2
  306. package/types/transaction.d.ts +110 -110
  307. package/types/transaction.js +0 -3
  308. package/types/transaction.mjs +0 -2
  309. package/types/transfer.d.ts +70 -66
  310. package/types/transfer.js +0 -3
  311. package/types/transfer.mjs +0 -2
  312. package/util.js +73 -118
  313. package/util.js.map +1 -1
  314. package/util.mjs +73 -116
  315. package/util.mjs.map +1 -1
  316. package/account/index.d.ts +0 -5
  317. package/debugging/index.d.ts +0 -1
  318. package/index.js.map +0 -1
  319. package/index.mjs.map +0 -1
  320. package/localnet/index.d.ts +0 -4
  321. package/testing/_asset.d.ts +0 -3
  322. package/testing/fixtures/index.d.ts +0 -2
  323. package/testing/index.js.map +0 -1
  324. package/testing/index.mjs.map +0 -1
  325. package/transaction/index.d.ts +0 -2
  326. package/transaction/legacy-bridge.d.ts +0 -35
  327. package/transfer/index.d.ts +0 -2
  328. package/types/asset.js.map +0 -1
  329. package/types/asset.mjs.map +0 -1
  330. package/types/expand.js.map +0 -1
  331. package/types/expand.mjs.map +0 -1
  332. package/types/instance-of.js.map +0 -1
  333. package/types/instance-of.mjs.map +0 -1
  334. package/types/testing.js.map +0 -1
  335. package/types/testing.mjs.map +0 -1
  336. package/types/transaction.js.map +0 -1
  337. package/types/transaction.mjs.map +0 -1
  338. package/types/transfer.js.map +0 -1
  339. package/types/transfer.mjs.map +0 -1
  340. package/util.d.ts +0 -48
@@ -1,1365 +1,1095 @@
1
- import algosdk, { Address } from 'algosdk';
2
- import { SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from './app';
3
- import { AppManager } from './app-manager';
4
- import { AssetManager } from './asset-manager';
5
- import { AssetCreateParams, AssetOptOutParams, TransactionComposer } from './composer';
6
- import { SendParams, SendSingleTransactionResult } from './transaction';
1
+ import { AlgoAmount } from "./amount.js";
2
+ import { TransactionSignerAccount } from "./account.js";
3
+ import { ABIReturn, SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from "./app.js";
4
+ import { SendParams, SendSingleTransactionResult } from "./transaction.js";
5
+ import { AppManager, BoxIdentifier, BoxReference, ResourceReference } from "./app-manager.js";
6
+ import { AppCreateParams, AppMethodCall, AppMethodCallParams, AppUpdateParams, AssetCreateParams, AssetOptOutParams, CommonTransactionParams, TransactionComposer } from "./composer.js";
7
+ import { AssetManager } from "./asset-manager.js";
8
+ import algosdk, { Address } from "algosdk";
9
+
10
+ //#region src/types/algorand-client-transaction-sender.d.ts
7
11
  /** Orchestrates sending transactions for `AlgorandClient`. */
8
- export declare class AlgorandClientTransactionSender {
9
- private _newGroup;
10
- private _assetManager;
11
- private _appManager;
12
- /**
13
- * Creates a new `AlgorandClientSender`
14
- * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
15
- * @param assetManager An `AssetManager` instance
16
- * @param appManager An `AppManager` instance
17
- * @example
18
- * ```typescript
19
- * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)
20
- * ```
21
- */
22
- constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager);
23
- /**
24
- * Start a new `TransactionComposer` transaction group
25
- * @returns A new instance of `TransactionComposer`.
26
- * @example
27
- * const composer = AlgorandClient.mainNet().send.newGroup();
28
- * const result = await composer.addTransaction(payment).send()
29
- */
30
- newGroup(): TransactionComposer;
31
- private _send;
32
- private _sendAppCall;
33
- private _sendAppUpdateCall;
34
- private _sendAppCreateCall;
35
- /**
36
- * Send a payment transaction to transfer Algo between accounts.
37
- * @param params The parameters for the payment transaction
38
- * @example Basic example
39
- * ```typescript
40
- * const result = await algorand.send.payment({
41
- * sender: 'SENDERADDRESS',
42
- * receiver: 'RECEIVERADDRESS',
43
- * amount: (4).algo(),
44
- * })
45
- * ```
46
- * @example Advanced example
47
- * ```typescript
48
- * const result = await algorand.send.payment({
49
- * amount: (4).algo(),
50
- * receiver: 'RECEIVERADDRESS',
51
- * sender: 'SENDERADDRESS',
52
- * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
53
- * lease: 'lease',
54
- * note: 'note',
55
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
56
- * rekeyTo: 'REKEYTOADDRESS',
57
- * // You wouldn't normally set this field
58
- * firstValidRound: 1000n,
59
- * validityWindow: 10,
60
- * extraFee: (1000).microAlgo(),
61
- * staticFee: (1000).microAlgo(),
62
- * // Max fee doesn't make sense with extraFee AND staticFee
63
- * // already specified, but here for completeness
64
- * maxFee: (3000).microAlgo(),
65
- * // Signer only needed if you want to provide one,
66
- * // generally you'd register it with AlgorandClient
67
- * // against the sender and not need to pass it in
68
- * signer: transactionSigner,
69
- * maxRoundsToWaitForConfirmation: 5,
70
- * suppressLog: true,
71
- * })
72
- * ```
73
- * @returns The result of the payment transaction and the transaction that was sent
74
- */
75
- payment: (params: import("./composer").CommonTransactionParams & {
76
- receiver: string | algosdk.Address;
77
- amount: import("./amount").AlgoAmount;
78
- closeRemainderTo?: string | algosdk.Address | undefined;
79
- } & SendParams) => Promise<SendSingleTransactionResult>;
80
- /**
81
- * Create a new Algorand Standard Asset.
82
- *
83
- * The account that sends this transaction will automatically be
84
- * opted in to the asset and will hold all units after creation.
85
- *
86
- * @param params The parameters for the asset creation transaction
87
- *
88
- * @example Basic example
89
- * ```typescript
90
- * await algorand.send.assetCreate({ sender: "CREATORADDRESS", total: 100n})
91
- * ```
92
- * @example Advanced example
93
- * ```typescript
94
- * await algorand.send.assetCreate({
95
- * sender: 'CREATORADDRESS',
96
- * total: 100n,
97
- * decimals: 2,
98
- * assetName: 'asset',
99
- * unitName: 'unit',
100
- * url: 'url',
101
- * metadataHash: 'metadataHash',
102
- * defaultFrozen: false,
103
- * manager: 'MANAGERADDRESS',
104
- * reserve: 'RESERVEADDRESS',
105
- * freeze: 'FREEZEADDRESS',
106
- * clawback: 'CLAWBACKADDRESS',
107
- * lease: 'lease',
108
- * note: 'note',
109
- * // You wouldn't normally set this field
110
- * firstValidRound: 1000n,
111
- * validityWindow: 10,
112
- * extraFee: (1000).microAlgo(),
113
- * staticFee: (1000).microAlgo(),
114
- * // Max fee doesn't make sense with extraFee AND staticFee
115
- * // already specified, but here for completeness
116
- * maxFee: (3000).microAlgo(),
117
- * // Signer only needed if you want to provide one,
118
- * // generally you'd register it with AlgorandClient
119
- * // against the sender and not need to pass it in
120
- * signer: transactionSigner,
121
- * maxRoundsToWaitForConfirmation: 5,
122
- * suppressLog: true,
123
- * })
124
- * ```
125
- * @returns The result of the asset create transaction and the transaction that was sent
126
- */
127
- assetCreate: (params: AssetCreateParams & SendParams) => Promise<{
128
- assetId: bigint;
129
- groupId: string;
130
- txIds: string[];
131
- returns?: import("./app").ABIReturn[] | undefined;
132
- confirmations: algosdk.modelsv2.PendingTransactionResponse[];
133
- transactions: algosdk.Transaction[];
134
- confirmation: algosdk.modelsv2.PendingTransactionResponse;
135
- transaction: algosdk.Transaction;
136
- }>;
137
- /**
138
- * Configure an existing Algorand Standard Asset.
139
- *
140
- * **Note:** The manager, reserve, freeze, and clawback addresses
141
- * are immutably empty if they are not set. If manager is not set then
142
- * all fields are immutable from that point forward.
143
- *
144
- * @param params The parameters for the asset config transaction
145
- *
146
- * @example Basic example
147
- * ```typescript
148
- * await algorand.send.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
149
- * ```
150
- * @example Advanced example
151
- * ```typescript
152
- * await algorand.send.assetConfig({
153
- * sender: 'MANAGERADDRESS',
154
- * assetId: 123456n,
155
- * manager: 'MANAGERADDRESS',
156
- * reserve: 'RESERVEADDRESS',
157
- * freeze: 'FREEZEADDRESS',
158
- * clawback: 'CLAWBACKADDRESS',
159
- * lease: 'lease',
160
- * note: 'note',
161
- * // You wouldn't normally set this field
162
- * firstValidRound: 1000n,
163
- * validityWindow: 10,
164
- * extraFee: (1000).microAlgo(),
165
- * staticFee: (1000).microAlgo(),
166
- * // Max fee doesn't make sense with extraFee AND staticFee
167
- * // already specified, but here for completeness
168
- * maxFee: (3000).microAlgo(),
169
- * // Signer only needed if you want to provide one,
170
- * // generally you'd register it with AlgorandClient
171
- * // against the sender and not need to pass it in
172
- * signer: transactionSigner,
173
- * maxRoundsToWaitForConfirmation: 5,
174
- * suppressLog: true,
175
- * })
176
- * ```
177
- * @returns The result of the asset config transaction and the transaction that was sent
178
- */
179
- assetConfig: (params: import("./composer").CommonTransactionParams & {
180
- assetId: bigint;
181
- manager: string | algosdk.Address | undefined;
182
- reserve?: string | algosdk.Address | undefined;
183
- freeze?: string | algosdk.Address | undefined;
184
- clawback?: string | algosdk.Address | undefined;
185
- } & SendParams) => Promise<SendSingleTransactionResult>;
186
- /**
187
- * Freeze or unfreeze an Algorand Standard Asset for an account.
188
- *
189
- * @param params The parameters for the asset freeze transaction
190
- *
191
- * @example Basic example
192
- * ```typescript
193
- * await algorand.send.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
194
- * ```
195
- * @example Advanced example
196
- * ```typescript
197
- * await algorand.send.assetFreeze({
198
- * sender: 'MANAGERADDRESS',
199
- * assetId: 123456n,
200
- * account: 'ACCOUNTADDRESS',
201
- * frozen: true,
202
- * lease: 'lease',
203
- * note: 'note',
204
- * // You wouldn't normally set this field
205
- * firstValidRound: 1000n,
206
- * validityWindow: 10,
207
- * extraFee: (1000).microAlgo(),
208
- * staticFee: (1000).microAlgo(),
209
- * // Max fee doesn't make sense with extraFee AND staticFee
210
- * // already specified, but here for completeness
211
- * maxFee: (3000).microAlgo(),
212
- * // Signer only needed if you want to provide one,
213
- * // generally you'd register it with AlgorandClient
214
- * // against the sender and not need to pass it in
215
- * signer: transactionSigner,
216
- * maxRoundsToWaitForConfirmation: 5,
217
- * suppressLog: true,
218
- * })
219
- * ```
220
- * @returns The result of the asset freeze transaction and the transaction that was sent
221
- */
222
- assetFreeze: (params: import("./composer").CommonTransactionParams & {
223
- assetId: bigint;
224
- account: string | algosdk.Address;
225
- frozen: boolean;
226
- } & SendParams) => Promise<SendSingleTransactionResult>;
227
- /**
228
- * Destroys an Algorand Standard Asset.
229
- *
230
- * Created assets can be destroyed only by the asset manager account.
231
- * All of the assets must be owned by the creator of the asset before
232
- * the asset can be deleted.
12
+ declare class AlgorandClientTransactionSender {
13
+ private _newGroup;
14
+ private _assetManager;
15
+ private _appManager;
16
+ /**
17
+ * Creates a new `AlgorandClientSender`
18
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
19
+ * @param assetManager An `AssetManager` instance
20
+ * @param appManager An `AppManager` instance
21
+ * @example
22
+ * ```typescript
23
+ * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)
24
+ * ```
25
+ */
26
+ constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager);
27
+ /**
28
+ * Start a new `TransactionComposer` transaction group
29
+ * @returns A new instance of `TransactionComposer`.
30
+ * @example
31
+ * const composer = AlgorandClient.mainNet().send.newGroup();
32
+ * const result = await composer.addTransaction(payment).send()
33
+ */
34
+ newGroup(): TransactionComposer;
35
+ private _send;
36
+ private _sendAppCall;
37
+ private _sendAppUpdateCall;
38
+ private _sendAppCreateCall;
39
+ /**
40
+ * Send a payment transaction to transfer Algo between accounts.
41
+ * @param params The parameters for the payment transaction
42
+ * @example Basic example
43
+ * ```typescript
44
+ * const result = await algorand.send.payment({
45
+ * sender: 'SENDERADDRESS',
46
+ * receiver: 'RECEIVERADDRESS',
47
+ * amount: (4).algo(),
48
+ * })
49
+ * ```
50
+ * @example Advanced example
51
+ * ```typescript
52
+ * const result = await algorand.send.payment({
53
+ * amount: (4).algo(),
54
+ * receiver: 'RECEIVERADDRESS',
55
+ * sender: 'SENDERADDRESS',
56
+ * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
57
+ * lease: 'lease',
58
+ * note: 'note',
59
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
60
+ * rekeyTo: 'REKEYTOADDRESS',
61
+ * // You wouldn't normally set this field
62
+ * firstValidRound: 1000n,
63
+ * validityWindow: 10,
64
+ * extraFee: (1000).microAlgo(),
65
+ * staticFee: (1000).microAlgo(),
66
+ * // Max fee doesn't make sense with extraFee AND staticFee
67
+ * // already specified, but here for completeness
68
+ * maxFee: (3000).microAlgo(),
69
+ * // Signer only needed if you want to provide one,
70
+ * // generally you'd register it with AlgorandClient
71
+ * // against the sender and not need to pass it in
72
+ * signer: transactionSigner,
73
+ * maxRoundsToWaitForConfirmation: 5,
74
+ * suppressLog: true,
75
+ * })
76
+ * ```
77
+ * @returns The result of the payment transaction and the transaction that was sent
78
+ */
79
+ payment: (params: CommonTransactionParams & {
80
+ receiver: string | Address;
81
+ amount: AlgoAmount;
82
+ closeRemainderTo?: string | Address;
83
+ } & SendParams) => Promise<SendSingleTransactionResult>;
84
+ /**
85
+ * Create a new Algorand Standard Asset.
86
+ *
87
+ * The account that sends this transaction will automatically be
88
+ * opted in to the asset and will hold all units after creation.
89
+ *
90
+ * @param params The parameters for the asset creation transaction
91
+ *
92
+ * @example Basic example
93
+ * ```typescript
94
+ * await algorand.send.assetCreate({ sender: "CREATORADDRESS", total: 100n})
95
+ * ```
96
+ * @example Advanced example
97
+ * ```typescript
98
+ * await algorand.send.assetCreate({
99
+ * sender: 'CREATORADDRESS',
100
+ * total: 100n,
101
+ * decimals: 2,
102
+ * assetName: 'asset',
103
+ * unitName: 'unit',
104
+ * url: 'url',
105
+ * metadataHash: 'metadataHash',
106
+ * defaultFrozen: false,
107
+ * manager: 'MANAGERADDRESS',
108
+ * reserve: 'RESERVEADDRESS',
109
+ * freeze: 'FREEZEADDRESS',
110
+ * clawback: 'CLAWBACKADDRESS',
111
+ * lease: 'lease',
112
+ * note: 'note',
113
+ * // You wouldn't normally set this field
114
+ * firstValidRound: 1000n,
115
+ * validityWindow: 10,
116
+ * extraFee: (1000).microAlgo(),
117
+ * staticFee: (1000).microAlgo(),
118
+ * // Max fee doesn't make sense with extraFee AND staticFee
119
+ * // already specified, but here for completeness
120
+ * maxFee: (3000).microAlgo(),
121
+ * // Signer only needed if you want to provide one,
122
+ * // generally you'd register it with AlgorandClient
123
+ * // against the sender and not need to pass it in
124
+ * signer: transactionSigner,
125
+ * maxRoundsToWaitForConfirmation: 5,
126
+ * suppressLog: true,
127
+ * })
128
+ * ```
129
+ * @returns The result of the asset create transaction and the transaction that was sent
130
+ */
131
+ assetCreate: (params: AssetCreateParams & SendParams) => Promise<{
132
+ assetId: bigint;
133
+ groupId: string;
134
+ txIds: string[];
135
+ returns?: ABIReturn[] | undefined;
136
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
137
+ transactions: Transaction[];
138
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
139
+ transaction: Transaction;
140
+ }>;
141
+ /**
142
+ * Configure an existing Algorand Standard Asset.
143
+ *
144
+ * **Note:** The manager, reserve, freeze, and clawback addresses
145
+ * are immutably empty if they are not set. If manager is not set then
146
+ * all fields are immutable from that point forward.
147
+ *
148
+ * @param params The parameters for the asset config transaction
149
+ *
150
+ * @example Basic example
151
+ * ```typescript
152
+ * await algorand.send.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
153
+ * ```
154
+ * @example Advanced example
155
+ * ```typescript
156
+ * await algorand.send.assetConfig({
157
+ * sender: 'MANAGERADDRESS',
158
+ * assetId: 123456n,
159
+ * manager: 'MANAGERADDRESS',
160
+ * reserve: 'RESERVEADDRESS',
161
+ * freeze: 'FREEZEADDRESS',
162
+ * clawback: 'CLAWBACKADDRESS',
163
+ * lease: 'lease',
164
+ * note: 'note',
165
+ * // You wouldn't normally set this field
166
+ * firstValidRound: 1000n,
167
+ * validityWindow: 10,
168
+ * extraFee: (1000).microAlgo(),
169
+ * staticFee: (1000).microAlgo(),
170
+ * // Max fee doesn't make sense with extraFee AND staticFee
171
+ * // already specified, but here for completeness
172
+ * maxFee: (3000).microAlgo(),
173
+ * // Signer only needed if you want to provide one,
174
+ * // generally you'd register it with AlgorandClient
175
+ * // against the sender and not need to pass it in
176
+ * signer: transactionSigner,
177
+ * maxRoundsToWaitForConfirmation: 5,
178
+ * suppressLog: true,
179
+ * })
180
+ * ```
181
+ * @returns The result of the asset config transaction and the transaction that was sent
182
+ */
183
+ assetConfig: (params: CommonTransactionParams & {
184
+ assetId: bigint;
185
+ manager: string | Address | undefined;
186
+ reserve?: string | Address;
187
+ freeze?: string | Address;
188
+ clawback?: string | Address;
189
+ } & SendParams) => Promise<SendSingleTransactionResult>;
190
+ /**
191
+ * Freeze or unfreeze an Algorand Standard Asset for an account.
192
+ *
193
+ * @param params The parameters for the asset freeze transaction
194
+ *
195
+ * @example Basic example
196
+ * ```typescript
197
+ * await algorand.send.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
198
+ * ```
199
+ * @example Advanced example
200
+ * ```typescript
201
+ * await algorand.send.assetFreeze({
202
+ * sender: 'MANAGERADDRESS',
203
+ * assetId: 123456n,
204
+ * account: 'ACCOUNTADDRESS',
205
+ * frozen: true,
206
+ * lease: 'lease',
207
+ * note: 'note',
208
+ * // You wouldn't normally set this field
209
+ * firstValidRound: 1000n,
210
+ * validityWindow: 10,
211
+ * extraFee: (1000).microAlgo(),
212
+ * staticFee: (1000).microAlgo(),
213
+ * // Max fee doesn't make sense with extraFee AND staticFee
214
+ * // already specified, but here for completeness
215
+ * maxFee: (3000).microAlgo(),
216
+ * // Signer only needed if you want to provide one,
217
+ * // generally you'd register it with AlgorandClient
218
+ * // against the sender and not need to pass it in
219
+ * signer: transactionSigner,
220
+ * maxRoundsToWaitForConfirmation: 5,
221
+ * suppressLog: true,
222
+ * })
223
+ * ```
224
+ * @returns The result of the asset freeze transaction and the transaction that was sent
225
+ */
226
+ assetFreeze: (params: CommonTransactionParams & {
227
+ assetId: bigint;
228
+ account: string | Address;
229
+ frozen: boolean;
230
+ } & SendParams) => Promise<SendSingleTransactionResult>;
231
+ /**
232
+ * Destroys an Algorand Standard Asset.
233
+ *
234
+ * Created assets can be destroyed only by the asset manager account.
235
+ * All of the assets must be owned by the creator of the asset before
236
+ * the asset can be deleted.
237
+ *
238
+ * @param params The parameters for the asset destroy transaction
239
+ *
240
+ * @example Basic example
241
+ * ```typescript
242
+ * await algorand.send.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
243
+ * ```
244
+ * @example Advanced example
245
+ * ```typescript
246
+ * await algorand.send.assetDestroy({
247
+ * sender: 'MANAGERADDRESS',
248
+ * assetId: 123456n,
249
+ * lease: 'lease',
250
+ * note: 'note',
251
+ * // You wouldn't normally set this field
252
+ * firstValidRound: 1000n,
253
+ * validityWindow: 10,
254
+ * extraFee: (1000).microAlgo(),
255
+ * staticFee: (1000).microAlgo(),
256
+ * // Max fee doesn't make sense with extraFee AND staticFee
257
+ * // already specified, but here for completeness
258
+ * maxFee: (3000).microAlgo(),
259
+ * // Signer only needed if you want to provide one,
260
+ * // generally you'd register it with AlgorandClient
261
+ * // against the sender and not need to pass it in
262
+ * signer: transactionSigner,
263
+ * maxRoundsToWaitForConfirmation: 5,
264
+ * suppressLog: true,
265
+ * })
266
+ * ```
267
+ * @returns The result of the asset destroy transaction and the transaction that was sent
268
+ */
269
+ assetDestroy: (params: CommonTransactionParams & {
270
+ assetId: bigint;
271
+ } & SendParams) => Promise<SendSingleTransactionResult>;
272
+ /**
273
+ * Transfer an Algorand Standard Asset.
274
+ *
275
+ * @param params The parameters for the asset transfer transaction
276
+ *
277
+ * @example Basic example
278
+ * ```typescript
279
+ * await algorand.send.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
280
+ * ```
281
+ * @example Advanced example (with clawback)
282
+ * ```typescript
283
+ * await algorand.send.assetTransfer({
284
+ * sender: 'CLAWBACKADDRESS',
285
+ * assetId: 123456n,
286
+ * amount: 1n,
287
+ * receiver: 'RECEIVERADDRESS',
288
+ * clawbackTarget: 'HOLDERADDRESS',
289
+ * // This field needs to be used with caution
290
+ * closeAssetTo: 'ADDRESSTOCLOSETO'
291
+ * lease: 'lease',
292
+ * note: 'note',
293
+ * // You wouldn't normally set this field
294
+ * firstValidRound: 1000n,
295
+ * validityWindow: 10,
296
+ * extraFee: (1000).microAlgo(),
297
+ * staticFee: (1000).microAlgo(),
298
+ * // Max fee doesn't make sense with extraFee AND staticFee
299
+ * // already specified, but here for completeness
300
+ * maxFee: (3000).microAlgo(),
301
+ * // Signer only needed if you want to provide one,
302
+ * // generally you'd register it with AlgorandClient
303
+ * // against the sender and not need to pass it in
304
+ * signer: transactionSigner,
305
+ * maxRoundsToWaitForConfirmation: 5,
306
+ * suppressLog: true,
307
+ * })
308
+ * ```
309
+ * @returns The result of the asset transfer transaction and the transaction that was sent
310
+ */
311
+ assetTransfer: (params: CommonTransactionParams & {
312
+ assetId: bigint;
313
+ amount: bigint;
314
+ receiver: string | Address;
315
+ clawbackTarget?: string | Address;
316
+ closeAssetTo?: string | Address;
317
+ } & SendParams) => Promise<SendSingleTransactionResult>;
318
+ /**
319
+ * Opt an account into an Algorand Standard Asset.
320
+ *
321
+ * @param params The parameters for the asset opt-in transaction
322
+ *
323
+ * @example Basic example
324
+ * ```typescript
325
+ * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
326
+ * ```
327
+ * @example Advanced example
328
+ * ```typescript
329
+ * await algorand.send.assetOptIn({
330
+ * sender: 'SENDERADDRESS',
331
+ * assetId: 123456n,
332
+ * lease: 'lease',
333
+ * note: 'note',
334
+ * // You wouldn't normally set this field
335
+ * firstValidRound: 1000n,
336
+ * validityWindow: 10,
337
+ * extraFee: (1000).microAlgo(),
338
+ * staticFee: (1000).microAlgo(),
339
+ * // Max fee doesn't make sense with extraFee AND staticFee
340
+ * // already specified, but here for completeness
341
+ * maxFee: (3000).microAlgo(),
342
+ * // Signer only needed if you want to provide one,
343
+ * // generally you'd register it with AlgorandClient
344
+ * // against the sender and not need to pass it in
345
+ * signer: transactionSigner,
346
+ * maxRoundsToWaitForConfirmation: 5,
347
+ * suppressLog: true,
348
+ * })
349
+ * ```
350
+ * @returns The result of the asset opt-in transaction and the transaction that was sent
351
+ */
352
+ assetOptIn: (params: CommonTransactionParams & {
353
+ assetId: bigint;
354
+ } & SendParams) => Promise<SendSingleTransactionResult>;
355
+ /**
356
+ * Opt an account out of an Algorand Standard Asset.
357
+ *
358
+ * *Note:* If the account has a balance of the asset,
359
+ * it will not be able to opt-out unless `ensureZeroBalance`
360
+ * is set to `false` (but then the account will lose the assets).
361
+ *
362
+ * @param params The parameters for the asset opt-out transaction
363
+ *
364
+ * @example Basic example (without creator, will be retrieved from algod)
365
+ * ```typescript
366
+ * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
367
+ * ```
368
+ * @example Basic example (with creator)
369
+ * ```typescript
370
+ * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
371
+ * ```
372
+ * @example Advanced example
373
+ * ```typescript
374
+ * await algorand.send.assetOptOut({
375
+ * sender: 'SENDERADDRESS',
376
+ * assetId: 123456n,
377
+ * creator: 'CREATORADDRESS',
378
+ * ensureZeroBalance: true,
379
+ * lease: 'lease',
380
+ * note: 'note',
381
+ * // You wouldn't normally set this field
382
+ * firstValidRound: 1000n,
383
+ * validityWindow: 10,
384
+ * extraFee: (1000).microAlgo(),
385
+ * staticFee: (1000).microAlgo(),
386
+ * // Max fee doesn't make sense with extraFee AND staticFee
387
+ * // already specified, but here for completeness
388
+ * maxFee: (3000).microAlgo(),
389
+ * // Signer only needed if you want to provide one,
390
+ * // generally you'd register it with AlgorandClient
391
+ * // against the sender and not need to pass it in
392
+ * signer: transactionSigner,
393
+ * maxRoundsToWaitForConfirmation: 5,
394
+ * suppressLog: true,
395
+ * })
396
+ * ```
397
+ * @returns The result of the asset opt-out transaction and the transaction that was sent
398
+ */
399
+ assetOptOut: (params: Omit<AssetOptOutParams, "creator"> & {
400
+ /** Optional asset creator account address; if not specified it will be retrieved from algod */creator?: string | Address;
401
+ /** Whether or not to check if the account has a zero balance first or not.
233
402
  *
234
- * @param params The parameters for the asset destroy transaction
235
- *
236
- * @example Basic example
237
- * ```typescript
238
- * await algorand.send.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
239
- * ```
240
- * @example Advanced example
241
- * ```typescript
242
- * await algorand.send.assetDestroy({
243
- * sender: 'MANAGERADDRESS',
244
- * assetId: 123456n,
245
- * lease: 'lease',
246
- * note: 'note',
247
- * // You wouldn't normally set this field
248
- * firstValidRound: 1000n,
249
- * validityWindow: 10,
250
- * extraFee: (1000).microAlgo(),
251
- * staticFee: (1000).microAlgo(),
252
- * // Max fee doesn't make sense with extraFee AND staticFee
253
- * // already specified, but here for completeness
254
- * maxFee: (3000).microAlgo(),
255
- * // Signer only needed if you want to provide one,
256
- * // generally you'd register it with AlgorandClient
257
- * // against the sender and not need to pass it in
258
- * signer: transactionSigner,
259
- * maxRoundsToWaitForConfirmation: 5,
260
- * suppressLog: true,
261
- * })
262
- * ```
263
- * @returns The result of the asset destroy transaction and the transaction that was sent
264
- */
265
- assetDestroy: (params: import("./composer").CommonTransactionParams & {
266
- assetId: bigint;
267
- } & SendParams) => Promise<SendSingleTransactionResult>;
268
- /**
269
- * Transfer an Algorand Standard Asset.
270
- *
271
- * @param params The parameters for the asset transfer transaction
272
- *
273
- * @example Basic example
274
- * ```typescript
275
- * await algorand.send.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
276
- * ```
277
- * @example Advanced example (with clawback)
278
- * ```typescript
279
- * await algorand.send.assetTransfer({
280
- * sender: 'CLAWBACKADDRESS',
281
- * assetId: 123456n,
282
- * amount: 1n,
283
- * receiver: 'RECEIVERADDRESS',
284
- * clawbackTarget: 'HOLDERADDRESS',
285
- * // This field needs to be used with caution
286
- * closeAssetTo: 'ADDRESSTOCLOSETO'
287
- * lease: 'lease',
288
- * note: 'note',
289
- * // You wouldn't normally set this field
290
- * firstValidRound: 1000n,
291
- * validityWindow: 10,
292
- * extraFee: (1000).microAlgo(),
293
- * staticFee: (1000).microAlgo(),
294
- * // Max fee doesn't make sense with extraFee AND staticFee
295
- * // already specified, but here for completeness
296
- * maxFee: (3000).microAlgo(),
297
- * // Signer only needed if you want to provide one,
298
- * // generally you'd register it with AlgorandClient
299
- * // against the sender and not need to pass it in
300
- * signer: transactionSigner,
301
- * maxRoundsToWaitForConfirmation: 5,
302
- * suppressLog: true,
303
- * })
304
- * ```
305
- * @returns The result of the asset transfer transaction and the transaction that was sent
306
- */
307
- assetTransfer: (params: import("./composer").CommonTransactionParams & {
308
- assetId: bigint;
309
- amount: bigint;
310
- receiver: string | algosdk.Address;
311
- clawbackTarget?: string | algosdk.Address | undefined;
312
- closeAssetTo?: string | algosdk.Address | undefined;
313
- } & SendParams) => Promise<SendSingleTransactionResult>;
314
- /**
315
- * Opt an account into an Algorand Standard Asset.
403
+ * If this is set to `true` and the account has an asset balance it will throw an error.
316
404
  *
317
- * @param params The parameters for the asset opt-in transaction
318
- *
319
- * @example Basic example
320
- * ```typescript
321
- * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
322
- * ```
323
- * @example Advanced example
324
- * ```typescript
325
- * await algorand.send.assetOptIn({
326
- * sender: 'SENDERADDRESS',
327
- * assetId: 123456n,
328
- * lease: 'lease',
329
- * note: 'note',
330
- * // You wouldn't normally set this field
331
- * firstValidRound: 1000n,
332
- * validityWindow: 10,
333
- * extraFee: (1000).microAlgo(),
334
- * staticFee: (1000).microAlgo(),
335
- * // Max fee doesn't make sense with extraFee AND staticFee
336
- * // already specified, but here for completeness
337
- * maxFee: (3000).microAlgo(),
338
- * // Signer only needed if you want to provide one,
339
- * // generally you'd register it with AlgorandClient
340
- * // against the sender and not need to pass it in
341
- * signer: transactionSigner,
342
- * maxRoundsToWaitForConfirmation: 5,
343
- * suppressLog: true,
344
- * })
345
- * ```
346
- * @returns The result of the asset opt-in transaction and the transaction that was sent
347
- */
348
- assetOptIn: (params: import("./composer").CommonTransactionParams & {
349
- assetId: bigint;
350
- } & SendParams) => Promise<SendSingleTransactionResult>;
351
- /**
352
- * Opt an account out of an Algorand Standard Asset.
353
- *
354
- * *Note:* If the account has a balance of the asset,
355
- * it will not be able to opt-out unless `ensureZeroBalance`
356
- * is set to `false` (but then the account will lose the assets).
357
- *
358
- * @param params The parameters for the asset opt-out transaction
359
- *
360
- * @example Basic example (without creator, will be retrieved from algod)
361
- * ```typescript
362
- * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
363
- * ```
364
- * @example Basic example (with creator)
365
- * ```typescript
366
- * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
367
- * ```
368
- * @example Advanced example
369
- * ```typescript
370
- * await algorand.send.assetOptOut({
371
- * sender: 'SENDERADDRESS',
372
- * assetId: 123456n,
373
- * creator: 'CREATORADDRESS',
374
- * ensureZeroBalance: true,
375
- * lease: 'lease',
376
- * note: 'note',
377
- * // You wouldn't normally set this field
378
- * firstValidRound: 1000n,
379
- * validityWindow: 10,
380
- * extraFee: (1000).microAlgo(),
381
- * staticFee: (1000).microAlgo(),
382
- * // Max fee doesn't make sense with extraFee AND staticFee
383
- * // already specified, but here for completeness
384
- * maxFee: (3000).microAlgo(),
385
- * // Signer only needed if you want to provide one,
386
- * // generally you'd register it with AlgorandClient
387
- * // against the sender and not need to pass it in
388
- * signer: transactionSigner,
389
- * maxRoundsToWaitForConfirmation: 5,
390
- * suppressLog: true,
391
- * })
392
- * ```
393
- * @returns The result of the asset opt-out transaction and the transaction that was sent
394
- */
395
- assetOptOut: (params: Omit<AssetOptOutParams, 'creator'> & {
396
- /** Optional asset creator account address; if not specified it will be retrieved from algod */
397
- creator?: string | Address;
398
- /** Whether or not to check if the account has a zero balance first or not.
399
- *
400
- * If this is set to `true` and the account has an asset balance it will throw an error.
401
- *
402
- * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.
403
- */
404
- ensureZeroBalance: boolean;
405
- } & SendParams) => Promise<{
406
- groupId: string;
407
- txIds: string[];
408
- returns?: import("./app").ABIReturn[] | undefined;
409
- confirmations: algosdk.modelsv2.PendingTransactionResponse[];
410
- transactions: algosdk.Transaction[];
411
- confirmation: algosdk.modelsv2.PendingTransactionResponse;
412
- transaction: algosdk.Transaction;
413
- }>;
414
- /**
415
- * Create a smart contract.
416
- *
417
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
418
- *
419
- * @param params The parameters for the app creation transaction
420
- * @example Basic example
421
- * ```typescript
422
- * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
423
- * const createdAppId = result.appId
424
- * ```
425
- * @example Advanced example
426
- * ```typescript
427
- * await algorand.send.appCreate({
428
- * sender: 'CREATORADDRESS',
429
- * approvalProgram: "TEALCODE",
430
- * clearStateProgram: "TEALCODE",
431
- * schema: {
432
- * globalInts: 1,
433
- * globalByteSlices: 2,
434
- * localInts: 3,
435
- * localByteSlices: 4
436
- * },
437
- * extraProgramPages: 1,
438
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
439
- * args: [new Uint8Array(1, 2, 3, 4)]
440
- * accountReferences: ["ACCOUNT_1"]
441
- * appReferences: [123n, 1234n]
442
- * assetReferences: [12345n]
443
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
444
- * accessReferences: [{ appId: 1234n }]
445
- * lease: 'lease',
446
- * note: 'note',
447
- * // You wouldn't normally set this field
448
- * firstValidRound: 1000n,
449
- * validityWindow: 10,
450
- * extraFee: (1000).microAlgo(),
451
- * staticFee: (1000).microAlgo(),
452
- * // Max fee doesn't make sense with extraFee AND staticFee
453
- * // already specified, but here for completeness
454
- * maxFee: (3000).microAlgo(),
455
- * rejectVersion: 1,
456
- * // Signer only needed if you want to provide one,
457
- * // generally you'd register it with AlgorandClient
458
- * // against the sender and not need to pass it in
459
- * signer: transactionSigner,
460
- * maxRoundsToWaitForConfirmation: 5,
461
- * suppressLog: true,
462
- *})
463
- * ```
464
- * @returns The result of the app create transaction and the transaction that was sent
465
- */
466
- appCreate: (params: {
467
- sender: string | algosdk.Address;
468
- maxFee?: import("./amount").AlgoAmount | undefined;
469
- note?: string | Uint8Array | undefined;
470
- args?: Uint8Array[] | undefined;
471
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
472
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
473
- rejectVersion?: number | undefined;
474
- lease?: string | Uint8Array | undefined;
475
- rekeyTo?: string | algosdk.Address | undefined;
476
- staticFee?: import("./amount").AlgoAmount | undefined;
477
- extraFee?: import("./amount").AlgoAmount | undefined;
478
- validityWindow?: number | bigint | undefined;
479
- firstValidRound?: bigint | undefined;
480
- lastValidRound?: bigint | undefined;
481
- accountReferences?: (string | algosdk.Address)[] | undefined;
482
- appReferences?: bigint[] | undefined;
483
- assetReferences?: bigint[] | undefined;
484
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
485
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
486
- approvalProgram: string | Uint8Array;
487
- clearStateProgram: string | Uint8Array;
488
- schema?: {
489
- globalInts: number;
490
- globalByteSlices: number;
491
- localInts: number;
492
- localByteSlices: number;
493
- } | undefined;
494
- extraProgramPages?: number | undefined;
495
- } & SendParams) => Promise<SendAppCreateTransactionResult>;
496
- /**
497
- * Update a smart contract.
498
- *
499
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
500
- *
501
- * @param params The parameters for the app update transaction
502
- * @example Basic example
503
- * ```typescript
504
- * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
505
- * ```
506
- * @example Advanced example
507
- * ```typescript
508
- * await algorand.send.appUpdate({
509
- * sender: 'CREATORADDRESS',
510
- * approvalProgram: "TEALCODE",
511
- * clearStateProgram: "TEALCODE",
512
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
513
- * args: [new Uint8Array(1, 2, 3, 4)]
514
- * accountReferences: ["ACCOUNT_1"]
515
- * appReferences: [123n, 1234n]
516
- * assetReferences: [12345n]
517
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
518
- * accessReferences: [{ appId: 1234n }]
519
- * lease: 'lease',
520
- * note: 'note',
521
- * // You wouldn't normally set this field
522
- * firstValidRound: 1000n,
523
- * validityWindow: 10,
524
- * extraFee: (1000).microAlgo(),
525
- * staticFee: (1000).microAlgo(),
526
- * // Max fee doesn't make sense with extraFee AND staticFee
527
- * // already specified, but here for completeness
528
- * maxFee: (3000).microAlgo(),
529
- * rejectVersion: 1,
530
- * // Signer only needed if you want to provide one,
531
- * // generally you'd register it with AlgorandClient
532
- * // against the sender and not need to pass it in
533
- * signer: transactionSigner,
534
- * maxRoundsToWaitForConfirmation: 5,
535
- * suppressLog: true,
536
- *})
537
- * ```
538
- * @returns The result of the app update transaction and the transaction that was sent
539
- */
540
- appUpdate: (params: {
541
- sender: string | algosdk.Address;
542
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
543
- rekeyTo?: string | algosdk.Address | undefined;
544
- note?: string | Uint8Array | undefined;
545
- lease?: string | Uint8Array | undefined;
546
- staticFee?: import("./amount").AlgoAmount | undefined;
547
- extraFee?: import("./amount").AlgoAmount | undefined;
548
- maxFee?: import("./amount").AlgoAmount | undefined;
549
- validityWindow?: number | bigint | undefined;
550
- firstValidRound?: bigint | undefined;
551
- lastValidRound?: bigint | undefined;
552
- appId: bigint;
553
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
554
- args?: Uint8Array[] | undefined;
555
- accountReferences?: (string | algosdk.Address)[] | undefined;
556
- appReferences?: bigint[] | undefined;
557
- assetReferences?: bigint[] | undefined;
558
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
559
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
560
- rejectVersion?: number | undefined;
561
- approvalProgram: string | Uint8Array;
562
- clearStateProgram: string | Uint8Array;
563
- } & SendParams) => Promise<SendAppUpdateTransactionResult>;
564
- /**
565
- * Delete a smart contract.
566
- *
567
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
568
- *
569
- * @param params The parameters for the app deletion transaction
570
- * @example Basic example
571
- * ```typescript
572
- * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })
573
- * ```
574
- * @example Advanced example
575
- * ```typescript
576
- * await algorand.send.appDelete({
577
- * sender: 'CREATORADDRESS',
578
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
579
- * args: [new Uint8Array(1, 2, 3, 4)]
580
- * accountReferences: ["ACCOUNT_1"]
581
- * appReferences: [123n, 1234n]
582
- * assetReferences: [12345n]
583
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
584
- * accessReferences: [{ appId: 1234n }]
585
- * lease: 'lease',
586
- * note: 'note',
587
- * // You wouldn't normally set this field
588
- * firstValidRound: 1000n,
589
- * validityWindow: 10,
590
- * extraFee: (1000).microAlgo(),
591
- * staticFee: (1000).microAlgo(),
592
- * // Max fee doesn't make sense with extraFee AND staticFee
593
- * // already specified, but here for completeness
594
- * maxFee: (3000).microAlgo(),
595
- * rejectVersion: 1,
596
- * // Signer only needed if you want to provide one,
597
- * // generally you'd register it with AlgorandClient
598
- * // against the sender and not need to pass it in
599
- * signer: transactionSigner,
600
- * maxRoundsToWaitForConfirmation: 5,
601
- * suppressLog: true,
602
- *})
603
- * ```
604
- * @returns The result of the app delete transaction and the transaction that was sent
605
- */
606
- appDelete: (params: import("./composer").CommonTransactionParams & {
607
- appId: bigint;
608
- onComplete?: algosdk.OnApplicationComplete | undefined;
609
- args?: Uint8Array[] | undefined;
610
- accountReferences?: (string | algosdk.Address)[] | undefined;
611
- appReferences?: bigint[] | undefined;
612
- assetReferences?: bigint[] | undefined;
613
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
614
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
615
- /**
616
- * Opt an account into an Algorand Standard Asset.
617
- *
618
- * @param params The parameters for the asset opt-in transaction
619
- *
620
- * @example Basic example
621
- * ```typescript
622
- * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
623
- * ```
624
- * @example Advanced example
625
- * ```typescript
626
- * await algorand.send.assetOptIn({
627
- * sender: 'SENDERADDRESS',
628
- * assetId: 123456n,
629
- * lease: 'lease',
630
- * note: 'note',
631
- * // You wouldn't normally set this field
632
- * firstValidRound: 1000n,
633
- * validityWindow: 10,
634
- * extraFee: (1000).microAlgo(),
635
- * staticFee: (1000).microAlgo(),
636
- * // Max fee doesn't make sense with extraFee AND staticFee
637
- * // already specified, but here for completeness
638
- * maxFee: (3000).microAlgo(),
639
- * // Signer only needed if you want to provide one,
640
- * // generally you'd register it with AlgorandClient
641
- * // against the sender and not need to pass it in
642
- * signer: transactionSigner,
643
- * maxRoundsToWaitForConfirmation: 5,
644
- * suppressLog: true,
645
- * })
646
- * ```
647
- * @returns The result of the asset opt-in transaction and the transaction that was sent
648
- */
649
- rejectVersion?: number | undefined;
650
- } & {
651
- onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
652
- } & SendParams) => Promise<SendAppTransactionResult>;
653
- /**
654
- * Call a smart contract.
655
- *
656
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
657
- *
658
- * @param params The parameters for the app call transaction
659
- * @example Basic example
660
- * ```typescript
661
- * await algorand.send.appCall({ sender: 'CREATORADDRESS' })
662
- * ```
663
- * @example Advanced example
664
- * ```typescript
665
- * await algorand.send.appCall({
666
- * sender: 'CREATORADDRESS',
667
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
668
- * args: [new Uint8Array(1, 2, 3, 4)]
669
- * accountReferences: ["ACCOUNT_1"]
670
- * appReferences: [123n, 1234n]
671
- * assetReferences: [12345n]
672
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
673
- * accessReferences: [{ appId: 1234n }]
674
- * lease: 'lease',
675
- * note: 'note',
676
- * // You wouldn't normally set this field
677
- * firstValidRound: 1000n,
678
- * validityWindow: 10,
679
- * extraFee: (1000).microAlgo(),
680
- * staticFee: (1000).microAlgo(),
681
- * // Max fee doesn't make sense with extraFee AND staticFee
682
- * // already specified, but here for completeness
683
- * maxFee: (3000).microAlgo(),
684
- * rejectVersion: 1,
685
- * // Signer only needed if you want to provide one,
686
- * // generally you'd register it with AlgorandClient
687
- * // against the sender and not need to pass it in
688
- * signer: transactionSigner,
689
- * maxRoundsToWaitForConfirmation: 5,
690
- * suppressLog: true,
691
- *})
692
- * ```
693
- * @returns The result of the app call transaction and the transaction that was sent
694
- */
695
- appCall: (params: import("./composer").CommonTransactionParams & {
696
- appId: bigint;
697
- onComplete?: algosdk.OnApplicationComplete | undefined;
698
- args?: Uint8Array[] | undefined;
699
- accountReferences?: (string | algosdk.Address)[] | undefined;
700
- appReferences?: bigint[] | undefined;
701
- assetReferences?: bigint[] | undefined;
702
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
703
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
704
- /**
705
- * Opt an account into an Algorand Standard Asset.
706
- *
707
- * @param params The parameters for the asset opt-in transaction
708
- *
709
- * @example Basic example
710
- * ```typescript
711
- * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
712
- * ```
713
- * @example Advanced example
714
- * ```typescript
715
- * await algorand.send.assetOptIn({
716
- * sender: 'SENDERADDRESS',
717
- * assetId: 123456n,
718
- * lease: 'lease',
719
- * note: 'note',
720
- * // You wouldn't normally set this field
721
- * firstValidRound: 1000n,
722
- * validityWindow: 10,
723
- * extraFee: (1000).microAlgo(),
724
- * staticFee: (1000).microAlgo(),
725
- * // Max fee doesn't make sense with extraFee AND staticFee
726
- * // already specified, but here for completeness
727
- * maxFee: (3000).microAlgo(),
728
- * // Signer only needed if you want to provide one,
729
- * // generally you'd register it with AlgorandClient
730
- * // against the sender and not need to pass it in
731
- * signer: transactionSigner,
732
- * maxRoundsToWaitForConfirmation: 5,
733
- * suppressLog: true,
734
- * })
735
- * ```
736
- * @returns The result of the asset opt-in transaction and the transaction that was sent
737
- */
738
- rejectVersion?: number | undefined;
739
- } & {
740
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.ClearStateOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
741
- } & SendParams) => Promise<SendAppTransactionResult>;
742
- /**
743
- * Create a smart contract via an ABI method.
744
- *
745
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
746
- *
747
- * @param params The parameters for the app creation transaction
748
- * @example Basic example
749
- * ```typescript
750
- * const method = new ABIMethod({
751
- * name: 'method',
752
- * args: [{ name: 'arg1', type: 'string' }],
753
- * returns: { type: 'string' },
754
- * })
755
- * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
756
- * const createdAppId = result.appId
757
- * ```
758
- * @example Advanced example
759
- * ```typescript
760
- * const method = new ABIMethod({
761
- * name: 'method',
762
- * args: [{ name: 'arg1', type: 'string' }],
763
- * returns: { type: 'string' },
764
- * })
765
- * await algorand.send.appCreateMethodCall({
766
- * sender: 'CREATORADDRESS',
767
- * method: method,
768
- * args: ["arg1_value"],
769
- * approvalProgram: "TEALCODE",
770
- * clearStateProgram: "TEALCODE",
771
- * schema: {
772
- * globalInts: 1,
773
- * globalByteSlices: 2,
774
- * localInts: 3,
775
- * localByteSlices: 4
776
- * },
777
- * extraProgramPages: 1,
778
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
779
- * args: [new Uint8Array(1, 2, 3, 4)]
780
- * accountReferences: ["ACCOUNT_1"]
781
- * appReferences: [123n, 1234n]
782
- * assetReferences: [12345n]
783
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
784
- * accessReferences: [{ appId: 1234n }]
785
- * lease: 'lease',
786
- * note: 'note',
787
- * // You wouldn't normally set this field
788
- * firstValidRound: 1000n,
789
- * validityWindow: 10,
790
- * extraFee: (1000).microAlgo(),
791
- * staticFee: (1000).microAlgo(),
792
- * // Max fee doesn't make sense with extraFee AND staticFee
793
- * // already specified, but here for completeness
794
- * maxFee: (3000).microAlgo(),
795
- * rejectVersion: 1,
796
- * // Signer only needed if you want to provide one,
797
- * // generally you'd register it with AlgorandClient
798
- * // against the sender and not need to pass it in
799
- * signer: transactionSigner,
800
- * maxRoundsToWaitForConfirmation: 5,
801
- * suppressLog: true,
802
- *})
803
- * ```
804
- * @returns The result of the application ABI method create transaction and the transaction that was sent
805
- */
806
- appCreateMethodCall: (params: {
807
- sender: string | algosdk.Address;
808
- maxFee?: import("./amount").AlgoAmount | undefined;
809
- approvalProgram: string | Uint8Array;
810
- clearStateProgram: string | Uint8Array;
811
- note?: string | Uint8Array | undefined;
812
- schema?: {
813
- globalInts: number;
814
- globalByteSlices: number;
815
- localInts: number;
816
- localByteSlices: number;
817
- } | undefined;
818
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
819
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
820
- rejectVersion?: number | undefined;
821
- lease?: string | Uint8Array | undefined;
822
- rekeyTo?: string | algosdk.Address | undefined;
823
- extraProgramPages?: number | undefined;
824
- staticFee?: import("./amount").AlgoAmount | undefined;
825
- extraFee?: import("./amount").AlgoAmount | undefined;
826
- validityWindow?: number | bigint | undefined;
827
- firstValidRound?: bigint | undefined;
828
- lastValidRound?: bigint | undefined;
829
- accountReferences?: (string | algosdk.Address)[] | undefined;
830
- appReferences?: bigint[] | undefined;
831
- assetReferences?: bigint[] | undefined;
832
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
833
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
834
- } & {
835
- method: algosdk.ABIMethod;
836
- args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
837
- sender: string | algosdk.Address;
838
- maxFee?: import("./amount").AlgoAmount | undefined;
839
- note?: string | Uint8Array | undefined;
840
- args?: Uint8Array[] | undefined;
841
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
842
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
843
- rejectVersion?: number | undefined;
844
- lease?: string | Uint8Array | undefined;
845
- rekeyTo?: string | algosdk.Address | undefined;
846
- staticFee?: import("./amount").AlgoAmount | undefined;
847
- extraFee?: import("./amount").AlgoAmount | undefined;
848
- validityWindow?: number | bigint | undefined;
849
- firstValidRound?: bigint | undefined;
850
- lastValidRound?: bigint | undefined;
851
- accountReferences?: (string | algosdk.Address)[] | undefined;
852
- appReferences?: bigint[] | undefined;
853
- assetReferences?: bigint[] | undefined;
854
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
855
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
856
- approvalProgram: string | Uint8Array;
857
- clearStateProgram: string | Uint8Array;
858
- schema?: {
859
- globalInts: number;
860
- globalByteSlices: number;
861
- localInts: number;
862
- localByteSlices: number;
863
- } | undefined;
864
- extraProgramPages?: number | undefined;
865
- }> | import("./composer").AppMethodCall<{
866
- sender: string | algosdk.Address;
867
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
868
- rekeyTo?: string | algosdk.Address | undefined;
869
- note?: string | Uint8Array | undefined;
870
- lease?: string | Uint8Array | undefined;
871
- staticFee?: import("./amount").AlgoAmount | undefined;
872
- extraFee?: import("./amount").AlgoAmount | undefined;
873
- maxFee?: import("./amount").AlgoAmount | undefined;
874
- validityWindow?: number | bigint | undefined;
875
- firstValidRound?: bigint | undefined;
876
- lastValidRound?: bigint | undefined;
877
- appId: bigint;
878
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
879
- args?: Uint8Array[] | undefined;
880
- accountReferences?: (string | algosdk.Address)[] | undefined;
881
- appReferences?: bigint[] | undefined;
882
- assetReferences?: bigint[] | undefined;
883
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
884
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
885
- rejectVersion?: number | undefined;
886
- approvalProgram: string | Uint8Array;
887
- clearStateProgram: string | Uint8Array;
888
- }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
889
- } & SendParams) => Promise<SendAppCreateTransactionResult>;
890
- /**
891
- * Update a smart contract via an ABI method.
892
- *
893
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
894
- *
895
- * @param params The parameters for the app update transaction
896
- * @example Basic example
897
- * ```typescript
898
- * const method = new ABIMethod({
899
- * name: 'method',
900
- * args: [{ name: 'arg1', type: 'string' }],
901
- * returns: { type: 'string' },
902
- * })
903
- * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
904
- * ```
905
- * @example Advanced example
906
- * ```typescript
907
- * const method = new ABIMethod({
908
- * name: 'method',
909
- * args: [{ name: 'arg1', type: 'string' }],
910
- * returns: { type: 'string' },
911
- * })
912
- * await algorand.send.appUpdateMethodCall({
913
- * sender: 'CREATORADDRESS',
914
- * method: method,
915
- * args: ["arg1_value"],
916
- * approvalProgram: "TEALCODE",
917
- * clearStateProgram: "TEALCODE",
918
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
919
- * args: [new Uint8Array(1, 2, 3, 4)]
920
- * accountReferences: ["ACCOUNT_1"]
921
- * appReferences: [123n, 1234n]
922
- * assetReferences: [12345n]
923
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
924
- * accessReferences: [{ appId: 1234n }]
925
- * lease: 'lease',
926
- * note: 'note',
927
- * // You wouldn't normally set this field
928
- * firstValidRound: 1000n,
929
- * validityWindow: 10,
930
- * extraFee: (1000).microAlgo(),
931
- * staticFee: (1000).microAlgo(),
932
- * // Max fee doesn't make sense with extraFee AND staticFee
933
- * // already specified, but here for completeness
934
- * maxFee: (3000).microAlgo(),
935
- * rejectVersion: 1,
936
- * // Signer only needed if you want to provide one,
937
- * // generally you'd register it with AlgorandClient
938
- * // against the sender and not need to pass it in
939
- * signer: transactionSigner,
940
- * maxRoundsToWaitForConfirmation: 5,
941
- * suppressLog: true,
942
- *})
943
- * ```
944
- * @returns The result of the application ABI method update transaction and the transaction that was sent
945
- */
946
- appUpdateMethodCall: (params: {
947
- sender: string | algosdk.Address;
948
- maxFee?: import("./amount").AlgoAmount | undefined;
949
- approvalProgram: string | Uint8Array;
950
- clearStateProgram: string | Uint8Array;
951
- note?: string | Uint8Array | undefined;
952
- appId: bigint;
953
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
954
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
955
- rejectVersion?: number | undefined;
956
- lease?: string | Uint8Array | undefined;
957
- rekeyTo?: string | algosdk.Address | undefined;
958
- staticFee?: import("./amount").AlgoAmount | undefined;
959
- extraFee?: import("./amount").AlgoAmount | undefined;
960
- validityWindow?: number | bigint | undefined;
961
- firstValidRound?: bigint | undefined;
962
- lastValidRound?: bigint | undefined;
963
- accountReferences?: (string | algosdk.Address)[] | undefined;
964
- appReferences?: bigint[] | undefined;
965
- assetReferences?: bigint[] | undefined;
966
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
967
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
968
- } & {
969
- method: algosdk.ABIMethod;
970
- args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
971
- sender: string | algosdk.Address;
972
- maxFee?: import("./amount").AlgoAmount | undefined;
973
- note?: string | Uint8Array | undefined;
974
- args?: Uint8Array[] | undefined;
975
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
976
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
977
- rejectVersion?: number | undefined;
978
- lease?: string | Uint8Array | undefined;
979
- rekeyTo?: string | algosdk.Address | undefined;
980
- staticFee?: import("./amount").AlgoAmount | undefined;
981
- extraFee?: import("./amount").AlgoAmount | undefined;
982
- validityWindow?: number | bigint | undefined;
983
- firstValidRound?: bigint | undefined;
984
- lastValidRound?: bigint | undefined;
985
- accountReferences?: (string | algosdk.Address)[] | undefined;
986
- appReferences?: bigint[] | undefined;
987
- assetReferences?: bigint[] | undefined;
988
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
989
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
990
- approvalProgram: string | Uint8Array;
991
- clearStateProgram: string | Uint8Array;
992
- schema?: {
993
- globalInts: number;
994
- globalByteSlices: number;
995
- localInts: number;
996
- localByteSlices: number;
997
- } | undefined;
998
- extraProgramPages?: number | undefined;
999
- }> | import("./composer").AppMethodCall<{
1000
- sender: string | algosdk.Address;
1001
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1002
- rekeyTo?: string | algosdk.Address | undefined;
1003
- note?: string | Uint8Array | undefined;
1004
- lease?: string | Uint8Array | undefined;
1005
- staticFee?: import("./amount").AlgoAmount | undefined;
1006
- extraFee?: import("./amount").AlgoAmount | undefined;
1007
- maxFee?: import("./amount").AlgoAmount | undefined;
1008
- validityWindow?: number | bigint | undefined;
1009
- firstValidRound?: bigint | undefined;
1010
- lastValidRound?: bigint | undefined;
1011
- appId: bigint;
1012
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
1013
- args?: Uint8Array[] | undefined;
1014
- accountReferences?: (string | algosdk.Address)[] | undefined;
1015
- appReferences?: bigint[] | undefined;
1016
- assetReferences?: bigint[] | undefined;
1017
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1018
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1019
- rejectVersion?: number | undefined;
1020
- approvalProgram: string | Uint8Array;
1021
- clearStateProgram: string | Uint8Array;
1022
- }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
1023
- } & SendParams) => Promise<SendAppUpdateTransactionResult>;
1024
- /**
1025
- * Delete a smart contract via an ABI method.
1026
- *
1027
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
1028
- *
1029
- * @param params The parameters for the app deletion transaction
1030
- * @example Basic example
1031
- * ```typescript
1032
- * const method = new ABIMethod({
1033
- * name: 'method',
1034
- * args: [{ name: 'arg1', type: 'string' }],
1035
- * returns: { type: 'string' },
1036
- * })
1037
- * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
1038
- * ```
1039
- * @example Advanced example
1040
- * ```typescript
1041
- * const method = new ABIMethod({
1042
- * name: 'method',
1043
- * args: [{ name: 'arg1', type: 'string' }],
1044
- * returns: { type: 'string' },
1045
- * })
1046
- * await algorand.send.appDeleteMethodCall({
1047
- * sender: 'CREATORADDRESS',
1048
- * method: method,
1049
- * args: ["arg1_value"],
1050
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
1051
- * args: [new Uint8Array(1, 2, 3, 4)]
1052
- * accountReferences: ["ACCOUNT_1"]
1053
- * appReferences: [123n, 1234n]
1054
- * assetReferences: [12345n]
1055
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
1056
- * accessReferences: [{ appId: 1234n }]
1057
- * lease: 'lease',
1058
- * note: 'note',
1059
- * // You wouldn't normally set this field
1060
- * firstValidRound: 1000n,
1061
- * validityWindow: 10,
1062
- * extraFee: (1000).microAlgo(),
1063
- * staticFee: (1000).microAlgo(),
1064
- * // Max fee doesn't make sense with extraFee AND staticFee
1065
- * // already specified, but here for completeness
1066
- * maxFee: (3000).microAlgo(),
1067
- * rejectVersion: 1,
1068
- * // Signer only needed if you want to provide one,
1069
- * // generally you'd register it with AlgorandClient
1070
- * // against the sender and not need to pass it in
1071
- * signer: transactionSigner,
1072
- * maxRoundsToWaitForConfirmation: 5,
1073
- * suppressLog: true,
1074
- *})
1075
- * ```
1076
- * @returns The result of the application ABI method delete transaction and the transaction that was sent
1077
- */
1078
- appDeleteMethodCall: (params: {
1079
- sender: string | algosdk.Address;
1080
- maxFee?: import("./amount").AlgoAmount | undefined;
1081
- note?: string | Uint8Array | undefined;
1082
- appId: bigint;
1083
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1084
- onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1085
- rejectVersion?: number | undefined;
1086
- lease?: string | Uint8Array | undefined;
1087
- rekeyTo?: string | algosdk.Address | undefined;
1088
- staticFee?: import("./amount").AlgoAmount | undefined;
1089
- extraFee?: import("./amount").AlgoAmount | undefined;
1090
- validityWindow?: number | bigint | undefined;
1091
- firstValidRound?: bigint | undefined;
1092
- lastValidRound?: bigint | undefined;
1093
- accountReferences?: (string | algosdk.Address)[] | undefined;
1094
- appReferences?: bigint[] | undefined;
1095
- assetReferences?: bigint[] | undefined;
1096
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1097
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1098
- } & {
1099
- method: algosdk.ABIMethod;
1100
- args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
1101
- sender: string | algosdk.Address;
1102
- maxFee?: import("./amount").AlgoAmount | undefined;
1103
- note?: string | Uint8Array | undefined;
1104
- args?: Uint8Array[] | undefined;
1105
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1106
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1107
- rejectVersion?: number | undefined;
1108
- lease?: string | Uint8Array | undefined;
1109
- rekeyTo?: string | algosdk.Address | undefined;
1110
- staticFee?: import("./amount").AlgoAmount | undefined;
1111
- extraFee?: import("./amount").AlgoAmount | undefined;
1112
- validityWindow?: number | bigint | undefined;
1113
- firstValidRound?: bigint | undefined;
1114
- lastValidRound?: bigint | undefined;
1115
- accountReferences?: (string | algosdk.Address)[] | undefined;
1116
- appReferences?: bigint[] | undefined;
1117
- assetReferences?: bigint[] | undefined;
1118
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1119
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1120
- approvalProgram: string | Uint8Array;
1121
- clearStateProgram: string | Uint8Array;
1122
- schema?: {
1123
- globalInts: number;
1124
- globalByteSlices: number;
1125
- localInts: number;
1126
- localByteSlices: number;
1127
- } | undefined;
1128
- extraProgramPages?: number | undefined;
1129
- }> | import("./composer").AppMethodCall<{
1130
- sender: string | algosdk.Address;
1131
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1132
- rekeyTo?: string | algosdk.Address | undefined;
1133
- note?: string | Uint8Array | undefined;
1134
- lease?: string | Uint8Array | undefined;
1135
- staticFee?: import("./amount").AlgoAmount | undefined;
1136
- extraFee?: import("./amount").AlgoAmount | undefined;
1137
- maxFee?: import("./amount").AlgoAmount | undefined;
1138
- validityWindow?: number | bigint | undefined;
1139
- firstValidRound?: bigint | undefined;
1140
- lastValidRound?: bigint | undefined;
1141
- appId: bigint;
1142
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
1143
- args?: Uint8Array[] | undefined;
1144
- accountReferences?: (string | algosdk.Address)[] | undefined;
1145
- appReferences?: bigint[] | undefined;
1146
- assetReferences?: bigint[] | undefined;
1147
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1148
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1149
- rejectVersion?: number | undefined;
1150
- approvalProgram: string | Uint8Array;
1151
- clearStateProgram: string | Uint8Array;
1152
- }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
1153
- } & SendParams) => Promise<SendAppTransactionResult>;
1154
- /**
1155
- * Call a smart contract via an ABI method.
1156
- *
1157
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
1158
- *
1159
- * @param params The parameters for the app call transaction
1160
- * @example Basic example
1161
- * ```typescript
1162
- * const method = new ABIMethod({
1163
- * name: 'method',
1164
- * args: [{ name: 'arg1', type: 'string' }],
1165
- * returns: { type: 'string' },
1166
- * })
1167
- * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
1168
- * ```
1169
- * @example Advanced example
1170
- * ```typescript
1171
- * const method = new ABIMethod({
1172
- * name: 'method',
1173
- * args: [{ name: 'arg1', type: 'string' }],
1174
- * returns: { type: 'string' },
1175
- * })
1176
- * await algorand.send.appCallMethodCall({
1177
- * sender: 'CREATORADDRESS',
1178
- * method: method,
1179
- * args: ["arg1_value"],
1180
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
1181
- * args: [new Uint8Array(1, 2, 3, 4)]
1182
- * accountReferences: ["ACCOUNT_1"]
1183
- * appReferences: [123n, 1234n]
1184
- * assetReferences: [12345n]
1185
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
1186
- * accessReferences: [{ appId: 1234n }]
1187
- * lease: 'lease',
1188
- * note: 'note',
1189
- * // You wouldn't normally set this field
1190
- * firstValidRound: 1000n,
1191
- * validityWindow: 10,
1192
- * extraFee: (1000).microAlgo(),
1193
- * staticFee: (1000).microAlgo(),
1194
- * // Max fee doesn't make sense with extraFee AND staticFee
1195
- * // already specified, but here for completeness
1196
- * maxFee: (3000).microAlgo(),
1197
- * rejectVersion: 1,
1198
- * // Signer only needed if you want to provide one,
1199
- * // generally you'd register it with AlgorandClient
1200
- * // against the sender and not need to pass it in
1201
- * signer: transactionSigner,
1202
- * maxRoundsToWaitForConfirmation: 5,
1203
- * suppressLog: true,
1204
- *})
1205
- * ```
1206
- * @returns The result of the application ABI method call transaction and the transaction that was sent
1207
- */
1208
- appCallMethodCall: (params: {
1209
- sender: string | algosdk.Address;
1210
- maxFee?: import("./amount").AlgoAmount | undefined;
1211
- note?: string | Uint8Array | undefined;
1212
- appId: bigint;
1213
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1214
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1215
- rejectVersion?: number | undefined;
1216
- lease?: string | Uint8Array | undefined;
1217
- rekeyTo?: string | algosdk.Address | undefined;
1218
- staticFee?: import("./amount").AlgoAmount | undefined;
1219
- extraFee?: import("./amount").AlgoAmount | undefined;
1220
- validityWindow?: number | bigint | undefined;
1221
- firstValidRound?: bigint | undefined;
1222
- lastValidRound?: bigint | undefined;
1223
- accountReferences?: (string | algosdk.Address)[] | undefined;
1224
- appReferences?: bigint[] | undefined;
1225
- assetReferences?: bigint[] | undefined;
1226
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1227
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1228
- } & {
1229
- method: algosdk.ABIMethod;
1230
- args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
1231
- sender: string | algosdk.Address;
1232
- maxFee?: import("./amount").AlgoAmount | undefined;
1233
- note?: string | Uint8Array | undefined;
1234
- args?: Uint8Array[] | undefined;
1235
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1236
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1237
- rejectVersion?: number | undefined;
1238
- lease?: string | Uint8Array | undefined;
1239
- rekeyTo?: string | algosdk.Address | undefined;
1240
- staticFee?: import("./amount").AlgoAmount | undefined;
1241
- extraFee?: import("./amount").AlgoAmount | undefined;
1242
- validityWindow?: number | bigint | undefined;
1243
- firstValidRound?: bigint | undefined;
1244
- lastValidRound?: bigint | undefined;
1245
- accountReferences?: (string | algosdk.Address)[] | undefined;
1246
- appReferences?: bigint[] | undefined;
1247
- assetReferences?: bigint[] | undefined;
1248
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1249
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1250
- approvalProgram: string | Uint8Array;
1251
- clearStateProgram: string | Uint8Array;
1252
- schema?: {
1253
- globalInts: number;
1254
- globalByteSlices: number;
1255
- localInts: number;
1256
- localByteSlices: number;
1257
- } | undefined;
1258
- extraProgramPages?: number | undefined;
1259
- }> | import("./composer").AppMethodCall<{
1260
- sender: string | algosdk.Address;
1261
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1262
- rekeyTo?: string | algosdk.Address | undefined;
1263
- note?: string | Uint8Array | undefined;
1264
- lease?: string | Uint8Array | undefined;
1265
- staticFee?: import("./amount").AlgoAmount | undefined;
1266
- extraFee?: import("./amount").AlgoAmount | undefined;
1267
- maxFee?: import("./amount").AlgoAmount | undefined;
1268
- validityWindow?: number | bigint | undefined;
1269
- firstValidRound?: bigint | undefined;
1270
- lastValidRound?: bigint | undefined;
1271
- appId: bigint;
1272
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
1273
- args?: Uint8Array[] | undefined;
1274
- accountReferences?: (string | algosdk.Address)[] | undefined;
1275
- appReferences?: bigint[] | undefined;
1276
- assetReferences?: bigint[] | undefined;
1277
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1278
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1279
- rejectVersion?: number | undefined;
1280
- approvalProgram: string | Uint8Array;
1281
- clearStateProgram: string | Uint8Array;
1282
- }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
1283
- } & SendParams) => Promise<SendAppTransactionResult>;
1284
- /**
1285
- * Register an online key.
1286
- * @param params The parameters for the key registration transaction
1287
- * @example Basic example
1288
- * ```typescript
1289
- * const result = await algorand.send.onlineKeyRegistration({
1290
- * sender: 'SENDERADDRESS',
1291
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1292
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1293
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1294
- * voteFirst: 1n,
1295
- * voteLast: 1000n,
1296
- * voteKeyDilution: 1n,
1297
- * })
1298
- * ```
1299
- * @example Advanced example
1300
- * ```typescript
1301
- * const result = await algorand.send.onlineKeyRegistration({
1302
- * sender: 'SENDERADDRESS',
1303
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1304
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1305
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1306
- * voteFirst: 1n,
1307
- * voteLast: 1000n,
1308
- * voteKeyDilution: 1n,
1309
- * lease: 'lease',
1310
- * note: 'note',
1311
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1312
- * rekeyTo: 'REKEYTOADDRESS',
1313
- * // You wouldn't normally set this field
1314
- * firstValidRound: 1000n,
1315
- * validityWindow: 10,
1316
- * extraFee: (1000).microAlgo(),
1317
- * staticFee: (1000).microAlgo(),
1318
- * // Max fee doesn't make sense with extraFee AND staticFee
1319
- * // already specified, but here for completeness
1320
- * maxFee: (3000).microAlgo(),
1321
- * })
1322
- * ```
1323
- * @returns The result of the online key registration transaction and the transaction that was sent
1324
- */
1325
- onlineKeyRegistration: (params: import("./composer").CommonTransactionParams & {
1326
- voteKey: Uint8Array;
1327
- selectionKey: Uint8Array;
1328
- voteFirst: bigint;
1329
- voteLast: bigint;
1330
- voteKeyDilution: bigint;
1331
- stateProofKey?: Uint8Array | undefined;
1332
- } & SendParams) => Promise<SendSingleTransactionResult>;
1333
- /**
1334
- * Register an offline key.
1335
- * @param params The parameters for the key registration transaction
1336
- * @example Basic example
1337
- * ```typescript
1338
- * const result = await algorand.send.offlineKeyRegistration({
1339
- * sender: 'SENDERADDRESS',
1340
- * })
1341
- * ```
1342
- * @example Advanced example
1343
- * ```typescript
1344
- * const result = await algorand.send.offlineKeyRegistration({
1345
- * sender: 'SENDERADDRESS',
1346
- * lease: 'lease',
1347
- * note: 'note',
1348
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1349
- * rekeyTo: 'REKEYTOADDRESS',
1350
- * // You wouldn't normally set this field
1351
- * firstValidRound: 1000n,
1352
- * validityWindow: 10,
1353
- * extraFee: (1000).microAlgo(),
1354
- * staticFee: (1000).microAlgo(),
1355
- * // Max fee doesn't make sense with extraFee AND staticFee
1356
- * // already specified, but here for completeness
1357
- * maxFee: (3000).microAlgo(),
1358
- * })
1359
- * ```
1360
- * @returns The result of the offline key registration transaction and the transaction that was sent
405
+ * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.
1361
406
  */
1362
- offlineKeyRegistration: (params: import("./composer").CommonTransactionParams & {
1363
- preventAccountFromEverParticipatingAgain?: boolean | undefined;
1364
- } & SendParams) => Promise<SendSingleTransactionResult>;
407
+ ensureZeroBalance: boolean;
408
+ } & SendParams) => Promise<{
409
+ groupId: string;
410
+ txIds: string[];
411
+ returns?: ABIReturn[] | undefined;
412
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
413
+ transactions: Transaction[];
414
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
415
+ transaction: Transaction;
416
+ }>;
417
+ /**
418
+ * Create a smart contract.
419
+ *
420
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
421
+ *
422
+ * @param params The parameters for the app creation transaction
423
+ * @example Basic example
424
+ * ```typescript
425
+ * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
426
+ * const createdAppId = result.appId
427
+ * ```
428
+ * @example Advanced example
429
+ * ```typescript
430
+ * await algorand.send.appCreate({
431
+ * sender: 'CREATORADDRESS',
432
+ * approvalProgram: "TEALCODE",
433
+ * clearStateProgram: "TEALCODE",
434
+ * schema: {
435
+ * globalInts: 1,
436
+ * globalByteSlices: 2,
437
+ * localInts: 3,
438
+ * localByteSlices: 4
439
+ * },
440
+ * extraProgramPages: 1,
441
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
442
+ * args: [new Uint8Array(1, 2, 3, 4)]
443
+ * accountReferences: ["ACCOUNT_1"]
444
+ * appReferences: [123n, 1234n]
445
+ * assetReferences: [12345n]
446
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
447
+ * accessReferences: [{ appId: 1234n }]
448
+ * lease: 'lease',
449
+ * note: 'note',
450
+ * // You wouldn't normally set this field
451
+ * firstValidRound: 1000n,
452
+ * validityWindow: 10,
453
+ * extraFee: (1000).microAlgo(),
454
+ * staticFee: (1000).microAlgo(),
455
+ * // Max fee doesn't make sense with extraFee AND staticFee
456
+ * // already specified, but here for completeness
457
+ * maxFee: (3000).microAlgo(),
458
+ * rejectVersion: 1,
459
+ * // Signer only needed if you want to provide one,
460
+ * // generally you'd register it with AlgorandClient
461
+ * // against the sender and not need to pass it in
462
+ * signer: transactionSigner,
463
+ * maxRoundsToWaitForConfirmation: 5,
464
+ * suppressLog: true,
465
+ *})
466
+ * ```
467
+ * @returns The result of the app create transaction and the transaction that was sent
468
+ */
469
+ appCreate: (params: {
470
+ sender: string | Address;
471
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
472
+ rekeyTo?: (string | Address) | undefined;
473
+ note?: (Uint8Array | string) | undefined;
474
+ lease?: (Uint8Array | string) | undefined;
475
+ staticFee?: AlgoAmount | undefined;
476
+ extraFee?: AlgoAmount | undefined;
477
+ maxFee?: AlgoAmount | undefined;
478
+ validityWindow?: number | bigint | undefined;
479
+ firstValidRound?: bigint | undefined;
480
+ lastValidRound?: bigint | undefined;
481
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
482
+ args?: Uint8Array[] | undefined;
483
+ accountReferences?: (string | Address)[] | undefined;
484
+ appReferences?: bigint[] | undefined;
485
+ assetReferences?: bigint[] | undefined;
486
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
487
+ accessReferences?: ResourceReference[] | undefined;
488
+ rejectVersion?: number | undefined;
489
+ approvalProgram: string | Uint8Array;
490
+ clearStateProgram: string | Uint8Array;
491
+ schema?: {
492
+ globalInts: number;
493
+ globalByteSlices: number;
494
+ localInts: number;
495
+ localByteSlices: number;
496
+ } | undefined;
497
+ extraProgramPages?: number | undefined;
498
+ } & SendParams) => Promise<SendAppCreateTransactionResult>;
499
+ /**
500
+ * Update a smart contract.
501
+ *
502
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
503
+ *
504
+ * @param params The parameters for the app update transaction
505
+ * @example Basic example
506
+ * ```typescript
507
+ * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
508
+ * ```
509
+ * @example Advanced example
510
+ * ```typescript
511
+ * await algorand.send.appUpdate({
512
+ * sender: 'CREATORADDRESS',
513
+ * approvalProgram: "TEALCODE",
514
+ * clearStateProgram: "TEALCODE",
515
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
516
+ * args: [new Uint8Array(1, 2, 3, 4)]
517
+ * accountReferences: ["ACCOUNT_1"]
518
+ * appReferences: [123n, 1234n]
519
+ * assetReferences: [12345n]
520
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
521
+ * accessReferences: [{ appId: 1234n }]
522
+ * lease: 'lease',
523
+ * note: 'note',
524
+ * // You wouldn't normally set this field
525
+ * firstValidRound: 1000n,
526
+ * validityWindow: 10,
527
+ * extraFee: (1000).microAlgo(),
528
+ * staticFee: (1000).microAlgo(),
529
+ * // Max fee doesn't make sense with extraFee AND staticFee
530
+ * // already specified, but here for completeness
531
+ * maxFee: (3000).microAlgo(),
532
+ * rejectVersion: 1,
533
+ * // Signer only needed if you want to provide one,
534
+ * // generally you'd register it with AlgorandClient
535
+ * // against the sender and not need to pass it in
536
+ * signer: transactionSigner,
537
+ * maxRoundsToWaitForConfirmation: 5,
538
+ * suppressLog: true,
539
+ *})
540
+ * ```
541
+ * @returns The result of the app update transaction and the transaction that was sent
542
+ */
543
+ appUpdate: (params: {
544
+ sender: string | Address;
545
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
546
+ rekeyTo?: (string | Address) | undefined;
547
+ note?: (Uint8Array | string) | undefined;
548
+ lease?: (Uint8Array | string) | undefined;
549
+ staticFee?: AlgoAmount | undefined;
550
+ extraFee?: AlgoAmount | undefined;
551
+ maxFee?: AlgoAmount | undefined;
552
+ validityWindow?: number | bigint | undefined;
553
+ firstValidRound?: bigint | undefined;
554
+ lastValidRound?: bigint | undefined;
555
+ appId: bigint;
556
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
557
+ args?: Uint8Array[] | undefined;
558
+ accountReferences?: (string | Address)[] | undefined;
559
+ appReferences?: bigint[] | undefined;
560
+ assetReferences?: bigint[] | undefined;
561
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
562
+ accessReferences?: ResourceReference[] | undefined;
563
+ rejectVersion?: number | undefined;
564
+ approvalProgram: string | Uint8Array;
565
+ clearStateProgram: string | Uint8Array;
566
+ } & SendParams) => Promise<SendAppUpdateTransactionResult>;
567
+ /**
568
+ * Delete a smart contract.
569
+ *
570
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
571
+ *
572
+ * @param params The parameters for the app deletion transaction
573
+ * @example Basic example
574
+ * ```typescript
575
+ * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })
576
+ * ```
577
+ * @example Advanced example
578
+ * ```typescript
579
+ * await algorand.send.appDelete({
580
+ * sender: 'CREATORADDRESS',
581
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
582
+ * args: [new Uint8Array(1, 2, 3, 4)]
583
+ * accountReferences: ["ACCOUNT_1"]
584
+ * appReferences: [123n, 1234n]
585
+ * assetReferences: [12345n]
586
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
587
+ * accessReferences: [{ appId: 1234n }]
588
+ * lease: 'lease',
589
+ * note: 'note',
590
+ * // You wouldn't normally set this field
591
+ * firstValidRound: 1000n,
592
+ * validityWindow: 10,
593
+ * extraFee: (1000).microAlgo(),
594
+ * staticFee: (1000).microAlgo(),
595
+ * // Max fee doesn't make sense with extraFee AND staticFee
596
+ * // already specified, but here for completeness
597
+ * maxFee: (3000).microAlgo(),
598
+ * rejectVersion: 1,
599
+ * // Signer only needed if you want to provide one,
600
+ * // generally you'd register it with AlgorandClient
601
+ * // against the sender and not need to pass it in
602
+ * signer: transactionSigner,
603
+ * maxRoundsToWaitForConfirmation: 5,
604
+ * suppressLog: true,
605
+ *})
606
+ * ```
607
+ * @returns The result of the app delete transaction and the transaction that was sent
608
+ */
609
+ appDelete: (params: CommonTransactionParams & {
610
+ appId: bigint;
611
+ onComplete?: algosdk.OnApplicationComplete;
612
+ args?: Uint8Array[];
613
+ accountReferences?: (string | Address)[];
614
+ appReferences?: bigint[];
615
+ assetReferences?: bigint[];
616
+ boxReferences?: (BoxReference | BoxIdentifier)[];
617
+ accessReferences?: ResourceReference[];
618
+ rejectVersion?: number;
619
+ } & {
620
+ onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC;
621
+ } & SendParams) => Promise<SendAppTransactionResult>;
622
+ /**
623
+ * Call a smart contract.
624
+ *
625
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
626
+ *
627
+ * @param params The parameters for the app call transaction
628
+ * @example Basic example
629
+ * ```typescript
630
+ * await algorand.send.appCall({ sender: 'CREATORADDRESS' })
631
+ * ```
632
+ * @example Advanced example
633
+ * ```typescript
634
+ * await algorand.send.appCall({
635
+ * sender: 'CREATORADDRESS',
636
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
637
+ * args: [new Uint8Array(1, 2, 3, 4)]
638
+ * accountReferences: ["ACCOUNT_1"]
639
+ * appReferences: [123n, 1234n]
640
+ * assetReferences: [12345n]
641
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
642
+ * accessReferences: [{ appId: 1234n }]
643
+ * lease: 'lease',
644
+ * note: 'note',
645
+ * // You wouldn't normally set this field
646
+ * firstValidRound: 1000n,
647
+ * validityWindow: 10,
648
+ * extraFee: (1000).microAlgo(),
649
+ * staticFee: (1000).microAlgo(),
650
+ * // Max fee doesn't make sense with extraFee AND staticFee
651
+ * // already specified, but here for completeness
652
+ * maxFee: (3000).microAlgo(),
653
+ * rejectVersion: 1,
654
+ * // Signer only needed if you want to provide one,
655
+ * // generally you'd register it with AlgorandClient
656
+ * // against the sender and not need to pass it in
657
+ * signer: transactionSigner,
658
+ * maxRoundsToWaitForConfirmation: 5,
659
+ * suppressLog: true,
660
+ *})
661
+ * ```
662
+ * @returns The result of the app call transaction and the transaction that was sent
663
+ */
664
+ appCall: (params: CommonTransactionParams & {
665
+ appId: bigint;
666
+ onComplete?: algosdk.OnApplicationComplete;
667
+ args?: Uint8Array[];
668
+ accountReferences?: (string | Address)[];
669
+ appReferences?: bigint[];
670
+ assetReferences?: bigint[];
671
+ boxReferences?: (BoxReference | BoxIdentifier)[];
672
+ accessReferences?: ResourceReference[];
673
+ rejectVersion?: number;
674
+ } & {
675
+ onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC>;
676
+ } & SendParams) => Promise<SendAppTransactionResult>;
677
+ /**
678
+ * Create a smart contract via an ABI method.
679
+ *
680
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
681
+ *
682
+ * @param params The parameters for the app creation transaction
683
+ * @example Basic example
684
+ * ```typescript
685
+ * const method = new ABIMethod({
686
+ * name: 'method',
687
+ * args: [{ name: 'arg1', type: 'string' }],
688
+ * returns: { type: 'string' },
689
+ * })
690
+ * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
691
+ * const createdAppId = result.appId
692
+ * ```
693
+ * @example Advanced example
694
+ * ```typescript
695
+ * const method = new ABIMethod({
696
+ * name: 'method',
697
+ * args: [{ name: 'arg1', type: 'string' }],
698
+ * returns: { type: 'string' },
699
+ * })
700
+ * await algorand.send.appCreateMethodCall({
701
+ * sender: 'CREATORADDRESS',
702
+ * method: method,
703
+ * args: ["arg1_value"],
704
+ * approvalProgram: "TEALCODE",
705
+ * clearStateProgram: "TEALCODE",
706
+ * schema: {
707
+ * globalInts: 1,
708
+ * globalByteSlices: 2,
709
+ * localInts: 3,
710
+ * localByteSlices: 4
711
+ * },
712
+ * extraProgramPages: 1,
713
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
714
+ * args: [new Uint8Array(1, 2, 3, 4)]
715
+ * accountReferences: ["ACCOUNT_1"]
716
+ * appReferences: [123n, 1234n]
717
+ * assetReferences: [12345n]
718
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
719
+ * accessReferences: [{ appId: 1234n }]
720
+ * lease: 'lease',
721
+ * note: 'note',
722
+ * // You wouldn't normally set this field
723
+ * firstValidRound: 1000n,
724
+ * validityWindow: 10,
725
+ * extraFee: (1000).microAlgo(),
726
+ * staticFee: (1000).microAlgo(),
727
+ * // Max fee doesn't make sense with extraFee AND staticFee
728
+ * // already specified, but here for completeness
729
+ * maxFee: (3000).microAlgo(),
730
+ * rejectVersion: 1,
731
+ * // Signer only needed if you want to provide one,
732
+ * // generally you'd register it with AlgorandClient
733
+ * // against the sender and not need to pass it in
734
+ * signer: transactionSigner,
735
+ * maxRoundsToWaitForConfirmation: 5,
736
+ * suppressLog: true,
737
+ *})
738
+ * ```
739
+ * @returns The result of the application ABI method create transaction and the transaction that was sent
740
+ */
741
+ appCreateMethodCall: (params: {
742
+ sender: string | Address;
743
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
744
+ rekeyTo?: (string | Address) | undefined;
745
+ note?: (Uint8Array | string) | undefined;
746
+ lease?: (Uint8Array | string) | undefined;
747
+ staticFee?: AlgoAmount | undefined;
748
+ extraFee?: AlgoAmount | undefined;
749
+ maxFee?: AlgoAmount | undefined;
750
+ validityWindow?: number | bigint | undefined;
751
+ firstValidRound?: bigint | undefined;
752
+ lastValidRound?: bigint | undefined;
753
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
754
+ accountReferences?: (string | Address)[] | undefined;
755
+ appReferences?: bigint[] | undefined;
756
+ assetReferences?: bigint[] | undefined;
757
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
758
+ accessReferences?: ResourceReference[] | undefined;
759
+ rejectVersion?: number | undefined;
760
+ approvalProgram: string | Uint8Array;
761
+ clearStateProgram: string | Uint8Array;
762
+ schema?: {
763
+ globalInts: number;
764
+ globalByteSlices: number;
765
+ localInts: number;
766
+ localByteSlices: number;
767
+ } | undefined;
768
+ extraProgramPages?: number | undefined;
769
+ } & {
770
+ method: algosdk.ABIMethod;
771
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
772
+ } & SendParams) => Promise<SendAppCreateTransactionResult>;
773
+ /**
774
+ * Update a smart contract via an ABI method.
775
+ *
776
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
777
+ *
778
+ * @param params The parameters for the app update transaction
779
+ * @example Basic example
780
+ * ```typescript
781
+ * const method = new ABIMethod({
782
+ * name: 'method',
783
+ * args: [{ name: 'arg1', type: 'string' }],
784
+ * returns: { type: 'string' },
785
+ * })
786
+ * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
787
+ * ```
788
+ * @example Advanced example
789
+ * ```typescript
790
+ * const method = new ABIMethod({
791
+ * name: 'method',
792
+ * args: [{ name: 'arg1', type: 'string' }],
793
+ * returns: { type: 'string' },
794
+ * })
795
+ * await algorand.send.appUpdateMethodCall({
796
+ * sender: 'CREATORADDRESS',
797
+ * method: method,
798
+ * args: ["arg1_value"],
799
+ * approvalProgram: "TEALCODE",
800
+ * clearStateProgram: "TEALCODE",
801
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
802
+ * args: [new Uint8Array(1, 2, 3, 4)]
803
+ * accountReferences: ["ACCOUNT_1"]
804
+ * appReferences: [123n, 1234n]
805
+ * assetReferences: [12345n]
806
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
807
+ * accessReferences: [{ appId: 1234n }]
808
+ * lease: 'lease',
809
+ * note: 'note',
810
+ * // You wouldn't normally set this field
811
+ * firstValidRound: 1000n,
812
+ * validityWindow: 10,
813
+ * extraFee: (1000).microAlgo(),
814
+ * staticFee: (1000).microAlgo(),
815
+ * // Max fee doesn't make sense with extraFee AND staticFee
816
+ * // already specified, but here for completeness
817
+ * maxFee: (3000).microAlgo(),
818
+ * rejectVersion: 1,
819
+ * // Signer only needed if you want to provide one,
820
+ * // generally you'd register it with AlgorandClient
821
+ * // against the sender and not need to pass it in
822
+ * signer: transactionSigner,
823
+ * maxRoundsToWaitForConfirmation: 5,
824
+ * suppressLog: true,
825
+ *})
826
+ * ```
827
+ * @returns The result of the application ABI method update transaction and the transaction that was sent
828
+ */
829
+ appUpdateMethodCall: (params: {
830
+ appId: bigint;
831
+ sender: string | Address;
832
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
833
+ rekeyTo?: (string | Address) | undefined;
834
+ note?: (Uint8Array | string) | undefined;
835
+ lease?: (Uint8Array | string) | undefined;
836
+ staticFee?: AlgoAmount | undefined;
837
+ extraFee?: AlgoAmount | undefined;
838
+ maxFee?: AlgoAmount | undefined;
839
+ validityWindow?: number | bigint | undefined;
840
+ firstValidRound?: bigint | undefined;
841
+ lastValidRound?: bigint | undefined;
842
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
843
+ accountReferences?: (string | Address)[] | undefined;
844
+ appReferences?: bigint[] | undefined;
845
+ assetReferences?: bigint[] | undefined;
846
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
847
+ accessReferences?: ResourceReference[] | undefined;
848
+ rejectVersion?: number | undefined;
849
+ approvalProgram: string | Uint8Array;
850
+ clearStateProgram: string | Uint8Array;
851
+ } & {
852
+ method: algosdk.ABIMethod;
853
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
854
+ } & SendParams) => Promise<SendAppUpdateTransactionResult>;
855
+ /**
856
+ * Delete a smart contract via an ABI method.
857
+ *
858
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
859
+ *
860
+ * @param params The parameters for the app deletion transaction
861
+ * @example Basic example
862
+ * ```typescript
863
+ * const method = new ABIMethod({
864
+ * name: 'method',
865
+ * args: [{ name: 'arg1', type: 'string' }],
866
+ * returns: { type: 'string' },
867
+ * })
868
+ * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
869
+ * ```
870
+ * @example Advanced example
871
+ * ```typescript
872
+ * const method = new ABIMethod({
873
+ * name: 'method',
874
+ * args: [{ name: 'arg1', type: 'string' }],
875
+ * returns: { type: 'string' },
876
+ * })
877
+ * await algorand.send.appDeleteMethodCall({
878
+ * sender: 'CREATORADDRESS',
879
+ * method: method,
880
+ * args: ["arg1_value"],
881
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
882
+ * args: [new Uint8Array(1, 2, 3, 4)]
883
+ * accountReferences: ["ACCOUNT_1"]
884
+ * appReferences: [123n, 1234n]
885
+ * assetReferences: [12345n]
886
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
887
+ * accessReferences: [{ appId: 1234n }]
888
+ * lease: 'lease',
889
+ * note: 'note',
890
+ * // You wouldn't normally set this field
891
+ * firstValidRound: 1000n,
892
+ * validityWindow: 10,
893
+ * extraFee: (1000).microAlgo(),
894
+ * staticFee: (1000).microAlgo(),
895
+ * // Max fee doesn't make sense with extraFee AND staticFee
896
+ * // already specified, but here for completeness
897
+ * maxFee: (3000).microAlgo(),
898
+ * rejectVersion: 1,
899
+ * // Signer only needed if you want to provide one,
900
+ * // generally you'd register it with AlgorandClient
901
+ * // against the sender and not need to pass it in
902
+ * signer: transactionSigner,
903
+ * maxRoundsToWaitForConfirmation: 5,
904
+ * suppressLog: true,
905
+ *})
906
+ * ```
907
+ * @returns The result of the application ABI method delete transaction and the transaction that was sent
908
+ */
909
+ appDeleteMethodCall: (params: {
910
+ appId: bigint;
911
+ sender: string | Address;
912
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
913
+ rekeyTo?: (string | Address) | undefined;
914
+ note?: (Uint8Array | string) | undefined;
915
+ lease?: (Uint8Array | string) | undefined;
916
+ staticFee?: AlgoAmount | undefined;
917
+ extraFee?: AlgoAmount | undefined;
918
+ maxFee?: AlgoAmount | undefined;
919
+ validityWindow?: number | bigint | undefined;
920
+ firstValidRound?: bigint | undefined;
921
+ lastValidRound?: bigint | undefined;
922
+ onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
923
+ accountReferences?: (string | Address)[] | undefined;
924
+ appReferences?: bigint[] | undefined;
925
+ assetReferences?: bigint[] | undefined;
926
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
927
+ accessReferences?: ResourceReference[] | undefined;
928
+ rejectVersion?: number | undefined;
929
+ } & {
930
+ method: algosdk.ABIMethod;
931
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
932
+ } & SendParams) => Promise<SendAppTransactionResult>;
933
+ /**
934
+ * Call a smart contract via an ABI method.
935
+ *
936
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
937
+ *
938
+ * @param params The parameters for the app call transaction
939
+ * @example Basic example
940
+ * ```typescript
941
+ * const method = new ABIMethod({
942
+ * name: 'method',
943
+ * args: [{ name: 'arg1', type: 'string' }],
944
+ * returns: { type: 'string' },
945
+ * })
946
+ * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
947
+ * ```
948
+ * @example Advanced example
949
+ * ```typescript
950
+ * const method = new ABIMethod({
951
+ * name: 'method',
952
+ * args: [{ name: 'arg1', type: 'string' }],
953
+ * returns: { type: 'string' },
954
+ * })
955
+ * await algorand.send.appCallMethodCall({
956
+ * sender: 'CREATORADDRESS',
957
+ * method: method,
958
+ * args: ["arg1_value"],
959
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
960
+ * args: [new Uint8Array(1, 2, 3, 4)]
961
+ * accountReferences: ["ACCOUNT_1"]
962
+ * appReferences: [123n, 1234n]
963
+ * assetReferences: [12345n]
964
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
965
+ * accessReferences: [{ appId: 1234n }]
966
+ * lease: 'lease',
967
+ * note: 'note',
968
+ * // You wouldn't normally set this field
969
+ * firstValidRound: 1000n,
970
+ * validityWindow: 10,
971
+ * extraFee: (1000).microAlgo(),
972
+ * staticFee: (1000).microAlgo(),
973
+ * // Max fee doesn't make sense with extraFee AND staticFee
974
+ * // already specified, but here for completeness
975
+ * maxFee: (3000).microAlgo(),
976
+ * rejectVersion: 1,
977
+ * // Signer only needed if you want to provide one,
978
+ * // generally you'd register it with AlgorandClient
979
+ * // against the sender and not need to pass it in
980
+ * signer: transactionSigner,
981
+ * maxRoundsToWaitForConfirmation: 5,
982
+ * suppressLog: true,
983
+ *})
984
+ * ```
985
+ * @returns The result of the application ABI method call transaction and the transaction that was sent
986
+ */
987
+ appCallMethodCall: (params: {
988
+ appId: bigint;
989
+ sender: string | Address;
990
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
991
+ rekeyTo?: (string | Address) | undefined;
992
+ note?: (Uint8Array | string) | undefined;
993
+ lease?: (Uint8Array | string) | undefined;
994
+ staticFee?: AlgoAmount | undefined;
995
+ extraFee?: AlgoAmount | undefined;
996
+ maxFee?: AlgoAmount | undefined;
997
+ validityWindow?: number | bigint | undefined;
998
+ firstValidRound?: bigint | undefined;
999
+ lastValidRound?: bigint | undefined;
1000
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1001
+ accountReferences?: (string | Address)[] | undefined;
1002
+ appReferences?: bigint[] | undefined;
1003
+ assetReferences?: bigint[] | undefined;
1004
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
1005
+ accessReferences?: ResourceReference[] | undefined;
1006
+ rejectVersion?: number | undefined;
1007
+ } & {
1008
+ method: algosdk.ABIMethod;
1009
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
1010
+ } & SendParams) => Promise<SendAppTransactionResult>;
1011
+ /**
1012
+ * Register an online key.
1013
+ * @param params The parameters for the key registration transaction
1014
+ * @example Basic example
1015
+ * ```typescript
1016
+ * const result = await algorand.send.onlineKeyRegistration({
1017
+ * sender: 'SENDERADDRESS',
1018
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1019
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1020
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1021
+ * voteFirst: 1n,
1022
+ * voteLast: 1000n,
1023
+ * voteKeyDilution: 1n,
1024
+ * })
1025
+ * ```
1026
+ * @example Advanced example
1027
+ * ```typescript
1028
+ * const result = await algorand.send.onlineKeyRegistration({
1029
+ * sender: 'SENDERADDRESS',
1030
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1031
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1032
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1033
+ * voteFirst: 1n,
1034
+ * voteLast: 1000n,
1035
+ * voteKeyDilution: 1n,
1036
+ * lease: 'lease',
1037
+ * note: 'note',
1038
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1039
+ * rekeyTo: 'REKEYTOADDRESS',
1040
+ * // You wouldn't normally set this field
1041
+ * firstValidRound: 1000n,
1042
+ * validityWindow: 10,
1043
+ * extraFee: (1000).microAlgo(),
1044
+ * staticFee: (1000).microAlgo(),
1045
+ * // Max fee doesn't make sense with extraFee AND staticFee
1046
+ * // already specified, but here for completeness
1047
+ * maxFee: (3000).microAlgo(),
1048
+ * })
1049
+ * ```
1050
+ * @returns The result of the online key registration transaction and the transaction that was sent
1051
+ */
1052
+ onlineKeyRegistration: (params: CommonTransactionParams & {
1053
+ voteKey: Uint8Array;
1054
+ selectionKey: Uint8Array;
1055
+ voteFirst: bigint;
1056
+ voteLast: bigint;
1057
+ voteKeyDilution: bigint;
1058
+ stateProofKey?: Uint8Array;
1059
+ } & SendParams) => Promise<SendSingleTransactionResult>;
1060
+ /**
1061
+ * Register an offline key.
1062
+ * @param params The parameters for the key registration transaction
1063
+ * @example Basic example
1064
+ * ```typescript
1065
+ * const result = await algorand.send.offlineKeyRegistration({
1066
+ * sender: 'SENDERADDRESS',
1067
+ * })
1068
+ * ```
1069
+ * @example Advanced example
1070
+ * ```typescript
1071
+ * const result = await algorand.send.offlineKeyRegistration({
1072
+ * sender: 'SENDERADDRESS',
1073
+ * lease: 'lease',
1074
+ * note: 'note',
1075
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1076
+ * rekeyTo: 'REKEYTOADDRESS',
1077
+ * // You wouldn't normally set this field
1078
+ * firstValidRound: 1000n,
1079
+ * validityWindow: 10,
1080
+ * extraFee: (1000).microAlgo(),
1081
+ * staticFee: (1000).microAlgo(),
1082
+ * // Max fee doesn't make sense with extraFee AND staticFee
1083
+ * // already specified, but here for completeness
1084
+ * maxFee: (3000).microAlgo(),
1085
+ * })
1086
+ * ```
1087
+ * @returns The result of the offline key registration transaction and the transaction that was sent
1088
+ */
1089
+ offlineKeyRegistration: (params: CommonTransactionParams & {
1090
+ preventAccountFromEverParticipatingAgain?: boolean;
1091
+ } & SendParams) => Promise<SendSingleTransactionResult>;
1365
1092
  }
1093
+ //#endregion
1094
+ export { AlgorandClientTransactionSender };
1095
+ //# sourceMappingURL=algorand-client-transaction-sender.d.ts.map